/* =========================================================
   Design System
   Theme: Dark editorial — deep navy background, warm amber
   accent, Fraunces display + Satoshi body
   ========================================================= */

:root {
  --bg:         #0c0d14;
  --bg-card:    #13141f;
  --bg-elevated:#1a1b28;
  --border:     rgba(255,255,255,0.07);
  --border-hover: rgba(255,255,255,0.14);

  --text-primary:   #f0ede8;
  --text-secondary: #9593a1;
  --text-muted:     #5e5c6e;

  --accent:     #f5a623;
  --accent-dim: rgba(245,166,35,0.12);
  --accent-glow: rgba(245,166,35,0.25);

  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'Satoshi', system-ui, sans-serif;

  --radius-sm: 6px;
  --radius:    12px;
  --radius-lg: 20px;

  --shadow-card: 0 1px 3px rgba(0,0,0,0.4), 0 8px 32px rgba(0,0,0,0.3);
  --shadow-accent: 0 0 40px var(--accent-glow);
}

/* =========================================================
   Reset & Base
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Subtle grain texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; }

/* =========================================================
   Layout helpers
   ========================================================= */
.container {
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: 24px;
}

/* =========================================================
   Nav
   ========================================================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  background: rgba(12,13,20,0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.nav-inner {
  max-width: 1100px;
  margin-inline: auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  transition: opacity 0.2s;
}
.logo:hover { opacity: 0.8; }

.logo-mark {
  color: var(--accent);
  font-size: 1.2rem;
}

.nav-cta {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  border: 1px solid rgba(245,166,35,0.35);
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  transition: background 0.2s, border-color 0.2s;
}
.nav-cta:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin-inline: auto;
  padding: 100px 24px 80px;
  text-align: center;
}

/* Radial glow behind hero */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse at center, rgba(245,166,35,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(245,166,35,0.2);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 32px;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 6vw, 5rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.hero-headline em {
  font-style: italic;
  color: var(--accent);
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 560px;
  margin-inline: auto;
  margin-bottom: 40px;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero-social-proof {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}
.proof-divider { opacity: 0.4; }

/* =========================================================
   Buttons
   ========================================================= */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: #0c0d14;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9375rem;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  text-decoration: none;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px var(--accent-glow);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  text-decoration: none;
}
.btn-ghost:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
  background: var(--bg-elevated);
}

.btn-full { width: 100%; }

/* =========================================================
   Features
   ========================================================= */
.features {
  position: relative;
  z-index: 1;
  padding: 80px 24px 100px;
  border-top: 1px solid var(--border);
}

.features-header {
  text-align: center;
  max-width: 560px;
  margin-inline: auto;
  margin-bottom: 60px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 300;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  line-height: 1.15;
}

.section-sub {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.65;
}

.features-grid {
  max-width: 1000px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-dim), transparent);
  opacity: 0;
  transition: opacity 0.2s;
}

.feature-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}
.feature-card:hover::before { opacity: 1; }

.feature-icon {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 20px;
  display: block;
}

.feature-title {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.feature-desc {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* =========================================================
   Waitlist
   ========================================================= */
.waitlist-section {
  position: relative;
  z-index: 1;
  padding: 100px 24px;
  border-top: 1px solid var(--border);
  background: radial-gradient(ellipse at 50% 0%, rgba(245,166,35,0.05) 0%, transparent 65%);
}

.waitlist-inner {
  max-width: 600px;
  margin-inline: auto;
  text-align: center;
}

.waitlist-copy {
  margin-bottom: 40px;
}

.waitlist-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input::placeholder { color: var(--text-muted); }
.form-input:focus {
  border-color: rgba(245,166,35,0.5);
  box-shadow: 0 0 0 3px rgba(245,166,35,0.08);
}

.form-note {
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-align: center;
}

.form-success {
  font-size: 0.9375rem;
  color: #4ade80;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: rgba(74,222,128,0.08);
  border: 1px solid rgba(74,222,128,0.2);
}

.form-error {
  font-size: 0.9375rem;
  color: #f87171;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: rgba(248,113,113,0.08);
  border: 1px solid rgba(248,113,113,0.2);
}

/* =========================================================
   Referral Confirmation Panel
   ========================================================= */
.referral-confirm {
  margin-top: 8px;
  background: var(--bg-card);
  border: 1px solid rgba(245,166,35,0.25);
  border-radius: var(--radius);
  padding: 32px 28px;
  text-align: center;
  animation: fadeIn 0.35s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ref-confirm-check {
  font-size: 1.5rem;
  color: #4ade80;
  margin-bottom: 12px;
}

.ref-confirm-position {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 300;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.ref-confirm-position strong {
  color: var(--accent);
  font-weight: 600;
}

.ref-confirm-sub {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.5;
}

.ref-link-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.ref-link-input {
  flex: 1;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--text-secondary);
  outline: none;
  min-width: 0; /* prevent overflow in flex */
}

.btn-copy {
  flex-shrink: 0;
  background: var(--accent);
  color: #0c0d14;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.875rem;
  padding: 11px 18px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: opacity 0.15s;
  white-space: nowrap;
}
.btn-copy:hover { opacity: 0.88; }

.ref-copied-note {
  font-size: 0.8125rem;
  color: #4ade80;
  margin-top: 8px;
}

/* =========================================================
   Footer
   ========================================================= */
.footer {
  position: relative;
  z-index: 1;
  padding: 40px 24px;
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: 1100px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--text-primary); }

.footer-copy {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 640px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .hero-headline {
    font-size: 2.5rem;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* =========================================================
   Scroll-reveal animation
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
