/* ============================================================
   The Nat — Save the Date
   Brand palette: Mint #CFFBCB on Dark Green #0C2325.
   ABC Diatype Extended Bold for display, ABC Diatype Regular for body.
   ============================================================ */

@font-face {
  font-family: "ABC Diatype Extended";
  src: url("assets/fonts/ABCDiatypeExtended-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "ABC Diatype Extended";
  src: url("assets/fonts/ABCDiatypeExtended-BoldItalic.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "ABC Diatype";
  src: url("assets/fonts/ABCDiatype-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "ABC Diatype";
  src: url("assets/fonts/ABCDiatype-RegularItalic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  /* Brand colors — from THE_NAT_GREEN_CODES.pdf */
  --ink: #CFFBCB;                          /* Mint Green */
  --ink-dim: rgba(207, 251, 203, 0.62);    /* Mint at 62% */
  --ink-faint: rgba(207, 251, 203, 0.18);  /* Mint at 18% */
  --surface: #14393a;                      /* lighter green for shallow tint */
  --mid: #0e2a2c;
  --abyss: #0C2325;                        /* Dark Green — brand background */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-interactive: 220ms var(--ease-out);
  /* --depth is driven from JS (0 at top, 1 at bottom). All scroll-darkening reads from this. */
  --depth: 0;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; background: var(--abyss); }
body {
  font-family: "ABC Diatype", system-ui, -apple-system, Helvetica, Arial, sans-serif;
  font-weight: 400;
  color: var(--ink);
  background: var(--abyss);
  overflow-x: hidden;
  letter-spacing: -0.02em;
  line-height: 1.3;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ------------------------------------------------------------
   Backdrop — fixed video + teal tint + scroll-driven depth + vignette
   ------------------------------------------------------------ */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--abyss);
  overflow: hidden;
}
.backdrop-video {
  position: absolute;
  inset: 0;
  /* Parallax: drift the video down as we descend, so the jelly recedes into the dark. */
  transform: translateY(calc(var(--depth) * 12vh));
  transition: transform 60ms linear;
}
.backdrop-video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  /* Pull the source's blue toward Gail's petrol teal; lift contrast so the jelly glows */
  filter: saturate(0.78) hue-rotate(-8deg) brightness(0.92) contrast(1.08);
  /* Fade in once video can actually play, to avoid a flash of black before first frame */
  opacity: 0;
  transition: opacity 600ms ease;
}
.backdrop-video video.is-playing { opacity: 1; }

/* Lightweight AVIF/JPEG poster painted instantly while the video buffers.
   Sized identically to the video and tinted to match, so the swap is invisible. */
.backdrop-poster {
  position: absolute;
  inset: 0;
  display: block;
  pointer-events: none;
  transition: opacity 600ms ease;
}
.backdrop-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  filter: saturate(0.78) hue-rotate(-8deg) brightness(0.92) contrast(1.08);
}
.backdrop-video.video-ready .backdrop-poster { opacity: 0; }

/* Brand green cast that thickens with depth — pulls source video toward NAT palette */
.backdrop-tint {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      rgba(20, 57, 58, 0.20) 0%,
      rgba(14, 42, 44, 0.38) 60%,
      rgba(12, 35, 37, 0.62) 100%);
  mix-blend-mode: multiply;
  opacity: calc(0.55 + var(--depth) * 0.25);
}
/* Depth veil — settles to brand Dark Green (not pure black) as we scroll. */
.backdrop-depth {
  position: absolute;
  inset: 0;
  background: #0C2325;
  opacity: calc(var(--depth) * 1.05);
}
.backdrop-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 130% 95% at 50% 35%, transparent 50%, rgba(0,0,0,0.55) 100%);
}
main, .topbar, .site-footer { position: relative; z-index: 10; }

/* ------------------------------------------------------------
   Top bar — logo + sound toggle
   ------------------------------------------------------------ */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(16px, 2.2vw, 28px) clamp(20px, 3vw, 40px);
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }

.brand { display: inline-flex; }
.logo-mark { display: block; width: clamp(84px, 8vw, 124px); height: auto; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.55)); }
/* Hero variant fills its parent — sizing comes from .hero-logo */
.logo-mark--large { display: block; width: 100%; height: auto; filter: drop-shadow(0 6px 24px rgba(0,0,0,0.45)); }
/* Footer mark uses same official logo */
.logo-mark--footer { display: block; width: clamp(100px, 9vw, 144px); height: auto; }

.sound-toggle {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 14px;
  border: 1px solid rgba(207, 251, 203, 0.40);
  border-radius: 999px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 400;
  transition: border-color var(--transition-interactive), background var(--transition-interactive);
}
.sound-toggle:hover { border-color: rgba(207, 251, 203, 0.90); background: rgba(207, 251, 203, 0.06); }
.sound-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(207, 251, 203, 0.50);
  transition: background var(--transition-interactive), box-shadow var(--transition-interactive);
}
.sound-toggle[aria-pressed="true"] .sound-dot {
  background: #CFFBCB;
  box-shadow: 0 0 12px rgba(207, 251, 203, 0.85);
  animation: sound-pulse 2.4s ease-in-out infinite;
}
@keyframes sound-pulse {
  0%, 100% { box-shadow: 0 0 6px rgba(207, 251, 203, 0.55); transform: scale(1); }
  50%      { box-shadow: 0 0 16px rgba(207, 251, 203, 0.95); transform: scale(1.18); }
}
@media (prefers-reduced-motion: reduce) {
  .sound-toggle[aria-pressed="true"] .sound-dot { animation: none; }
}

/* ------------------------------------------------------------
   Panels
   ------------------------------------------------------------ */
main { position: relative; z-index: 10; }
.panel {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(48px, 8vh, 96px) clamp(20px, 4vw, 64px);
  text-align: center;
}

.panel--hero {
  /* No extra top padding — hero centers its content like every other panel */
  padding-top: clamp(48px, 8vh, 96px);
  justify-content: center;
}
.hero-logo {
  /* Big and dominant. SVG aspect is 480:180 (~2.67:1) — width controls everything. */
  width: clamp(360px, 60vw, 900px);
  margin-bottom: clamp(48px, 9vh, 96px);
  color: var(--ink);
  filter: drop-shadow(0 14px 60px rgba(0,0,0,0.75));
  animation: breathe 6s var(--ease-out) infinite;
}
@media (max-width: 640px) {
  .hero-logo { width: 88vw; }
}
@keyframes breathe {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(-6px); opacity: 0.94; }
}

.scroll-cue {
  position: absolute;
  bottom: clamp(28px, 5vh, 56px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--ink-dim);
  animation: cue-bob 2.4s ease-in-out infinite;
}
@keyframes cue-bob {
  0%, 100% { transform: translateY(0); opacity: 0.55; }
  50% { transform: translateY(6px); opacity: 1; }
}

/* ------------------------------------------------------------
   Display type — ABC Diatype Extended Bold, edge-to-edge
   Brand spec: kerning -25, optical tracking, line-height ~1.1.
   We tighten line-height for stacked headlines so they read as a block.
   ------------------------------------------------------------ */
.display {
  font-family: "ABC Diatype Extended", system-ui, sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.025em;
  line-height: 0.95;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.04em;
  width: 100%;
  max-width: 1600px;
}
.display span { display: block; }

/* Diatype Extended is visually wider than Anton — sizes pulled back ~20%
   so 3-line stacks still fit inside 100svh on common heights. */
.display--md   { font-size: clamp(32px, 6vw,    88px); }
.display--lg   { font-size: clamp(40px, 7.2vw, 112px); }
.display--xl   { font-size: clamp(52px, 9.6vw, 152px); }
.display--mega { font-size: clamp(60px, 10.8vw, 180px); letter-spacing: -0.03em; }

.display em {
  font-style: normal;
}
.display span.date-line { white-space: nowrap; display: inline-flex; align-items: baseline; justify-content: center; gap: 0.18em; align-self: center; }
.date-sep {
  display: inline-block;
  width: 0.16em;
  height: 0.16em;
  background: currentColor;
  border-radius: 50%;
  flex: 0 0 auto;
  /* Dots sit on the baseline (align-items: baseline on parent, no transform). */
}

/* Lift the colon glyph in the time display so it sits at digit visual center, not on the
   baseline-low position the font draws it at. Pixel-measured at 76.8px: colon ink center sits
   10px below digit ink center → 10/76.8 ≈ 0.13em up. */
.display .colon-mid {
  display: inline-block;
  transform: translateY(-0.13em);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.display-sub {
  margin: 1.4em 0 0;
  font-family: "ABC Diatype", sans-serif;
  font-weight: 400;
  font-size: clamp(13px, 1.2vw, 17px);
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

/* ------------------------------------------------------------
   CTA panel
   ------------------------------------------------------------ */
.panel--cta { gap: 0; }
.cta-stack {
  width: min(92vw, 1100px);
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 5vh, 56px);
}
.cta-line {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(16px, 3vw, 40px);
  padding: clamp(12px, 2vh, 20px) 0;
  text-align: left;
  transition: transform var(--transition-interactive), opacity var(--transition-interactive);
}
.cta-line:hover { transform: translateX(6px); }
.cta-line:hover .cta-arrow { transform: translateX(6px); }
.cta-eyebrow {
  font-size: clamp(11px, 1vw, 13px);
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--ink-dim);
  white-space: nowrap;
}
.cta-label {
  font-family: "ABC Diatype Extended", sans-serif;
  font-weight: 700;
  font-size: clamp(28px, 5.4vw, 84px);
  letter-spacing: -0.025em;
  text-transform: uppercase;
  line-height: 0.95;
  white-space: nowrap;
}
.cta-label--email { text-transform: lowercase; letter-spacing: -0.02em; white-space: nowrap; }
.cta-arrow {
  font-family: "ABC Diatype Extended", sans-serif;
  font-weight: 700;
  font-size: clamp(24px, 3.4vw, 48px);
  transition: transform var(--transition-interactive);
}
.rule { height: 1px; background: var(--ink-faint); }

@media (max-width: 720px) {
  .cta-line {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "eyebrow eyebrow"
      "label   arrow";
    gap: 8px 16px;
  }
  .cta-eyebrow { grid-area: eyebrow; }
  .cta-label   { grid-area: label; }
  .cta-arrow   { grid-area: arrow; align-self: end; }
  .cta-label--email { font-size: clamp(22px, 7.6vw, 56px); white-space: nowrap; }
}

/* ------------------------------------------------------------
   Footer
   ------------------------------------------------------------ */
.site-footer {
  position: relative;
  z-index: 10;
  background: #081a1c;
  border-top: 1px solid rgba(207, 251, 203, 0.08);
}
.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: clamp(48px, 8vh, 88px) clamp(24px, 5vw, 64px);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
}
@media (max-width: 760px) {
  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
    gap: 28px;
  }
}
/* Legacy solid (no longer used; kept for safety) */
.logo-mark--solid { width: clamp(90px, 8vw, 130px); }
.press { display: flex; flex-direction: column; gap: 10px; }
.press-eyebrow {
  font-size: 11px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.press-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: clamp(12px, 2vw, 28px);
  flex-wrap: wrap;
  justify-content: center;
}
.press-list a {
  font-family: "ABC Diatype Extended", sans-serif;
  font-weight: 700;
  font-size: clamp(15px, 1.7vw, 22px);
  letter-spacing: -0.01em;
  text-transform: uppercase;
  transition: opacity var(--transition-interactive);
}
.press-list a:hover { opacity: 0.6; }
.copy {
  font-size: 11px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin: 0;
}

/* ------------------------------------------------------------
   Reveal — opacity + clip only (no CLS)
   ------------------------------------------------------------ */
.reveal { opacity: 1; }

@supports (animation-timeline: view()) {
  .reveal {
    opacity: 0;
    filter: blur(6px);
    animation: reveal-in linear both;
    animation-timeline: view();
    /* Complete the reveal well before the panel is fully centered, so when the
       user lands on a panel the text is already crisp. */
    animation-range: entry 5% entry 80%;
  }
  .reveal > span,
  .reveal > * {
    animation: reveal-stagger linear both;
    animation-timeline: view();
    animation-range: entry 10% entry 90%;
  }
  .reveal > *:nth-child(2) { animation-range: entry 18% entry 98%; }
  .reveal > *:nth-child(3) { animation-range: entry 26% cover 6%; }
}
@keyframes reveal-in {
  to { opacity: 1; filter: blur(0); }
}
@keyframes reveal-stagger {
  from { opacity: 0; transform: translateY(0); filter: blur(10px); }
  to { opacity: 1; filter: blur(0); }
}

/* respect motion preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; filter: none !important; }
  .hero-logo { animation: none; }
  .scroll-cue { animation: none; opacity: 0.7; }
}
