/* ============================================
   DODO AEGIES — shared design tokens & chrome
   ============================================ */

:root {
  /* Brand */
  --brand-50:  #eef4ff;
  --brand-100: #dbe7ff;
  --brand-200: #b6cdff;
  --brand-300: #84acff;
  --brand-400: #5485ff;
  --brand-500: #2f63f5;   /* primary blue (matches logo) */
  --brand-600: #1f4ad6;
  --brand-700: #1838a8;
  --brand-800: #14297a;
  --brand-900: #0f1d54;
  --brand-950: #08123a;

  --accent-cyan: #00b8d4;
  --accent-violet: #6e5cff;

  /* Neutrals */
  --ink:      #0b1024;
  --ink-2:    #1c2238;
  --slate-1:  #2b3148;
  --slate-2:  #4a5167;
  --slate-3:  #6e7488;
  --slate-4:  #9097a8;
  --line:     #e4e8ee;
  --line-2:   #eef0f4;
  --surface:  #f7f8fb;
  --surface-2:#f0f2f7;
  --bg:       #ffffff;
  --card:     #ffffff;   /* generic raised surface (flips in dark) */
  --panel:    #0b1024;   /* intentionally-dark surfaces (stay dark in both themes) */
  --panel-2:  #1c2238;
  --code-bg:  #0d1126;

  /* Semantic */
  --ok:       #16a34a;
  --warn:     #f59e0b;
  --crit:     #ef4444;

  /* Typography */
  --font-sans: "Helvetica Neue", Helvetica, "Segoe UI", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;

  /* Radii */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(11,16,36,.05), 0 1px 1px rgba(11,16,36,.04);
  --shadow-md: 0 4px 16px -2px rgba(11,16,36,.08), 0 2px 6px -1px rgba(11,16,36,.06);
  --shadow-lg: 0 24px 48px -16px rgba(11,16,36,.18), 0 8px 16px -4px rgba(11,16,36,.08);
  --shadow-brand: 0 14px 40px -10px rgba(47,99,245,.45);

  /* Layout */
  --container: 1240px;
  --nav-h: 64px;
}

/* ===== Dark theme ===== */
[data-theme="dark"] {
  --brand-50:  #16224d;   /* tinted surfaces (.active, .tag, callout) */
  --brand-100: #1b2c63;
  --brand-200: #25407e;   /* borders / hover rings */
  --brand-300: #3a5da8;
  --brand-600: #8fb2ff;   /* links */
  --brand-700: #b8cdff;   /* strong text on tinted bg */

  --ink:      #eef1fb;    /* primary text */
  --ink-2:    #d2d8ea;
  --slate-1:  #c2c9dd;
  --slate-2:  #9aa3bd;
  --slate-3:  #7f88a3;
  --slate-4:  #626c8a;
  --line:     #28315a;
  --line-2:   #202845;
  --surface:  #151c34;
  --surface-2:#1b2342;
  --bg:       #0a0f21;
  --card:     #121a32;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 4px 16px -2px rgba(0,0,0,.5);
  --shadow-lg: 0 24px 48px -16px rgba(0,0,0,.6);
}
[data-theme="dark"] body { background: var(--bg); color: var(--ink); }
[data-theme="dark"] img { filter: brightness(.92); }
[data-theme="dark"] .nav-logo img,
[data-theme="dark"] .footer-logo img { filter: none; }
/* translucent chrome */
[data-theme="dark"] .nav { background: rgba(10,15,33,.82); border-bottom-color: var(--line); }
[data-theme="dark"] .product-strip { background: rgba(10,15,33,.7); }
/* gradient marketing surfaces that hard-coded white */
[data-theme="dark"] .hero,
[data-theme="dark"] .preview,
[data-theme="dark"] .final-cta,
[data-theme="dark"] .page-hero,
[data-theme="dark"] .pricing-hero,
[data-theme="dark"] .docs-home-hero,
[data-theme="dark"] .auth-wrap { background: var(--bg); }
[data-theme="dark"] .hero::before,
[data-theme="dark"] .pricing-hero::before { opacity: .5; }
[data-theme="dark"] .how-step.accent,
[data-theme="dark"] .price-card.featured,
[data-theme="dark"] .plan.featured,
[data-theme="dark"] .dash-aiPanel,
[data-theme="dark"] .feature .ic { background: linear-gradient(180deg, var(--surface), var(--card)); }
[data-theme="dark"] .dashboard-body { background: var(--card); }
[data-theme="dark"] .callout.warn { background: #2a210e; }
[data-theme="dark"] .callout.note { background: var(--surface); }
/* keep dark code blocks consistent */
[data-theme="dark"] .docs-main pre,
[data-theme="dark"] .code,
[data-theme="dark"] .docs-code pre { background: #070a18; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body { background: var(--bg); }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--brand-600); text-decoration: none; }
a:hover { color: var(--brand-700); }

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

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 880px; margin: 0 auto; padding: 0 24px; }

.section { padding: 96px 0; }
.section-tight { padding: 64px 0; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand-600);
  font-weight: 500;
}
.eyebrow.muted { color: var(--slate-3); }

h1, h2, h3, h4 { margin: 0; letter-spacing: -.02em; line-height: 1.1; }
h1 { font-size: clamp(40px, 5.5vw, 72px); font-weight: 700; letter-spacing: -.035em; }
h2 { font-size: clamp(30px, 3.5vw, 46px); font-weight: 600; letter-spacing: -.025em; }
h3 { font-size: 22px; font-weight: 600; }
p  { margin: 0; }
.lede { font-size: 19px; line-height: 1.55; color: var(--slate-2); max-width: 56ch; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: var(--r-sm);
  font: 500 14px/1 var(--font-sans);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s, transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--brand-500);
  color: #fff;
  box-shadow: 0 6px 14px -4px rgba(47,99,245,.55);
}
.btn-primary:hover { background: var(--brand-600); color: #fff; }
.btn-secondary {
  background: var(--panel);
  color: #fff;
}
.btn-secondary:hover { background: var(--panel-2); color: #fff; }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { background: var(--surface); }
.btn-link {
  background: transparent;
  color: var(--brand-600);
  padding: 0;
  height: auto;
}
.btn-lg { height: 48px; padding: 0 22px; font-size: 15px; border-radius: var(--r-md); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }

/* ===== Top Nav ===== */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 16px;
  color: var(--ink);
  letter-spacing: -.01em;
  white-space: nowrap;
}
.nav-logo img {
  width: 32px; height: 32px;
  image-rendering: pixelated;
}
.nav-logo b { font-weight: 700; }
.nav-logo .pill {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .08em;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--brand-50);
  color: var(--brand-700);
  text-transform: uppercase;
}
.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}
.nav-menu > a, .nav-menu > button {
  font: 500 13.5px/1 var(--font-sans);
  color: var(--slate-2);
  padding: 8px 10px;
  border-radius: var(--r-sm);
  background: transparent;
  border: 0;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}
.nav-menu > a:hover, .nav-menu > button:hover { color: var(--ink); background: var(--surface); }
.nav-menu > a.active { color: var(--ink); }
.nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--card);
  font-family: var(--font-mono);
  font-size: 11px;
}
.lang-toggle button {
  padding: 6px 9px;
  background: transparent;
  border: 0;
  color: var(--slate-3);
  cursor: pointer;
  letter-spacing: .04em;
}
.lang-toggle button.on { background: var(--panel); color: #fff; }

/* theme toggle */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--card);
  color: var(--slate-2);
  cursor: pointer;
  padding: 0;
  transition: color .15s, border-color .15s, background .15s;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--brand-300); }
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle .moon { display: none; }
[data-theme="dark"] .theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .moon { display: block; }

@media (max-width: 1080px) {
  .nav-menu > a, .nav-menu > button { padding: 8px 8px; font-size: 13px; }
}
@media (max-width: 880px) {
  .nav-menu { display: none; }
}
/* Phones: the header row (logo + theme + language + two buttons) was ~100px
   wider than a 375px screen. Drop the secondary sign-in button (the sign-up
   page links to it) and tighten spacing so nothing scrolls sideways. */
@media (max-width: 520px) {
  .container, .container-sm { padding: 0 16px; }
  .nav-inner { padding-inline: 16px; gap: 12px; }
  .nav-logo .pill { display: none; }
  .nav-right { gap: 6px; }
  .nav-right .btn-ghost.btn-sm { display: none; }
  .nav-right .btn-primary.btn-sm { padding-inline: 12px; }
}

/* ===== Footer ===== */
.footer {
  background: var(--panel);
  color: #c8cbd6;
  padding: 80px 0 36px;
  font-size: 14px;
}
.footer a { color: #c8cbd6; }
.footer a:hover { color: #fff; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr);
  gap: 40px;
}
.footer-brand p { color: #8a8f9e; max-width: 26ch; margin-top: 16px; font-size: 13.5px; line-height: 1.55; }
.footer-col h4 { color: #fff; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 18px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-bottom {
  margin-top: 64px;
  padding-top: 28px;
  border-top: 1px solid #1c2238;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #6e7488;
  font-size: 12.5px;
}
.footer-logo { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 600; }
.footer-logo img { width: 28px; height: 28px; image-rendering: pixelated; }
.status-dot { display: inline-flex; align-items: center; gap: 8px; }
.status-dot .d { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.22); }

@media (max-width: 880px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ===== Cards ===== */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
}
.card-hover { transition: border-color .15s, box-shadow .15s, transform .15s; }
.card-hover:hover { border-color: var(--brand-300); box-shadow: var(--shadow-md); transform: translateY(-2px); }

/* ===== Tags / badges ===== */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .04em;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--brand-50);
  color: var(--brand-700);
}
.tag.muted { background: var(--surface); color: var(--slate-2); }
.tag .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ===== Code blocks ===== */
.code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: #0d1126;
  color: #d8def0;
  border-radius: var(--r-md);
  padding: 18px 20px;
  overflow: auto;
  line-height: 1.6;
}
.code .k { color: #8aa6ff; }
.code .s { color: #9be59b; }
.code .c { color: #6e7488; }
.code .n { color: #ffb37a; }
.code .f { color: #6dd1ff; }

/* ===== Utility ===== */
.muted { color: var(--slate-3); }
.text-center { text-align: center; }
.flex { display: flex; }
.grid { display: grid; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; } .gap-32 { gap: 32px; } .gap-48 { gap: 48px; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; } .mt-48 { margin-top: 48px; } .mt-64 { margin-top: 64px; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; } .mb-32 { margin-bottom: 32px; } .mb-48 { margin-bottom: 48px; }
.center { display: flex; align-items: center; justify-content: center; }

/* Hide dodo mascot helper (Tweak) */
body.hide-mascot .mascot { display: none !important; }

/* Reduce animation helper (Tweak) */
body.calm * { animation-duration: 0s !important; transition-duration: 0s !important; }

/* ===== Section headings ===== */
.section-head { max-width: 760px; margin-bottom: 56px; }
.section-head h2 { margin-top: 12px; }
.section-head .lede { margin-top: 16px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .lede { margin-inline: auto; }

/* ===== Divider rule ===== */
.rule { height: 1px; background: var(--line); margin: 0; border: 0; }

/* ===== Marquee logo strip ===== */
.logo-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 32px;
  align-items: center;
}
.logo-strip svg { width: 100%; height: 28px; color: var(--slate-3); opacity: .85; }
@media (max-width: 880px) { .logo-strip { grid-template-columns: repeat(3, 1fr); } }

/* ===== Form ===== */
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; font-weight: 500; color: var(--slate-2); }
.field input, .field textarea, .field select {
  font: 14px var(--font-sans);
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  outline: 0;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(47,99,245,.18);
}
.field .hint { font-size: 12px; color: var(--slate-3); }
.field textarea { min-height: 110px; resize: vertical; }
