/* =========================================================
   MiamiTV.pro — design system v3
   Editorial cinematic · Manrope display · Inter body
   ========================================================= */

/* ---------- design tokens ---------- */
:root{
  /* surfaces */
  --ink:        #0a0b0e;
  --ink-2:      #111317;
  --ink-3:      #181a1f;
  --ink-soft:   #2a2d33;

  --paper:      #f7f5f0;     /* warm off-white */
  --paper-2:    #ede8de;     /* deeper warm */
  --paper-3:    #fefdfb;     /* near white */
  --line:       rgba(10,11,14,0.08);
  --line-dark:  rgba(255,255,255,0.08);

  /* type */
  --fg-dark:    #0a0b0e;
  --fg-dark-60: rgba(10,11,14,0.62);
  --fg-dark-40: rgba(10,11,14,0.42);
  --fg-light:   #f7f5f0;
  --fg-light-60: rgba(247,245,240,0.65);
  --fg-light-40: rgba(247,245,240,0.42);

  /* accents */
  --coral:      #ff6a3d;     /* signature */
  --coral-2:    #ff8861;
  --amber:      #ffb663;
  --teal:       #4dccb5;
  --aqua:       #6fd4ea;
  --lavender:   #c8c5ff;

  /* timing */
  --t-fast:     cubic-bezier(.2,.7,.2,1);
  --t-out:      cubic-bezier(.16,1,.3,1);
  --t-in-out:   cubic-bezier(.65,0,.35,1);

  /* layout */
  --pad:        clamp(20px, 5vw, 64px);
  --max:        1320px;
  --max-narrow: 980px;

  /* type stacks */
  --font-display: 'Manrope', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-body:    'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-mono:    'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius-sm:   8px;
  --radius:      14px;
  --radius-lg:   22px;
  --radius-xl:   34px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html {
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}
/* Lenis: don't override overflow on html — that breaks position:sticky.
   Only suppress horizontal overflow which is fine for sticky. */
html.lenis body { overflow-x: clip; }
html.lenis-stopped, html.lenis-stopped body { overflow: hidden; }
body{
  background: var(--ink);
  color: var(--fg-light);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  font-feature-settings: "ss01","cv11";
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
a { color: inherit; text-decoration: none; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
::selection { background: var(--coral); color: #fff; }

.wrap{
  max-width: var(--max);
  margin: 0 auto;
  padding-inline: var(--pad);
  position: relative;
}
.wrap--narrow{ max-width: var(--max-narrow); }

/* ---------- typography ---------- */
.h-mega{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(56px, 11vw, 168px);
  line-height: .9;
  letter-spacing: -0.045em;
}
.h-display{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(44px, 8vw, 108px);
  line-height: .92;
  letter-spacing: -0.04em;
}
.h-section{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 6vw, 84px);
  line-height: .96;
  letter-spacing: -0.035em;
}
.h-sub{
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.lede{
  font-size: clamp(17px, 1.4vw, 21px);
  line-height: 1.45;
  letter-spacing: -0.012em;
  font-weight: 400;
  max-width: 60ch;
  color: var(--fg-light-60);
}
.body{
  font-size: 16.5px;
  line-height: 1.55;
  letter-spacing: -0.005em;
}
.body-sm{
  font-size: 14.5px;
  line-height: 1.5;
  letter-spacing: -0.005em;
  font-weight: 400;
}
.kicker{
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-weight: 500;
  color: currentColor;
}

/* gradient text */
.text-coral{
  background: linear-gradient(120deg, var(--coral), var(--amber));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.text-cool{
  background: linear-gradient(120deg, var(--teal), var(--lavender));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
em{ font-style: italic; font-weight: 500; }

/* ---------- nav ---------- */
.nav{
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 80;
  padding: 14px var(--pad);
  display: flex; align-items: center; gap: 24px;
  color: var(--fg-light);
  transition:
    padding .25s var(--t-fast),
    color .25s,
    background .25s,
    transform .35s cubic-bezier(.16,1,.3,1);
  will-change: transform;
}
/* auto-hide on scroll down (mobile only — JS gates it) */
.nav.is-hidden{ transform: translateY(-110%); }
.nav::before{
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,11,14,.75), rgba(10,11,14,.25) 70%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  z-index: -1;
  transition: opacity .25s;
}
.nav.is-on-light{ color: var(--fg-dark); }
.nav.is-on-light::before{
  background: linear-gradient(180deg, rgba(247,245,240,.85), rgba(247,245,240,.4) 70%, transparent);
}

.brand{
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.025em;
  font-size: 19px;
  color: inherit;
}
.brand-mark{
  width: 28px; height: 28px;
  border-radius: 8px;
  background: conic-gradient(from 220deg at 50% 50%, var(--coral), var(--amber) 90deg, var(--coral) 200deg, #ff4d89 290deg, var(--coral) 360deg);
  position: relative;
  box-shadow: 0 0 0 1px rgba(255,255,255,.15) inset, 0 4px 16px rgba(255,106,61,.4);
}
.brand-mark::after{
  content: ""; position: absolute; inset: 6px;
  background: var(--ink); border-radius: 3px;
}
.is-on-light .brand-mark::after{ background: var(--paper); }
.brand-dot{
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--coral);
  margin-left: 2px;
  margin-top: 6px;
}

.nav-links{
  display: flex; gap: 4px;
  margin-left: clamp(20px, 4vw, 56px);
}
.nav-links a{
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: inherit;
  opacity: .72;
  transition: opacity .2s, background .2s;
}
.nav-links a:hover, .nav-links a.is-active{
  opacity: 1;
  background: rgba(255,255,255,.06);
}
.is-on-light .nav-links a:hover, .is-on-light .nav-links a.is-active{
  background: rgba(10,11,14,.05);
}

.nav-cta{
  margin-left: auto;
  display: flex; align-items: center; gap: 10px;
}
.nav-phone{
  display: none; align-items: center; gap: 7px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  padding: 9px 14px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  transition: background .2s, transform .2s;
}
.nav-phone:hover{ background: rgba(255,255,255,.06); transform: translateY(-1px); }
.is-on-light .nav-phone{ border-color: rgba(10,11,14,.12); }
.is-on-light .nav-phone:hover{ background: rgba(10,11,14,.04); }

.nav-burger{
  width: 40px; height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  position: relative;
  display: inline-grid; place-items: center;
}
.is-on-light .nav-burger{ border-color: rgba(10,11,14,.12); }
.nav-burger span{
  position: absolute; left: 12px; right: 12px; height: 1.5px;
  background: currentColor; border-radius: 2px;
  transition: transform .25s var(--t-out), opacity .2s;
}
.nav-burger span:nth-child(1){ top: 15px; }
.nav-burger span:nth-child(2){ top: 20px; }
.nav-burger span:nth-child(3){ top: 25px; }
.nav-burger[aria-expanded="true"] span:nth-child(1){ transform: translateY(5px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2){ opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3){ transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 880px){
  .nav-links{
    position: fixed;
    inset: 70px 16px auto 16px;
    flex-direction: column;
    padding: 18px;
    border-radius: 18px;
    background: rgba(10,11,14,.96);
    border: 1px solid rgba(255,255,255,.08);
    backdrop-filter: blur(20px);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s, transform .25s var(--t-out);
    margin-left: 0;
  }
  .is-on-light .nav-links{
    background: rgba(247,245,240,.96);
    border-color: rgba(10,11,14,.08);
  }
  .nav-links.is-open{
    opacity: 1; transform: none; pointer-events: auto;
  }
  .nav-links a{ padding: 12px 14px; font-size: 16px; opacity: 1; }
}
@media (min-width: 880px){
  .nav-burger{ display: none; }
  .nav-phone{ display: inline-flex; }
}

/* ---------- buttons ---------- */
.btn{
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 20px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  transition: transform .2s var(--t-fast), background .2s, border-color .2s, box-shadow .25s;
  white-space: nowrap;
}
.btn .arr{
  font-family: var(--font-mono);
  font-weight: 500;
  transition: transform .25s var(--t-fast);
}
.btn:hover .arr{ transform: translateX(4px); }
.btn-primary{
  background: var(--fg-light);
  color: var(--fg-dark);
}
.btn-primary:hover{ background: #fff; transform: translateY(-1px); }
.is-on-light .btn-primary{ background: var(--fg-dark); color: var(--fg-light); }
.is-on-light .btn-primary:hover{ background: #000; }
.btn-coral{
  background: var(--coral);
  color: #fff;
  box-shadow: 0 0 0 0 rgba(255,106,61,0);
}
.btn-coral:hover{
  background: var(--coral-2);
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(255,106,61,.4);
}
.btn-ghost{
  border-color: rgba(255,255,255,.18);
  color: var(--fg-light);
}
.btn-ghost:hover{ background: rgba(255,255,255,.06); }
.is-on-light .btn-ghost{
  border-color: rgba(10,11,14,.16);
  color: var(--fg-dark);
}
.is-on-light .btn-ghost:hover{ background: rgba(10,11,14,.04); }

.btn-link{
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 500;
  font-size: 15px;
  padding-bottom: 4px;
  border-bottom: 1px solid currentColor;
  transition: gap .25s var(--t-fast);
}
.btn-link:hover{ gap: 12px; }

/* ---------- section poster baseline ---------- */
section.poster{
  position: relative;
  padding: clamp(96px, 14vw, 200px) 0;
  overflow: hidden;
}
section.dark{ background: var(--ink); color: var(--fg-light); }
section.dark-2{ background: var(--ink-2); color: var(--fg-light); }
section.paper{ background: var(--paper); color: var(--fg-dark); }
section.paper-2{ background: var(--paper-3); color: var(--fg-dark); }

/* eyebrow */
.eyebrow{
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-weight: 500;
  color: currentColor;
  opacity: .65;
}
.eyebrow::before{
  content: ""; width: 28px; height: 1px;
  background: currentColor;
  opacity: .55;
}

.poster-head{
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(40px, 5vw, 80px);
  align-items: end;
  margin-bottom: clamp(56px, 7vw, 96px);
}
@media (max-width: 880px){
  .poster-head{ grid-template-columns: 1fr; gap: 24px; align-items: start; }
}
.poster h2{ margin: 22px 0 0; max-width: 18ch; }
.poster p.lede{ margin: 0; max-width: 52ch; color: inherit; opacity: .72; }
section.dark p.lede, section.dark-2 p.lede{ color: var(--fg-light-60); opacity: 1; }
section.paper p.lede, section.paper-2 p.lede{ color: var(--fg-dark-60); opacity: 1; }

/* ---------- reveal-on-scroll ---------- */
.reveal{
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 1.1s var(--t-out), transform 1.1s var(--t-out);
}
.reveal.in{ opacity: 1; transform: none; }

.reveal-stagger > *{
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s var(--t-out), transform .9s var(--t-out);
}
.reveal-stagger.in > *{ opacity: 1; transform: none; }
.reveal-stagger.in > *:nth-child(1){ transition-delay: 0ms; }
.reveal-stagger.in > *:nth-child(2){ transition-delay: 80ms; }
.reveal-stagger.in > *:nth-child(3){ transition-delay: 160ms; }
.reveal-stagger.in > *:nth-child(4){ transition-delay: 240ms; }
.reveal-stagger.in > *:nth-child(5){ transition-delay: 320ms; }
.reveal-stagger.in > *:nth-child(6){ transition-delay: 400ms; }
.reveal-stagger.in > *:nth-child(7){ transition-delay: 480ms; }
.reveal-stagger.in > *:nth-child(8){ transition-delay: 560ms; }

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: .001s !important; transition-duration: .001s !important; }
  .reveal, .reveal-stagger > *{ opacity: 1; transform: none; }
}

/* ---------- ambient drift blobs (re-usable per section) ---------- */
.section-blobs{
  position: absolute; inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.section-blobs span{
  position: absolute;
  border-radius: 50%;
  will-change: transform;
}

/* dark sections: stronger blobs */
section.dark .section-blobs span,
section.dark-2 .section-blobs span,
section.ink .section-blobs span{
  filter: blur(80px);
  opacity: .48;
  mix-blend-mode: screen;
}
/* light sections: gentle, paper-friendly */
section.paper .section-blobs span,
section.paper-2 .section-blobs span,
section.partners .section-blobs span{
  filter: blur(100px);
  opacity: .28;
  mix-blend-mode: multiply;
}

/* each blob gets its own keyframe + duration so they drift independently */
.section-blobs .b1{
  top: 6%; left: 10%;
  width: clamp(260px, 36vw, 460px);
  aspect-ratio: 1;
  background: var(--coral);
  animation: blob-drift-1 18s ease-in-out infinite;
}
.section-blobs .b2{
  bottom: 4%; right: 6%;
  width: clamp(300px, 40vw, 520px);
  aspect-ratio: 1;
  background: var(--lavender);
  animation: blob-drift-2 22s ease-in-out infinite;
  animation-delay: -7s;
}
.section-blobs .b3{
  top: 50%; left: 50%;
  width: clamp(220px, 30vw, 360px);
  aspect-ratio: 1;
  background: var(--teal);
  animation: blob-drift-3 20s ease-in-out infinite;
  animation-delay: -12s;
}

/* color variants */
.section-blobs--coral .b2{ background: var(--amber); }
.section-blobs--cool .b1{ background: var(--teal); }
.section-blobs--cool .b2{ background: var(--lavender); }
.section-blobs--mix .b1{ background: var(--coral); }
.section-blobs--mix .b2{ background: var(--teal); }

/* keep the wrap above blobs */
.wrap{ z-index: 1; }

/* Distinct, viewport-relative drifts so the motion is actually noticeable. */
@keyframes blob-drift-1{
  0%, 100%{ transform: translate(0, 0) scale(1); }
  25%    { transform: translate(12vw, 6vh) scale(1.15); }
  50%    { transform: translate(8vw, -10vh) scale(0.9); }
  75%    { transform: translate(-10vw, 4vh) scale(1.1); }
}
@keyframes blob-drift-2{
  0%, 100%{ transform: translate(0, 0) scale(1); }
  25%    { transform: translate(-14vw, -8vh) scale(0.88); }
  50%    { transform: translate(-6vw, 10vh) scale(1.2); }
  75%    { transform: translate(10vw, 6vh) scale(0.95); }
}
/* b3 is centered with translate(-50%,-50%), so its keyframes use the same baseline */
@keyframes blob-drift-3{
  0%, 100%{ transform: translate(-50%, -50%) scale(1); }
  25%    { transform: translate(-30%, -65%) scale(1.2); }
  50%    { transform: translate(-65%, -30%) scale(0.85); }
  75%    { transform: translate(-50%, -38%) scale(1.1); }
}
@media (prefers-reduced-motion: reduce){
  .section-blobs span{ animation: none !important; }
}

/* ---------- cursor spotlight on cards ---------- */
[data-spotlight]{
  position: relative;
  isolation: isolate;
}
[data-spotlight]::after{
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%),
              rgba(255, 106, 61, 0.18) 0%,
              rgba(255, 106, 61, 0.07) 30%,
              transparent 60%);
  opacity: 0;
  transition: opacity .35s var(--t-out);
  z-index: 0;
}
section.dark [data-spotlight]::after,
section.dark-2 [data-spotlight]::after,
section.ink [data-spotlight]::after{
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%),
              rgba(255, 106, 61, 0.22) 0%,
              rgba(255, 106, 61, 0.10) 30%,
              transparent 60%);
}
[data-spotlight]:hover::after{ opacity: 1; }
[data-spotlight] > *{ position: relative; z-index: 1; }

/* hover-only — no spotlight on touch devices */
@media (hover: none){
  [data-spotlight]::after{ display: none; }
}

/* ---------- focus ---------- */
:focus-visible{
  outline: 2px solid var(--coral);
  outline-offset: 4px;
  border-radius: 4px;
}

/* ---------- utility ---------- */
.muted{ opacity: .65; }
.center{ text-align: center; }
.tabular{ font-variant-numeric: tabular-nums; }
