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

/* ─── Tokens — Unbidden.AI brand palette ────────────────── */
:root {
  /* Backgrounds — matched to exact brand guide dark navy */
  --bg:          #0B1628;   /* brand guide background navy */
  --surface:     #101E34;   /* card / panel surface */
  --surface-2:   #162C46;   /* raised surface, hover states */
  --border:      #1C3352;   /* default border */
  --border-muted:#122844;   /* subtle separator */

  /* Accent — exact brand teal from ".AI" and section headings */
  --accent:      #18D5CF;   /* .AI teal, primary CTA */
  --accent-hi:   #72F0EA;   /* icon highlight / hover */
  --accent-dim:  #10B8C2;   /* pressed / dimmed */
  --dot-glow:    #A8FFF8;   /* icon dot highlight */

  /* Typography */
  --text:        #F4F6FA;   /* primary text */
  --muted:       #B9C4D0;   /* secondary / body copy */
  --subtle:      #5C7A96;   /* placeholder, disabled */

  /* Functional */
  --success:     #25D6DB;
  --danger:      #E05252;

  --mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', ui-monospace, monospace;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;

  --radius: 6px;
  --max-w: 1100px;
}

/* ─── Base ───────────────────────────────────────────────── */
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code, pre {
  font-family: var(--mono);
  font-size: 0.875em;
}

/* ─── Layout ─────────────────────────────────────────────── */
.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
section { padding: 80px 0; }
section + section { border-top: 1px solid var(--border-muted); }

/* ─── Nav ────────────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 22, 40, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.nav-logo img { height: 30px; display: block; width: auto; }
.nav-wordmark {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1;
}
.nav-wordmark .dot-ai { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}
.nav-links a {
  color: var(--muted);
  font-size: 0.875rem;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links a.active { color: var(--text); }
.nav-links .btn-nav {
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 7px 16px;
  border-radius: var(--radius);
  font-size: 0.8rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.nav-links .btn-nav:hover {
  background: var(--accent);
  color: var(--bg);
  text-decoration: none;
}

/* ─── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  text-decoration: none;
  font-family: var(--sans);
}
.btn-primary {
  background: var(--accent);
  color: var(--bg);
}
.btn-primary:hover {
  background: var(--accent-hi);
  color: var(--bg);
  text-decoration: none;
}
.btn-outline {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

/* ─── Hero ───────────────────────────────────────────────── */
.hero {
  padding: 100px 0 88px;
  border-bottom: 1px solid var(--border-muted);
}
.hero-eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.035em;
  margin-bottom: 20px;
  max-width: 680px;
  color: var(--text);
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
}
.hero-sub {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 540px;
  margin-bottom: 36px;
  line-height: 1.7;
}
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 52px; }

/* Code block in hero */
.hero-code {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 26px;
  font-family: var(--mono);
  font-size: 0.82rem;
  max-width: 500px;
  line-height: 1.85;
}
.c-comment { color: var(--subtle); }
.c-cmd     { color: var(--text); }
.c-kw      { color: var(--accent); }
.c-str     { color: var(--accent-hi); }
.c-out     { color: var(--subtle); font-style: italic; }
.c-out-hi  { color: var(--accent); font-style: italic; }

/* ─── Problem bar ────────────────────────────────────────── */
.problem-bar {
  padding: 30px 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  border-top: 1px solid var(--border);
}
.problem-bar p {
  font-size: 1rem;
  color: var(--muted);
  text-align: center;
}
.problem-bar strong { color: var(--text); }

/* ─── Section headings ───────────────────────────────────── */
.section-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 14px;
}
h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 14px;
  line-height: 1.2;
}
.section-sub {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 44px;
  max-width: 520px;
  line-height: 1.7;
}

/* ─── Cards ──────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.card p {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.65;
}
.card-accent { border-color: var(--accent); }
.card-accent h3 { color: var(--accent-hi); }

/* ─── Steps ──────────────────────────────────────────────── */
.steps { display: flex; flex-direction: column; gap: 36px; max-width: 640px; }
.step { display: flex; gap: 20px; align-items: flex-start; }
.step-num {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}
.step-content h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--text);
}
.step-content p { font-size: 0.875rem; color: var(--muted); line-height: 1.65; }

/* ─── Product card ───────────────────────────────────────── */
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
}
.product-card h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}
.product-card h3 .accent { color: var(--accent); }
.product-card > p {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 22px;
  max-width: 540px;
  line-height: 1.7;
}
.tag-list { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  padding: 3px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--subtle);
}

/* ─── Integration pills ──────────────────────────────────── */
.integration-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}
.integration-pill {
  font-family: var(--mono);
  font-size: 0.78rem;
  padding: 5px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--muted);
}
.integration-pill.active {
  border-color: var(--accent);
  color: var(--accent);
}

/* ─── Pricing ────────────────────────────────────────────── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
}
.pricing-card.featured {
  border-color: var(--accent);
  background: #0D1C34;
}
.pricing-tier {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--subtle);
  margin-bottom: 14px;
}
.pricing-price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1;
}
.pricing-price .period {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 400;
}
.pricing-desc {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 14px 0 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  line-height: 1.6;
}
.pricing-features {
  list-style: none;
  flex: 1;
  margin-bottom: 28px;
}
.pricing-features li {
  font-size: 0.85rem;
  color: var(--muted);
  padding: 7px 0;
  display: flex;
  gap: 10px;
  border-bottom: 1px solid var(--border-muted);
}
.pricing-features li:last-child { border-bottom: none; }
.pricing-features li .check {
  color: var(--accent);
  font-family: var(--mono);
  flex-shrink: 0;
}
.pricing-features li strong { color: var(--text); }

/* ─── Email bar ──────────────────────────────────────────── */
.email-bar {
  padding: 28px 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.email-bar-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.email-bar p {
  font-size: 0.875rem;
  color: var(--muted);
  flex: 1;
  min-width: 200px;
}
.email-form { display: flex; gap: 10px; flex-wrap: wrap; }
.email-form input[type="email"] {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 14px;
  color: var(--text);
  font-size: 0.875rem;
  font-family: var(--sans);
  width: 230px;
  outline: none;
  transition: border-color 0.15s;
}
.email-form input[type="email"]::placeholder { color: var(--subtle); }
.email-form input[type="email"]:focus { border-color: var(--accent); }
.email-form button {
  padding: 9px 18px;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--sans);
  transition: background 0.15s;
}
.email-form button:hover { background: var(--accent-hi); }

/* ─── Footer ─────────────────────────────────────────────── */
footer {
  padding: 56px 0 32px;
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 40px;
  margin-bottom: 48px;
}
.footer-brand { max-width: 220px; }
.footer-brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.footer-brand-logo img { height: 26px; width: auto; }
.footer-brand p {
  font-size: 0.82rem;
  color: var(--subtle);
  line-height: 1.6;
}
.footer-links { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-col h4 {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--subtle);
  margin-bottom: 14px;
  font-family: var(--mono);
}
.footer-col ul { list-style: none; }
.footer-col ul li + li { margin-top: 10px; }
.footer-col a {
  font-size: 0.85rem;
  color: var(--muted);
  transition: color 0.15s;
}
.footer-col a:hover { color: var(--text); text-decoration: none; }
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border-muted);
  font-size: 0.78rem;
  color: var(--subtle);
}

/* ─── FAQ accordion ──────────────────────────────────────── */
.faq-list { max-width: 700px; }
details {
  border-bottom: 1px solid var(--border-muted);
  padding: 18px 0;
}
details:first-of-type { border-top: 1px solid var(--border-muted); }
summary {
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  user-select: none;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: '+';
  font-family: var(--mono);
  color: var(--accent);
  font-size: 1rem;
  flex-shrink: 0;
}
details[open] summary::after { content: '−'; }
details p {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.75;
}
details code {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 3px;
  color: var(--accent-hi);
}

/* ─── Code block ─────────────────────────────────────────── */
.code-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.9;
  overflow-x: auto;
  color: var(--muted);
}
.code-block .c-comment { color: var(--subtle); }
.code-block .c-cmd     { color: var(--text); }
.code-block .c-kw      { color: var(--accent); }
.code-block .c-str     { color: var(--accent-hi); }
.code-block code { font-family: inherit; font-size: inherit; }

/* ─── Billing toggle ─────────────────────────────────────── */
.billing-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}
.toggle-opt {
  font-size: 0.875rem;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s;
  user-select: none;
}
.toggle-opt.active { color: var(--text); font-weight: 500; }
.toggle-track {
  width: 44px;
  height: 24px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
}
.toggle-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: var(--accent);
  border-radius: 50%;
  transition: transform 0.2s;
  display: block;
}
.save-badge {
  font-size: 0.68rem;
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  padding: 2px 7px;
  border-radius: 3px;
  margin-left: 6px;
  font-weight: 500;
  font-family: var(--mono);
  letter-spacing: 0.03em;
}

/* ─── Blog ───────────────────────────────────────────────── */
.post-list { display: flex; flex-direction: column; gap: 0; }
.post-item {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  padding: 28px 0;
  border-bottom: 1px solid var(--border-muted);
  text-decoration: none;
}
.post-item:first-child { border-top: 1px solid var(--border-muted); }
.post-item:hover .post-title { color: var(--accent); }
.post-date {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--subtle);
  white-space: nowrap;
  padding-top: 4px;
  min-width: 90px;
}
.post-content { flex: 1; }
.post-tag {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.post-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  transition: color 0.15s;
  line-height: 1.35;
}
.post-excerpt {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.65;
}

/* ─── Article / Docs prose ───────────────────────────────── */
.prose { max-width: 700px; }
.prose h2 {
  font-size: 1.35rem;
  margin-top: 48px;
  margin-bottom: 14px;
  padding-top: 20px;
  border-top: 1px solid var(--border-muted);
}
.prose h2:first-of-type { border-top: none; margin-top: 0; }
.prose h3 { font-size: 1rem; font-weight: 600; margin-top: 28px; margin-bottom: 10px; color: var(--text); }
.prose p { font-size: 0.9rem; color: var(--muted); line-height: 1.8; margin-bottom: 16px; }
.prose ul, .prose ol { padding-left: 20px; margin-bottom: 16px; }
.prose li { font-size: 0.9rem; color: var(--muted); line-height: 1.8; margin-bottom: 4px; }
.prose code {
  font-family: var(--mono);
  font-size: 0.82em;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 3px;
  color: var(--accent-hi);
}
.prose pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  overflow-x: auto;
  margin-bottom: 20px;
}
.prose pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.85;
}
.prose strong { color: var(--text); font-weight: 600; }
.prose a { color: var(--accent); }
.prose a:hover { text-decoration: underline; }
.prose blockquote {
  border-left: 3px solid var(--accent);
  margin: 20px 0;
  padding: 12px 20px;
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.prose blockquote p { margin-bottom: 0; color: var(--muted); font-style: italic; }

/* Docs sidebar layout */
.docs-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  align-items: start;
}
.docs-nav { position: sticky; top: 88px; }
.docs-nav-section { margin-bottom: 28px; }
.docs-nav-section h4 {
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--subtle);
  margin-bottom: 10px;
}
.docs-nav-section ul { list-style: none; }
.docs-nav-section li + li { margin-top: 6px; }
.docs-nav-section a {
  font-size: 0.85rem;
  color: var(--muted);
  transition: color 0.15s;
}
.docs-nav-section a:hover { color: var(--text); text-decoration: none; }
.docs-nav-section a.active { color: var(--accent); font-weight: 500; }
@media (max-width: 768px) {
  .docs-layout { grid-template-columns: 1fr; }
  .docs-nav { position: static; }
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
  section { padding: 56px 0; }
  .hero { padding: 72px 0 64px; }
  .hero-ctas { flex-direction: column; align-items: flex-start; }
  .footer-inner { flex-direction: column; }
  .email-bar-inner { flex-direction: column; align-items: flex-start; }
  .footer-links { gap: 36px; }
}
@media (max-width: 520px) {
  .nav-links li:not(:last-child):not(:nth-last-child(2)) { display: none; }
  .pricing-grid { grid-template-columns: 1fr; }
}
