/* ============================================================
   FLYTE — shared design system
   ============================================================ */
:root {
  /* Paper + ink */
  --paper: oklch(97% 0.008 80);
  --paper-2: oklch(94% 0.012 75);
  --paper-3: oklch(90% 0.015 70);
  --ink: oklch(18% 0.015 260);
  --ink-2: oklch(32% 0.018 260);
  --ink-3: oklch(52% 0.015 260);
  --rule: oklch(86% 0.008 260);

  /* Accent — golden terracotta (echoes mountain-light) */
  --accent: oklch(68% 0.13 55);
  --accent-2: oklch(58% 0.14 45);
  --accent-soft: oklch(92% 0.035 65);

  /* Secondary — sky */
  --sky: oklch(74% 0.06 235);
  --sky-soft: oklch(93% 0.02 230);

  /* Type */
  --serif: "Instrument Serif", "Cormorant Garamond", Georgia, serif;
  --sans: "Geist", "Söhne", ui-sans-serif, system-ui, sans-serif;
  --mono: "Geist Mono", "JetBrains Mono", ui-monospace, monospace;

  /* Metrics */
  --max: 1320px;
  --pad: clamp(20px, 4vw, 56px);
  --r-sm: 10px;
  --r-md: 18px;
  --r-lg: 28px;
  --r-xl: 36px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--paper); color: var(--ink); -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  background: var(--paper);
  color: var(--ink);
  overflow-x: hidden;
}

/* Subtle paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.4;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.1 0 0 0 0 0.1 0 0 0 0 0.15 0 0 0 0.06 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

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

/* Typography */
.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; }
.mono  { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; }

h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 400; letter-spacing: -0.02em; line-height: 0.95; }
h1 { font-size: clamp(56px, 9vw, 148px); }
h2 { font-size: clamp(40px, 6vw, 92px); }
h3 { font-size: clamp(28px, 3vw, 44px); }

p { margin: 0; }

/* Layout utilities */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); position: relative; z-index: 2; }
.rule { height: 1px; background: var(--rule); border: 0; margin: 0; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  background: color-mix(in srgb, var(--paper) 72%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--rule) 60%, transparent);
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px var(--pad);
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}
.logo {
  font-family: var(--serif);
  font-size: 30px;
  font-style: italic;
  letter-spacing: -0.02em;
  line-height: 1;
  display: inline-flex; align-items: baseline; gap: 6px;
}
.logo .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); display: inline-block; transform: translateY(-2px); }

.nav-links { display: flex; gap: 6px; align-items: center; }
.nav-links a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--ink-2);
  transition: background .2s, color .2s;
}
.nav-links a:hover { background: var(--paper-3); color: var(--ink); }
.nav-links a.current { color: var(--ink); }
.nav-links a.current::after {
  content: ""; display: block; width: 4px; height: 4px;
  border-radius: 50%; background: var(--accent);
  margin: 2px auto -4px;
}
@media (max-width: 720px) {
  .nav-links a:not(.cta) { display: none; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 14px;
  border: 1px solid transparent;
  transition: transform .18s ease, background .18s, color .18s, border-color .18s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-2); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink-3); }
.btn-ghost:hover { background: var(--paper-3); color: var(--ink); border-color: var(--ink); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-2); }
.btn .arrow { display: inline-block; transition: transform .2s; }
.btn:hover .arrow { transform: translateX(3px); }

/* Footer */
.footer {
  position: relative;
  background: var(--paper-2);
  color: var(--ink);
  padding: clamp(80px, 12vw, 160px) 0 40px;
  overflow: hidden;
  z-index: 2;
  border-top: 1px solid var(--rule);
}
.footer h2 { font-size: clamp(56px, 10vw, 180px); line-height: 0.9; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  margin-top: 120px;
  padding-top: 40px;
  border-top: 1px solid var(--rule);
  font-size: 14px;
}
.footer-grid h4 {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 400;
}
.footer-grid a { display: block; padding: 4px 0; color: var(--ink-2); transition: color .2s; }
.footer-grid a:hover { color: var(--accent); }
.footer-meta {
  display: flex; justify-content: space-between; margin-top: 64px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em;
  color: var(--ink-3);
  text-transform: uppercase;
}
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-meta { flex-direction: column; gap: 12px; }
}

/* CTA block (reused) */
.cta-block {
  position: relative;
  padding: clamp(60px, 10vw, 140px) 0 clamp(40px, 6vw, 80px);
}
.cta-lead {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em;
  color: var(--ink-3); margin-bottom: 18px; display: flex; align-items: center; gap: 10px;
}
.cta-lead::before { content: ""; width: 28px; height: 1px; background: var(--accent); }

/* Section header */
.sec-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 24px; margin-bottom: 56px;
}
.sec-num {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em;
  color: var(--ink-3);
}

/* Image placeholders (editorial striped) */
.ph {
  position: relative;
  background:
    repeating-linear-gradient(135deg, color-mix(in srgb, var(--ink) 6%, transparent) 0 2px, transparent 2px 14px),
    linear-gradient(180deg, var(--paper-2), var(--paper-3));
  overflow: hidden;
  border-radius: var(--r-md);
}
.ph::after {
  content: attr(data-label);
  position: absolute; inset: auto 0 12px 0;
  text-align: center; font-family: var(--mono);
  font-size: 10px; letter-spacing: 0.2em; color: var(--ink-3);
}

/* Reveal-on-scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s ease, transform .9s ease; }
.reveal.in { opacity: 1; transform: none; }

/* Magnetic/hover utilities */
.hover-lift { transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.hover-lift:hover { transform: translateY(-4px); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Waitlist form */
.waitlist { width: 100%; max-width: 520px; }
.waitlist-row { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
.waitlist-row input[type="email"] {
  flex: 1; min-width: 180px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid var(--ink-3);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
.waitlist-row input[type="email"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}
.waitlist-row input[type="email"]:disabled { opacity: .6; }
.waitlist-row .btn[disabled] { opacity: .7; cursor: default; transform: none; }
.waitlist-msg { margin-top: 10px; font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.waitlist-msg-err { color: #b8462f; }
.waitlist-msg-ok { color: var(--accent-2); }
.waitlist-heading {
  font-family: var(--mono); font-size: 11px; letter-spacing: .2em;
  color: var(--ink-3); margin-bottom: 12px; text-transform: uppercase;
}
.waitlist.waitlist-nav { width: auto; }
.waitlist.waitlist-nav .waitlist-row input[type="email"] { min-width: 180px; padding: 8px 14px; font-size: 13px; }
.waitlist.waitlist-nav .waitlist-row .btn { padding: 8px 14px; font-size: 13px; }
@media (max-width: 720px) {
  .waitlist.waitlist-nav { display: none; }
}

/* Legal pages (privacy / terms / unsubscribe) */
.legal { padding: clamp(60px, 9vw, 120px) 0 clamp(80px, 12vw, 140px); }
.legal .label { font-family: var(--mono); font-size: 11px; letter-spacing: .22em; color: var(--ink-3); margin-bottom: 20px; display: flex; align-items: center; gap: 10px; text-transform: uppercase; }
.legal .label::before { content: ""; width: 28px; height: 1px; background: var(--accent); }
.legal h1 { font-size: clamp(44px, 7vw, 96px); line-height: 0.95; margin-bottom: 24px; }
.legal .updated { font-family: var(--mono); font-size: 11px; letter-spacing: .18em; color: var(--ink-3); margin-bottom: 48px; text-transform: uppercase; }
.legal .doc { max-width: 72ch; color: var(--ink-2); font-size: 17px; line-height: 1.65; }
.legal .doc h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(24px, 3vw, 34px); color: var(--ink); margin: 40px 0 14px; letter-spacing: -0.01em; line-height: 1.15; }
.legal .doc h3 { font-family: var(--sans); font-weight: 500; font-size: 16px; color: var(--ink); margin: 24px 0 8px; }
.legal .doc p { margin: 0 0 14px; }
.legal .doc ul, .legal .doc ol { padding-left: 20px; margin: 0 0 16px; }
.legal .doc li { margin-bottom: 6px; }
.legal .doc a { color: var(--accent-2); border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.legal .doc a:hover { color: var(--accent); border-bottom-color: var(--accent); }
