/* =========================================================
   DJSON — Design tokens & base styles
   ========================================================= */
:root {
  /* Type */
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Color — paper + ink with a single signal accent */
  --paper: #f7f3ea;        /* warm ivory */
  --paper-2: #eee6d9;      /* card / subtle surface */
  --ink: #15161a;          /* near-black */
  --ink-2: #3a3b40;
  --ink-3: #6b6d75;
  --line: #e3e0d6;
  --line-2: #d4d1c5;
  --accent: #2f6f4f;       /* signal green — identity / verification */
  --accent-2: #1f4d36;
  --gold: #b88a44;
  --code-bg: #14161b;
  --code-ink: #e7e5db;
  --code-key: #9ec5fe;
  --code-str: #b7d99a;
  --code-num: #f0b67f;
  --code-punct: #8a8d96;

  /* Scale */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --shadow-sm: 0 1px 0 rgba(20,22,27,.04), 0 1px 2px rgba(20,22,27,.04);
  --shadow-md: 0 1px 0 rgba(20,22,27,.04), 0 8px 24px rgba(20,22,27,.06);

  --max: 1140px;
  --gutter: clamp(20px, 4vw, 40px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 15% -10%, rgba(184, 138, 68, .16), transparent 58%),
    radial-gradient(680px 420px at 95% 8%, rgba(47, 111, 79, .12), transparent 62%),
    var(--paper);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }

/* =========================================================
   Layout
   ========================================================= */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--paper) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand-wordmark {
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 0;
}
.brand-wordmark em {
  font-style: normal;
  color: var(--accent);
}
.nav-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.nav-link {
  font-size: 14px;
  color: var(--ink-2);
  padding: 8px 12px;
  border-radius: var(--r-sm);
  text-decoration: none;
}
.nav-link:hover { background: var(--paper-2); color: var(--ink); }

/* Buttons */
.btn {
  --bg: var(--ink);
  --fg: var(--paper);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--bg);
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn--accent { --bg: var(--ink); --fg: #fff; border-color: var(--ink); }
.btn--accent:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn--ghost {
  --bg: transparent; --fg: var(--ink);
  border-color: var(--line-2);
}
.btn--ghost:hover { background: var(--paper-2); }
.btn--lg { height: 48px; padding: 0 22px; font-size: 15px; }

/* =========================================================
   Hero
   ========================================================= */
.hero {
  padding: clamp(64px, 11vw, 128px) 0 clamp(48px, 8vw, 96px);
  position: relative;
  overflow: hidden;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--ink-3);
  text-transform: lowercase;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 22%, transparent);
}
.hero h1 {
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin: 18px 0 18px;
  font-weight: 600;
  max-width: 18ch;
}
.hero h1 .accent { color: var(--accent); }
.hero p.lede {
  font-size: clamp(17px, 1.6vw, 19px);
  color: var(--ink-2);
  max-width: 56ch;
  margin: 0 0 28px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* =========================================================
   Code block / JSON output
   ========================================================= */
.code-card {
  margin-top: clamp(40px, 6vw, 64px);
  background: var(--code-bg);
  color: var(--code-ink);
  border-radius: var(--r-lg);
  box-shadow: 0 24px 70px rgba(20,22,27,.13);
  overflow: hidden;
  border: 1px solid #1f2229;
}
.code-card__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid #20242c;
  background: #1a1d24;
}
.code-card__bar .dots { display: inline-flex; gap: 6px; }
.code-card__bar .dots span {
  width: 10px; height: 10px; border-radius: 50%;
  background: #2a2f38;
}
.code-card__file {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #9aa0aa;
}
.code-card__copy {
  background: transparent;
  border: 1px solid #2a2f38;
  color: #cfd2d8;
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
}
.code-card__copy:hover { background: #20242c; }
.code-card pre {
  margin: 0;
  padding: 22px 22px 26px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.65;
  overflow-x: auto;
  tab-size: 2;
}
.tok-key   { color: var(--code-key); }
.tok-str   { color: var(--code-str); }
.tok-num   { color: var(--code-num); }
.tok-bool  { color: var(--code-num); }
.tok-null  { color: var(--code-punct); }
.tok-punct { color: var(--code-punct); }

/* =========================================================
   Sections — explainer
   ========================================================= */
section { padding: clamp(56px, 8vw, 96px) 0; }
.section-title {
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.02em;
  font-weight: 600;
  margin: 0 0 12px;
}
.section-kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
  margin: 0 0 12px;
  text-transform: lowercase;
  letter-spacing: 0.02em;
}
.section-lede {
  font-size: 17px;
  color: var(--ink-2);
  max-width: 62ch;
  margin: 0 0 40px;
}

.divider {
  height: 1px; background: var(--line); margin: 0;
}

/* Features grid */
.features {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(3, 1fr);
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.feature {
  background: var(--paper);
  padding: 28px 26px 30px;
}
.feature__num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
}
.feature h3 {
  font-size: 17px;
  margin: 10px 0 8px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.feature p {
  font-size: 14.5px;
  color: var(--ink-2);
  margin: 0;
  line-height: 1.6;
}

/* Two-column "what / why" */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}
.two-col h2 { margin-top: 0; }

/* Spec list */
.spec {
  border-top: 1px solid var(--line);
}
.spec__row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.spec__key {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink);
}
.spec__desc {
  font-size: 15px;
  color: var(--ink-2);
}

/* CTA banner */
.cta {
  margin: clamp(24px, 4vw, 56px) 0 0;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(28px, 5vw, 48px);
  background:
    radial-gradient(120% 140% at 100% 0%, color-mix(in oklab, var(--accent) 10%, transparent), transparent 60%),
    var(--paper-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}
.cta h3 {
  font-size: clamp(20px, 2.4vw, 26px);
  letter-spacing: -0.015em;
  margin: 0 0 6px;
  font-weight: 600;
}
.cta p { margin: 0; color: var(--ink-2); }

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px 0 48px;
  margin-top: 40px;
}
.site-footer .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--ink-3);
}
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

/* =========================================================
   Generator page
   ========================================================= */
.tool-grid {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 40px);
  align-items: start;
}
.panel {
  background: rgba(247, 243, 234, .88);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px 22px 24px;
  box-shadow: 0 18px 50px rgba(20,22,27,.06);
}
.panel h2 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.panel p.help {
  margin: 0 0 18px;
  color: var(--ink-3);
  font-size: 13.5px;
}

.step-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--gold);
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.field { display: block; margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 12.5px;
  font-family: var(--font-mono);
  color: var(--ink-2);
  margin-bottom: 6px;
  text-transform: lowercase;
  letter-spacing: 0.02em;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  font: inherit;
  font-size: 14.5px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  padding: 11px 13px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
  font-family: var(--font-mono);
}
.field input::placeholder,
.field textarea::placeholder { color: #a8aab2; }
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 18%, transparent);
}
.field .hint {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 6px;
  font-family: var(--font-mono);
}
.field-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-2);
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  cursor: pointer;
}
.chip:hover { border-color: var(--ink-3); color: var(--ink); }

.actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 6px;
}

.toast {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-2);
  opacity: 0;
  transition: opacity .25s ease;
}
.toast.visible { opacity: 1; }

/* Guided readiness panel */
.readiness-panel {
  margin: 20px 0 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: #fbf8f0;
}
.readiness-panel__head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.readiness-panel h3 {
  margin: 0 0 4px;
  font-size: 17px;
  letter-spacing: -.01em;
}
.readiness-panel p {
  margin: 0;
  color: var(--ink-3);
  font-size: 13.5px;
}
.score-pill {
  min-width: 82px;
  text-align: center;
  border: 1px solid color-mix(in oklab, var(--gold) 42%, var(--line));
  color: var(--ink);
  background: #fffaf0;
  border-radius: 999px;
  padding: 8px 10px;
  font-family: var(--font-mono);
  font-size: 13px;
}
.score-pill span {
  font-size: 20px;
  font-weight: 600;
}
.check {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: flex-start;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  cursor: pointer;
}
.check input {
  margin-top: 3px;
  accent-color: var(--accent);
}
.check span {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.35;
}
.check strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
}
.check small {
  display: block;
  margin-top: 3px;
  color: var(--ink-3);
  font-size: 12.5px;
}
.score-result {
  border-top: 1px solid var(--line);
  margin-top: 8px;
  padding-top: 14px;
}
.score-result div {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.next-card {
  margin-top: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: #fbf8f0;
}
.next-card h3 {
  margin: 0 0 10px;
  font-size: 18px;
  letter-spacing: -.01em;
}
.next-card ol {
  margin: 0 0 12px 20px;
  padding: 0;
  color: var(--ink-2);
}
.next-card li {
  margin: 7px 0;
}
.next-card p {
  color: var(--ink-3);
  margin: 0;
}
.next-card code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--paper-2);
  border-radius: 5px;
  padding: 2px 5px;
}
.service-list {
  margin: 16px 0 0;
  padding-left: 19px;
  color: var(--ink-2);
}
.service-list li { margin: 6px 0; }
.service-cta {
  align-items: flex-start;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 880px) {
  .features { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .spec__row { grid-template-columns: 1fr; gap: 4px; }
  .tool-grid { grid-template-columns: 1fr; }
  .nav-link.hide-sm { display: none; }
}
@media (max-width: 520px) {
  .cta { flex-direction: column; align-items: flex-start; }
  .hero h1 { letter-spacing: -0.02em; }
}

/* Focus visibility */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Selection */
::selection { background: color-mix(in oklab, var(--accent) 30%, transparent); color: var(--ink); }
