/* ============================================================================
   HERO UPGRADE — scoped to the landing screen only.
   Nothing here touches the nav, footer, colours, typography or any other
   section. It (1) grades the bright website-build clip down into the site's
   dark #070707 world, (2) adds a cinematic black -> light-sweep brand reveal,
   (3) melts the fold into the film section, and (4) provides three hero looks
   switched by a class on .landing:  .hero--v1 / .hero--v2 / .hero--v3.
   Uses only the existing design tokens (--bg, --ink, --accent, fonts).
   ========================================================================== */

/* ---- 1. Grade the footage into the dark theme --------------------------- */
/* The clip is bright pastel; these layers pull it into ink/near-black so the
   existing white illuminated headline keeps its contrast, while a whisper of
   the original colour and a low brand-accent glow stay alive underneath. */
.landing.hero-up .landing__video {
  filter: brightness(0.60) contrast(1.08) saturate(0.66);
  transform: scale(1.08);
}

.landing.hero-up .landing__media::after,
.landing.hero-up .landing__media::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
/* Primary tonal wash — light at eye level, heavy top (for the nav) and heavy
   bottom (for the headline + the fold). */
.landing.hero-up .landing__media::before {
  background:
    linear-gradient(180deg,
      rgba(7,7,7,0.62) 0%,
      rgba(7,7,7,0.30) 24%,
      rgba(7,7,7,0.34) 52%,
      rgba(7,7,7,0.72) 82%,
      rgba(7,7,7,0.96) 100%);
}
/* Brand-accent bloom + cool counter-light, kept very low so it reads as
   cinematic grade rather than a colour cast. */
.landing.hero-up .landing__media::after {
  background:
    radial-gradient(120% 90% at 16% 108%, var(--accent-glow), transparent 55%),
    radial-gradient(130% 100% at 88% -10%, rgba(120,150,190,0.16), transparent 60%);
  mix-blend-mode: screen;
}

/* Vignette + fold: a dedicated layer above the media, below the content. */
.landing.hero-up .landing__fold {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  box-shadow: inset 0 0 200px 40px rgba(0,0,0,0.55);
}
.landing.hero-up .landing__fold::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 34vh;
  background: linear-gradient(180deg, transparent 0%, rgba(7,7,7,0.55) 55%, var(--bg) 100%);
}

/* A near-invisible wrapper by default: for v1 and v3 it must not affect the
   flow at all, so it collapses to its contents. v2 turns it into a glass card. */
.landing.hero-up .landing__card { display: contents; }

/* ---- 2. Variation 1 — Dark premium industrial --------------------------- */
/* The default look. Content bottom-left, deep grade, faint accent floor glow.
   (Grade above already delivers this; v1 just deepens the accent floor.) */
.landing.hero--v1 .landing__media::after {
  background:
    radial-gradient(120% 96% at 14% 112%, rgba(192,57,43,0.34), transparent 52%),
    radial-gradient(130% 100% at 88% -12%, rgba(120,150,190,0.14), transparent 60%);
}

/* ---- 3. Variation 2 — Glassmorphism ------------------------------------- */
/* The headline + actions ride on a frosted glass slab. The footage stays a
   touch more visible around it; the panel does the legibility work. */
.landing.hero--v2 .landing__video { filter: brightness(0.72) contrast(1.05) saturate(0.78); }
.landing.hero--v2 .landing__inner { justify-content: flex-end; }
.landing.hero--v2 .landing__card {
  display: flex;
  flex-direction: column;
  align-self: flex-start;
  max-width: min(46rem, 100%);
  padding: clamp(1.5rem, 3vw, 2.6rem) clamp(1.5rem, 3vw, 2.8rem);
  border-radius: 20px;
  background: rgba(14,14,14,0.34);
  border: 1px solid rgba(255,255,255,0.14);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
  backdrop-filter: blur(18px) saturate(1.1);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.10) inset,
    0 30px 80px -30px rgba(0,0,0,0.65);
}
.landing.hero--v2 .landing__foot { margin-top: clamp(1.1rem, 2.2vh, 1.7rem); }

/* ---- 4. Variation 3 — Minimal luxury fullscreen ------------------------- */
/* Footage owns the frame; content is centred and quieter, inside a hairline
   luxury border. */
.landing.hero--v3 .landing__video { filter: brightness(0.66) contrast(1.06) saturate(0.72); }
.landing.hero--v3 .landing__inner {
  justify-content: center;
  align-items: center;
  text-align: center;
  padding-bottom: 0;
}
.landing.hero--v3 .landing__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.2rem, 3vh, 2rem);
  max-width: 24ch;
}
.landing.hero--v3 .landing__title {
  max-width: 18ch;
  font-size: clamp(2.9rem, 6.6vw, 6.2rem);
}
.landing.hero--v3 .landing__foot { justify-content: center; }
.landing.hero--v3 .landing__actions { justify-content: center; }
.landing.hero--v3 .hero-frame {
  position: absolute;
  inset: clamp(0.9rem, 2vh, 1.6rem);
  z-index: 2;
  pointer-events: none;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 4px;
}
.landing:not(.hero--v3) .hero-frame { display: none; }

/* ---- 5. Cinematic intro: black -> light sweep -> hero ------------------- */
.hero-intro {
  position: fixed;
  inset: 0;
  z-index: 900;                 /* above the curtain (800), below skip-link (999) */
  display: grid;
  place-items: center;
  background: #050505;
  opacity: 1;
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.hero-intro[hidden] { display: none; }
.hero-intro.is-out {
  opacity: 0;
  pointer-events: none;
}
.hero-intro__word {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 500;
  letter-spacing: -0.02em;
  font-size: clamp(1.9rem, 5.2vw, 4.4rem);
  line-height: 1;
  white-space: nowrap;
  /* Ink base with a bright sweep travelling across the glyphs. */
  color: rgba(255,255,255,0.10);
  background:
    linear-gradient(100deg,
      rgba(255,255,255,0) 30%,
      rgba(255,255,255,0.55) 46%,
      #ffffff 50%,
      rgba(255,255,255,0.55) 54%,
      rgba(255,255,255,0.10) 70%) no-repeat;
  background-size: 260% 100%;
  background-position: 140% 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0;
  transform: translateY(8px);
  filter: drop-shadow(0 0 22px rgba(255,255,255,0.18));
}
.hero-intro__word .dot { color: var(--accent-lift); -webkit-text-fill-color: var(--accent-lift); }

.hero-intro.is-armed .hero-intro__word {
  animation:
    heroIntroIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards,
    heroIntroSweep 1.15s cubic-bezier(0.4, 0, 0.2, 1) 0.1s forwards;
}
@keyframes heroIntroIn {
  0%   { opacity: 0; transform: translateY(8px); }
  40%  { opacity: 1; }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes heroIntroSweep {
  0%   { background-position: 140% 0; }
  100% { background-position: -140% 0; }
}
/* After the sweep the word settles to a calm illuminated white before the
   layer fades away. */
.hero-intro.is-settle .hero-intro__word {
  color: #fff;
  -webkit-text-fill-color: #fff;
  background: none;
  transition: opacity 0.4s ease;
}

@media (prefers-reduced-motion: reduce) {
  .hero-intro { transition: none; }
  .hero-intro.is-armed .hero-intro__word { animation: none; opacity: 1; color: #fff; -webkit-text-fill-color: #fff; background: none; transform: none; }
}

/* ---- 6. Variations preview page chrome (only on hero-variations.html) --- */
.varbar {
  position: fixed;
  left: 50%;
  bottom: 1.4rem;
  transform: translateX(-50%);
  z-index: 940;
  display: flex;
  gap: 0.4rem;
  padding: 0.4rem;
  border-radius: 999px;
  background: rgba(14,14,14,0.6);
  border: 1px solid rgba(255,255,255,0.14);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  font-family: var(--font-sans);
}
.varbar button {
  appearance: none;
  border: 0;
  cursor: pointer;
  color: rgba(255,255,255,0.7);
  background: transparent;
  font: inherit;
  font-size: 0.82rem;
  letter-spacing: 0.01em;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}
.varbar button:hover { color: #fff; }
.varbar button[aria-pressed="true"] {
  color: #000;
  background: #fff;
}
