/* Comparsa BETA round 2: home page first view (Meta-style). Not part of the live site.
   Every rule is scoped to [data-beta-layout=new] and body.home-page, so the BETA bar's
   "Live" layout button shows today's home page unchanged. Works with Light and Dark.

   1. Shorter hero film: about 76% of the screen on laptops and 74% on phones, so the next
      section's heading peeks out below ("there is more").
   2. One clean group, bottom-left: place, headline, short text, buttons. The caption
      strip along the bottom edge is hidden (its right half repeated the next heading).
   3. Top bar: clear over the film (unchanged), then a frosted see-through bar once you
      scroll past it. It reuses the site's existing "over the film" check; the fade
      itself is a short CSS transition that runs only at that moment.
   Browser care: the blur covers only the thin bar; no blur support, or "reduce
   transparency" turned on, means a solid bar; "reduce motion" means no fade. */

/* ---------- 1 + 2. Hero size and placement ----------
   The box takes the film's own shape (--film-ratio, set by film.js from the real video:
   16:9 on laptops, 9:16 on phones), capped at 84% of the screen so the next section
   peeks. Under the cap the whole frame is visible, nothing cropped. Above it (very wide
   or short screens) the crop is small and biased toward the top, where the faces are.
   Text can still make the box taller than the film; the film then loses a little width,
   never height. */
:root[data-beta-layout=new] body.home-page .hero-stage {
  box-sizing: border-box;
  width: 100%;              /* explicit, or the max-height cap transfers through the ratio and narrows the box */
  aspect-ratio: var(--film-ratio, 1.7778);
  min-height: auto;
  max-height: 84svh;
  padding-top: 132px;
  padding-bottom: 72px;
}
:root[data-beta-layout=new] body.home-page .hero-stage .hero-media video,
:root[data-beta-layout=new] body.home-page .hero-stage .hero-media > picture img {
  object-fit: cover;
  object-position: 50% var(--film-focus, 35%);
}
:root[data-beta-layout=new] body.home-page .hero-stage .hero-intro {
  display: block;
  max-width: 760px;
}
:root[data-beta-layout=new] body.home-page .hero-stage .hero-intro .hero-lede {
  margin-top: 22px;
  max-width: 500px;
}
:root[data-beta-layout=new] body.home-page .hero-stage .hero-intro .hero-actions { margin-top: 26px; }
/* Headline reads as the same font as the rest of the site. It already IS the same font
   (Archivo Regular), but live tracks it very tight (-5.2%) and tints "celebration." mint,
   which reads like a second typeface next to the footer's "Every kind of celebration."
   Now: the footer's tracking (-2.5%), one color for both lines, slightly open lines. */
:root[data-beta-layout=new] body.home-page .hero-stage h1 { letter-spacing: -0.025em; line-height: 1.08; }
:root[data-beta-layout=new] body.home-page .hero-stage h1 em { color: inherit; font-style: normal; }
:root[data-beta-layout=new] body.home-page .hero-stage .film-caption { display: none; }
:root[data-beta-layout=new] body.home-page .hero-stage .hero-playback-control { bottom: 72px; }

@media (max-width: 760px) {
  :root[data-beta-layout=new] body.home-page .hero-stage {
    min-height: auto;
    max-height: 84svh;
    padding-top: 100px;
    padding-bottom: 36px;
  }
  :root[data-beta-layout=new] body.home-page .hero-stage .hero-intro .hero-lede { margin-top: 16px; }
  :root[data-beta-layout=new] body.home-page .hero-stage .hero-intro .hero-actions { margin-top: 20px; }
  /* On phones the bottom row is full with the two actions, so play/pause moves to the
     film's top-right corner, just under the top bar. */
  :root[data-beta-layout=new] body.home-page .hero-stage .hero-playback-control {
    top: calc(77px + env(safe-area-inset-top, 0px) + 14px);
    bottom: auto;
  }
}

/* ---------- 3b. The same frosted bar on every other page once you scroll (Elijah: Home's bar on every tab) ---------- */
:root[data-beta-layout=new] .cs-header { transition: background-color .28s ease, border-color .28s ease, box-shadow .28s ease; }
:root[data-beta-layout=new] .cs-header.cs-scrolled:not(.cs-over-hero),
:root[data-beta-layout=new] #header.cs-header.cs-scrolled:not(.cs-over-hero) { /* id form outranks pages that style #header */
  background-color: rgba(242, 237, 222, .72);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: rgba(22, 47, 40, .08);
  box-shadow: 0 1px 0 rgba(22, 47, 40, .04);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root[data-beta-layout=new] .cs-header.cs-scrolled:not(.cs-over-hero) { background-color: #F2EDDE; }
}
@media (prefers-reduced-transparency: reduce) {
  :root[data-beta-layout=new] .cs-header.cs-scrolled:not(.cs-over-hero) { background-color: #F2EDDE; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-reduced-motion: reduce) { :root[data-beta-layout=new] .cs-header { transition: none; } }

/* ---------- 3. Frosted top bar (Home, How it works, Discover: the pages with a film or photo under the bar) ---------- */
:root[data-beta-layout=new] body.cinematic-page #header.cs-header {
  transition: background-color .28s ease, border-color .28s ease, box-shadow .28s ease, color .28s ease;
}
:root[data-beta-layout=new] body.cinematic-page #header.cs-header:not(.cs-over-hero) {
  background-color: rgba(242, 237, 222, .72);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: rgba(22, 47, 40, .08);
  box-shadow: 0 1px 0 rgba(22, 47, 40, .04);
}
:root[data-beta-layout=new][data-beta-theme=dark] body.cinematic-page #header.cs-header:not(.cs-over-hero) {
  background-color: rgba(4, 16, 14, .66);
  border-bottom-color: rgba(159, 227, 205, .12);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .2);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root[data-beta-layout=new] body.cinematic-page #header.cs-header:not(.cs-over-hero) { background-color: #F2EDDE; }
  :root[data-beta-layout=new][data-beta-theme=dark] body.cinematic-page #header.cs-header:not(.cs-over-hero) { background-color: #04100E; }
}
@media (prefers-reduced-transparency: reduce) {
  :root[data-beta-layout=new] body.cinematic-page #header.cs-header:not(.cs-over-hero) { background-color: #F2EDDE; -webkit-backdrop-filter: none; backdrop-filter: none; }
  :root[data-beta-layout=new][data-beta-theme=dark] body.cinematic-page #header.cs-header:not(.cs-over-hero) { background-color: #04100E; }
}
@media (prefers-reduced-motion: reduce) {
  :root[data-beta-layout=new] body.cinematic-page #header.cs-header { transition: none; }
}

/* ---------- 4. How it works: same first view ----------
   The laptop film (creator-brand-web, 16:9) carries its own headline inside the picture,
   so the page copy stays bottom-right next to it. Changes: the 84% cap so the next section
   peeks (small top-biased crop above the cap), and narrow windows (601-1000px) get the
   landscape film in full with the copy below it, instead of the phone's portrait film
   from 760px down. Phones (600px and narrower) keep today's layout, which already shows
   the whole portrait film with the copy peeking below. */
@media (min-width: 1001px) {
  :root[data-beta-layout=new] body.cinematic-page .creator-hero-stage {
    box-sizing: border-box;
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: auto;
    max-height: 84svh;
  }
  :root[data-beta-layout=new] body.cinematic-page .creator-hero-stage .creator-hero-media video,
  :root[data-beta-layout=new] body.cinematic-page .creator-hero-stage .creator-hero-media > picture img {
    object-fit: cover;
    object-position: 50% 30%;
  }
}
@media (min-width: 601px) and (max-width: 1000px) {
  :root[data-beta-layout=new] body.cinematic-page .creator-hero-stage {
    --creator-frame-height: 56.25vw;
    min-height: auto;
    padding-top: calc(var(--cs-header-height) + var(--creator-frame-height) + 28px);
    padding-bottom: 56px;
  }
  :root[data-beta-layout=new] body.cinematic-page .creator-hero-stage .creator-hero-media video,
  :root[data-beta-layout=new] body.cinematic-page .creator-hero-stage .creator-hero-media > picture img {
    inset: auto; top: var(--cs-header-height); left: 0;
    width: 100%; height: auto;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    object-position: center;
  }
  :root[data-beta-layout=new] body.cinematic-page .creator-portrait-overlay { display: none; } /* belongs to the portrait film */
  /* The landscape film shows the title itself; keep the h1 for screen readers only (as the laptop layout does). */
  :root[data-beta-layout=new] body.cinematic-page .creator-hero .creator-hero-title {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
  }
  :root[data-beta-layout=new] body.cinematic-page .creator-hero-stage .film-control {
    top: calc(var(--cs-header-height) + var(--creator-frame-height) - 64px); bottom: auto; right: var(--pad);
  }
}

/* ---------- 5. Discover: same first view ----------
   A still photo (photographer.jpg, 16:9). The box takes the photo's shape, capped at 84%,
   instead of a fixed 560px band that cropped a third of it. The copy is already bottom-left
   and the search panel still overlaps the bottom edge. On phones the copy needs more room
   than a 16:9 box gives, so the box grows to fit the copy and the photo loses width, not height. */
:root[data-beta-layout=new] body.cs-discover .discover-hero .hero-stage {
  box-sizing: border-box;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: auto;
  max-height: 84svh;
  overflow: visible;        /* the live box clips its contents, which stops it growing to fit the copy on small screens */
}
@media (max-width: 1000px) {
  :root[data-beta-layout=new] body.cs-discover .discover-hero .hero-stage { padding-top: 108px; } /* top bar + a little air; was 140 */
}
:root[data-beta-layout=new] body.cs-discover .discover-hero-photo { object-position: 50% 35%; }
:root[data-beta-layout=new] body.cs-discover .discover-hero h1 { letter-spacing: -0.025em; line-height: 1.08; }
@media (max-width: 620px) {
  :root[data-beta-layout=new] body.cs-discover .discover-hero-photo { object-position: 42% 35%; }
}

/* ---------- 6. How it works + For creators are one page in the New layout (2026-10-20) ---------- */
:root[data-beta-layout=new] header.cs-header nav a[href="/creators"],
:root[data-beta-layout=new] header.cs-header .cs-menu a[href="/creators"],
:root[data-beta-layout=new] #cs-menu a[href="/creators"] { display: none; }
