/* ─────────────────────────────────────────────────────────────────────────── *
 * PivotX Waitlist — styles                                                    *
 * Tokens copied 1:1 from PivotX's real design system (design/CLAUDE.md +      *
 * frontend/src/styles/tokens.css) — same brand green, same Newsreader +       *
 * Hanken Grotesk pairing, same light-primary/dark-secondary posture. This is  *
 * a separate static project, so the values are duplicated here on purpose     *
 * rather than imported — there is no shared build step between the two.      *
 * ─────────────────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

:root {
  --bg:          #F8FAF8;
  --card:        #FFFFFF;
  --card-2:      #FBFCFB;
  --brand:       #2FA36B;
  --brand-hover: #258A5A;
  --brand-soft:  #E8F5EE;
  --brand-glow:  rgba(47, 163, 107, .26);
  --text:        #0F172A;
  --text-2:      #64748B;
  --border:      #E5E7EB;
  --navy-soft:   rgba(16, 37, 72, .045);
  --danger:      #E5484D;
  --danger-bg:   rgba(229, 72, 77, .10);
  --shadow:      0 1px 2px rgba(16, 37, 72, .05), 0 8px 24px rgba(16, 37, 72, .06);
  --shadow-lg:   0 28px 64px rgba(16, 37, 72, .18);
  --font-display: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-body:    'Hanken Grotesk', system-ui, -apple-system, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:          #0B1220;
    --card:        #121C2E;
    --card-2:      #0F1828;
    --brand:       #3CCB84;
    --brand-hover: #52D993;
    --brand-soft:  #1A3D2E;
    --brand-glow:  rgba(60, 203, 132, .42);
    --text:        #F8FAFC;
    --text-2:      #94A3B8;
    --border:      #22304A;
    --navy-soft:   rgba(124, 160, 220, .08);
    --danger:      #FF6166;
    --danger-bg:   rgba(255, 97, 102, .14);
    --shadow:      0 1px 2px rgba(0, 0, 0, .4), 0 14px 36px rgba(0, 0, 0, .45);
    --shadow-lg:   0 34px 76px rgba(0, 0, 0, .6);
  }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background .3s ease, color .3s ease;
}

a { color: inherit; }

.wl-page {
  position: relative;
  min-height: 100vh;
  overflow-x: clip;
}

/* ── Ambient background orbs — same motif as the main Landing page ── */
.wl-orbs { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.wl-orb1 { position: absolute; top: -180px; left: -140px; width: 540px; height: 540px; border-radius: 50%; background: radial-gradient(circle, rgba(47,163,107,.12), transparent 68%); filter: blur(44px); animation: orbDrift1 26s ease-in-out infinite; }
.wl-orb2 { position: absolute; top: 34%; right: -180px; width: 600px; height: 600px; border-radius: 50%; background: radial-gradient(circle, rgba(16,37,72,.07), transparent 68%); filter: blur(52px); animation: orbDrift2 32s ease-in-out infinite; }
@media (prefers-color-scheme: dark) {
  .wl-orb1 { background: radial-gradient(circle, rgba(60,203,132,.12), transparent 68%); }
  .wl-orb2 { background: radial-gradient(circle, rgba(37,80,140,.18), transparent 68%); }
}

.wl-content { position: relative; z-index: 1; max-width: 1140px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 40px); }

/* ── Header ── */
.wl-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: clamp(20px, 3vw, 30px) 0;
}
.wl-brand { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.wl-logo { height: 26px; width: auto; display: block; }
.wl-wordmark {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 19px;
  letter-spacing: -.01em;
  color: var(--text);
}
.wl-wordmark span { color: var(--brand); }
.wl-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 99px;
  padding: 6px 12px;
}
.wl-pill-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ── Hero (two-column, matches the main Landing page's hero) ── */
.wl-hero-section { padding: clamp(36px, 6vw, 68px) 0 clamp(48px, 8vw, 88px); }
.wl-hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(32px, 5vw, 60px);
  align-items: center;
}
.wl-eyebrow {
  font-size: 13px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 600;
  margin: 0 0 clamp(16px, 2vw, 22px);
}
.wl-h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(33px, 5vw, 54px);
  line-height: 1.12;
  letter-spacing: -.018em;
  margin: 0;
  max-width: 16ch;
}
.wl-sub {
  font-size: clamp(15.5px, 1.8vw, 18px);
  line-height: 1.65;
  color: var(--text-2);
  margin: clamp(18px, 2.4vw, 24px) 0 0;
  max-width: 48ch;
}
.wl-cta-row { display: flex; flex-wrap: wrap; gap: 13px; margin-top: clamp(26px, 3vw, 32px); }
.wl-fineprint { font-size: 13.5px; color: var(--text-2); margin: clamp(18px, 2.4vw, 22px) 0 0; }

.wl-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15.5px;
  color: #fff;
  background: var(--brand);
  border: none;
  border-radius: 12px;
  padding: 13px 24px;
  cursor: pointer;
  box-shadow: 0 2px 12px var(--brand-glow);
  transition: transform .35s cubic-bezier(.34,1.56,.64,1), background .2s;
}
.wl-btn:hover { background: var(--brand-hover); transform: translateY(-2px); }
.wl-btn:active { transform: translateY(0) scale(.97); }
.wl-btn:disabled { opacity: .65; cursor: not-allowed; transform: none; }

/* ── Hero right: trust-mechanism diagram card ── */
.wl-diagram-wrap { position: relative; }
.wl-diagram-glow {
  position: absolute;
  inset: 6% 8%;
  background: radial-gradient(ellipse at 50% 40%, var(--brand-glow), transparent 70%);
  filter: blur(38px);
  opacity: .7;
  pointer-events: none;
}
.wl-diagram-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  padding: clamp(18px, 2.6vw, 26px);
  overflow: hidden;
}
.wl-diagram-label {
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-2);
  font-weight: 600;
  margin: 0 0 4px;
}

/* ── Section scaffolding, shared by every section below the hero ── */
.wl-section { padding: clamp(52px, 8vw, 96px) 0; border-top: 1px solid var(--border); }
.wl-sec-head {
  display: grid;
  grid-template-columns: minmax(0,1.15fr) minmax(0,1fr);
  gap: clamp(24px, 5vw, 56px);
  align-items: end;
  margin-bottom: clamp(36px, 5vw, 52px);
}
@media (max-width: 768px) { .wl-sec-head { grid-template-columns: 1fr; gap: 14px; align-items: start; } }
.wl-sec-kicker { font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--text-2); font-weight: 600; margin: 0 0 clamp(14px, 2vw, 18px); }
.wl-sec-kicker.wl-kicker-brand { color: var(--brand); }
.wl-h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(26px, 3.6vw, 42px);
  line-height: 1.1;
  letter-spacing: -.018em;
  margin: 0;
}
.wl-sec-lead { font-size: clamp(14.5px, 1.5vw, 16.5px); line-height: 1.7; color: var(--text-2); margin: 0; }

.wl-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(252px, 1fr)); gap: clamp(16px, 2vw, 20px); }
.wl-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: clamp(22px, 3vw, 28px);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .45s cubic-bezier(.34,1.56,.64,1), box-shadow .45s, border-color .35s;
}
.wl-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.wl-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.wl-card h3 { font-size: 17px; font-weight: 700; margin: 0 0 8px; letter-spacing: -.01em; }
.wl-card p { font-size: 14px; line-height: 1.6; color: var(--text-2); margin: 0; }

/* ── Closing CTA banner ── */
.wl-closing {
  text-align: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: clamp(36px, 6vw, 56px) clamp(20px, 4vw, 40px);
}
.wl-closing .wl-h2 { max-width: 24ch; margin: 0 auto; }
.wl-closing .wl-cta-row { justify-content: center; margin-top: clamp(22px, 3vw, 28px); }

/* ── Scroll-reveal (mirrors the main Landing page's [data-reveal] effect) ── */
[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.22,1,.36,1), transform .7s cubic-bezier(.22,1,.36,1); }
[data-reveal].wl-revealed { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ── Footer ── */
.wl-footer { padding: clamp(28px, 4vw, 40px) 0 40px; text-align: center; }
.wl-footer p { font-size: 12px; color: var(--text-2); margin: 0; }

@keyframes orbDrift1 { 0% { transform: translate(0,0) scale(1); } 50% { transform: translate(46px,-34px) scale(1.14); } 100% { transform: translate(0,0) scale(1); } }
@keyframes orbDrift2 { 0% { transform: translate(0,0) scale(1); } 50% { transform: translate(-54px,32px) scale(1.1); } 100% { transform: translate(0,0) scale(1); } }
@keyframes drawIn     { from { stroke-dashoffset: var(--len, 400); } to { stroke-dashoffset: 0; } }
@keyframes flowPulse  { from { stroke-dashoffset: var(--flow, 240); } to { stroke-dashoffset: 0; } }
@keyframes nodeBreath { 0%, 100% { opacity: .86; } 50% { opacity: 1; } }
@keyframes haloBreath { 0%, 100% { opacity: .35; transform: scale(1); } 50% { opacity: .7; transform: scale(1.07); } }
@keyframes floatY     { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes ringPulse  { 0% { transform: scale(.55); opacity: .5; } 80% { opacity: 0; } 100% { transform: scale(1.75); opacity: 0; } }

/* ── Modal ── */
.wl-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 14, 30, .72);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100;
}
.wl-overlay.wl-open { display: flex; }

.wl-panel {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  padding: 24px;
  animation: wl-panel-in .25s cubic-bezier(.22,1,.36,1);
}
@keyframes wl-panel-in { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }

.wl-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.wl-panel-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 20px;
  margin: 0;
}
.wl-panel-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: var(--text-2);
  cursor: pointer;
}
.wl-panel-close:hover { background: var(--navy-soft); color: var(--text); }

.wl-panel-lead { font-size: 13.5px; color: var(--text-2); line-height: 1.55; margin: 12px 0 18px; }

.wl-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.wl-label { font-size: 13px; font-weight: 500; color: var(--text-2); }
.wl-input {
  height: 44px;
  padding: 0 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.wl-input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.wl-input.wl-invalid { border-color: var(--danger); }

.wl-error {
  display: none;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--danger);
  background: var(--danger-bg);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 14px;
}
.wl-error.wl-show { display: flex; }

.wl-submit { width: 100%; justify-content: center; margin-top: 4px; }

.wl-success { text-align: center; padding: 8px 0; }
.wl-success-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  border-radius: 14px;
  background: var(--brand-soft);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
}
.wl-success-title { font-family: var(--font-display); font-weight: 500; font-size: 20px; }
.wl-success-msg { font-size: 13.5px; color: var(--text-2); line-height: 1.6; margin: 8px 0 20px; }
.wl-secondary-btn {
  width: 100%;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 12px;
  cursor: pointer;
}
.wl-secondary-btn:hover { border-color: var(--text-2); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
