/* Hivework Studio public site — v0.3 preview
   Tokens from brand kit v0.1.2 (DRAFT, not owner-approved). Not final.
   Copy from HOW-IT-WORKS-COPY-v0.9.md. */

/* --- tokens --- */
:root {
  --teal: #1C5A57;
  --deep: #123F3D;
  --cream: #F3E5CC;
  --paper: #FFF9F1;
  --ink: #1d2321;
  --gold: #E3A32B;          /* light and highlight only; never text on cream or paper */
  --gold-ink: #7A5300;      /* tool-only in the kit; listed here, not used as marketing text */
  --pale-lamp: #F1D08A;
  --shadow-tan: #D2AF6E;
  --mist: #2E6E69;
  --sage: #8DAFA9;

  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --font-body: "Figtree", "Source Sans 3", "Segoe UI", system-ui, sans-serif;

  --text-body: clamp(1.125rem, 0.55vw + 1.02rem, 1.5rem);      /* 18–24; ≥22 at 1366, 24 at 1920 */
  --text-lead: clamp(1.25rem, 0.7vw + 1.1rem, 1.75rem);       /* 20–28 */
  --text-display: clamp(2.5rem, 3.6vw + 1.2rem, 5.25rem);     /* 40–84 */
  --text-section: clamp(1.75rem, 1.6vw + 1.2rem, 2.75rem);    /* 28–44 */
  --text-step: clamp(1.375rem, 0.85vw + 1.15rem, 1.9rem);     /* titles, in proportion to 26px body */
  /* Step bodies: 18px floor, ≥22px at 1366, 26px at 1920. */
  --text-step-body: clamp(1.125rem, 0.65vw + 1rem, 1.625rem);
  --hex-w: max(2.75rem, calc(var(--text-step-body) * 2.6));   /* ≥44px; ~62px at 24px; ~67px at 26px */
  --hex-h: calc(var(--hex-w) * 1.1547005);                    /* pointy-top regular hex */
  --hex-gap: calc(var(--text-step-body) * 0.75);
  --step-num-size: calc(var(--text-step-body) * 1.1);
  --text-measure: 38em; /* ~70 characters; 988px at 26px step body */

  --page-pad-x: clamp(1.25rem, 5vw, 6rem);                    /* 20–96 */
  --gutter: clamp(1rem, 1.2vw, 1.5rem);                       /* 16–24 */
  --space-section: clamp(3.25rem, 7vh, 6rem);
  --header-h: 4.5rem;
  --tap: 2.75rem;
  --content-max: 1920px;
  --rule: rgba(28, 90, 87, 0.22);
  --grain-size: 600px;
  --grain-opacity: 1;
}

/* --- fonts (self-hosted, OFL) --- */
@font-face {
  font-family: Fraunces;
  src: url("../fonts/Fraunces-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Figtree;
  src: url("../fonts/Figtree-var.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

/* --- reset --- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--header-h);
}
html {
  background-color: var(--cream);
  background-image: url("../assets/textures/T2-cream-grain.svg");
  background-size: var(--grain-size) var(--grain-size);
  background-repeat: repeat;
  background-attachment: scroll;
}
body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background: transparent;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--text-body);
  line-height: 1.55;
  position: relative;
}
.site-header,
main,
.site-footer { position: relative; z-index: 1; }
.site-header { z-index: 10; }

@media (max-width: 750px) {
  :root { --grain-size: 280px; }
}

img { max-width: 100%; height: auto; display: block; border: 0; }
h1, h2, h3, p, ol, ul, dl, dt, dd { margin: 0; }
ol, ul { padding: 0; }
a { color: var(--teal); }
a:hover { color: var(--deep); }

:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}

/* --- skip link --- */
.skip {
  position: absolute;
  left: var(--page-pad-x);
  top: 0.5rem;
  z-index: 20;
  padding: 0.5rem 0.85rem;
  background: var(--paper);
  color: var(--deep);
  font-weight: 700;
  text-decoration: none;
  min-height: var(--tap);
  display: inline-flex;
  align-items: center;
  transform: translateY(-150%);
}
.skip:focus { transform: none; }

/* --- 12-column grid --- */
.header-inner,
.section-inner,
.footer-inner {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--page-pad-x);
}

/* --- header / nav --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: var(--header-h);
  background-color: var(--cream);
  background-image: url("../assets/textures/T2-cream-grain.svg");
  background-size: var(--grain-size) var(--grain-size);
  background-repeat: repeat;
  border-bottom: 1px solid var(--rule);
}
.header-inner {
  align-items: center;
  min-height: var(--header-h);
  padding-block: 0.75rem;
  position: relative;
  z-index: 1;
}
.logo {
  grid-column: 1 / 6;
  display: flex;
  align-items: center;
  justify-self: start;
  min-height: 44px;
  text-decoration: none;
  /* Clear space around the lockup is at least the HW / wordmark cap height (~12px). */
  padding-block: 0;
  background: none;
  box-shadow: none;
}
.logo-lockup {
  display: block;
  height: 44px;
  width: auto;
  max-width: min(155px, 46vw);
  background: none;
  box-shadow: none;
  border: 0;
}
.site-nav {
  grid-column: 6 / 13;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  justify-self: end;
  gap: 0.15rem 0.25rem;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 0.7rem;
  color: var(--deep);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.125rem;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--teal); }
.site-nav a[aria-current="page"] {
  box-shadow: inset 0 -3px 0 0 var(--gold);
}

@media (min-width: 700px) {
  .logo { grid-column: 1 / 5; }
  .site-nav { grid-column: 5 / 13; }
}

/* --- layout --- */
main { display: block; flex: 1 0 auto; }
.section { padding-block: var(--space-section); }

.page-title,
.hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-variation-settings: "SOFT" 30, "WONK" 0, "opsz" 96;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--deep);
  text-wrap: balance;
}

/* Home: statement on the same left edge as the header (column 1, x=96 at 1920). */
.page-home .hero {
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  min-height: calc(100svh - var(--header-h) - 7rem);
  padding-block: clamp(2.5rem, 8vh, 6rem);
}
.page-home .section-inner {
  position: relative;
  z-index: 2;
  width: 100%;
}
.page-home .hero h1 {
  grid-column: 1 / 13;
  font-size: var(--text-display);
  max-width: 18ch;
}
.page-home .hero-lead {
  grid-column: 1 / 13;
  margin-top: 1.5rem;
  font-size: var(--text-lead);
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink);
  max-width: 36em;
}
.page-home .path-link { grid-column: 1 / 13; }

/* Brand world: kit site-hero composition as ONE 1920×548 unit, scaled by width.
   Bee is a separate swappable file/class, placed in 1920-space so it scales with the stage. */
.brand-world {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}
.brand-world-stage {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  aspect-ratio: 1920 / 548;
}
.brand-scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: fill;
}
/* Kit bee: translate(1416 208) rotate(-18) scale(4.6). bee.svg viewBox 200, body at (98, 112), inner scale 7. */
.brand-bee {
  position: absolute;
  left: calc(1416 / 1920 * 100%);
  top: calc(208 / 548 * 100%);
  width: calc(131.43 / 1920 * 100%);
  height: auto;
  max-width: none;
  transform-origin: 49% 56%;
  transform: translate(-49%, -56%) rotate(-18deg);
}
.page-home .site-footer { border-top: 0; }

/* Hide the scene below the 12-col typography breakpoint so type never collides with props. */
@media (max-width: 1099px) {
  .brand-world { display: none; }
}

/* How-it-works hero: two-line description is the dominant statement. */
.page-how .hero { padding-block: var(--space-section); }
.page-how .page-title {
  grid-column: 1 / 13;
  font-family: var(--font-body);
  font-weight: 700;
  font-variation-settings: normal;
  font-size: clamp(1.125rem, 0.4vw + 1.05rem, 1.375rem);
  line-height: 1.3;
  letter-spacing: 0.04em;
  color: var(--teal);
  text-wrap: unset;
}
.page-how .who {
  grid-column: 1 / 13;
  margin-top: 0.75rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-variation-settings: "SOFT" 30, "WONK" 0, "opsz" 72;
  font-size: clamp(1.75rem, 3vw, 2.75rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--deep);
}
.page-how .who p { max-width: 22ch; }
.page-how .who p + p { margin-top: 0.2em; }

.section-title {
  grid-column: 1 / 13;
  font-family: var(--font-display);
  font-weight: 600;
  font-variation-settings: "SOFT" 30, "WONK" 0, "opsz" 72;
  font-size: var(--text-section);
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--deep);
  margin-bottom: 1.75rem;
  text-wrap: balance;
}

/* --- steps: hex markers + dotted flight path --- */
.steps-wrap {
  position: relative;
  grid-column: 1 / 13;
}
.steps-flight {
  position: absolute;
  left: calc(var(--hex-w) / 2);
  top: 0;
  bottom: 0;
  width: 8px;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 0;
  background-image: url("../assets/brand/flight-dots.svg");
  background-repeat: repeat-y;
  background-size: 8px 13.1px;
  background-position: center top;
}
.steps-bee {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  /* On the path in the gap under hex 1, kept inside the marker column so it never covers the step text. */
  top: calc(var(--hex-h) + 0.35rem);
  left: 0;
  width: calc(var(--hex-w) * 0.9);
  height: auto;
  max-width: none;
  transform: rotate(-14deg);
}
@media (max-width: 1099px) {
  .steps-bee {
    width: 2.15rem;
    left: -0.15rem;
    top: calc(var(--hex-h) + 0.55rem);
  }
}
.steps {
  list-style: none;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}
.steps li {
  display: grid;
  grid-template-columns: var(--hex-w) minmax(0, 1fr);
  column-gap: var(--hex-gap);
  row-gap: 0.4rem;
  align-items: start;
}
.step-num {
  position: relative;
  grid-row: 1 / span 2;
  grid-column: 1;
  width: var(--hex-w);
  height: var(--hex-h);
  display: flex;
  align-items: center;
  justify-content: center;
  /* Centre the hex on the first line of the title. */
  margin-top: calc((var(--text-step) * 1.25 - var(--hex-h)) / 2);
  background: none;
}
.step-hex {
  position: absolute;
  inset: 0;
  width: var(--hex-w);
  height: var(--hex-h);
  max-width: none;
  overflow: visible;
  display: block;
}
.step-hex-shadow { display: none; }
.step-num-text {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-weight: 600;
  font-variation-settings: "SOFT" 30, "WONK" 0, "opsz" 36;
  font-size: var(--step-num-size);
  line-height: 1;
  color: var(--deep);
}
.step-lit .step-hex-face { fill: #E3A32B; }
.steps h3 {
  grid-column: 2;
  grid-row: 1;
  font-family: var(--font-display);
  font-weight: 600;
  font-variation-settings: "SOFT" 30, "WONK" 0, "opsz" 36;
  font-size: var(--text-step);
  line-height: 1.25;
  color: var(--deep);
  text-wrap: balance;
}
.steps p {
  grid-column: 2;
  grid-row: 2;
  color: var(--ink);
  font-size: var(--text-step-body);
  line-height: 1.5;
  text-wrap: pretty;
}

/* --- what stays yours --- */
.yours-list {
  list-style: none;
  grid-column: 1 / 13;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
.yours-list li {
  padding-top: 1.1rem;
  border-top: 2px solid var(--teal);
  color: var(--ink);
  font-size: var(--text-body);
  line-height: 1.4;
  max-width: 28ch;
}

/* --- method --- */
.method-body {
  grid-column: 1 / 13;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 38rem;
}
.method-body p { color: var(--ink); }

/* --- questions --- */
.faq {
  grid-column: 1 / 13;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--rule);
}
.faq details {
  border-bottom: 1px solid var(--rule);
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--tap);
  padding-block: 0.85rem;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  font-size: var(--text-body);
  line-height: 1.35;
  color: var(--deep);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::marker { content: none; }
.faq summary::after {
  content: "";
  flex: 0 0 1.125rem;
  width: 1.125rem;
  height: 1.125rem;
  margin-left: 0.5rem;
  background:
    linear-gradient(var(--teal), var(--teal)) center / 1.125rem 2px no-repeat,
    linear-gradient(var(--teal), var(--teal)) center / 2px 1.125rem no-repeat;
}
.faq details[open] summary::after {
  background: linear-gradient(var(--teal), var(--teal)) center / 1.125rem 2px no-repeat;
}
.faq details p {
  color: var(--ink);
  font-size: var(--text-body);
  line-height: 1.55;
  max-width: 40rem;
  padding: 0 2rem 1.1rem 0;
  text-wrap: pretty;
}

/* --- next step --- */
.section-next .section-title { margin-bottom: 1.25rem; }
.next-line {
  grid-column: 1 / 13;
  font-size: var(--text-lead);
  line-height: 1.55;
  color: var(--ink);
}
.nowrap { white-space: nowrap; }
.contact-email { white-space: normal; }
@media (min-width: 700px) { .contact-email { white-space: nowrap; } }
.mailto {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  color: var(--teal);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1.5px;
}
.mailto:hover { color: var(--deep); }

#proof[hidden] { display: none; }

/* --- path link on home --- */
.path-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  margin-top: 2rem;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1.5px;
  justify-self: start;
}
.path-link:hover { color: var(--deep); }

/* --- footer --- */
.site-footer {
  padding-block: 2rem 2.25rem;
  border-top: 1px solid var(--rule);
}
.footer-inner {
  align-items: center;
}
.footer-logo {
  grid-column: 1 / 8;
  justify-self: start;
}

/* --- desktop: 12-column editorial composition (1366 and 1920) --- */
@media (min-width: 1100px) {
  /* Same left edge as the header and how-it-works (column 1). Leave room on the right for the brand world. */
  .page-home .hero h1 { grid-column: 1 / 8; }
  .page-home .hero-lead { grid-column: 1 / 8; }
  .page-home .path-link { grid-column: 1 / 8; }

  .page-how .page-title { grid-column: 1 / 13; }
  .page-how .who {
    grid-column: 1 / 13;
    margin-top: 0.75rem;
  }
  .page-how .who p { max-width: none; }

  .section-path .section-title { grid-column: 1 / 10; }

  .steps-wrap { grid-column: 1 / 13; }
  .steps { gap: 2rem; }
  .step-hex-shadow { display: block; }
  /* Cap body measure at ~70 characters; text stays on the left, right side stays empty. */
  .steps h3,
  .steps p { max-width: var(--text-measure); }

  .section-yours .section-title { grid-column: 1 / 7; }
  .yours-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 var(--gutter);
  }
  .yours-list li { max-width: none; }

  .section-method .section-title {
    grid-column: 1 / 6;
    margin-bottom: 0;
    align-self: start;
  }
  .method-body {
    grid-column: 7 / 13;
    max-width: var(--text-measure);
  }

  .section-questions .section-title { grid-column: 1 / 8; }
  .faq details p { max-width: var(--text-measure); }

  .section-next .section-title { grid-column: 1 / 9; }
  .next-line {
    grid-column: 1 / 13;
    max-width: var(--text-measure);
  }

  .footer-logo { grid-column: 1 / 5; }
}

@media (min-width: 1600px) {
  .page-home .hero h1 { grid-column: 1 / 8; }
  .page-home .hero-lead { grid-column: 1 / 8; }
  .page-home .path-link { grid-column: 1 / 8; }
}

/* Mid widths (Fold inner): one column, use the width, same left edge. */
@media (min-width: 700px) and (max-width: 1099px) {
  .page-home .hero h1,
  .page-home .hero-lead,
  .page-home .path-link { grid-column: 1 / 13; }
  .page-how .page-title { grid-column: 1 / 13; }
  .page-how .who { grid-column: 1 / 13; }
  .page-how .who p { max-width: none; }
  .section-title { grid-column: 1 / 13; }
}

@media (max-width: 500px) {
  /* Keep the lockup and nav on one row with clear space between them. */
  .logo-lockup { height: 36px; max-width: min(128px, 38vw); }
  .site-nav { flex-wrap: nowrap; }
  .site-nav a { padding-inline: 0.4rem; font-size: 1.0625rem; }
}

/* --- motion --- */
@media (prefers-reduced-motion: no-preference) {
  a { transition: color 160ms ease, box-shadow 160ms ease; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  :root { --space-section: 2.25rem; --header-h: 3.75rem; }
  .page-home .hero { min-height: 0; padding-block: 2rem; }
  .page-home .hero h1 { font-size: clamp(2rem, 10vh, 3rem); }
  .brand-world { opacity: 0.55; }
}
