/* home.css: the home page (/). Each section is a "poster": a fixed-height block with a
   background photo and words placed on top. Desktop numbers first, phone overrides at the end
   of each section. All positions are in pixels measured from the live Framer site at 1440 and
   390 wide; horizontally centred items use calc(50% ...) so the page stays centred at any width.
   Three layouts, as live: desktop (1200 and wider), tablet (810-1199, measured at 1024; the tablet
   design is close to the phone one, with its own sizes), phone (below 810). Tablet rules sit in one
   block per section, after the phone rules. */

/* Which layout shows an element (site.css has .desktop-only = 810 and up, .phone-only = below 810) */
@media (max-width: 1199.98px) { .wide-only { display: none !important; } }
@media (min-width: 1200px) { .narrow-only { display: none !important; } }
@media (max-width: 809.98px), (min-width: 1200px) { .tablet-only { display: none !important; } }
@media (min-width: 810px) and (max-width: 1199.98px) { .not-tablet { display: none !important; } }

.poster { position: relative; }
.poster > * { position: absolute; }
.poster .bg, .poster .bg img { left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; }
.poster picture.bg { display: block; }
.poster .bg img { position: absolute; }
.fill { left: 0; width: 100%; }
.fill img { width: 100%; height: 100%; object-fit: cover; }
.flip { transform: rotate(180deg); }
.text { font-family: var(--sans); font-weight: 400; color: var(--white); }
.poster p { white-space: pre-wrap; }   /* like Framer: spaces typed in the copy are kept */
.mono { font-family: var(--mono); }
.center { text-align: center; }
.cast { display: flex; align-items: flex-start; width: max-content; font: 700 18px/1.2 var(--mono); text-align: center; white-space: pre; }
.poster .cast p { flex: none; white-space: pre; }

/* black fades: a soft black edge at the top or bottom of each photo.
   Desktop uses the same gradient image as the live site; tablet and phone use a CSS gradient (as live). */
.fade-black { height: 600px; }
@media (max-width: 1199.98px) {
  .fade-black { background: linear-gradient(#000 0%, rgba(0, 0, 0, 0) 100%); }
  .fade-black img { display: none; }
}

/* ---------- 1. Hero: mountain, credits, title, trailer, first two facts ---------- */
/* (the facts, the "signal" line and the sign-up form are placed by % of the page width on desktop, as live) */
.hero { height: 1355px; }
.hero .bg img { object-position: 50% 0%; }
.hero .fade-a { top: 371.56px; height: 691px; }
.hero .white { top: 1062px; height: 293px; background: var(--white); }
.hero .fade-b { top: 0.5px; height: 1307px; }
.hero .quote { left: 46px; top: 140px; width: 163px; height: 83px; }
.hero .laurel { right: 69px; top: 139px; width: 191.22px; height: 106px; }
.hero .quote img, .hero .laurel img, .title img, .headline img { width: 100%; height: 100%; object-fit: contain; }
.hero .quote img, .hero .laurel img { object-fit: cover; }
.hero .cast { left: 50%; translate: -50% 0; top: 60.41px; gap: 92px; color: #000; }
.hero .written { left: 50%; translate: -50% 0; top: 19px; font: 400 18px/21.6px var(--mono); color: #000; white-space: pre; }
.hero .title { left: 50%; translate: -50% 0; top: 191.5px; width: 388px; height: 128px; }
.hero .streaming { left: 50%; translate: -50% 0; top: 772.5px; font-size: 23px; line-height: 27.6px; color: #000; white-space: pre; }
.hero .fact-2 { left: 28.75%; top: 1062.5px; width: 43%; font-size: 30px; line-height: 36px; color: #000; }
.hero .fact-1 { left: 29.04%; top: 893.5px; width: 42%; font-size: 30px; line-height: 36px; color: #000; }
.hero .cta { left: 50%; translate: -50% 0; top: 811.7px; z-index: 10; }
.hero .trailer { left: 50%; translate: -50% 0; top: 331.5px; width: 724px; height: 409px; overflow: hidden; }
.hero .trailer iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }
.hero .signal-phone { left: calc(50% - 175.5px); top: 1307.59px; width: 351px; font-size: 25px; line-height: 30px; color: #000; }
.hero .white-fade { top: 1428px; height: 210px; z-index: 1; background: linear-gradient(#fff 0%, #fff 75%, rgba(255, 255, 255, 0) 100%); }
@media (max-width: 809.98px) {
  .hero { height: 1637.59px; }
  .hero .bg { height: 1274px; }
  .hero .bg img { object-position: 50% 50%; }
  .hero .fade-a { top: 331.59px; height: 715px; }
  .hero .fade-b { top: 0; height: 1280px; }
  .hero .quote { left: 120px; top: 85px; width: 134px; height: 54px; }
  .hero .laurel { right: 22px; top: 92px; width: 95px; height: 58px; }
  .hero .cast { top: 49px; gap: 16px; font-size: 9px; }
  .hero .written { top: 15px; font-size: 15px; line-height: 18px; }
  .hero .title { top: 206px; width: 266px; height: 92px; }
  .hero .streaming { top: 541px; font-size: 19px; line-height: 22.8px; color: var(--white); }
  .hero .fact-2 { left: 4%; top: 972px; width: 90%; font-size: 25px; line-height: 30px; }
  .hero .fact-1 { left: 5%; top: 726px; width: 90%; font-size: 25px; line-height: 30px; }
  .hero .cta { top: 583.2px; }
  /* Deliberate fix (Harry, 31 Oct): live keeps the desktop 724px-wide trailer on phones, so it spills off both
     sides of the screen, hides its own play button and covers "STREAMING SOON". Here it fits the screen
     (16px each side, at most 432px wide) and sits centred in the gap between the title (ends 298px) and
     "STREAMING SOON" (starts 541px). */
  .hero { container-type: inline-size; }   /* lets the trailer size itself from the page width (cqw) */
  .hero .trailer { left: 50%; translate: -50% 0; width: min(calc(100cqw - 32px), 432px); height: auto;
    top: calc(419.5px - min(calc(100cqw - 32px), 432px) * 0.28125); border-radius: 6px; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25); }
  .hero .signal-phone { left: 50%; translate: -50% 0; width: min(351px, calc(100cqw - 32px)); }
}

/* ---------- 2. Crowd ---------- */
.crowd { height: 781px; }
.crowd .fade-1 { top: 0; height: 382px; z-index: 1; }
.crowd .fade-2 { top: 0; height: 335.83px; z-index: 1; }
@media (max-width: 809.98px) {
  .crowd { height: 819px; }
  .crowd .fade-1 { height: 352.16px; }
}

/* ---------- 3. The fall ---------- */
.fall { height: 1500px; background: #000; }
.fall .f-bottom { top: 908px; }
.fall .f-top2 { top: 33px; }
.fall .headline { left: 37px; top: 427.48px; width: 553px; height: 457px; }
.fall .signal { left: 11%; top: 71px; width: 78%; font-size: 34px; line-height: 40.8px; }
.fall .story { left: 80px; top: 1085.61px; width: 704.33px; font-size: 34px; line-height: 40.8px; }
@media (max-width: 809.98px) {
  .fall .bg img { object-position: 100% 0%; }
  .fall .headline { left: calc(50% - 172px); top: 46px; width: 344px; height: 318px; }
  .fall .story { left: 37px; top: 1263px; width: 232px; font-size: 28px; line-height: 33.6px; }
}

/* ---------- 4. Bedridden (window light) ---------- */
.window { height: 1500px; background: #000; }
.window .f-bottom { top: 908px; }
.window .f-side { right: -187px; left: auto; top: 181.48px; width: 1573px; height: 1201px; transform: rotate(90deg); }
.window .headline { right: 59px; top: 140.5px; width: 393px; height: 307px; }
.window .story { right: 80px; top: 728.41px; width: 448.64px; font-size: 34px; line-height: 40.8px; text-align: right; }
@media (max-width: 809.98px) {
  .window .f-side { right: auto; left: -591px; top: 579px; height: 391px; }
  .window .headline { right: 21px; top: 194.5px; width: 331px; height: 307px; }
  .window .story { right: auto; left: calc(50% - 195.5px); top: 749.5px; width: 361px; font-size: 28px; line-height: 33.6px; }
}

/* ---------- 5. The discovery (cell) ---------- */
.cell { height: 1500px; background: #000; }
.cell .f-bottom { top: 908px; }
.cell .f-top2 { top: 33px; }
.cell .headline { left: 67px; top: 300.8px; width: 475px; height: 568.39px; }
.cell .realized { left: calc(50% - 522.72px); top: 8px; width: 1045.44px; font-size: 34px; line-height: 44.2px; }
.cell .no-going-back { left: 94px; top: 1015.41px; width: 659.02px; font-size: 34px; line-height: 40.8px; }
@media (max-width: 809.98px) {
  .cell { height: 1612px; }
  .cell .f-bottom { top: 1020px; }
  .cell .f-top-phone { top: 93px; height: 507px; }
  .cell .headline { left: 24px; top: 888px; width: 343px; height: 442px; }
  .cell .no-going-back { left: calc(50% - 181px); top: 1456.99px; width: 362px; font-size: 25px; line-height: 30px; text-align: center; }
  .cell .realized { left: calc(50% - 163.52px); top: -57px; width: 335px; font-size: 27px; line-height: 35.1px; text-align: left; }
}

/* ---------- 6. Finale: credits, title, sign-up ---------- */
.finale { height: 1709px; background: #000; }
.finale .f-tall { height: 910px; }
.finale .cast { left: 50%; translate: -50% 0; top: 167.8px; gap: 92px; font-size: 21px; color: var(--white); }
.finale .directed { left: 50%; translate: -50% 0; top: 37px; font: 400 24px/28.8px var(--mono); color: var(--white); white-space: pre; }
.finale .title { left: 50%; translate: -50% 0; top: 283px; width: 715px; height: 326px; }
.finale .join { left: calc(51% - 223.2px); top: 1052.41px; width: 446.41px; white-space: pre; font: 400 24px/28.8px var(--mono); color: var(--white); text-align: center; }
.finale .signup-form { left: calc(51% - 232.5px); top: 1090.36px; width: 465px; }
.finale .streaming { left: calc(50% - 184px); top: 369px; width: 362px; font-size: 26px; line-height: 31.2px; }
@media (max-width: 809.98px) {
  .finale { height: 1220px; }
  .finale .f-top { height: 311px; }
  .finale .f-tall { top: 20px; height: 630px; }
  .finale .cast { left: calc(50% - 186.5px); translate: none; top: 106px; gap: 12px; }
  .finale .cast { font-size: 10px; }
  .finale .directed { left: calc(50% - 145.8px); translate: none; top: 67px; font-size: 18px; line-height: 21.6px; }
  .finale .title { left: calc(50% - 174px); translate: none; top: 159px; width: 348px; height: 212px; }
  .finale .join { left: calc(50% - 191.5px); top: 704.82px; width: 383px; font-size: 18px; line-height: 21.6px; }
  .finale .signup-form { left: calc(50% - 152px); top: 749.14px; width: 304px; }
}

/* YouTube trailer poster (tablet hero): thumbnail + YouTube's play button; home.js swaps in the player */
.trailer-yt { overflow: hidden; cursor: pointer; background: #000; }
.trailer-yt img { width: 100%; height: 100%; object-fit: cover; }
.trailer-yt button { position: absolute; left: 50%; top: 50%; width: 68px; height: 48px; padding: 0; border: 0; background: none; cursor: pointer; transform: translate(-50%, -50%); }
.trailer-yt svg { display: block; width: 100%; height: 100%; }
.trailer-yt .yt-bg { fill: #212121; fill-opacity: 0.8; transition: fill .1s cubic-bezier(0.4, 0, 1, 1), fill-opacity .1s cubic-bezier(0.4, 0, 1, 1); }
.trailer-yt:hover .yt-bg { fill: #f00; fill-opacity: 1; }
.trailer-yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ================= Tablet (810-1199px), measured from the live site at 1024 ================= */
@media (min-width: 810px) and (max-width: 1199.98px) {
  /* 1. Hero */
  .hero { height: 1146px; }
  .hero .bg img { object-position: 50% 50%; }
  .hero .fade-a { top: 344px; height: 715px; }
  .hero .fade-a.desktop-only { top: 486px; height: 522px; }
  .hero .fade-b { top: 170px; height: 888px; }
  .hero .white { top: 950px; height: 279px; }
  .hero .quote { left: 72px; top: 116px; width: 146px; height: 64px; }
  .hero .laurel { right: 91px; top: 123px; width: 140px; height: 79px; }
  .hero .cast { top: 65.6px; gap: 55px; font-size: 13px; }
  .hero .written { top: 25px; font-size: 15px; line-height: 18px; }
  .hero .title { top: 193px; width: 330px; height: 137px; }
  .hero .trailer-yt { left: calc(50% - 240px); top: 351px; width: 480px; height: 270px; }
  .hero .streaming { top: 648px; font-size: 28px; line-height: 33.6px; }
  .hero .cta { top: 712.9px; }
  .hero .fact-1 { left: calc(50% - 176.5px); top: 807px; width: 353px; font-size: 25px; line-height: 30px; }
  .hero .fact-2 { left: calc(50% - 198px); top: 967.6px; width: 396px; font-size: 25px; line-height: 30px; }

  /* 2. Crowd */
  .crowd { height: 819px; }
  .crowd .fade-1 { height: 352.2px; }
  .crowd .fade-2 { display: none; }

  /* 3. The fall */
  .fall .bg img { object-position: 100% 0%; }
  .fall .headline { left: 23px; top: 497px; width: 375px; height: 333px; }
  .fall .signal { left: 8.5%; top: 58px; width: 83%; }
  .fall .story { left: 46px; top: 1127px; width: 232px; font-size: 28px; line-height: 33.6px; }

  /* 4. Bedridden */
  .window .f-side { left: auto; right: -377px; top: 375.5px; width: 1562px; height: 811px; }   /* kept against the right edge, as live */
  .window .headline { right: 44.5px; top: 201px; width: 331px; height: 307px; }
  .window .story { right: 43.5px; top: 883px; width: 361px; font-size: 28px; line-height: 33.6px; }

  /* 5. The discovery. Live places the "Then he realized..." line near the top of section 4 here. */
  .cell { height: 1612px; }
  .cell .bg img { object-position: 55.4% 0.2%; }
  .cell .f-bottom { top: 1020px; }
  .cell .f-top-phone { top: 93px; height: 507px; }
  .cell .headline { left: 24px; top: 644px; width: 343px; height: 442px; }
  .cell .no-going-back { left: calc(50% - 263.5px); top: 1488px; width: 527px; font-size: 28px; line-height: 33.6px; text-align: center; }
  .cell .realized { left: calc(50% - 286px); top: -1476px; width: 572px; font-size: 28px; line-height: 36.4px; text-align: center; }

  /* 6. Finale: one long fade; the sign-up form is shown here too (live has none on tablet) */
  .finale { height: 1220px; }
  .finale .f-top { height: 1220px; }
  .finale .f-tall { display: none; }
  .finale .directed { top: 37px; font-size: 18px; line-height: 21.6px; }
  .finale .cast { top: 84.4px; gap: 70px; font-size: 11px; }
  .finale .title { left: calc(50% - 217.8px); translate: none; top: 164px; width: 433px; height: 249px; }
  .finale .streaming { left: calc(50% - 214.5px); top: 429px; width: 429px; font-size: 29px; line-height: 34.8px; }
  .finale .join { left: calc(50% - 191.5px); top: 718.8px; width: 383px; font-size: 18px; line-height: 21.6px; }
  .finale .signup-form { left: calc(50% - 152px); top: 763.1px; width: 304px; }
}
