/* frames-dense.css
   Additive density layer for scroll-frame pages.
   Does not edit site.css or frames.css. Linked after those files.
   Goal: frames size to their content; only heroes/impact keep a
   modest floor (~78svh). Less empty black, larger type and numbers,
   tinted fills where a typographic frame would otherwise feel sparse.
   Scroll-snap and --fr-top (56px compact header) are unchanged. */

/* ---- Content-sized frames ------------------------------------------- */
html.fr-on .fr,
body .fr {
  min-height: 0;
}

/* Heroes and other impact frames keep a floor, not a hard 100vh. */
html.fr-on .fr.wu-hero,
html.fr-on .fr.boh-hero,
html.fr-on .fr.dt-hero,
html.fr-on .fr.op-hero,
html.fr-on .fr.bleed.bleed-video,
html.fr-on .fr.cg-band,
html.fr-on .fr.apa-home,
html.fr-on .fr.fr-impact,
body.home .fr.bleed.bleed-video,
body.home .fr.cg-band,
body.home .fr.apa-home {
  min-height: calc(78svh - var(--fr-top, 76px));
}

/* Founders' Fears octopus hero is a full-bleed image — keep it viewport-tall
   so the cover crop and overlaid H1 stay intact. */
html.fr-on .fr.ff-hero,
body.ff .fr.ff-hero {
  min-height: calc(100svh - var(--fr-top, 76px));
  height: calc(100svh - var(--fr-top, 76px));
}

/* Drop typographic-hero hard heights so they can shrink to the floor. */
html.fr-on .fr.wu-hero,
html.fr-on .fr.boh-hero,
html.fr-on .fr.dt-hero,
html.fr-on .fr.op-hero {
  height: auto;
}

/* ---- Tighter vertical padding --------------------------------------- */
html.fr-on .frx,
html.fr-on .fr.frx {
  padding-top: clamp(28px, 4.2vh, 52px);
  padding-bottom: clamp(28px, 4.2vh, 52px);
}

/* HUD is fixed to the viewport, not the frame. Extra bottom padding on
   short content-sized frames just opens a gap; only typographic heroes
   (flex-end, ~78svh) need clearance so their dek doesn't sit under the HUD. */
@media (min-width: 1100px) {
  html.fr-on .fr.wu-hero .wu-band,
  html.fr-on .fr.boh-hero .wrap,
  html.fr-on .fr.dt-hero .wrap,
  html.fr-on .fr.op-hero .wrap {
    padding-bottom: calc(4.25rem + 8px);
  }
}

/* ---- Wider measure, larger type ------------------------------------- */
html.fr-on .frx .wrap {
  width: min(1200px, calc(100% - 36px));
}

html.fr-on .frx .fr-h,
html.fr-on .frx h2.fr-h {
  max-width: 18ch;
  font-size: clamp(2.7rem, 8vw, 6.4rem);
  margin-bottom: 0.35em;
}

html.fr-on .frx .fr-sub {
  max-width: 48rem;
  font-size: clamp(1.05rem, 1.7vw, 1.35rem);
}

html.fr-on .frx .kicker {
  margin-bottom: 10px;
}

/* ---- Big numbers fill the width ------------------------------------- */
html.fr-on .ff-nums .n,
html.fr-on .wu-nums .n,
html.fr-on .op-nums .n,
html.fr-on .dt-nums .n,
html.fr-on .boh-nums .n,
html.fr-on .ff-boom,
html.fr-on .fr-stat b,
html.fr-on .fr-stat .n {
  font-size: clamp(3.2rem, 10vw, 7.6rem);
  letter-spacing: -0.04em;
}

html.fr-on .ff-nums,
html.fr-on .wu-nums,
html.fr-on .op-nums,
html.fr-on .dt-nums,
html.fr-on .boh-nums {
  max-width: 1200px;
  gap: clamp(16px, 2.4vw, 32px) clamp(24px, 3vw, 48px);
}

/* Single-stat frames: number + caption side by side on desktop. */
@media (min-width: 900px) {
  html.fr-on .ff-nums:not(.two):not(.three):not(.four) > li:only-child,
  html.fr-on .wu-nums:not(.two):not(.three):not(.four) > li:only-child,
  html.fr-on .op-nums:not(.two):not(.three):not(.four) > li:only-child,
  html.fr-on .dt-nums:not(.two):not(.three):not(.four) > li:only-child,
  html.fr-on .boh-nums:not(.two):not(.three):not(.four) > li:only-child {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: clamp(24px, 4vw, 56px);
    row-gap: 6px;
    align-items: end;
  }
  html.fr-on .ff-nums:not(.two):not(.three):not(.four) > li:only-child .n,
  html.fr-on .wu-nums:not(.two):not(.three):not(.four) > li:only-child .n,
  html.fr-on .op-nums:not(.two):not(.three):not(.four) > li:only-child .n,
  html.fr-on .dt-nums:not(.two):not(.three):not(.four) > li:only-child .n,
  html.fr-on .boh-nums:not(.two):not(.three):not(.four) > li:only-child .n {
    font-size: clamp(5.4rem, 14vw, 11.2rem);
    line-height: 0.85;
    margin: 0;
  }
  html.fr-on .ff-nums:not(.two):not(.three):not(.four) > li:only-child .lbl,
  html.fr-on .wu-nums:not(.two):not(.three):not(.four) > li:only-child .lbl,
  html.fr-on .op-nums:not(.two):not(.three):not(.four) > li:only-child .lbl,
  html.fr-on .dt-nums:not(.two):not(.three):not(.four) > li:only-child .lbl,
  html.fr-on .boh-nums:not(.two):not(.three):not(.four) > li:only-child .lbl {
    max-width: 28rem;
    font-size: clamp(1.15rem, 1.8vw, 1.55rem);
    padding-bottom: 0.35em;
  }
}

/* Two- and three-column number rows: bigger figures, more width. */
@media (min-width: 900px) {
  html.fr-on .ff-nums.two,
  html.fr-on .wu-nums.two,
  html.fr-on .op-nums.two,
  html.fr-on .dt-nums.two,
  html.fr-on .boh-nums.two {
    grid-template-columns: 1fr 1fr;
  }
  html.fr-on .ff-nums.three,
  html.fr-on .wu-nums.three,
  html.fr-on .op-nums.three,
  html.fr-on .dt-nums.three,
  html.fr-on .boh-nums.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---- Tinted fills so sparse typographic frames don't feel empty ----- */
html.fr-on .frx.ink {
  background-color: var(--ink, #0b0b0c);
  background-image:
    radial-gradient(1100px 620px at 8% 88%, rgba(47, 91, 255, 0.22), transparent 58%),
    radial-gradient(900px 480px at 92% 8%, rgba(47, 91, 255, 0.1), transparent 55%);
  background-repeat: no-repeat;
}
html.fr-on .frx.hot {
  background-color: var(--hot, #2f5bff);
  background-image:
    radial-gradient(1000px 560px at 88% 12%, rgba(255, 255, 255, 0.16), transparent 58%),
    radial-gradient(800px 500px at 6% 92%, rgba(0, 0, 0, 0.16), transparent 55%);
  background-repeat: no-repeat;
}
html.fr-on .frx.paper {
  background-color: var(--paper, #f5f1e8);
  background-image:
    radial-gradient(1000px 520px at 8% 0%, rgba(47, 91, 255, 0.08), transparent 58%),
    radial-gradient(800px 480px at 100% 100%, rgba(47, 91, 255, 0.05), transparent 55%);
  background-repeat: no-repeat;
}

/* Statement / quote frames: a panel that fills the wrap so type sits in
   a tinted field rather than floating in a void. */
html.fr-on .frx.ink .wrap,
html.fr-on .frx.hot .wrap {
  position: relative;
}

/* ---- Campaign (/campaign) still uses .sec + copied .fr rules -------- */
body.home .sec.fr:not(.bleed):not(.apa-home):not(.cg-band) {
  min-height: 0;
  padding-top: clamp(36px, 5vh, 64px);
  padding-bottom: clamp(36px, 5vh, 64px);
}
body.home .sec.fr .wrap,
body.home .frx .wrap {
  width: min(1200px, calc(100% - 36px));
}

/* Don't let density collapse a video hero or the calculator band. */
body.home .fr.bleed.bleed-video {
  min-height: calc(85svh - var(--fr-top, 76px));
}

/* ---- Mobile: even tighter floors so 390 and 1024x640 feel full ------ */
@media (max-width: 699px) {
  html.fr-on .fr.wu-hero,
  html.fr-on .fr.boh-hero,
  html.fr-on .fr.dt-hero,
  html.fr-on .fr.op-hero {
    min-height: calc(70svh - var(--fr-top, 76px));
  }
  html.fr-on .frx .fr-h,
  html.fr-on .frx h2.fr-h {
    font-size: clamp(2.4rem, 13vw, 3.8rem);
  }
}

/* Landscape tablets (1024x640): keep content inside the short viewport. */
@media (min-width: 900px) and (max-height: 700px) {
  html.fr-on .fr.wu-hero,
  html.fr-on .fr.boh-hero,
  html.fr-on .fr.dt-hero,
  html.fr-on .fr.op-hero {
    min-height: calc(70svh - var(--fr-top, 76px));
  }
  html.fr-on .frx {
    padding-top: clamp(20px, 3.2vh, 36px);
    padding-bottom: clamp(20px, 3.2vh, 36px);
  }
}

/* Keep snap behavior intact; do not override scroll-padding-top. */

/* Statement / quote lists: fill the width so short typographic frames
   don't sit as a thin strip of modest type in a wide field. */
html.fr-on .dt-lines,
html.fr-on .op-lines {
  max-width: 56rem;
}
html.fr-on .dt-lines li,
html.fr-on .op-lines li {
  font-size: clamp(1.55rem, 3.8vw, 2.85rem);
  line-height: 1.22;
  margin: 0 0 0.45em;
}
html.fr-on .boh-quote {
  max-width: 52rem;
}
html.fr-on .boh-quote p {
  font-size: clamp(1.4rem, 2.8vw, 2.35rem);
}
