/* ── Fonts ── */
@font-face {
  font-family: 'Berkeley Mono';
  src: url('/fonts/BerkeleyMono-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Berkeley Mono';
  src: url('/fonts/BerkeleyMono-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

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

/* ── Tokens ── */
:root {
  /* palette — pulled from the logo */
  --ginger:    #F59E0B;
  --ginger-l:  #FCD472;
  --amber:     #D98A53;
  --cardboard: #C27A45;
  --brown:     #B06535;
  --charcoal:  #374151;
  --silver:    #E5E7EB;
  --ink:       #1F2937;

  /* functional */
  --bg:          #0C0B0A;
  --bg-raised:   #141210;
  --bg-card:     #1A1714;
  --border:      #2A2520;
  --border-warm: #3A3025;
  --text:        #F5F0EA;
  --text-dim:    #A89C8C;
  --text-muted:  #6D6050;
  --accent:      var(--ginger);
  --accent-soft: rgba(245, 158, 11, 0.10);
  --accent-med:  rgba(245, 158, 11, 0.20);
  --link:        #E8A940;

  /* type */
  --mono: 'Berkeley Mono', 'SF Mono', 'Cascadia Code', 'Fira Code', 'JetBrains Mono', monospace;

  /* space */
  --max-w: 960px;
  --r: 10px;
  --r-lg: 16px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--ginger);
  color: var(--bg);
}

a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.15s;
}
a:hover { color: var(--ginger-l); }

img { display: block; max-width: 100%; }

/* ── Layout ── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

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

/* ═══════════════════════════════════════
   NAV
   ═══════════════════════════════════════ */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 11, 10, 0.88);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}

nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.04em;
}

.nav-brand img {
  height: 26px;
  width: 26px;
  border-radius: 6px;
}

.nav-links { display: flex; gap: 6px; align-items: center; }
.nav-links a {
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.03em;
  padding: 6px 12px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.nav-links a:hover {
  color: var(--text);
  background: var(--accent-soft);
}

/* ═══════════════════════════════════════
   HERO
   ═══════════════════════════════════════ */
.hero {
  padding: 80px 0 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* warm radial glow behind logo */
.hero::before {
  content: '';
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 500px;
  background: radial-gradient(ellipse at center, rgba(245, 158, 11, 0.07) 0%, rgba(217, 138, 83, 0.03) 40%, transparent 70%);
  pointer-events: none;
}

.hero-logo {
  width: 220px;
  height: 220px;
  margin: 0 auto 32px;
  position: relative;
}

.hero-logo svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 20px 40px rgba(245, 158, 11, 0.15));
}

.hero h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 16px;
  color: var(--text);
}

.hero h1 .warm {
  background: linear-gradient(135deg, var(--ginger-l) 0%, var(--ginger) 50%, var(--amber) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 14px;
  color: var(--text-dim);
  max-width: 480px;
  margin: 0 auto 40px;
  line-height: 1.75;
}

/* terminal-style prompt line */
.hero-prompt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 18px;
  margin-bottom: 40px;
}

.hero-prompt .caret {
  color: var(--ginger);
}

.hero-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--r);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  text-decoration: none;
}

.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn-primary {
  background: var(--ginger);
  color: var(--bg);
}
.btn-primary:hover {
  background: var(--ginger-l);
  color: var(--bg);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(245, 158, 11, 0.25);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-dim);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  color: var(--text);
  border-color: var(--border-warm);
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════
   FEATURES
   ═══════════════════════════════════════ */
.features {
  padding: 60px 0 80px;
}

.section-label {
  display: block;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ginger);
  margin-bottom: 12px;
}

.features h2 {
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
  color: var(--text);
  margin-bottom: 48px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.feature-card {
  background: var(--bg-card);
  padding: 28px 24px;
  transition: background 0.2s;
  position: relative;
}

.feature-card:hover {
  background: var(--bg-raised);
}

.feature-icon {
  font-size: 20px;
  margin-bottom: 14px;
  display: block;
  width: fit-content;
}

.feature-card h3 {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: 0.01em;
  color: var(--text);
}

.feature-card p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ═══════════════════════════════════════
   HOW IT WORKS — horizontal steps
   ═══════════════════════════════════════ */
.how-it-works {
  padding: 60px 0 80px;
}

.how-it-works h2 {
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
  color: var(--text);
  margin-bottom: 48px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.step {
  text-align: center;
  position: relative;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-med);
  color: var(--ginger);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 16px;
}

.step h3 {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.step p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 240px;
  margin: 0 auto;
}

/* connecting line between steps */
.step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 18px;
  right: -12px;
  width: 24px;
  height: 1px;
  background: var(--border-warm);
}

/* ═══════════════════════════════════════
   HERO PILLS
   ═══════════════════════════════════════ */
.hero-oss {
  color: var(--ginger);
  font-weight: 700;
}

.hero-coming-soon {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 16px;
}

/* ═══════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════ */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: 40px;
}

footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-brand img {
  height: 22px;
  width: 22px;
  border-radius: 5px;
  opacity: 0.6;
}

.footer-left {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.footer-links { display: flex; gap: 16px; }
.footer-links a {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--text-dim); }

/* ═══════════════════════════════════════
   LEGAL PAGES (Privacy / Terms)
   ═══════════════════════════════════════ */
.legal {
  padding: 72px 0 60px;
  max-width: 640px;
  margin: 0 auto;
}

.legal h1 {
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  color: var(--text);
}

.legal .updated {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.legal h2 {
  font-size: 14px;
  font-weight: 700;
  color: var(--amber);
  margin: 32px 0 10px;
  letter-spacing: 0.01em;
}

.legal p, .legal li {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.85;
  margin-bottom: 10px;
}

.legal ul {
  padding-left: 18px;
  list-style: none;
}

.legal li {
  margin-bottom: 6px;
  position: relative;
  padding-left: 0;
}

.legal li::before {
  content: '·';
  color: var(--ginger);
  font-weight: 700;
  position: absolute;
  left: -14px;
}

.legal strong { color: var(--text); font-weight: 700; }

.legal a { color: var(--link); }
.legal a:hover { color: var(--ginger-l); }

/* ═══════════════════════════════════════
   SUPPORT PAGE
   ═══════════════════════════════════════ */
.support {
  padding: 72px 0 60px;
  max-width: 640px;
  margin: 0 auto;
}

.support h1 {
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  text-align: center;
  color: var(--text);
}

.support > p {
  color: var(--text-dim);
  font-size: 13px;
  text-align: center;
  margin-bottom: 40px;
  line-height: 1.75;
}

.support-cards {
  display: grid;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.support-card {
  background: var(--bg-card);
  padding: 24px;
  transition: background 0.2s;
}
.support-card:hover { background: var(--bg-raised); }

.support-card h3 {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--amber);
}

.support-card p {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.75;
}

.support-card strong { color: var(--text); font-weight: 700; }

/* ═══════════════════════════════════════
   404 PAGE
   ═══════════════════════════════════════ */
.four-oh-four {
  padding: 120px 0;
  text-align: center;
}

.four-oh-four h1 {
  font-size: clamp(64px, 12vw, 120px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--amber) 0%, var(--ginger) 50%, var(--ginger-l) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.four-oh-four p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 32px;
}

.four-oh-four .lost-kitten {
  width: 120px;
  margin: 0 auto 24px;
  opacity: 0.7;
}

/* ═══════════════════════════════════════
   STAGGER ANIMATIONS
   ═══════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in {
  opacity: 0;
  animation: fadeUp 0.6s ease-out forwards;
}

.fade-in-d1 { animation-delay: 0.08s; }
.fade-in-d2 { animation-delay: 0.16s; }
.fade-in-d3 { animation-delay: 0.24s; }
.fade-in-d4 { animation-delay: 0.32s; }
.fade-in-d5 { animation-delay: 0.40s; }

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */
@media (max-width: 720px) {

  .steps {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .step:not(:last-child)::after { display: none; }

  .hero { padding: 60px 0 32px; }
  .hero-logo { width: 170px; height: 170px; }
  .hero-sub { max-width: 380px; }

  .features { padding: 48px 0 60px; }
  .how-it-works { padding: 48px 0 60px; }
}

@media (max-width: 520px) {
  .feature-grid {
    grid-template-columns: 1fr;
    border-radius: var(--r);
  }

  /* hide less important nav links on tiny screens */
  .nav-links a[href="/terms"] { display: none; }

  .hero-logo { width: 140px; height: 140px; }
  .hero h1 { font-size: 28px; }
  .hero-sub { font-size: 13px; max-width: 320px; }

  .hero-cta {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
  .hero-cta .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  .section-label { margin-bottom: 16px; }

  .step p { max-width: 100%; }

  footer .container {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }
}
