/* ============================================================
   WAYMEET — design system
   "Candlelight ledger": warm near-black ink, ivory type,
   gold for the economics, phosphor for the agents,
   coral for the counter-argument.
   No framework. No build. Hand-set.
   ============================================================ */

:root {
  /* ink scale (warm) */
  --ink-0: #0b0a08;
  --ink-1: #121009;
  --ink-2: #191610;
  --ink-3: #221e15;

  /* paper scale */
  --paper: #ede8db;
  --paper-2: #c9c2ae;
  --paper-dim: #a29a83;
  --faint: #6e6753;

  /* accents */
  --gold: #e0b15e;
  --gold-hi: #f4d492;
  --phosphor: #8fe6b0;
  --phosphor-dim: #4d8f6b;
  --coral: #f0876c;

  --line: rgba(237, 232, 219, 0.10);
  --line-soft: rgba(237, 232, 219, 0.06);

  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;

  --w-max: 1180px;
  --pad: clamp(20px, 4.5vw, 56px);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink-0);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
::selection { background: var(--gold); color: var(--ink-0); }

/* film grain */
body::after {
  content: "";
  position: fixed; inset: -50%;
  width: 200%; height: 200%;
  pointer-events: none;
  z-index: 2000;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 9s steps(6) infinite;
}
@keyframes grain {
  0%,100% { transform: translate(0,0); }
  20% { transform: translate(-2%,1%); }
  40% { transform: translate(1%,-2%); }
  60% { transform: translate(-1%,2%); }
  80% { transform: translate(2%,-1%); }
}

/* ---------- skip link ---------- */
.skip {
  position: fixed; top: -60px; left: 16px; z-index: 300;
  background: var(--gold); color: #1a1408;
  padding: 10px 18px; border-radius: 10px; font-weight: 600; font-size: .9rem;
  transition: top .3s var(--ease-out);
}
.skip:focus { top: 14px; }

/* ---------- typography ---------- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 480; letter-spacing: -0.015em; margin: 0; }
.display-xl {
  font-size: clamp(2.6rem, 6.4vw, 5.4rem);
  line-height: 1.02;
  font-variation-settings: "opsz" 144, "SOFT" 40;
}
.display-lg { font-size: clamp(2.1rem, 4.6vw, 3.6rem); line-height: 1.06; }
.display-md { font-size: clamp(1.5rem, 2.8vw, 2.2rem); line-height: 1.15; }
.lede {
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  line-height: 1.55;
  color: var(--paper-2);
  max-width: 34em;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 22px;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--gold); opacity: .7; }
.serif-i { font-family: var(--font-display); font-style: italic; font-weight: 420; }
.gold { color: var(--gold); }
.phosphor { color: var(--phosphor); }
.coral { color: var(--coral); }
.dim { color: var(--paper-dim); }
.mono { font-family: var(--font-mono); }

p { margin: 0 0 1em; }
.measure { max-width: 62ch; }

/* ---------- layout ---------- */
.wrap { max-width: var(--w-max); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
section { position: relative; }
.section { padding: clamp(84px, 11vw, 160px) 0; }
.section-line { border-top: 1px solid var(--line-soft); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: border-color .4s;
  border-bottom: 1px solid transparent;
}
/* blur lives on a pseudo-element so the nav never becomes a containing
   block for the fixed mobile menu (backdrop-filter would hijack it) */
.nav::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(11, 10, 8, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  transition: opacity .4s var(--ease-out);
}
.nav.scrolled { border-bottom-color: var(--line-soft); }
.nav.scrolled::before { opacity: 1; }
.nav-inner {
  max-width: var(--w-max); margin: 0 auto;
  padding: 14px var(--pad);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.wordmark { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-size: 1.55rem; letter-spacing: -0.01em; }
.wordmark .mark { width: 38px; height: 38px; }
footer .wordmark { font-size: 1.4rem; }
footer .wordmark .mark { width: 32px; height: 32px; }
.nav-links { display: flex; align-items: center; gap: 30px; font-size: 0.92rem; color: var(--paper-2); }
.nav-links a { position: relative; padding: 4px 0; transition: color .25s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--paper); }
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%;
  background: var(--gold); transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease-out);
}
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.nav-cta { margin-left: 6px; }
/* the CTA pill must win over the .nav-links a link styles */
.nav-links a.nav-cta { padding: 10px 20px; }
.nav-links a.nav-cta::after { display: none; }
.nav-burger { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav-burger span { width: 22px; height: 1.5px; background: var(--paper); transition: transform .3s, opacity .3s; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px;
  font-size: 0.95rem; font-weight: 500; letter-spacing: 0.01em;
  border-radius: 999px;
  transition: transform .3s var(--ease-out), box-shadow .3s, background .3s, color .3s;
  will-change: transform;
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold-hi), var(--gold));
  color: #1a1408;
  box-shadow: 0 8px 32px -10px rgba(224, 177, 94, 0.55);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 14px 42px -10px rgba(224, 177, 94, 0.7); }
.btn-ghost {
  border: 1px solid var(--line);
  color: var(--paper-2);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--paper); transform: translateY(-2px); }
.btn .arr { transition: transform .3s var(--ease-out); }
.btn:hover .arr { transform: translateX(4px); }
.btn-sm { padding: 10px 20px; font-size: 0.88rem; }

/* ---------- reveal choreography (only when JS is present) ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
  transition-delay: var(--d, 0s);
}
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal-scale { opacity: 0; transform: scale(.96) translateY(14px); transition: opacity 1s var(--ease-out), transform 1s var(--ease-out); transition-delay: var(--d, 0s); }
.js .reveal-scale.in { opacity: 1; transform: none; }

/* ---------- cards ---------- */
.card {
  background: linear-gradient(160deg, var(--ink-2), var(--ink-1));
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  padding: 30px 28px;
  position: relative;
  overflow: hidden;
  transition: transform .4s var(--ease-out), border-color .4s;
}
.card:hover { transform: translateY(-4px); border-color: var(--line); }
.card h3 { font-size: 1.3rem; margin-bottom: 10px; }
.card p { color: var(--paper-dim); font-size: 0.96rem; margin: 0; }

/* ---------- chips ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 0.78rem;
  padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--paper-2);
  white-space: nowrap;
}
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--phosphor); box-shadow: 0 0 8px var(--phosphor); }

/* ---------- marquee ---------- */
.marquee { overflow: hidden; position: relative; padding: 26px 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.marquee-track { display: flex; gap: 16px; width: max-content; animation: marquee 46s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee-fade::before, .marquee-fade::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 120px; z-index: 2; pointer-events: none;
}
.marquee-fade::before { left: 0; background: linear-gradient(90deg, var(--ink-0), transparent); }
.marquee-fade::after { right: 0; background: linear-gradient(-90deg, var(--ink-0), transparent); }

/* ---------- receipt ---------- */
.receipt {
  font-family: var(--font-mono);
  background: #f4efe2;
  color: #2a251a;
  border-radius: 4px;
  padding: 26px 26px 34px;
  font-size: 0.82rem;
  line-height: 1.7;
  position: relative;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.8);
  --notch: 12px;
}
.receipt::before, .receipt::after {
  content: ""; position: absolute; left: 0; right: 0; height: var(--notch);
  background-image: radial-gradient(circle at 6px -3px, transparent 7px, #f4efe2 7.5px);
  background-size: 14px var(--notch);
}
.receipt::before { top: calc(var(--notch) * -1 + 2px); transform: scaleY(-1); }
.receipt::after { bottom: calc(var(--notch) * -1 + 2px); }
.receipt .r-rule { border-top: 1px dashed #b4ab92; margin: 10px 0; }
.receipt .r-row { display: flex; justify-content: space-between; gap: 18px; }
.receipt .r-big { font-size: 1.05rem; font-weight: 600; }
.receipt .r-dim { color: #857c63; }
.receipt .r-alert { color: #a33f22; font-weight: 600; }

/* ---------- footer ---------- */
footer {
  border-top: 1px solid var(--line-soft);
  padding: 64px 0 44px;
  color: var(--paper-dim);
  font-size: 0.9rem;
}
.footer-grid { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 28px; flex-wrap: wrap; }
.footer-links a { transition: color .25s; }
.footer-links a:hover { color: var(--paper); }
.footer-fine { margin-top: 40px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-family: var(--font-mono); font-size: 0.72rem; color: var(--faint); }

/* ---------- page CTA band ---------- */
.cta-band { text-align: center; padding: clamp(90px, 12vw, 170px) 0; position: relative; overflow: hidden; }
.cta-band .halo {
  position: absolute; left: 50%; top: 55%; transform: translate(-50%,-50%);
  width: 900px; height: 500px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(224,177,94,.13), transparent 65%);
  pointer-events: none;
}

/* ---------- hairline numbers / stats ---------- */
.stat-num {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5.5vw, 4.4rem);
  line-height: 1;
  color: var(--gold);
  font-variation-settings: "opsz" 144;
}
.stat-label { color: var(--paper-dim); font-size: .92rem; margin-top: 10px; max-width: 26ch; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .grid2 { grid-template-columns: 1fr; }
  .grid3 { grid-template-columns: 1fr; }
}
@media (max-width: 780px) {
  .nav-links {
    position: fixed; inset: 0; top: 61px;
    background: rgba(11,10,8,.97);
    backdrop-filter: blur(20px);
    flex-direction: column; justify-content: center; gap: 34px;
    font-size: 1.3rem;
    transform: translateY(-110%);
    transition: transform .45s var(--ease-out);
  }
  .nav-links.open { transform: none; }
  .nav-burger { display: flex; }
  .nav-burger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .nav-burger.open span:nth-child(2) { opacity: 0; }
  .nav-burger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body::after { animation: none; }
  .marquee-track { animation-duration: 400s; }
  .js .reveal, .js .reveal-scale { transition: opacity .4s; transform: none; }
  *, *::before, *::after { animation-duration: 0.001s !important; }
}

/* ============================================================
   v2 additions — enterprise update
   ============================================================ */

/* ---------- USA badge ---------- */
.badge-usa {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .16em;
  color: var(--paper-2);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 16px;
  background: rgba(237,232,219,.02);
}
.badge-usa .flag { font-size: .95rem; line-height: 1; }
.badge-usa b { color: var(--paper); font-weight: 600; letter-spacing: .16em; }

/* ---------- hero aurora (candle glow) ---------- */
.aurora { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.aurora .orb {
  position: absolute; border-radius: 50%;
  filter: blur(90px);
  opacity: .5;
  animation: orbDrift 16s var(--ease-in-out) infinite alternate;
}
.aurora .orb.gold { width: 520px; height: 520px; background: radial-gradient(circle, rgba(224,177,94,.20), transparent 70%); top: -10%; right: 4%; }
.aurora .orb.ember { width: 420px; height: 420px; background: radial-gradient(circle, rgba(240,135,108,.10), transparent 70%); bottom: -20%; left: -6%; animation-delay: -8s; }
@keyframes orbDrift {
  from { transform: translate(0,0) scale(1); }
  to { transform: translate(-60px, 40px) scale(1.15); }
}

/* ---------- tilt cards ---------- */
.js .tilt { transform-style: preserve-3d; will-change: transform; }

/* ---------- forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field label {
  display: block;
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .18em;
  color: var(--paper-dim); text-transform: uppercase;
  margin-bottom: 8px;
}
.field input, .field select, .field textarea {
  width: 100%;
  background: rgba(237,232,219,.03);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--paper);
  font: inherit; font-size: .95rem;
  padding: 13px 16px;
  transition: border-color .3s, background .3s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--gold); background: rgba(237,232,219,.05);
}
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23a29a83' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; }
.field textarea { min-height: 120px; resize: vertical; }
.form-note { font-family: var(--font-mono); font-size: .7rem; color: var(--faint); letter-spacing: .06em; line-height: 1.8; }
.form-panel {
  background: linear-gradient(165deg, var(--ink-2), var(--ink-1));
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: clamp(26px, 4vw, 44px);
  box-shadow: 0 50px 110px -60px rgba(0,0,0,.9);
}
.form-ok { color: var(--phosphor); font-size: .95rem; display: none; margin-top: 14px; }

/* ---------- stat band ---------- */
.stat-band { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 3vw, 40px); }
@media (max-width: 720px) { .stat-band { grid-template-columns: 1fr; } }

/* ---------- billing toggle ---------- */
.bill-toggle {
  display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid var(--line); border-radius: 999px; padding: 4px;
  font-family: var(--font-mono); font-size: .74rem; letter-spacing: .08em;
}
.bill-toggle button {
  border-radius: 999px; padding: 9px 20px; color: var(--paper-dim);
  transition: all .3s var(--ease-out);
}
.bill-toggle button.on { background: var(--gold); color: #1a1408; font-weight: 600; }
.bill-toggle .save { color: var(--phosphor); font-size: .64rem; margin-left: 4px; }

/* inline US flag */
.usflag { display: inline-block; vertical-align: -1px; }

/* ---------- waitlist / notify-me forms ---------- */
.wl-form { display: flex; flex-direction: column; gap: 8px; max-width: 480px; }
.wl-row { display: flex; gap: 8px; flex-wrap: wrap; }
.wl-form input[type="email"] {
  flex: 1; min-width: 220px;
  background: rgba(237,232,219,.04);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--paper);
  font: inherit; font-size: .95rem;
  padding: 13px 22px;
  transition: border-color .3s, background .3s;
}
.wl-form input[type="email"]::placeholder { color: var(--faint); }
.wl-form input[type="email"]:focus { outline: none; border-color: var(--gold); background: rgba(237,232,219,.06); }
.wl-form button { white-space: nowrap; }
.wl-form button:disabled { opacity: .6; cursor: wait; transform: none; }
.wl-error { display: none; font-size: .82rem; color: var(--coral); padding-left: 8px; }
.wl-success {
  padding: 16px 20px; border-radius: 14px; max-width: 480px;
  background: rgba(143,230,176,.08);
  border: 1px solid rgba(143,230,176,.35);
  font-size: .95rem; line-height: 1.55;
}
.wl-success strong { color: var(--phosphor); display: block; margin-bottom: 2px; }
.wl-success span { color: var(--paper-2); }
.wl-form.compact input[type="email"] { padding: 10px 18px; font-size: .88rem; min-width: 0; }
.wl-form.compact button { padding: 10px 18px; font-size: .88rem; }
.wl-form.center { margin-left: auto; margin-right: auto; }
.wl-form.center .wl-row { justify-content: center; }

/* footer notify band */
.notify-band {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding-bottom: 34px; margin-bottom: 34px;
  border-bottom: 1px solid var(--line-soft);
}
.notify-band .nb-copy { max-width: 40ch; }
.notify-band .nb-copy strong { font-family: var(--font-display); font-weight: 480; font-size: 1.2rem; display: block; color: var(--paper); }
.notify-band .nb-copy span { color: var(--paper-dim); font-size: .9rem; }
.notify-band .wl-form { flex: 1; min-width: 280px; max-width: 440px; }
