/* =====================================================================
   Cannes Young Lions Kenya 2027 · Site layout
   Built on the YL27 design system: css/tokens.css (values and fonts)
   and css/components.css (button, chip, link). This file only lays out
   the page and sets the responsive type steps.
   Layout: charcoal header and full-height campaign opening, the YL27
   pattern as the single chapter break, then white editorial sections
   and charcoal media bands, closing on a charcoal call to action.
   ===================================================================== */

/* ---------- Responsive type: Mobile styles at 767px and below, Desktop styles at 1024px and up,
   interpolated in between, as the design system specifies. ---------- */
:root {
  --fs-display: clamp(56px, calc(21.875vw - 112px), 112px);
  --lh-display: clamp(56px, calc(20.3125vw - 100px), 108px);
  --fs-h2: clamp(40px, calc(9.375vw - 32px), 64px);
  --lh-h2: clamp(42px, calc(8.594vw - 24px), 64px);
  --fs-h3: clamp(32px, calc(6.25vw - 16px), 48px);
  --lh-h3: clamp(36px, calc(5.469vw - 6px), 50px);
  --fs-h5: clamp(24px, calc(1.5625vw + 12px), 28px);
  --lh-h5: clamp(28px, calc(1.5625vw + 16px), 32px);
  --fs-h6: clamp(20px, calc(1.5625vw + 8px), 24px);
  --lh-h6: clamp(24px, calc(1.5625vw + 12px), 28px);
  --fs-subhead: clamp(18px, calc(0.78125vw + 12px), 20px);
  --lh-subhead: clamp(26px, calc(0.78125vw + 20px), 28px);
  --fs-body-large: clamp(18px, calc(0.78125vw + 12px), 20px);
  --lh-body-large: clamp(28px, calc(1.5625vw + 16px), 32px);
  --fs-body: clamp(16px, calc(0.78125vw + 10px), 18px);
  --lh-body: clamp(26px, calc(0.78125vw + 20px), 28px);

  --margin: var(--margin-mobile);
  --gutter: var(--gutter-mobile);
  --section-y: var(--space-48);
  --header-h: 72px;
  --radius-media: 24px;   /* Rounded corners for every container that holds an image (site decision; the kit uses 0). */
}
@media (min-width: 768px) {
  :root { --margin: var(--margin-tablet); --gutter: var(--gutter-tablet); --section-y: var(--space-64); }
}
@media (min-width: 1024px) {
  :root { --margin: var(--margin-desktop); --gutter: var(--gutter-desktop); --section-y: var(--space-96); --header-h: 80px; }
}

/* Type styles (font families, weights and tracking come from the design system) */
.display, .h1, .h2, .h3 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.07em;
  text-transform: uppercase;
  margin: 0;
}
.display { font-size: var(--fs-display); line-height: var(--lh-display); }
.h2 { font-size: var(--fs-h2); line-height: var(--lh-h2); }
.h3 { font-size: var(--fs-h3); line-height: var(--lh-h3); }
.h5 { font: 700 var(--fs-h5)/var(--lh-h5) var(--font-sans); letter-spacing: -0.01em; margin: 0; }
.h6 { font: 700 var(--fs-h6)/var(--lh-h6) var(--font-sans); margin: 0; }
.subhead { font: 400 var(--fs-subhead)/var(--lh-subhead) var(--font-sans); letter-spacing: 0.12em; text-transform: uppercase; margin: 0; }
.eyebrow { font: 400 12px/18px var(--font-sans); letter-spacing: 0.2em; text-transform: uppercase; margin: 0; }
.body-large { font: 300 var(--fs-body-large)/var(--lh-body-large) var(--font-sans); margin: 0; }
.body { font: 300 var(--fs-body)/var(--lh-body) var(--font-sans); margin: 0; }
.body-small { font: 300 14px/22px var(--font-sans); margin: 0; }
.caption { font: 400 12px/18px var(--font-sans); margin: 0; }
strong { font-weight: 700; }
.highlight { color: var(--golden-yellow-500); }   /* one word or phrase, on charcoal only */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 8px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { background: var(--surface-default); color: var(--text-primary); }
img { display: block; max-width: 100%; height: auto; }
p { margin: 0; }
[hidden] { display: none !important; }
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-default);
  outline-offset: var(--focus-ring-offset);
}
.yl-inverse a:focus-visible, .yl-inverse button:focus-visible, .yl-inverse summary:focus-visible {
  outline-color: var(--text-inverse);
}
.yl-inverse { background: var(--surface-inverse); color: var(--text-inverse); }

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-left: max(var(--margin), env(safe-area-inset-left, 0px));
  padding-right: max(var(--margin), env(safe-area-inset-right, 0px));
}
.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  padding: 12px 16px; background: var(--action-primary); color: var(--text-primary);
  font: 700 14px/20px var(--font-sans); letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none;
}
.skip-link:focus { top: 12px; }
.placeholder { color: var(--text-secondary); }
.yl-inverse .placeholder { color: var(--charcoal-300); }

/* ---------- Buttons: pill shape with the arrow in a round chip (site decision, after the state reference).
   Builds on the kit's Button (components.css): same colours, label style, sizes and states. ---------- */
a.yl-btn { text-decoration: none; }
.yl-btn__label { display: inline-block; }
.yl-btn { border-radius: var(--radius-999); padding: 0 var(--space-24); gap: var(--space-12); transition: background-color 120ms cubic-bezier(.2, 0, 0, 1), border-color 120ms cubic-bezier(.2, 0, 0, 1), box-shadow 200ms cubic-bezier(.2, 0, 0, 1); }
.yl-btn--l { padding: 0 var(--space-28); }
.yl-btn:has(.yl-btn__arrow) { padding-right: 6px; }
.yl-btn--l:has(.yl-btn__arrow) { padding-right: 8px; }
.yl-btn__arrow {
  box-sizing: content-box; flex: none;
  width: 16px; height: 16px; padding: 10px; border-radius: 50%;
  background: var(--charcoal-900); color: var(--golden-yellow-500);
  transition: background-color 120ms cubic-bezier(.2, 0, 0, 1);
}
.yl-btn--s .yl-btn__arrow { width: 14px; height: 14px; padding: 8px; }
.yl-btn--l .yl-btn__arrow { width: 18px; height: 18px; padding: 14px; }
.yl-btn__arrow path { transition: transform 200ms cubic-bezier(.2, 0, 0, 1); }
.yl-btn--primary:hover .yl-btn__arrow { transform: none; }
.yl-btn:hover .yl-btn__arrow path { transform: translateX(3px); }
.yl-btn--primary:hover { box-shadow: 0 10px 24px -12px rgba(23, 23, 23, 0.55); }
.yl-btn:active .yl-btn__arrow { background: var(--charcoal-800); }
.yl-btn--secondary .yl-btn__arrow, .yl-btn--tertiary .yl-btn__arrow { background: var(--charcoal-900); color: var(--white-50); }
.yl-inverse .yl-btn--secondary .yl-btn__arrow, .yl-inverse .yl-btn--tertiary .yl-btn__arrow { background: var(--white-50); color: var(--charcoal-900); }
.yl-inverse .yl-btn--primary:hover { box-shadow: 0 10px 28px -10px rgba(243, 203, 21, 0.45); }
/* Loading and success (set by script on submit) */
.yl-btn.is-loading, .yl-btn.is-success { cursor: progress; }
.yl-btn.is-loading .yl-btn__arrow { animation: btn-spin 900ms linear infinite; }
@keyframes btn-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .yl-btn__arrow path { transition: none; }
  .yl-btn:hover .yl-btn__arrow path { transform: none; }
  .yl-btn.is-loading .yl-btn__arrow { animation-duration: 2.4s; }
}
.nav-toggle { border-radius: var(--radius-999); }

/* ---------- Registration states: only the content for the current state shows ---------- */
html[data-reg="open"]   [data-reg-show]:not([data-reg-show~="open"]),
html[data-reg="before"] [data-reg-show]:not([data-reg-show~="before"]),
html[data-reg="closed"] [data-reg-show]:not([data-reg-show~="closed"]) { display: none !important; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  border-bottom: 1px solid var(--charcoal-800);
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
  z-index: 60; background: var(--surface-inverse);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-24); min-height: var(--header-h); }
.brand { display: inline-flex; flex: none; padding-block: var(--space-12); }
.brand img { height: 48px; width: auto; }
@media (max-width: 767px) { .brand img { height: 40px; } }
.nav-list { display: flex; align-items: center; gap: var(--space-8) var(--space-32); margin: 0; padding: 0; list-style: none; }
.nav-link {
  display: inline-flex; align-items: center; min-height: var(--control-s);
  font: 400 16px/24px var(--font-sans); color: var(--text-inverse);
  text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 2px; text-underline-offset: 6px;
  transition: text-decoration-color 120ms cubic-bezier(.2, 0, 0, 1);
}
.nav-link:hover { text-decoration-color: var(--golden-yellow-500); }
.nav-toggle {
  display: none; align-items: center; gap: var(--space-12);
  height: var(--control-s); padding: 0 var(--space-20);
  border: 1px solid var(--white-50); border-radius: var(--radius-999);
  background: transparent; color: var(--text-inverse);
  font: 700 14px/20px var(--font-sans); letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer;
}
.nav-toggle:hover { background: var(--charcoal-800); }
.nav-toggle-bars, .nav-toggle-bars::before { display: block; width: 18px; height: 1.8px; background: currentColor; }
.nav-toggle-bars { position: relative; transform: translateY(-3px); }
.nav-toggle-bars::before { content: ""; position: absolute; top: 6px; left: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(-6px) rotate(-90deg); }

/* Below the tablet breakpoint the mobile menu replaces the desktop nav (no JavaScript: links wrap). */
@media (max-width: 899px) {
  .no-js .header-inner { flex-wrap: wrap; padding-block: var(--space-8); }
  .no-js .nav-list { flex-wrap: wrap; }
  .js .nav-toggle { display: inline-flex; }
  .js .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--surface-inverse); border-bottom: 1px solid var(--charcoal-800);
    padding: var(--space-8) max(var(--margin), env(safe-area-inset-right, 0px)) var(--space-24) max(var(--margin), env(safe-area-inset-left, 0px));
  }
  .js .site-nav.is-open { display: block; }
  .js .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .js .nav-link { display: flex; min-height: 56px; font-size: 18px; border-bottom: 1px solid var(--charcoal-800); }
  .js .nav-cta { margin-top: var(--space-24); }
  .js .nav-cta .yl-btn { width: 100%; justify-content: space-between; height: var(--control-m); }
}

/* ---------- A. Opening section ---------- */
.hero {
  --hero-scrim: 0.35;   /* Black layer over the backdrop so white text stays readable on its bright centre. */
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h) - env(safe-area-inset-top, 0px));
  padding-top: var(--space-48);
  background-color: var(--solar-flare-edge);
  background-image: linear-gradient(rgba(0, 0, 0, var(--hero-scrim)), rgba(0, 0, 0, var(--hero-scrim))), url("../images/brand/hero-backdrop.webp");
  background-size: cover;
  background-position: center;
}
@media (max-width: 767px) {
  .hero { background-image: linear-gradient(rgba(0, 0, 0, var(--hero-scrim)), rgba(0, 0, 0, var(--hero-scrim))), url("../images/brand/hero-backdrop-1000.webp"); }
}
.trail-layer { position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; contain: strict; }   /* above the text, as briefed */
.trail-img {
  border-radius: calc(var(--radius-media) * 0.67);
  position: absolute; top: 0; left: 0;
  width: var(--trail-w, 240px); height: auto; max-width: none;
  opacity: 0; pointer-events: none; user-select: none;
  will-change: transform, opacity; backface-visibility: hidden;
}
/* YL27 pattern running up the left edge and down the right edge of the opening section */
.side-pattern {
  --tile-h: calc(var(--side-w, 40px) * 7.4135);   /* one pattern tile: 75 x 556, scaled to the strip width */
  position: absolute; top: 0; bottom: 0; z-index: 1; width: var(--side-w, 40px);
  overflow: hidden; pointer-events: none;
}
.side-pattern--left { left: max(var(--space-12), env(safe-area-inset-left, 0px)); }
.side-pattern--right { right: max(var(--space-12), env(safe-area-inset-right, 0px)); }
.side-pattern span {
  position: absolute; left: 0; right: 0; top: 0; height: calc(100% + var(--tile-h));
  background: url("../images/brand/yl27-pattern-golden-yellow-vertical.svg?v=2") repeat-y center top / 100% auto;
}
@media (prefers-reduced-motion: no-preference) {
  .side-pattern--left span { animation: side-up 9s linear infinite; }
  .side-pattern--right span { animation: side-down 9s linear infinite; }
}
@keyframes side-up { from { transform: translateY(0); } to { transform: translateY(calc(-1 * var(--tile-h))); } }
@keyframes side-down { from { transform: translateY(calc(-1 * var(--tile-h))); } to { transform: translateY(0); } }
@media (max-width: 1023px) { :root { --side-w: 24px; } .side-pattern--left { left: 6px; } .side-pattern--right { right: 6px; } }
@media (max-width: 767px) { :root { --side-w: 14px; } .side-pattern--left { left: 4px; } .side-pattern--right { right: 4px; } }
.hero-content { position: relative; z-index: 2; flex: 1 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.hero-eyebrow { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 var(--space-12); color: var(--text-inverse); }
.hero-title { margin-top: var(--space-24); max-width: 100%; letter-spacing: -0.04em; }
/* Below about 380px the Mobile display size is reduced just enough to keep KWAJUNGLE! on one line. */
@media (max-width: 767px) {
  .hero-title { font-size: min(var(--fs-display), calc((100vw - 48px) / 6)); line-height: min(var(--lh-display), calc((100vw - 48px) / 6)); }
  .hero .hero-title .line { display: inline; }   /* phones: let the campaign line wrap by word */
  .hero-eyebrow { flex-direction: column; }
  .hero-eyebrow .sep { display: none; }
}
.hero-title .line { display: block; }
/* Supporting line at the foot of the opening section, 72px from the bottom */
.hero-foot { position: relative; z-index: 2; padding-top: var(--space-48); padding-bottom: 72px; text-align: center; }
.hero-lead {
  margin: 0 auto; max-width: 64ch;
  font: 400 var(--fs-subhead)/var(--lh-subhead) var(--font-sans); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-inverse); text-wrap: balance;
}
.hero-meta { max-width: 60ch; color: var(--charcoal-300); }
.hero-meta strong { color: var(--text-inverse); }
.hero-actions { margin-top: var(--space-32); }
/* Countdown band, straight after the opening section */
.countdown-band { padding-block: var(--space-32); border-top: 1px solid var(--charcoal-800); }
.countdown { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-16) var(--space-48); }
.countdown-intro { display: flex; flex-direction: column; gap: var(--space-4); }
.countdown-label { color: var(--golden-yellow-500); }
.no-js .countdown-band { display: none; }
.countdown-label, .countdown-deadline { color: var(--charcoal-300); }
.countdown-units { display: flex; flex-wrap: wrap; gap: var(--space-4) var(--space-48); margin: 0; }
.cd-unit { display: inline-flex; align-items: baseline; gap: var(--space-8); }
.cd-num { font-family: var(--font-display); font-size: clamp(36px, 4vw, 56px); line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; min-width: 2ch; text-align: right; }
.cd-name { font: 400 12px/18px var(--font-sans); letter-spacing: 0.2em; text-transform: uppercase; color: var(--charcoal-300); }

/* Still arrangement (touch, reduced motion, no JavaScript). Hidden while the trail runs. */
.hero-gallery {
  list-style: none; margin: var(--space-48) 0 0; padding: 0; width: 100%;
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--gutter); align-items: start;
}
.hero-gallery li:nth-child(n+7) { display: none; }
.hero-gallery li:nth-child(even) { transform: translateY(var(--space-24)); }
.hero-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-media); }
.trail-on .hero-gallery { display: none; }
@media (max-width: 767px) {
  .hero-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-gallery li:nth-child(even) { transform: none; }
  .hero-gallery li:nth-child(3n+2) { transform: translateY(var(--space-16)); }
}

/* The YL27 pattern as the chapter break: tiled edge to edge, never stretched. */


/* ---------- Sections ---------- */
.section { padding-block: var(--section-y); }
.section-ruled { border-top: 1px solid var(--border-subtle); }
.section-eyebrow { color: var(--signal-red-600); margin-bottom: var(--space-16); }
.yl-inverse .section-eyebrow { color: var(--golden-yellow-500); }
.section-title { max-width: 18ch; margin-bottom: var(--space-48); text-wrap: balance; }
.section-title .line { display: block; }

/* Disclosure (accordion) built from the kit's 1.8px stroke and text styles */
.disclosure { border-top: 1px solid var(--charcoal-900); }
.disclosure summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-24);
  min-height: 64px; padding-block: var(--space-16); cursor: pointer; list-style: none;
}
.disclosure summary::-webkit-details-marker { display: none; }
.disclosure summary:hover .chev { transform: translateY(2px); }
.chev { flex: none; transition: transform 200ms cubic-bezier(.2, 0, 0, 1); }
.disclosure[open] .chev { transform: rotate(180deg); }
.disclosure[open] summary:hover .chev { transform: rotate(180deg); }
.disclosure-body { display: flex; flex-direction: column; gap: var(--space-16); padding-bottom: var(--space-32); max-width: 68ch; }
.disclosure-body .body-small { color: var(--text-secondary); }
.disclosure-body strong { color: var(--text-primary); }

/* ---------- B. Categories: cards with hover descriptions, scroll-linked staircase ---------- */
.cat-section { padding-block: var(--section-y); }
.cat-row {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-16);
}
.cat-item { min-width: 0; will-change: transform; }
.cat-card {
  position: relative; display: block; overflow: hidden; isolation: isolate;
  aspect-ratio: 3 / 4; border-radius: var(--radius-media);
  background: var(--surface-inverse); color: var(--text-inverse); text-decoration: none;
}
.cat-card:focus-visible { outline: var(--focus-ring-width) solid var(--focus-default); outline-offset: var(--focus-ring-offset); }
.cat-img {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none;
  object-fit: cover; object-position: center 35%;
  transition: transform 600ms cubic-bezier(.16, 1, .3, 1);
}
.cat-shade {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.35) 38%, rgba(0, 0, 0, 0) 62%);
  transition: opacity 200ms cubic-bezier(.2, 0, 0, 1);
}
.cat-content {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  display: flex; flex-direction: column; gap: var(--space-16);
  padding: var(--space-32);
}
.cat-name {
  margin: 0; font-family: var(--font-display); font-weight: 400; text-transform: uppercase; letter-spacing: -0.07em;
  font-size: var(--fs-h3); line-height: var(--lh-h3);
}
.cat-reveal { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-16); }
.cat-desc { font: 400 var(--fs-body)/var(--lh-body) var(--font-sans); max-width: 34ch; }
.cat-btn { pointer-events: none; }
/* Mouse and trackpad: the description comes in on hover or keyboard focus.
   The content block is moved down by the description's height (set by js/main.js), so only the title shows. */
@media (hover: hover) and (pointer: fine) {
  .js .cat-content { transform: translateY(var(--reveal-shift, 0px)); transition: transform 320ms cubic-bezier(.16, 1, .3, 1); }
  .js .cat-reveal { opacity: 0; transition: opacity 200ms cubic-bezier(.2, 0, 0, 1); }
  .js .cat-card:hover .cat-content, .js .cat-card:focus-visible .cat-content { transform: translateY(0); }
  .js .cat-card:hover .cat-reveal, .js .cat-card:focus-visible .cat-reveal { opacity: 1; transition-delay: 80ms; }
  .cat-card:hover .cat-img, .cat-card:focus-visible .cat-img { transform: scale(1.04); }
}
.cat-headline {
  margin: var(--space-48) 0 0;
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase; letter-spacing: -0.07em;
  font-size: var(--fs-h2); line-height: 1;
  text-wrap: balance;
}
.cat-headline .line { display: block; }
/* Below laptop width the headline sits on two lines, broken by meaning. */
@media (min-width: 768px) { .cat-headline { text-align: center; } }
/* Laptop and up: one line across the page, sized to the container width. */
@media (min-width: 1024px) {
  .cat-headline {
    white-space: nowrap;
    font-size: calc((min(100vw, var(--container-max)) - 2 * var(--margin)) * var(--headline-fit, 0.0465));
  }
  .cat-headline .line { display: inline; }
}

/* Scroll scene (added by js/main.js on screens 768px and wider when motion is allowed) */
.cat-motion .cat-section { padding-block: 0; }
.cat-motion .cat-scene { height: calc(100vh - var(--header-h) + var(--scene-scroll, 90vh)); }
.cat-motion .cat-stage {
  position: sticky; top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  height: calc(100vh - var(--header-h));
  height: calc(100svh - var(--header-h) - env(safe-area-inset-top, 0px));
  display: flex; flex-direction: column; justify-content: center;
  overflow: hidden;
}
.cat-motion .cat-card { aspect-ratio: auto; height: min(calc((100svh - var(--header-h)) * 0.62), calc((min(100vw, var(--container-max)) - 2 * var(--margin)) / 3 * 4 / 3)); }
.cat-motion .cat-headline { will-change: transform, opacity; }

/* ---------- C. Media band ---------- */
.media-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-64); align-items: center; }
.poster { margin: 0; }
.poster img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radius-media); }
.media-copy { display: flex; flex-direction: column; gap: var(--space-24); align-items: flex-start; min-width: 0; }
.media-copy .body-large { max-width: 46ch; }
.media-copy .body { color: var(--charcoal-300); }
.media-copy .body strong { color: var(--text-inverse); }
.media-action { margin-top: var(--space-8); }

/* ---------- D. Eligibility, how to enter, key dates ---------- */
.how-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-64); }
.how-col { min-width: 0; }
.col-title { padding-bottom: var(--space-16); border-bottom: 1px solid var(--charcoal-900); }
.marker-list, .step-list { list-style: none; margin: 0; padding: 0; }
.marker-list li, .step-list li { position: relative; padding: var(--space-16) 0 var(--space-16) var(--space-32); border-bottom: 1px solid var(--border-subtle); }
.marker-list li::before {
  content: ""; position: absolute; left: 0; top: calc(var(--space-16) + (var(--lh-body) - 10px) / 2);
  width: 10px; height: 10px; background: var(--accent-signal);
}
.step-list { counter-reset: step; }
.step-list li { counter-increment: step; padding-left: var(--space-48); }
.step-list li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: var(--space-16);
  font-family: var(--font-display); font-size: 24px; line-height: var(--lh-body); letter-spacing: -0.04em;
  color: var(--signal-red-600);
}
}

/* ---------- E. Past winners ---------- */
.year-filter { display: flex; gap: var(--space-16); margin-bottom: var(--space-48); }
.year-heading { margin-bottom: var(--space-24); }
.years-ready .year-heading { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.year-panel + .year-panel { margin-top: var(--space-64); }
.years-ready .year-panel + .year-panel { margin-top: 0; }
.winner-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-48) var(--gutter); }
.winner { display: flex; flex-direction: column; gap: var(--space-8); min-width: 0; }
.winner-img {
  border-radius: var(--radius-media); overflow: hidden;
  aspect-ratio: 4 / 5; margin-bottom: var(--space-16);
  display: flex; align-items: center; justify-content: center; padding: var(--space-24); text-align: center;
  background: var(--surface-subtle); border: 1px solid var(--border-subtle);
  font: 400 12px/18px var(--font-sans); letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-secondary);
}
.winner-meta { color: var(--signal-red-600); }
.winner-result { color: var(--text-secondary); }
.quote { margin: var(--space-64) 0 0; padding-top: var(--space-32); border-top: 1px solid var(--charcoal-900); display: flex; flex-direction: column; gap: var(--space-16); max-width: 860px; }
.quote blockquote { margin: 0; }
.quote figcaption { color: var(--text-secondary); }
.quote figcaption strong { color: var(--text-primary); }

/* ---------- F. Partners ---------- */
.partners-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: var(--space-32); }
.title-sponsor { display: flex; flex-direction: column; gap: var(--space-12); }
.title-sponsor .eyebrow { color: var(--golden-yellow-500); }
.title-sponsor img { width: clamp(200px, 22vw, 320px); }
.ticker { display: flex; overflow: hidden; margin-top: var(--space-64); padding-block: var(--space-24); border-top: 1px solid var(--charcoal-800); border-bottom: 1px solid var(--charcoal-800); }
.ticker-track { flex: 0 0 auto; display: flex; align-items: center; gap: var(--space-96); margin: 0; padding: 0 var(--space-96) 0 0; list-style: none; }
.ticker-track img { width: auto; max-width: none; }
.partner-link { display: flex; flex-direction: column; align-items: center; gap: var(--space-8); text-decoration: none; color: inherit; transition: opacity 150ms ease; }
.partner-link:hover { opacity: 0.75; }
.partner-link:focus-visible { outline: 2px solid var(--golden-yellow-500); outline-offset: 4px; }
.logo-role { font: 400 11px/14px var(--font-sans); letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; color: var(--charcoal-300); }
.logo-tusker { height: 88px; }
/* Toolkit: clear space equal to the Lion mark's height on all sides. At this size the mark is 25px tall (19px at the phone size below); the
   logo's own margin, the ticker's padding and the logo gaps give more than that. Keep it so if the sizes or gaps change. */
.logo-cannes { height: 68px; }
.logo-quollective { height: 34px; }
.logo-belva { height: 44px; }
.logo-mb96 { height: 40px; }
.ticker-copy { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .js .ticker-copy { display: flex; }
  .js .ticker-track { animation: ticker 32s linear infinite; }
  .js .ticker:hover .ticker-track { animation-play-state: paused; }
}
@keyframes ticker { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) {
  .ticker { padding-inline: max(var(--margin), env(safe-area-inset-left, 0px)); }
  .ticker-track { flex: 1 1 auto; flex-wrap: wrap; justify-content: center; gap: var(--space-48); padding: 0; max-width: var(--container-max); margin-inline: auto; }
}
.no-js .ticker-track { flex: 1 1 auto; flex-wrap: wrap; justify-content: center; gap: var(--space-48); padding: 0 var(--margin); }

/* ---------- G. FAQs ---------- */
.faq-filter { display: flex; flex-wrap: wrap; gap: var(--space-12); margin-bottom: var(--space-48); }
.faq-group { max-width: 960px; }
.faq-group + .faq-group { margin-top: var(--space-48); }
.faq-group-title { margin-bottom: var(--space-16); }
.faqs-ready .faq-group + .faq-group { margin-top: 0; }
.faqs-ready .faq-group-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.faq-list { border-bottom: 1px solid var(--charcoal-900); }
.support { margin-top: var(--space-32); }
.support .placeholder { font-weight: 300; }

/* ---------- Closing call to action ---------- */
.closing { padding-block: var(--space-128); border-top: 1px solid var(--charcoal-800); }
.closing-inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--space-48); }
.closing-title { max-width: 20ch; text-wrap: balance; }
.closing-actions { display: flex; flex-direction: column; align-items: center; gap: var(--space-24); }
.closing-meta { max-width: 46ch; color: var(--charcoal-300); }
.closing-meta strong { color: var(--text-inverse); }
.closing-deadline { color: var(--charcoal-300); }

/* ---------- Footer ---------- */
.site-footer { position: relative; overflow: hidden; border-top: 1px solid var(--charcoal-800); padding-block: var(--space-64) var(--space-32); }
.site-footer > .container { position: relative; z-index: 2; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr)); gap: var(--space-32) var(--gutter); }
.footer-brand { display: flex; flex-direction: column; gap: var(--space-16); align-items: flex-start; }
.footer-brand img { height: 72px; width: auto; }
.footer-brand p { color: var(--charcoal-300); max-width: 36ch; }
.footer-heading { color: var(--golden-yellow-500); margin-bottom: var(--space-12); }
.footer-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-4); }
.footer-list li.placeholder { min-height: 28px; }
.social-list { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--space-12); }
.social-link {
  display: inline-flex; align-items: center; justify-content: center; width: var(--control-s); height: var(--control-s);
  border: 1px solid var(--white-50); border-radius: 50%; color: var(--text-inverse);
  transition: background-color 120ms cubic-bezier(.2, 0, 0, 1), color 120ms cubic-bezier(.2, 0, 0, 1);
}
.social-link:hover { background: var(--golden-yellow-500); border-color: var(--golden-yellow-500); color: var(--text-primary); }
.footer-bottom { margin-top: var(--space-48); padding-top: var(--space-24); border-top: 1px solid var(--charcoal-800); color: var(--charcoal-300); }

/* ---------- Inner pages (register, privacy, terms) ---------- */
.page-main { padding-block: var(--section-y) var(--space-128); }
.page-main .h2 { margin-bottom: var(--space-24); }
.page-main .body-large { max-width: 56ch; }
.page-placeholder {
  margin-top: var(--space-48); min-height: 280px; display: flex; align-items: center; justify-content: center;
  padding: var(--space-32); text-align: center; border: 1px dashed var(--border-control);
  font: 400 12px/18px var(--font-sans); letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-secondary);
}
.page-back { margin-top: var(--space-48); }

/* ---------- Tablet and mobile layout ---------- */
@media (max-width: 1023px) {
  .media-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-32); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
  .media-split, .how-grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-48); }
  .cat-row { grid-template-columns: minmax(0, 1fr); gap: var(--space-16); }
  .cat-card { aspect-ratio: 4 / 5; }
  .cat-content { padding: var(--space-24); }
  .poster { max-width: 420px; }
  .winner-grid { grid-template-columns: minmax(0, 1fr); }
  .winner-img { aspect-ratio: 4 / 3; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .closing { padding-block: var(--space-96); }
  .countdown { justify-content: center; text-align: center; }
  .countdown-intro { align-items: center; width: 100%; }
  .countdown-units { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-8); width: 100%; max-width: 360px; margin-inline: auto; }
  .cd-unit { flex-direction: column; align-items: center; gap: var(--space-4); }
  .cd-num { text-align: center; font-size: 32px; line-height: 36px; }
  .cd-name { letter-spacing: 0.12em; }
  .logo-tusker { height: 64px; } .logo-cannes { height: 52px; } .logo-quollective { height: 26px; } .logo-belva { height: 34px; } .logo-mb96 { height: 30px; }
  .ticker-track { gap: var(--space-64); padding-right: var(--space-64); }
}

/* Touch tablets: three narrow cards leave no room for the description over the photo, so show title and button only. */
@media (min-width: 768px) and (max-width: 1023px) and (hover: none) {
  .cat-desc { display: none; }
}


/* ---------- Scroll-in text (added by js/main.js; off with reduced motion) ---------- */
.reveal-on [data-reveal] {
  transition: opacity 480ms cubic-bezier(.16, 1, .3, 1) var(--reveal-delay, 0ms), transform 480ms cubic-bezier(.16, 1, .3, 1) var(--reveal-delay, 0ms);
}
.reveal-on [data-reveal]:not(.is-visible) { opacity: 0; transform: translateY(12px); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Phones: hero images as a background slideshow (js/main.js adds .carousel-on) ---------- */
.hero-carousel { display: none; }
.carousel-toggle { display: none; }
.carousel-on .hero-carousel { display: block; position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.carousel-on .hero-carousel::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.35) 45%, rgba(0, 0, 0, 0.7) 100%);
}
.hero-carousel img {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none;
  object-fit: cover; object-position: center 30%;
  opacity: 0; transition: opacity 1200ms cubic-bezier(.4, 0, .2, 1);
}
.hero-carousel img.is-active { opacity: 1; }
.carousel-on .hero-gallery { display: none; }
.carousel-on .carousel-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  position: absolute; z-index: 4; right: 28px; bottom: 16px;
  width: var(--control-s); height: var(--control-s); border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.7); background: rgba(23, 23, 23, 0.45); color: var(--text-inverse); cursor: pointer;
}
.carousel-toggle .icon-play { display: none; }
.carousel-toggle[aria-pressed="true"] .icon-play { display: block; }
.carousel-toggle[aria-pressed="true"] .icon-pause { display: none; }

/* ---------- Phones: opening section text about 30% smaller ---------- */
@media (max-width: 767px) {
  .hero .hero-title {
    font-size: calc(min(var(--fs-display), (100vw - 48px) / 6) * 0.7);
    line-height: calc(min(var(--lh-display), (100vw - 48px) / 6) * 0.72);
  }
  .hero .hero-lead { font-size: 13px; line-height: 20px; }
}

/* ---------- Footer legal links ---------- */
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-12) var(--space-24); }
.footer-legal { display: flex; flex-wrap: wrap; gap: var(--space-8) var(--space-24); list-style: none; margin: 0; padding: 0; }
.footer-legal .yl-link { color: var(--charcoal-300); }
.footer-legal .yl-link:hover { color: var(--text-inverse); }
.footer-legal [hidden] { display: none; }

/* ---------- Cookie banner and settings (js/consent.js) ---------- */
.cookie-banner {
  position: fixed; z-index: 60; left: var(--space-16); right: var(--space-16); bottom: var(--space-16);
  max-width: 440px; padding: var(--space-24); border-radius: 16px;
  background: var(--white, #fff); color: var(--text-primary); border: 1px solid var(--charcoal-900);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
}
.cookie-banner p { margin: var(--space-8) 0 var(--space-16); }
.cookie-title { margin: 0; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: var(--space-8); }
.cookie-dialog {
  width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto;
  padding: var(--space-32); border: 0; border-radius: 16px; color: var(--text-primary); background: var(--white, #fff);
}
.cookie-dialog::backdrop { background: rgba(0, 0, 0, 0.6); }
.cookie-dialog .h5 { margin: 0 0 var(--space-8); }
.cookie-rows { margin: var(--space-24) 0; border-top: 1px solid var(--charcoal-200); }
.cookie-row { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-24); padding: var(--space-16) 0; border-bottom: 1px solid var(--charcoal-200); }
.cookie-row p { margin: var(--space-4) 0 0; color: var(--text-secondary, var(--charcoal-600)); }
.cookie-row-title { font: 700 15px/1.4 var(--font-sans); }
.cookie-switch {
  appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 48px; height: 28px; margin: 0;
  border-radius: 999px; background: var(--charcoal-300); cursor: pointer; transition: background 0.2s;
}
.cookie-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform 0.2s; }
.cookie-switch:checked { background: var(--charcoal-900); }
.cookie-switch:checked::after { transform: translateX(20px); background: var(--golden-yellow-500, #f9bd59); }
.cookie-switch:disabled { cursor: not-allowed; opacity: 0.55; }
.cookie-switch:focus-visible { outline: 2px solid var(--charcoal-900); outline-offset: 3px; }
@media (min-width: 768px) { .cookie-banner { left: var(--space-24); bottom: var(--space-24); right: auto; } }
@media (prefers-reduced-motion: reduce) { .cookie-switch, .cookie-switch::after { transition: none; } }

/* ---------- Policy pages (Terms, Privacy, Cookies) ---------- */
.policy { max-width: 54ch; }   /* About 72 characters a line: Riviera Nights' "0" (1ch) is wider than its average letter. */
.policy p, .policy li { text-wrap: pretty; }
.policy h1, .policy h2, .policy h3 { text-wrap: balance; }
.policy h2 { margin: var(--space-48) 0 var(--space-12); }
.policy h3 { margin: var(--space-24) 0 var(--space-8); }
.policy p, .policy li { margin: 0 0 var(--space-12); }
.policy ul, .policy ol { padding-left: var(--space-24); margin: 0 0 var(--space-16); }
.policy table { width: 100%; border-collapse: collapse; margin: var(--space-16) 0 var(--space-24); font: 400 14px/1.5 var(--font-sans); }
.policy th, .policy td { text-align: left; vertical-align: top; padding: var(--space-12) var(--space-12) var(--space-12) 0; border-bottom: 1px solid var(--charcoal-200); }
.policy th { font-weight: 700; }
.policy .table-wrap { overflow-x: auto; }
.policy-meta { color: var(--text-secondary); }
.policy-summary { padding: var(--space-24); border: 2px solid var(--charcoal-900); border-radius: 16px; margin: var(--space-32) 0; }

/* Policy pages: list of sections (sticky on the left on wide screens; a drawer from the corner button on small ones) */
.policy-side { margin-bottom: var(--space-32); }
.policy-nav-title { margin: 0 0 var(--space-12); color: var(--text-secondary); }
.policy-nav { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; font: 400 14px/1.4 var(--font-sans); }
.policy-nav a { display: block; padding: var(--space-8) var(--space-12); border-left: 2px solid var(--border-subtle); color: var(--text-secondary); text-decoration: none; }
.policy-nav a:hover { color: var(--text-primary); text-decoration: underline; text-underline-offset: 3px; }
.policy-nav a[aria-current] { border-left-color: var(--accent-signal); color: var(--text-primary); font-weight: 700; }
.policy-nav a:focus-visible { outline: 2px solid var(--charcoal-900); outline-offset: 2px; }
.policy h2.h4 { margin-top: var(--space-64); }
.policy h3.h5 { margin: var(--space-32) 0 var(--space-12); }
.policy h4 { margin: var(--space-20) 0 var(--space-8); }
/* Sub-sections: indented. In the sidebar only the category being read is open; the drawer shows them all. */
.policy-nav ol { list-style: none; margin: 0; padding: 0; }
.policy-nav ol a { padding-left: var(--space-24); font-size: 13px; }
.policy-nav > li:has(> ol) > a { font-weight: 700; color: var(--text-primary); }
.has-policy-drawer .policy-side .policy-nav li:not(.is-open) > ol { display: none; }
.policy h2[id], .policy h3[id] { scroll-margin-top: var(--space-16); }   /* html's scroll-padding already clears the header */
@media (min-width: 1024px) {
  .policy-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: var(--space-64); align-items: start; }
  .policy-side { position: sticky; top: calc(var(--header-h) + var(--space-32)); max-height: calc(100vh - var(--header-h) - var(--space-64)); overflow-y: auto; margin: 0; }
}
@media (max-width: 1023px) {
  .has-policy-drawer .policy-side { display: none; }
}
.policy-fab {
  position: fixed; z-index: 40;
  right: max(var(--space-16), env(safe-area-inset-right, 0px)); bottom: max(var(--space-16), env(safe-area-inset-bottom, 0px));
  width: 56px; height: 56px; border-radius: 50%; border: 0;
  display: grid; place-items: center; cursor: pointer;
  background: var(--charcoal-900); color: #fff; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}
.policy-fab[hidden] { display: none; }
.policy-fab:focus-visible { outline: 3px solid var(--accent-signal); outline-offset: 3px; }
.policy-drawer {
  margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; width: min(340px, 88vw); max-width: 88vw;
  border: 0; padding: var(--space-24); background: var(--surface-default); color: var(--text-primary);
  overflow-y: auto;
}
.policy-drawer::backdrop { background: rgba(0, 0, 0, 0.45); }
.policy-drawer-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-16); margin-bottom: var(--space-16); }
.policy-drawer-close { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border-subtle); background: none; color: inherit; display: grid; place-items: center; cursor: pointer; }
.policy-drawer-close:focus-visible { outline: 2px solid var(--charcoal-900); outline-offset: 2px; }
.policy-drawer .policy-nav a { padding-block: var(--space-12); }
@media (prefers-reduced-motion: no-preference) {
  .policy-drawer[open] { animation: drawer-in 200ms ease-out; }
  @keyframes drawer-in { from { transform: translateX(100%); } to { transform: none; } }
}
@media (min-width: 1024px) { .policy-fab, .policy-drawer { display: none; } }   /* after .policy-fab so it wins */

/* ---------- 404: full-screen photo with a large headline ---------- */
.nf-body { margin: 0; background: var(--charcoal-900); }
.nf { position: relative; min-height: 100vh; min-height: 100svh; display: flex; color: #fff; overflow: hidden; }
.nf-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 30%; }
.nf::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.38) 55%, rgba(0, 0, 0, 0.1) 100%); }
.nf-inner { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; justify-content: space-between; gap: var(--space-48); padding: var(--space-24) var(--margin) var(--space-64); }
.nf-copy { max-width: 900px; display: flex; flex-direction: column; gap: var(--space-16); align-items: flex-start; }
.nf-copy > * { margin: 0; }
.nf-title { font-family: var(--font-display); font-weight: 400; font-size: clamp(56px, 11vw, 168px); line-height: 0.95; letter-spacing: -0.04em; text-transform: uppercase; }
.nf-copy .body-large { max-width: 40ch; }
@media (max-width: 767px) {
  .nf-image { object-position: 55% 20%; }
  .nf::after { background: linear-gradient(0deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.5) 50%, rgba(0, 0, 0, 0.15) 100%); }
}

/* ---------- Footer on every page, kept at the bottom of the window on short pages ---------- */
body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; }
body > main, body > .reg-shell { flex: 1 0 auto; }
.site-footer { margin-top: auto; flex-shrink: 0; }
