/* ============================================================
   CREATED IN LA — main.css
   Order: 1) tokens  2) fonts/global  3) layout  4) utilities
          5) component blocks (section markers)  6) theme overrides
   Every design value flows from a :root token. Math is wrapped in calc().
   ============================================================ */

/* ------------------------------------------------------------
   1. DESIGN TOKENS (:root)
   ------------------------------------------------------------ */
:root {
  /* Site fundamentals — unitless */
  --site--viewport-min: 20;
  --site--viewport-max: 80;
  --site--column-count: 12;

  /* Max widths */
  --max-width--main: 80rem;
  --max-width--medium: 60rem;
  --max-width--small: 40rem;

  /* Site layout — fluid margin / gutter (1rem → 3rem, 1rem → 2rem) */
  --site--margin: clamp(
    1 * 1rem,
    ((1 - ((3 - 1) / (var(--site--viewport-max) - var(--site--viewport-min)) * var(--site--viewport-min))) * 1rem
      + ((3 - 1) / (var(--site--viewport-max) - var(--site--viewport-min))) * 100vw),
    3 * 1rem
  );
  --site--gutter: clamp(
    1 * 1rem,
    ((1 - ((2 - 1) / (var(--site--viewport-max) - var(--site--viewport-min)) * var(--site--viewport-min))) * 1rem
      + ((2 - 1) / (var(--site--viewport-max) - var(--site--viewport-min))) * 100vw),
    2 * 1rem
  );

  /* Spacing */
  --space--section-main: clamp(
    4 * 1rem,
    ((4 - ((8 - 4) / (var(--site--viewport-max) - var(--site--viewport-min)) * var(--site--viewport-min))) * 1rem
      + ((8 - 4) / (var(--site--viewport-max) - var(--site--viewport-min))) * 100vw),
    8 * 1rem
  );

  /* Typography — families */
  --text--font-title: "Bahnschrift", "Arial Narrow", system-ui, sans-serif;
  --text--font-body: "Montserrat", system-ui, -apple-system, sans-serif;

  /* Title axis defaults (variable font). Bold + condensed now; italic later. */
  --text--title-wght: 700;
  --text--title-wdth: 75;

  /* Typography — body sizes (14→16 / 16→18 / 18→20) */
  --text--size-small: clamp(
    0.875 * 1rem,
    ((0.875 - ((1 - 0.875) / (var(--site--viewport-max) - var(--site--viewport-min)) * var(--site--viewport-min))) * 1rem
      + ((1 - 0.875) / (var(--site--viewport-max) - var(--site--viewport-min))) * 100vw),
    1 * 1rem
  );
  --text--size-main: clamp(
    1 * 1rem,
    ((1 - ((1.125 - 1) / (var(--site--viewport-max) - var(--site--viewport-min)) * var(--site--viewport-min))) * 1rem
      + ((1.125 - 1) / (var(--site--viewport-max) - var(--site--viewport-min))) * 100vw),
    1.125 * 1rem
  );
  --text--size-large: clamp(
    1.125 * 1rem,
    ((1.125 - ((1.25 - 1.125) / (var(--site--viewport-max) - var(--site--viewport-min)) * var(--site--viewport-min))) * 1rem
      + ((1.25 - 1.125) / (var(--site--viewport-max) - var(--site--viewport-min))) * 100vw),
    1.25 * 1rem
  );

  /* Typography — heading / display sizes */
  --text--size-eyebrow: clamp(
    0.75 * 1rem,
    ((0.75 - ((0.9375 - 0.75) / (var(--site--viewport-max) - var(--site--viewport-min)) * var(--site--viewport-min))) * 1rem
      + ((0.9375 - 0.75) / (var(--site--viewport-max) - var(--site--viewport-min))) * 100vw),
    0.9375 * 1rem
  );
  --text--size-h2: clamp(
    2 * 1rem,
    ((2 - ((3.5 - 2) / (var(--site--viewport-max) - var(--site--viewport-min)) * var(--site--viewport-min))) * 1rem
      + ((3.5 - 2) / (var(--site--viewport-max) - var(--site--viewport-min))) * 100vw),
    3.5 * 1rem
  );
  --text--size-display: clamp(
    2.5 * 1rem,
    ((2.5 - ((5.5 - 2.5) / (var(--site--viewport-max) - var(--site--viewport-min)) * var(--site--viewport-min))) * 1rem
      + ((5.5 - 2.5) / (var(--site--viewport-max) - var(--site--viewport-min))) * 100vw),
    5.5 * 1rem
  );

  /* Line heights / spacing */
  --text--lh-display: 1.02;
  --text--ls-display: 0.01em;

  /* Colour */
  --color--bg: #000000;
  --color--text: #f8f8f8;
  --color--text-muted: rgba(248, 248, 248, 0.7);
  --color--accent: #00ffcf;
  --color--accent-text: #000000;

  /* Radius */
  --radius--small: 0.25rem;

  /* Component-local */
  --nav--height: 5.5rem;
}

/* ------------------------------------------------------------
   2. FONTS + GLOBAL ELEMENT STYLES
   ------------------------------------------------------------ */
@font-face {
  font-family: "Bahnschrift";
  src: url("../assets/fonts/Bahnschrift%20Regular.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 50% 100%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("../assets/fonts/Montserrat-VariableFont_wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--color--bg);
  color: var(--color--text);
  font-family: var(--text--font-body);
  font-size: var(--text--size-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--text--font-title);
  font-weight: var(--text--title-wght);
  font-stretch: 75%;
  font-variation-settings: "wght" var(--text--title-wght), "wdth" var(--text--title-wdth);
  text-transform: uppercase;
  line-height: var(--text--lh-display);
  letter-spacing: var(--text--ls-display);
}

p {
  margin: 0;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Title elements are hidden until JS reveals them (prevents FOUC) */
[data-hero-title],
[data-split="heading"] {
  visibility: hidden;
}

/* ------------------------------------------------------------
   3. LAYOUT / STRUCTURE
   ------------------------------------------------------------ */
.page-wrap {
  position: relative;
  width: 100%;
}

.main-wrap {
  display: block;
  width: 100%;
}

.padding-global {
  padding-left: var(--site--margin);
  padding-right: var(--site--margin);
}

.container-large {
  width: 100%;
  max-width: var(--max-width--main);
  margin: 0 auto;
}
.container-medium {
  width: 100%;
  max-width: var(--max-width--medium);
  margin: 0 auto;
}
.container-small {
  width: 100%;
  max-width: var(--max-width--small);
  margin: 0 auto;
}

/* ------------------------------------------------------------
   4. UTILITIES
   ------------------------------------------------------------ */
.text-style-display {
  font-family: var(--text--font-title);
  font-size: var(--text--size-display);
  font-weight: var(--text--title-wght);
  font-stretch: 75%;
  font-variation-settings: "wght" var(--text--title-wght), "wdth" var(--text--title-wdth);
  text-transform: uppercase;
  line-height: var(--text--lh-display);
  letter-spacing: var(--text--ls-display);
}

.text-style-eyebrow {
  font-family: var(--text--font-body);
  font-size: var(--text--size-eyebrow);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  line-height: 1.2;
}

.text-style-small {
  font-size: var(--text--size-small);
}

.text-color-accent {
  color: var(--color--accent);
}

/* Button — left "flag" / forked-tongue notch, right edge a straight slant
   (top further right than bottom) */
.button {
  --button--bg: transparent;
  --button--color: var(--color--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* tighter padding; extra top to optically centre the condensed caps */
  padding: 0.22em 1.05em 0.08em 1.15em;
  font-family: var(--text--font-title);
  font-size: clamp(1.95rem, 2.75vw, 2.75rem);
  font-weight: var(--text--title-wght);
  font-stretch: 75%;
  font-variation-settings: "wght" var(--text--title-wght), "wdth" var(--text--title-wdth);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--button--color);
  background-color: var(--button--bg);
  clip-path: polygon(0 0, 100% 0, 92% 100%, 0 100%, 8% 50%);
}
.button-accent {
  --button--bg: var(--color--accent);
  --button--color: var(--color--accent-text);
}

/* Character-stagger hover — each char rolls up to a duplicate (Osmo).
   Targets the [data-button-animate-chars] wrapper; split into spans in JS. */
[data-button-animate-chars] {
  position: relative;
  display: inline-block;
  overflow: hidden;
  line-height: 1.3;
  white-space: nowrap;
  vertical-align: bottom;
}
[data-button-animate-chars] span {
  display: inline-block;
  position: relative;
  text-shadow: 0 1.3em currentColor;
  transform: translateY(0) rotate(0.001deg);
  transition: transform 0.55s cubic-bezier(0.625, 0.05, 0, 1);
}
.nav_link:hover [data-button-animate-chars] span,
.button:hover [data-button-animate-chars] span {
  transform: translateY(-1.3em) rotate(0.001deg);
}

/* ============================================================
   HERO  —  section_hero
   Used on: Home
   Scroll-driven curtain reveal. A ~300vh track scrolls past a
   sticky 100vh stage; layers are driven by data-* hooks in JS.
   ============================================================ */
.section_hero {
  position: relative;
  background-color: var(--color--bg);
}

.hero_track {
  position: relative;
  height: 300vh; /* fallback; JS sets the real height from the strip width */
}

.hero_stage {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

/* Layered media + content all fill the stage */
.hero_video,
.hero_overlay,
.hero_vignette,
.hero_cover,
.hero_content {
  position: absolute;
  inset: 0;
}

/* Layer 0 — horizontal timeline strip (behind the curtains) */
.hero_strip {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  display: flex;
  align-items: center;
  height: 100%;
  width: max-content;
  padding: 0 0 0 6vw; /* Walt sits further left; no right padding so the outro centres */
  background-color: var(--color--bg);
  will-change: transform;
}
.story_item {
  position: relative;
  flex: 0 0 auto;
}

/* Intro — desk on the left, title encroaching from the right */
.story_intro {
  display: flex;
  align-items: center;
  height: 100%;
}
.story_intro-img {
  height: 72vh;
  width: auto;
  object-fit: cover;
  -webkit-mask-image: linear-gradient(to right, #000 64%, transparent 100%);
  mask-image: linear-gradient(to right, #000 64%, transparent 100%);
}
.story_intro-title {
  position: relative;
  z-index: 1;
  margin-left: -13vw; /* encroach further over the image for weight */
  max-width: none;
  white-space: nowrap; /* deterministic 2 lines (break only at the <br>) */
  color: #fff;
  font-size: clamp(2.4rem, 5.1vw, 5.3rem);
}

/* Shared paragraph styling — fully white */
.story_text {
  color: #fff;
  font-family: var(--text--font-body);
  font-size: var(--text--size-large);
  font-weight: 500;
  line-height: 1.3;
}

/* 1923 — separate, bottom-left, just before the grid */
.story_p1 {
  width: clamp(28rem, 30vw, 34rem);
  align-self: flex-end;
  margin-bottom: 16vh;
  margin-left: calc(7vw - 1.25rem); /* ~20px tighter to the H2 title */
}

/* Responsive grid: images 3/4/6/7 touching + text in top/bottom rows */
.story_grid {
  position: relative;
  display: grid;
  grid-template-columns: auto auto auto auto; /* each sized to its image */
  grid-template-rows: 1fr auto 1fr; /* top text | image | bottom text */
  align-items: center;
  justify-items: center;
  height: 100%;
  margin-left: 14rem; /* grid sits closer to the 1923 paragraph */
}
.story_grid-img {
  grid-row: 2;
  position: relative;
  width: auto;
  display: block;
  object-fit: cover;
}
.story_grid-img.is-40 { height: 40vh; }
.story_grid-img.is-55 { height: 55vh; }
.story_grid-img.is-70 { height: 70vh; }
/* Star Wars (col 4) drifts behind the Theatre (col 3) on scroll */
.story_grid-img.col-3 { z-index: 1; }
.story_grid-img.is-behind { z-index: 0; }

.col-1 { grid-column: 1; }
.col-2 { grid-column: 2; }
.col-3 { grid-column: 3; }
.col-4 { grid-column: 4; }
.row-1 { grid-row: 1; }
.row-2 { grid-row: 2; }
.row-3 { grid-row: 3; }

/* Text cells fill their column so the black box can span it and mask the
   image where they meet (prevents text overlapping images on short screens). */
.story_cell {
  position: relative;
  justify-self: stretch;
  align-self: stretch;
  z-index: 4; /* text always above the images */
}
.story_box {
  position: absolute;
  left: -1%; /* 102% wide — tips over each edge so no thin image sliver shows */
  right: -1%;
  background-color: var(--color--bg); /* cuts off the image cleanly on collision */
  padding: 1.6rem 2rem;
}
.story_cell.is-top .story_box { top: calc(var(--nav--height) + 0.5rem); }
.story_cell.is-bottom .story_box { bottom: 1.5rem; }
.story_box .story_text {
  max-width: clamp(26rem, 28vw, 32rem); /* condensed — doesn't span the full column */
}

/* Absolute small images (2, 5) positioned over the grid */
.story_abs {
  position: absolute;
  top: 50%;
  z-index: 2;
}
.story_abs img {
  height: 30vh;
  width: auto;
  display: block;
  object-fit: cover;
}
.story_abs-2 {
  left: 0; /* grid start, overlapping ~20% into the grid */
  transform: translate(-80%, -50%);
}
.story_abs-5 {
  left: calc(50% + 15rem); /* grid mid-point, shifted 15rem right */
  transform: translate(-50%, -50%);
}

/* Outro — alone on a black screen, full viewport wide */
.story_outro {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  height: 100%;
  margin-left: 6vw; /* gap closed; the last image fades out so the outro is alone */
}
.story_outro-title {
  white-space: nowrap;
  font-size: clamp(2.4rem, 5.4vw, 5rem);
  color: var(--color--text);
}
/* "our turn." — green tag, black text, slanted on both edges */
.story_tag {
  display: inline-block;
  margin-left: 0.15em;
  padding: 0.18em 0.55em 0.04em; /* extra top to optically centre the caps */
  background-color: var(--color--accent);
  color: var(--color--accent-text);
  clip-path: polygon(8% 0, 100% 0, 92% 100%, 0 100%);
}

/* Highlight marker reveal — coloured bar over each line, scales away on reveal */
[data-highlight-marker-reveal] {
  visibility: hidden;
}
[data-highlight-marker-reveal] .highlight-marker-line {
  display: inline-block !important;
  width: auto;
}
.highlight-marker-bar {
  position: absolute;
  inset: -0.07em 0;
  z-index: 2;
  pointer-events: none;
}
/* the outro tag is taller than the text line — extend the cover to clear it */
.story_outro-title .highlight-marker-bar {
  inset: -0.18em 0;
}

/* Videos — cover the stage */
.hero_video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero_curtain {
  z-index: 1;
}
.hero_loop {
  z-index: 2;
  opacity: 1; /* opaque immediately so the timeline strip never flashes through */
}

/* Overlays */
.hero_overlay {
  z-index: 3;
  background-color: rgba(0, 0, 0, 0.2);
  pointer-events: none;
}
.hero_vignette {
  z-index: 3;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0.4) 22%,
    rgba(0, 0, 0, 0) 48%
  );
  pointer-events: none;
}
/* Anti-flash cover — opaque black at load (hides the strip + any un-decoded
   video frame and the font-load wait), then fades out as the intro begins. */
.hero_cover {
  z-index: 3;
  background-color: #000;
  pointer-events: none;
}

/* Content */
.hero_content {
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: stretch; /* keep padding-global/container full width for stable line splitting */
  justify-content: center;
  pointer-events: none;
}
.hero_content-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.25rem;
}
.hero_eyebrow {
  font-size: clamp(1.05rem, 1.7vw, 1.5rem);
  letter-spacing: 0.26em;
  color: var(--color--text);
  /* hidden state for the rightward unmask; JS animates clip-path open */
  clip-path: inset(0 100% 0 0);
}
.hero_title {
  /* sized so "THE PREMIERE CREATOR EVENT" holds on one line (2 lines total) */
  font-size: clamp(2.6rem, 6.7vw, 5.7rem);
  width: 100%;
  max-width: none;
  white-space: nowrap; /* deterministic 2 lines (break only at the <br>) */
  color: var(--color--text);
}

/* Presented by Disney */
.hero_presented {
  z-index: 4;
  position: absolute;
  left: 50%;
  bottom: clamp(1.5rem, 4vh, 3rem);
  transform: translateX(-50%);
  display: flex;
  flex-direction: row; /* one line, including the logo */
  align-items: center;
  gap: 0.7em;
  white-space: nowrap;
  opacity: 0; /* fades in with nav */
  pointer-events: none;
}
.hero_presented-label {
  font-size: clamp(1.05rem, 1.8vw, 1.5rem); /* ~2.5x the prior eyebrow size */
  color: var(--color--text-muted);
}
.hero_presented-logo {
  height: clamp(3.9rem, 6.9vw, 5.4rem); /* +50% */
  width: auto;
}
/* end: HERO */

/* ============================================================
   NAV  —  .nav
   Used on: Home (persistent / global)
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding-top: clamp(0.5rem, 1.2vh, 1rem); /* breathing room from the top edge */
  opacity: 0; /* fades in during hero intro */
}
.nav_inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav--height);
}
.nav_left {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.nav_logo-img {
  height: 4rem; /* 2.5x the prior 1.6rem */
  width: auto;
}
/* Timeline progress — full logo width, fades in on reveal, fills on horizontal scroll */
.nav_progress {
  width: 100%;
  height: 1.5px;
  background-color: rgba(248, 248, 248, 0.2);
  opacity: 0;
  overflow: hidden;
}
.nav_progress-fill {
  display: block;
  width: 100%;
  height: 100%;
  background-color: #fff;
  transform: scaleX(0);
  transform-origin: left center;
}
.nav_menu {
  display: flex;
  align-items: center;
  gap: clamp(0.875rem, 1.75vw, 1.75rem); /* ~30% tighter between the text links */
  margin: 0;
  padding: 0;
  list-style: none;
}
/* keep the larger gap before the Apply button */
.nav_menu .button {
  margin-left: clamp(0.5rem, 1vw, 1rem);
}
.nav_link {
  font-family: var(--text--font-title);
  font-size: clamp(1.75rem, 2.4vw, 2.4rem);
  font-weight: var(--text--title-wght);
  font-stretch: 75%;
  font-variation-settings: "wght" var(--text--title-wght), "wdth" var(--text--title-wdth);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--color--text);
}
/* end: NAV */

/* ============================================================
   SHOWREEL  —  section_showreel
   Used on: Home
   Full-bleed parallaxing background video, dark overlay, centred text.
   ============================================================ */
.section_showreel {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background-color: var(--color--bg);
}
.showreel_bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.showreel_video {
  position: absolute;
  top: -10%;
  left: 0;
  width: 100%;
  height: 120%; /* extra height for the parallax travel */
  object-fit: cover;
}
.showreel_overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.43);
  pointer-events: none;
}
.showreel_content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.showreel_inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45em;
  text-align: center;
}
.showreel_line {
  color: #fff;
  font-size: clamp(2.1rem, 4.9vw, 4.2rem);
  line-height: 1.05;
  white-space: nowrap; /* each line is single-line — keeps SplitText to one line */
}
/* line 2 — green box (same shape as the outro tag) */
.showreel_tag {
  background-color: var(--color--accent);
  color: var(--color--accent-text);
  padding: 0.2em 0.85em 0.06em; /* more horizontal breathing room */
  clip-path: polygon(8% 0, 100% 0, 92% 100%, 0 100%);
}
/* end: SHOWREEL */

/* ------------------------------------------------------------
   6. RESPONSIVE
   ------------------------------------------------------------ */
@media screen and (max-width: 767px) {
  /* No pin / horizontal scroll on mobile — the section flows vertically.
     The desktop matchMedia in JS doesn't run below 768px. */
  .hero_track {
    height: auto;
  }
  .hero_stage {
    position: static;
    height: auto;
    overflow: visible;
  }
  .hero_video,
  .hero_overlay,
  .hero_vignette {
    display: none;
  }
  .hero_content {
    position: relative;
    min-height: 88vh;
  }
  .hero_presented {
    position: relative;
    left: auto;
    bottom: auto;
    transform: none;
    margin: 2rem auto 0;
  }
  .hero_strip {
    position: relative;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    height: auto;
    padding: var(--space--section-main) var(--site--margin);
    row-gap: var(--space--section-main);
    column-gap: 0;
    transform: none !important;
  }
  .story_intro {
    flex-direction: column;
    align-items: flex-start;
    height: auto;
  }
  .story_intro-img {
    height: auto;
    width: 100%;
    -webkit-mask-image: none;
    mask-image: none;
  }
  .story_intro-title {
    margin-left: 0;
    margin-top: 1rem;
  }
  .story_text {
    width: 100%;
    align-self: auto !important;
    margin: 0 !important;
  }
  .story_media {
    align-self: auto !important;
    margin: 0 !important;
  }
  .story_media img {
    height: auto !important;
    width: 100%;
  }
  .story_outro {
    height: auto;
  }
  .story_outro-title {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero_loop {
    opacity: 1;
  }
  .hero_cover {
    opacity: 0;
  }
  .hero_eyebrow {
    clip-path: none;
  }
  [data-hero-title],
  [data-split="heading"],
  [data-highlight-marker-reveal] {
    visibility: visible;
  }
}
