/* fit-a: viewport-fit overrides (owned by one agent)
   Scope: header nav, hero, #story, #founder, #prices.
   Goal: every section fits one screen at 100% zoom (1920x1080 and 1366x768). */

/* ---------- header: a steady 80px bar ---------- */
.header { padding: 20px 0; }
.header.scrolled { padding: 14px 0; }
@media (min-width: 1081px) {
  .header .wrap { gap: clamp(16px, 2vw, 32px); }
  .nav { gap: clamp(16px, 1.9vw, 36px); }
  .nav a { letter-spacing: .2em; white-space: nowrap; }
  .header .btn { white-space: nowrap; }
}

/* ---------- hero: exactly one screen below the header bar ---------- */
/* The section starts under the 80px bar; its photo reaches up behind the bar,
   so the hero still reads as one full-bleed screen. */
.hero { min-height: calc(100svh - 80px); margin-top: 80px; overflow: visible; }
.hero-media { top: -80px; overflow: hidden; }
.hero-content { padding-top: clamp(28px, 6vh, 72px); padding-bottom: clamp(22px, 4vh, 44px); }
.hero h1 { font-size: min(var(--fs-h1), 10.5vh); max-width: none; margin: clamp(12px, 2vh, 22px) 0 0; }
.hero-foot { margin-top: clamp(22px, 4vh, 48px); padding-top: clamp(14px, 2.2vh, 24px); }
@media (min-width: 601px) { .hero-foot .stat-num { font-size: clamp(2rem, 1.2rem + 3.2vh, 3.4rem); } }
.hero-foot .stat-label { margin-top: 8px; }
.hero .lead { margin: clamp(14px, 2.4vh, 24px) 0 0; }
.hero-actions { margin-top: clamp(18px, 3vh, 32px); }

@media (min-width: 861px) {
  /* headline left, lead and actions right, stats along the foot */
  .hero-content {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    grid-template-areas: "eye eye" "h1 lead" "h1 actions" "foot foot";
    grid-template-rows: auto auto 1fr auto;
    column-gap: clamp(40px, 6vw, 110px);
    align-items: end;
  }
  .hero-content > .eyebrow { grid-area: eye; }
  .hero h1 { grid-area: h1; align-self: end; }
  .hero .lead { grid-area: lead; align-self: end; margin: 0; }
  .hero-actions { grid-area: actions; align-self: start; }
  .hero-foot { grid-area: foot; }
}

/* ---------- framed panels of my sections: vh-aware vertical padding ---------- */
@media (min-width: 861px) {
  #story > .wrap, #founder > .wrap, #prices > .wrap {
    padding-top: clamp(30px, 6.4vh, 64px);
    padding-bottom: clamp(30px, 6.4vh, 64px);
  }
  #story p, #founder p:not(.lead):not(.founder-sign) { line-height: 1.62; }
}

/* ---------- story: quote across, text in two columns, photo + signature on the right ---------- */
@media (min-width: 861px) {
  .story-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, .9fr);
    grid-template-areas:
      "eye   eye   fig"
      "quote quote fig"
      "text  text  fig"
      "text  text  sign";
    grid-template-rows: auto auto auto auto;
    column-gap: clamp(28px, 3.2vw, 56px);
    row-gap: 0;
    align-items: start;
  }
  .story-grid > div:first-child { display: contents; }
  .story-grid > div:first-child > .eyebrow { grid-area: eye; }
  .story-quote { grid-area: quote; margin: clamp(10px, 1.8vh, 18px) 0 clamp(14px, 2.6vh, 26px); font-size: clamp(1.9rem, 1rem + 1.4vw + 1.2vh, 3rem); max-width: 30ch; }
  .story-grid > div:first-child > div.reveal:not(.story-sign) { grid-area: text; column-count: 2; column-gap: clamp(26px, 2.8vw, 48px); }
  .story-grid > div:first-child > div.reveal:not(.story-sign) p:last-child { margin-bottom: 0; }
  .story-sign { grid-area: sign; margin-top: clamp(14px, 2.4vh, 24px); padding-top: clamp(14px, 2.2vh, 22px); gap: 28px; }
  .story-sign .stat-num { font-size: clamp(2rem, 1.2rem + 2.6vh, 3rem); }
  .story-figure { grid-area: fig; align-self: stretch; height: 100%; min-height: 0; }
  .story-figure .mask-img { aspect-ratio: auto; height: 100%; min-height: clamp(220px, 44vh, 460px); position: relative; }
  .story-figure .mask-img img { position: absolute; inset: 0; }
}

/* ---------- founder: portrait height tied to the screen, copy in two bands ---------- */
@media (min-width: 861px) {
  .founder-grid { grid-template-columns: minmax(0, .58fr) minmax(0, 1.42fr); gap: clamp(32px, 4.6vw, 80px); align-items: center; }
  .founder-photo { aspect-ratio: auto; height: min(68vh, 640px); min-height: 360px; }
  .founder-copy h2 { margin: clamp(8px, 1.4vh, 16px) 0 6px; }
  .founder-role { margin-bottom: clamp(12px, 2vh, 20px); }
  .founder-copy .lead { margin-bottom: clamp(12px, 2vh, 20px); max-width: 58ch; }
  .founder-copy > div.reveal { column-count: 2; column-gap: clamp(26px, 2.8vw, 48px); }
  .founder-copy > div.reveal p:last-child { margin-bottom: 0; }
  .founder-facts { margin-top: clamp(16px, 2.6vh, 26px); padding-top: clamp(14px, 2.2vh, 22px); }
  .founder-facts .stat-num { font-size: clamp(2rem, 1.2rem + 2.6vh, 3rem); }
  /* facts and the signature line share the closing row */
  .founder-copy { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 0; }
  .founder-copy > * { grid-column: 1 / -1; }
  .founder-copy > .founder-facts { grid-column: 1; }
  .founder-copy > .founder-sign {
    grid-column: 2; align-self: stretch; display: grid; align-content: end;
    margin: clamp(16px, 2.6vh, 26px) 0 0; padding: 0 0 4px clamp(24px, 3vw, 56px);
    border-top: 1px solid var(--line); line-height: 1.2; white-space: nowrap;
  }
  .founder-copy > .founder-sign > em { display: block; }
  .founder-copy > .eyebrow { justify-self: start; }
}

/* ---------- prices: cards and thickness side by side ---------- */
@media (min-width: 861px) {
  #prices > .wrap {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    column-gap: clamp(16px, 2vw, 28px);
    align-items: stretch;
  }
  #prices .section-head, #prices .price-fine { grid-column: 1 / -1; }
  #prices .section-head { max-width: none; gap: 12px; margin-bottom: clamp(20px, 4vh, 44px); }
  #prices .section-head h2 { font-size: min(var(--fs-h2), 6.4vh); }
  #prices .price-grid { max-width: none; margin: 0; }
  #prices .price-card { padding: clamp(24px, 4vh, 44px) 20px; align-content: center; }
  #prices .price-num { font-size: clamp(3.2rem, 1.4rem + 3vw + 2vh, 6rem); }
  #prices .thickness { grid-template-columns: 1fr; max-width: none; margin: 0; align-content: center; gap: clamp(14px, 2.4vh, 22px); }
  #prices .mm-list li { min-width: 0; flex: 1 1 0; padding: 10px 6px; }
  #prices .price-fine { margin-top: clamp(16px, 3vh, 26px); }
}

/* hero only: lift the content up from the bottom so the top is not empty */
@media (min-width: 861px) {
  .hero { align-items: center; }
  .hero-content { padding-top: 0 !important; padding-bottom: clamp(40px, 9vh, 110px) !important; }
}
@media (min-width: 861px) { .hero-foot { margin-top: clamp(56px, 11vh, 130px) !important; } }

/* hero distribution: main content in the upper part, stats + line anchored to the bottom */
@media (min-width: 861px) {
  .hero { align-items: stretch !important; }
  .hero-content {
    min-height: calc(100svh - 80px);
    padding-top: clamp(48px, 11vh, 130px) !important;
    padding-bottom: clamp(22px, 4.5vh, 48px) !important;
    grid-template-areas: "eye eye" "h1 lead" "h1 actions" "gap gap" "foot foot" !important;
    grid-template-rows: auto auto auto 1fr auto !important;
  }
  .hero-foot { margin-top: 0 !important; align-self: end; }
}
