@font-face {
  font-family: 'Archivo';
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url('/fonts/archivo.woff2') format('woff2');
}
@font-face {
  font-family: 'Archivo';
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url('/fonts/archivo.woff2') format('woff2');
}
@font-face {
  font-family: 'Archivo';
  font-weight: 800;
  font-style: normal;
  font-display: swap;
  src: url('/fonts/archivo.woff2') format('woff2');
}

:root {
  --bg: #FAFAF9;
  --surface: #FFFFFF;
  --surface-2: #F0F2EF;
  --border: #E1E4DF;
  --ink: #14181A;
  --ink-muted: #5C6560;
  --accent: #0F7A5C;
  --accent-strong: #0B5C45;
  --accent-soft: #E3F3EC;
  --accent-contrast: #FFFFFF;
  --shadow: 0 1px 2px rgba(20,24,26,.04), 0 12px 32px rgba(20,24,26,.06);
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B0F0D;
    --surface: #121613;
    --surface-2: #171D19;
    --border: #232B26;
    --ink: #EAEFEC;
    --ink-muted: #94A199;
    --accent: #34C994;
    --accent-strong: #22A87A;
    --accent-soft: #10241C;
    --accent-contrast: #06120D;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 32px rgba(0,0,0,.45);
  }
}
:root[data-theme="dark"] {
  --bg: #0B0F0D;
  --surface: #121613;
  --surface-2: #171D19;
  --border: #232B26;
  --ink: #EAEFEC;
  --ink-muted: #94A199;
  --accent: #34C994;
  --accent-strong: #22A87A;
  --accent-soft: #10241C;
  --accent-contrast: #06120D;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 32px rgba(0,0,0,.45);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

a { color: inherit; }

code, .mono {
  font-family: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

h1, h2, h3, .display {
  font-family: 'Archivo', -apple-system, sans-serif;
  letter-spacing: -0.01em;
  text-wrap: balance;
  margin: 0;
}

/* ---- nav ---- */
nav.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
nav.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.logo .dot { color: var(--accent); font-size: 1.9em; line-height: 0; display: inline-block; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-size: 0.9375rem; font-weight: 500; text-decoration: none; color: var(--ink-muted); }
.nav-links a:hover { color: var(--ink); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: var(--accent-contrast); }
.btn-primary:hover { background: var(--accent-strong); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-block { width: 100%; }

/* ---- hero ---- */
.hero {
  padding: 88px 0 64px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent-strong);
  background: var(--accent-soft);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 20px;
}
.hero h1 { font-size: clamp(2.4rem, 1.9rem + 2.2vw, 3.4rem); font-weight: 800; line-height: 1.05; }
.hero .lede { margin-top: 20px; font-size: 1.125rem; color: var(--ink-muted); max-width: 46ch; }
.hero .cta-row { margin-top: 32px; display: flex; gap: 14px; flex-wrap: wrap; }

.code-panel {
  background: #0D1210;
  border: 1px solid #202824;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.code-panel .bar {
  display: flex;
  gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid #202824;
}
.code-panel .bar span { width: 10px; height: 10px; border-radius: 50%; background: #2B332F; }
.code-panel pre {
  margin: 0;
  padding: 20px;
  font-size: 0.8125rem;
  line-height: 1.7;
  overflow-x: auto;
  color: #C9D6CF;
}
.code-panel .k { color: #7FE0B8; }
.code-panel .s { color: #E8C97A; }
.code-panel .c { color: #5C6560; }

/* ---- sections ---- */
section { padding: 72px 0; }
.section-head { max-width: 60ch; margin: 0 auto 48px; text-align: center; }
.section-head h2 { font-size: clamp(1.7rem, 1.5rem + 1vw, 2.1rem); font-weight: 700; }
.section-head p { margin-top: 14px; color: var(--ink-muted); font-size: 1.0625rem; }
.section-tag {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent-strong); margin-bottom: 10px; display: block; text-align: center;
}

/* ---- how it works ---- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.step .num {
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  font-size: 0.875rem;
  color: var(--accent);
  margin-bottom: 14px;
}
.step h3 { font-size: 1.125rem; font-weight: 700; margin-bottom: 8px; }
.step p { color: var(--ink-muted); font-size: 0.9375rem; margin: 0; }

/* ---- features ---- */
.features { background: var(--surface-2); }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}
.feature .icon {
  width: 36px; height: 36px; border-radius: 9px;
  background: var(--accent-soft); color: var(--accent-strong);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Archivo', sans-serif; font-weight: 800; margin-bottom: 16px;
}
.feature h3 { font-size: 1.0625rem; font-weight: 700; margin-bottom: 8px; }
.feature p { color: var(--ink-muted); font-size: 0.9375rem; margin: 0; }

/* ---- pricing ---- */
.pricing-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; max-width: 780px; margin: 0 auto; }
.price-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.price-card.featured { border-color: var(--accent); position: relative; }
.price-card .badge {
  position: absolute; top: -13px; right: 24px;
  background: var(--accent); color: var(--accent-contrast);
  font-size: 0.75rem; font-weight: 700; padding: 5px 12px; border-radius: 100px;
}
.price-card h3 { font-size: 1.0625rem; font-weight: 700; }
.price-card .amount { font-family: 'Archivo', sans-serif; font-weight: 800; font-size: 2.5rem; margin-top: 14px; }
.price-card .amount small { font-family: -apple-system, sans-serif; font-size: 0.9375rem; font-weight: 500; color: var(--ink-muted); }
.price-card .annual { font-size: 0.8125rem; color: var(--ink-muted); margin-top: 4px; }
.price-card ul { list-style: none; margin: 24px 0; padding: 0; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.price-card li { display: flex; gap: 10px; font-size: 0.9375rem; align-items: baseline; }
.price-card li::before { content: "✓"; color: var(--accent); font-weight: 700; }

/* ---- MCP callout ---- */
.mcp-callout {
  background: var(--ink);
  color: var(--bg);
  border-radius: 20px;
  padding: 48px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}
.mcp-callout h2 { font-size: 1.75rem; font-weight: 700; color: var(--bg); }
.mcp-callout p { color: color-mix(in srgb, var(--bg) 65%, transparent); margin-top: 14px; font-size: 1.0625rem; }
.mcp-callout .btn-primary { margin-top: 24px; }
.mcp-callout .code-panel { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.1); }
.mcp-callout .code-panel pre { color: color-mix(in srgb, var(--bg) 80%, transparent); }

/* ---- form ---- */
.form-section .wrap { max-width: 620px; }
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
}
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 0.8125rem; font-weight: 600; margin-bottom: 7px; color: var(--ink-muted); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--ink);
  font-size: 0.9375rem;
  font-family: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.field textarea { resize: vertical; min-height: 84px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hp-field { position: absolute; left: -9999px; opacity: 0; }
#form-msg { margin-top: 16px; font-size: 0.9375rem; display: none; }
#form-msg.ok { color: var(--accent-strong); display: block; }
#form-msg.err { color: #B4442E; display: block; }

footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  color: var(--ink-muted);
  font-size: 0.875rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 56px; }
  .steps, .feature-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .mcp-callout { grid-template-columns: 1fr; padding: 32px; }
  .field-row { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}

/* ---- account pages (login / welcome / dashboard) ---- */
.account-page {
  min-height: calc(100vh - 65px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}
.account-card {
  width: 100%;
  max-width: 440px;
}
.account-card h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: 8px; }
.account-card .sub { color: var(--ink-muted); font-size: 0.9375rem; margin-bottom: 28px; }
.account-links { margin-top: 20px; text-align: center; font-size: 0.875rem; color: var(--ink-muted); }
.account-links a { color: var(--accent-strong); font-weight: 600; text-decoration: none; }

.dash-wrap { max-width: 720px; margin: 0 auto; padding: 56px 24px 96px; }
.dash-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 32px; }
.dash-head h1 { font-size: 1.625rem; font-weight: 700; }
.dash-head .email { color: var(--ink-muted); font-size: 0.9375rem; }

.dash-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.dash-card h2 { font-size: 1.0625rem; font-weight: 700; margin-bottom: 4px; }
.dash-row { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; }
.dash-label { font-size: 0.8125rem; color: var(--ink-muted); }
.dash-plan-badge {
  display: inline-block; background: var(--accent-soft); color: var(--accent-strong);
  font-weight: 700; font-size: 0.75rem; padding: 4px 12px; border-radius: 100px;
  text-transform: capitalize;
}
.key-box {
  font-family: ui-monospace, monospace;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 14px 16px;
  font-size: 0.9375rem;
  margin-top: 14px;
  word-break: break-all;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.key-box button {
  flex: 0 0 auto;
  background: var(--accent);
  color: var(--accent-contrast);
  border: none;
  border-radius: 7px;
  padding: 7px 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}
.key-warn {
  font-size: 0.8125rem;
  color: var(--accent-strong);
  margin-top: 10px;
}
#dash-msg, #login-msg, #welcome-msg { margin-top: 14px; font-size: 0.9375rem; }
#dash-msg.err, #login-msg.err, #welcome-msg.err { color: #B4442E; }
#dash-msg.ok, #login-msg.ok, #welcome-msg.ok { color: var(--accent-strong); }

.mini-plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
.mini-plan {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mini-plan-name { font-weight: 700; font-size: 0.9375rem; margin-bottom: 2px; }
.mini-plan .btn { font-size: 0.8125rem; padding: 9px 14px; }
@media (max-width: 520px) { .mini-plan-grid { grid-template-columns: 1fr; } }

/* ---- site footer ---- */
.site-footer { border-top: 1px solid var(--border); padding-top: 48px; margin-top: 40px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 40px;
}
.footer-brand p { color: var(--ink-muted); font-size: 0.875rem; margin-top: 10px; max-width: 32ch; }
.footer-head { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 12px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 0.875rem; color: var(--ink-muted); text-decoration: none; }
.footer-col a:hover { color: var(--ink); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  color: var(--ink-muted);
  font-size: 0.8125rem;
}
@media (max-width: 700px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ---- free tools ---- */
.ft-wrap { max-width: 640px; margin: 0 auto; padding: 56px 24px 96px; }
.ft-wrap h1 { font-size: clamp(1.9rem, 1.6rem + 1.2vw, 2.4rem); font-weight: 800; }
.ft-wrap .lede { color: var(--ink-muted); font-size: 1rem; margin: 14px 0 32px; }
.ft-form { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 28px; }
.ft-result { margin-top: 20px; }
.ft-result pre {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
  padding: 14px 16px; font-size: 0.8125rem; overflow-x: auto; margin: 0 0 10px;
}
.ft-result.err p { color: #B4442E; font-size: 0.9375rem; }
.ft-note, .ft-empty { color: var(--ink-muted); font-size: 0.875rem; }
.ft-note a { color: var(--accent-strong); font-weight: 600; }
.ft-limits { color: var(--ink-muted); font-size: 0.8125rem; margin-top: 14px; }
