/* OpenZCine landing — brand tokens + base styles.
  Tokens mirror ios/Runner/Branding.swift (canonical app brand).
  No build step; this file is served as-is by GitHub Pages. */

:root {
  /* ---- Color (OKLCh, warm charcoal palette) ---- */
  --bg:         oklch(15% 0.009 62);          /* #0A0908 warm charcoal */
  --bg-deep:    oklch(10% 0.009 62);          /* deeper warm — footer */
  --surface:    oklch(23% 0.012 60);          /* #1D1813 card/device bodies */
  --ink:        oklch(94% 0.012 80);          /* #F2ECE2 warm off-white */
  --muted:      oklch(67% 0.013 72);          /* secondary text */
  --faint:      oklch(52% 0.012 68);          /* tertiary text */
  --accent:     oklch(82% 0.155 83);          /* #FFE100 Nikon gold — SOLID only */
  --accent-soft:oklch(82% 0.155 83 / .16);    /* gold @ 16% — glows, hovers */
  --rec:        oklch(63% 0.225 27);          /* REC red */

  /* ---- Liquid-glass surfaces ---- */
  --glass:        rgba(22,19,15,0.52);
  --glass-bright: rgba(40,35,28,0.55);
  --hairline:     rgba(247,239,225,0.10);
  --hairline-2:   rgba(247,239,225,0.16);
  --blur:         blur(22px) saturate(1.15);

  /* ---- Type ---- */
  --sans: 'Geist', -apple-system, 'SF Pro Text', system-ui, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* ---- Geometry ---- */
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 11px;
  --maxw: 1120px;
}

/* ---- Reset ---- */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ---- Layout primitives ---- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(20px, 5vw, 48px); }
.section { padding: clamp(64px, 10vw, 120px) 0; position: relative; }
.section--spot { padding: clamp(96px, 14vw, 180px) 0; }   /* spotlight sections get more space */

/* ---- Typographic scale ---- */
h1 { font-size: clamp(36px, 6vw, 68px); line-height: 1.05; letter-spacing: -0.03em; font-weight: 700; }
h2 { font-size: clamp(28px, 4vw, 44px); line-height: 1.1; letter-spacing: -0.02em; font-weight: 700; }
h3 { font-size: clamp(20px, 2.4vw, 26px); line-height: 1.2; letter-spacing: -0.01em; font-weight: 600; }
.lead { font-size: clamp(17px, 2vw, 21px); color: var(--muted); max-width: 52ch; }
.mono { font-family: var(--mono); }

/* ---- Liquid-glass utility ---- */
.glass {
  background: var(--glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--hairline);
}
.glass--bright { background: var(--glass-bright); border-color: var(--hairline-2); }

/* ---- Accent treatments ---- */
.gold { color: var(--accent); }
.gold-glow { box-shadow: 0 0 60px var(--accent-soft); }

/* REC motif — the red dot used before section labels and on device mockups */
.rec-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--rec); box-shadow: 0 0 10px var(--rec); vertical-align: middle;
}

/* ---- Section label (small uppercase gold tag with REC dot) ---- */
.section-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent);
  padding: 5px 12px; border-radius: 999px; border: 1px solid var(--accent-soft);
  background: var(--accent-soft);
  margin-bottom: 20px;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 15px; padding: 12px 22px; border-radius: 999px;
  transition: transform .15s ease, box-shadow .15s ease;
  cursor: pointer; border: none;
}
.btn--primary { background: var(--accent); color: #1a1300; }
.btn--primary:hover { transform: translateY(-1px); box-shadow: 0 8px 30px var(--accent-soft); }
.btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--hairline-2); }
.btn--ghost:hover { background: var(--glass); }

/* ---- Responsive helpers ---- */
.grid { display: grid; gap: 24px; }
@media (min-width: 720px) { .grid--2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }

/* ---- Nav: floating glass pill that morphs in on scroll ---- */
/* At the very top (scrollY = 0): invisible — content sits flush under no bar.
   Once scrolled (~24px), a floating pill with rounded end-caps + liquid-glass
   fades and slides into view. Matches the app's morphing-nav aesthetic. */
.nav {
  position: sticky; top: 0; z-index: 50;
  /* The pill floats with a gap above content; container supplies the padding. */
  padding: 14px clamp(16px, 4vw, 40px);
  background: transparent;
  border: none;
  transition: padding .3s ease;
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 52px; gap: 16px;
  max-width: var(--maxw); margin: 0 auto;
  /* The pill itself: rounded capsule + glass, hidden until scrolled. */
  border-radius: 999px;
  padding: 0 18px;
  background: transparent;
  border: 1px solid transparent;
  opacity: 0;
  transform: translateY(-8px);
  transition:
    opacity .35s ease,
    transform .35s ease,
    background .35s ease,
    border-color .35s ease,
    box-shadow .35s ease;
}
/* Scrolled state — the morphed-in glass pill. */
.nav.scrolled .nav__inner {
  background: var(--glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-color: var(--hairline);
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  opacity: 1;
  transform: translateY(0);
}
/* Reduced motion: skip the slide, keep a simple fade. */
@media (prefers-reduced-motion: reduce) {
  .nav, .nav__inner { transition-duration: .01ms; }
}
.nav__brand { display: flex; align-items: center; gap: 9px; font-weight: 700; letter-spacing: -0.01em; }
.nav__brand img { border-radius: 7px; }
.nav__links { display: none; gap: 24px; font-size: 14px; color: var(--muted); }
.nav__links a:hover { color: var(--ink); }
.nav__cta { display: flex; align-items: center; gap: 10px; }
.nav__github { font-size: 14px; color: var(--muted); }
.nav__github:hover { color: var(--ink); }
.nav__cta .btn { padding: 9px 16px; font-size: 14px; }
@media (min-width: 860px) { .nav__links { display: flex; } }
@media (max-width: 560px) { .nav__github { display: none; } }

/* ---- Footer ---- */
.footer { background: var(--bg-deep); border-top: 1px solid var(--hairline); padding: 48px 0; }
.footer__inner { display: flex; flex-direction: column; gap: 14px; }
.footer__brand { display: flex; align-items: center; gap: 9px; font-weight: 700; }
.footer__brand img { border-radius: 6px; }
.footer__meta { color: var(--muted); font-size: 14px; }
.footer__meta a:hover { color: var(--ink); }
.footer__disclaimer { color: var(--faint); font-size: 12px; line-height: 1.5; max-width: 70ch; }

/* ---- Hero ---- */
.hero { padding-top: clamp(48px, 8vw, 96px); }
.hero__inner { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .hero__inner { grid-template-columns: 1.1fr 1fr; } }
.hero__copy h1 { margin: 4px 0 20px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---- Landscape device mockup ---- */
.device--landscape { width: 100%; max-width: 460px; margin-inline: auto; }
.device__bezel {
  position: relative; aspect-ratio: 440 / 220; border-radius: 22px;
  background: var(--surface); border: 1px solid var(--hairline-2);
  padding: 10px; overflow: hidden;
}
.device__screen {
  width: 100%; height: 100%; border-radius: 14px; object-fit: cover;
  background: linear-gradient(135deg, #1a2530, #0d1418);   /* placeholder until video loads */
}
.device__hud {
  position: absolute; top: 20px; left: 20px; padding: 4px 9px; border-radius: 7px;
  font-size: 11px; display: flex; align-items: center; gap: 6px;
}
.device__scope {
  position: absolute; top: 20px; right: 20px; width: 52px; height: 26px;
  border-radius: 6px; display: flex; align-items: flex-end; gap: 2px; padding: 4px;
}
.device__scope span { flex: 1; background: var(--accent); opacity: .85; border-radius: 1px; }

/* ---- Spotlight section ---- */
.spot { position: relative; overflow: hidden; }
.spot__glow {
  position: absolute; top: -10%; left: 50%; transform: translateX(-50%);
  width: 80%; height: 70%;
  background: radial-gradient(ellipse, var(--accent-soft), transparent 70%);
  pointer-events: none;
}
.spot__features { margin-top: 48px; position: relative; }
.feat { padding: 24px; border-radius: var(--r-md); }
.feat h3 { margin-bottom: 8px; }
.feat p { color: var(--muted); font-size: 15px; }

/* ---- Feature row (alternating copy/visual) ---- */
.feat-row { align-items: center; }
.feat-row__copy h2 { margin: 4px 0 16px; }
.feat-row__visual { border-radius: var(--r-lg); padding: 12px; min-height: 220px; }
.placeholder {
  width: 100%; height: 100%; min-height: 200px; border-radius: var(--r-md);
  background:
    linear-gradient(135deg, rgba(255,225,0,0.04), transparent),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.02) 0 12px, transparent 12px 24px),
    var(--surface);
  display: flex; align-items: center; justify-content: center;
}
.placeholder::after {
  content: "screenshot: " attr(data-label);
  font-family: var(--mono); font-size: 12px; color: var(--faint);
}
@media (min-width: 900px) { .feat-row--reverse .feat-row__copy { order: 2; } }

/* ---- Open-source spotlight ---- */
.spot-oss__inner { text-align: center; display: flex; flex-direction: column; align-items: center; }
.spot-oss__inner .lead { margin-bottom: 24px; }

/* ---- Ticks + badges ---- */
.ticks { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.ticks li { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.badge {
  font-family: var(--mono); font-size: 11px; padding: 2px 9px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-soft);
}
.badge--soon { background: transparent; color: var(--muted); border-color: var(--hairline-2); }

/* ---- Final CTA ---- */
.cta-final { text-align: center; display: flex; flex-direction: column; align-items: center; }
.cta-final h2 { margin-bottom: 12px; }
.cta-final .hero__cta { margin-top: 24px; }
