/* Home page only: one Sunday morning on a 3D set behind the words, then a calm light sheet of facts,
   then back to the fire. Without 3D (reduced motion, data saver, no WebGL) the words simply stack on Night. */

body.home { background: var(--night); color: var(--card); }
.site-head { position: fixed; left: 0; right: 0; background: rgba(19,40,74,.84); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }

#stage { display: none; position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; }
.scrim { display: none; position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(19,40,74,.94) 0%, rgba(19,40,74,.8) 28%, rgba(19,40,74,0) 52%); }
.stage #stage, .stage .scrim { display: block; }

main { position: relative; z-index: 2; }

.hero { padding: calc(var(--head) + 56px) var(--gutter) 48px; display: grid; gap: 40px; }
.hero h1 { font-size: clamp(50px, 7.2vw, 104px); line-height: .98; letter-spacing: -.025em; margin: 16px 0 20px; }
.hero h1 .on { position: relative; display: inline-block; }
.hero h1 .on::after { content: ""; position: absolute; left: 4%; right: 16%; bottom: -.1em; height: .07em; background: var(--flame); border-radius: 99px; }
.hero p.line { font-size: clamp(18px, 1.6vw, 22px); color: var(--mist); max-width: 30rem; }
.hero .copy, .chapter .copy, .close-copy { max-width: 33rem; }

.chapter { padding: 40px var(--gutter); }
.chapter .sheet-row { margin-bottom: 18px; max-width: 24rem; }
.chapter h2 { font-size: clamp(34px, 4.2vw, 60px); line-height: 1.05; letter-spacing: -.02em; margin-bottom: 16px; }
.chapter p { color: #D6DEE9; font-size: clamp(17px, 1.4vw, 20px); max-width: 28rem; }
.chapter .human { color: var(--card); margin-top: 22px; }

/* The flame drawn flat, for when there is no 3D */
.flat-flame { width: min(58vw, 300px); height: auto; }
.stage .flat-flame { display: none; }

/* With the 3D stage running, give the scroll room to tell the story */
.stage .hero { min-height: 112vh; padding-top: calc(var(--head) + 13vh); padding-bottom: 40px; align-content: start; }
.stage .chapter { min-height: 175vh; padding-block: 0; }
.stage .chapter .copy { position: sticky; top: 32vh; padding-bottom: 8vh; }
.stage .closing-stage { min-height: 100vh; padding-top: 22vh; }

/* The light sheet */
.sheet {
  position: relative; background: var(--page); color: var(--night); margin-top: 48px;
  border-radius: 28px; padding: clamp(56px, 8vw, 110px) var(--gutter);
  display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(64px, 8vw, 104px);
}
.stage .sheet { margin-top: 0; }
.sheet > section { max-width: var(--measure); width: 100%; min-width: 0; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.sheet .lead { margin-top: 10px; }
.sheet :focus-visible { outline-color: var(--night); }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; list-style: none; margin: 0; padding: 0; }
.tiles li { background: var(--card); border: 1px solid var(--lines); border-radius: 16px; padding: 18px 16px; display: grid; gap: 12px; font-weight: 500; font-size: 16px; }
.tiles svg { width: 24px; height: 24px; stroke: var(--night); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.tablist { display: flex; gap: 28px; overflow-x: auto; border-bottom: 1px solid var(--lines); scrollbar-width: none; }
.tablist button { font: 500 17px/1.2 var(--body); color: var(--quiet-words); background: none; border: 0; cursor: pointer; padding: 14px 0; min-height: 48px; white-space: nowrap; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tablist button[aria-selected="true"] { color: var(--night); border-bottom-color: var(--night); font-weight: 700; }
.tablist:not(.ready) { display: none; }
.panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 20px 56px; padding-top: 28px; }
.panel[hidden] { display: none; }
.panel .more { display: inline-flex; align-items: center; min-height: 44px; margin-top: 4px; font-weight: 700; color: var(--night); }

.chapter.members .actions { margin-top: 24px; }
.stage .chapter.members { min-height: 300vh; }
.members-band { background: var(--card); border: 1px solid var(--lines); border-radius: 24px; padding: clamp(24px, 4vw, 56px); }
.sheet > .members-band { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); align-items: center; gap: 28px clamp(28px, 4vw, 56px); }
.members-copy { display: grid; gap: 16px; }
.members-copy > p:not(.eyebrow) { color: var(--quiet-words); }
.phones { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.phones img { border-radius: 22px; border: 4px solid var(--night); box-shadow: 0 18px 36px rgba(19,40,74,.18); }
.phones figure:nth-child(2) { margin-top: 28px; }
.made-up { grid-column: 1 / -1; font-size: 15px; color: var(--quiet-words); }

/* The close */
.closing-stage { padding: 72px var(--gutter) 56px; display: grid; gap: 28px; align-content: start; }
.closing-stage h2 { font-size: clamp(42px, 5.6vw, 84px); line-height: 1; letter-spacing: -.025em; margin-bottom: 16px; }
.close-copy p { color: #D6DEE9; font-size: clamp(18px, 1.5vw, 21px); }
.home .site-foot { position: relative; z-index: 2; background: transparent; border-top: 0; }
.home .foot-in { max-width: none; }

@media (max-width: 900px) {
  .scrim { background: linear-gradient(180deg, rgba(19,40,74,0) 42%, rgba(19,40,74,.86) 62%, rgba(19,40,74,.97) 100%); }
  .hero h1 { font-size: clamp(46px, 13vw, 76px); }
  .stage .hero { min-height: 100svh; align-content: end; padding-top: var(--head); padding-bottom: 32px; }
  .stage .chapter { display: flex; flex-direction: column; justify-content: flex-end; min-height: 165svh; }
  .stage .chapter .copy { top: auto; bottom: 28px; padding-bottom: 0; }
  .stage .closing-stage { min-height: 70svh; padding-top: 44vh; }
  .panel { grid-template-columns: minmax(0, 1fr); }
  .sheet > .members-band { grid-template-columns: minmax(0, 1fr); }
  .stage .chapter.members { min-height: 280svh; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
