/* ============================================================
   Open Source Lawyer (fancy) — premium consultancy styling
   Palette: warm ivory, deep navy, gold
   ============================================================ */

:root {
  --paper: #F5F2EA;
  --paper-2: #EDE8DC;
  --card: #FCFBF7;
  --ink: #1A1F29;
  --navy: #14263C;
  --navy-deep: #0B1826;
  --gold: #A87B2F;
  --gold-bright: #C89A4B;
  --muted: #6E675C;
  --line: #E1DACA;
  --line-strong: #CFC6B4;
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace;
  --container: 1180px;
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }

::selection { background: var(--gold-bright); color: var(--navy-deep); }

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

.container-narrow { max-width: 780px; }

section[id], div[id] { scroll-margin-top: 92px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border: none;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--navy);
  color: var(--paper);
  box-shadow: 0 6px 16px rgba(20, 38, 60, 0.18);
}
.btn-primary:hover {
  background: var(--navy-deep);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(20, 38, 60, 0.24);
}

.btn-ghost {
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

.btn-gold {
  background: var(--gold-bright);
  color: var(--navy-deep);
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(200, 154, 75, 0.3);
}
.btn-gold:hover {
  background: #D8AB5E;
  transform: translateY(-1px);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 242, 234, 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.site-header.is-scrolled {
  background: rgba(245, 242, 234, 0.97);
  box-shadow: 0 8px 24px rgba(26, 31, 41, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}
.brand-mark { width: 32px; height: 32px; }
.brand-name {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--navy);
}

.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav a {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.15s ease;
}
.site-nav a:hover { color: var(--gold); }

.btn-cta { padding: 10px 20px; font-size: 0.85rem; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  cursor: pointer;
}
.nav-toggle-bar {
  height: 2px;
  width: 100%;
  background: var(--navy);
  border-radius: 2px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: clip;
  padding: 112px 0 96px;
  background:
    radial-gradient(90% 60% at 72% 0%, rgba(168, 123, 47, 0.09), transparent 62%),
    var(--paper);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 56px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-glyph {
  position: absolute;
  top: -6%;
  right: -3%;
  z-index: 0;
  font-family: var(--serif);
  font-size: clamp(280px, 42vw, 620px);
  line-height: 1;
  color: rgba(20, 38, 60, 0.05);
  user-select: none;
  pointer-events: none;
  transform: translateY(var(--glyph-shift, 0px));
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}
.rule {
  display: inline-block;
  width: 36px;
  height: 1px;
  background: var(--gold);
}
.rule-gold { background: var(--gold-bright); }

.hero-title {
  margin: 0 0 24px;
  font-family: var(--serif);
  font-size: clamp(2.9rem, 5.6vw, 4.4rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.015em;
  color: var(--navy);
}

.h-line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.1em;
  margin-bottom: -0.1em;
}
.h-line-in {
  display: block;
  transform: translateY(110%);
  animation: rise 0.9s cubic-bezier(0.19, 0.65, 0.22, 1) forwards;
}
.h-line:nth-child(2) .h-line-in { animation-delay: 0.22s; }

@keyframes rise { to { transform: none; } }

.hero-sub {
  max-width: 540px;
  margin: 0 0 34px;
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-meta {
  margin: 28px 0 0;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* load-in stagger for hero copy */
.hero-copy > * {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.8s cubic-bezier(0.19, 0.65, 0.22, 1) forwards;
}
.hero-copy > :nth-child(1) { animation-delay: 0.05s; }
.hero-copy > :nth-child(2) { animation-delay: 0.12s; } /* title animates its own lines; keep container fade subtle */
.hero-copy > :nth-child(3) { animation-delay: 0.5s; }
.hero-copy > :nth-child(4) { animation-delay: 0.6s; }
.hero-copy > :nth-child(5) { animation-delay: 0.7s; }

@keyframes fadeUp { to { opacity: 1; transform: none; } }

/* ---------- Console (hero visual) ---------- */
.console {
  margin: 0;
  background: #0F1E30;
  border: 1px solid rgba(200, 154, 75, 0.28);
  border-radius: 16px;
  box-shadow: 0 28px 56px rgba(11, 24, 38, 0.3);
  overflow: hidden;
}

.console-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 13px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}
.console-title {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.35);
}

.console-body {
  padding: 22px 20px 26px;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 2;
  color: rgba(255, 255, 255, 0.78);
}
.console-body p { margin: 0; }
.cl {
  opacity: 0;
  transform: translateY(6px);
  animation: fadeLine 0.5s ease forwards;
}
.cl-1 { animation-delay: 0.55s; }
.cl-2 { animation-delay: 1s; }
.cl-3 { animation-delay: 1.35s; }
.cl-4 { animation-delay: 1.7s; }
@keyframes fadeLine { to { opacity: 1; transform: none; } }

.prompt { color: var(--gold-bright); }
.dim { color: rgba(255, 255, 255, 0.4); }
.ok { color: #7FB58B; font-weight: 700; }

.cursor {
  display: inline-block;
  width: 9px;
  height: 1.05em;
  margin-left: 8px;
  vertical-align: text-bottom;
  background: var(--gold-bright);
  animation: blink 1.1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Marquee ---------- */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--card);
  overflow: hidden;
  padding: 17px 0;
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 38s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }

.marquee-list {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}
.marquee-list li {
  display: flex;
  align-items: center;
  padding: 0 20px;
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--navy);
  white-space: nowrap;
}
.marquee-list li::after {
  content: "·";
  margin-left: 40px;
  color: var(--gold);
  font-size: 1.4rem;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Stats ---------- */
.stats { background: var(--navy-deep); }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding: 58px 0;
}
.stat + .stat {
  border-left: 1px solid rgba(245, 242, 234, 0.12);
  padding-left: 32px;
}
.stat-num {
  display: block;
  font-family: var(--serif);
  font-size: clamp(2.3rem, 4vw, 3.3rem);
  font-weight: 600;
  line-height: 1;
  color: var(--gold-bright);
}
.stat-label {
  display: block;
  margin-top: 12px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245, 242, 234, 0.55);
}

/* ---------- Sections (shared) ---------- */
.section { padding: 100px 0; }
.section-alt { background: var(--paper-2); }

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}
.section-label-light { color: var(--gold-bright); }

.section-title {
  margin: 0 0 18px;
  font-family: var(--serif);
  font-size: clamp(2rem, 3.8vw, 2.9rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--navy);
}
.section-title-light { color: var(--paper); }

.section-lead {
  max-width: 620px;
  margin: 0 0 56px;
  font-size: 1.08rem;
  line-height: 1.65;
  color: var(--muted);
}
.section-lead-light { color: rgba(245, 242, 234, 0.6); }

/* ---------- Focus blocks ---------- */
.focus-block {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
  margin-top: 76px;
}
.focus-block + .focus-block { margin-top: 96px; }
.focus-block-rev .focus-copy { order: 2; }
.focus-block-rev .focus-visual { order: 1; }

.focus-kicker {
  margin: 0 0 14px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

.focus-heading {
  margin: 0 0 16px;
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--navy);
}

.focus-desc {
  margin: 0 0 26px;
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--muted);
}

.focus-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.focus-list li {
  position: relative;
  padding: 12px 0 12px 30px;
  font-size: 0.97rem;
  line-height: 1.55;
  border-top: 1px solid var(--line);
}
.focus-list li:first-child { border-top: none; padding-top: 0; }
.focus-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 17px;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--gold);
}
.focus-list li:first-child::before { top: 6px; }
.focus-list strong { color: var(--navy); font-weight: 600; }
.focus-list em { font-family: var(--serif); font-style: italic; }

/* Mock: Markdown -> DOCX */
.focus-visual { min-width: 0; }

.mock-split {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 12px 32px rgba(26, 31, 41, 0.07);
}

.mock-md {
  background: #12233C;
  border-radius: 10px;
  padding: 18px;
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.8);
}
.mock-md p { margin: 0; }
.tk-gap { height: 10px; }
.tk-h { color: var(--gold-bright); font-weight: 700; }
.tk-b { color: #fff; font-weight: 700; }
.tk-i { color: #9DB8D2; font-style: italic; }

.mock-arrow {
  width: 40px;
  color: var(--gold);
}
.mock-arrow svg { width: 28px; height: 28px; margin: 0 auto; }

.mock-doc {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px 20px 20px;
}
.md-court {
  margin: 0;
  text-align: center;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.md-party {
  margin: 3px 0;
  text-align: center;
  font-family: var(--serif);
  font-size: 0.85rem;
}
.md-no {
  margin: 0 0 14px;
  padding-bottom: 10px;
  text-align: center;
  font-size: 0.68rem;
  color: var(--muted);
  border-bottom: 3px double var(--line-strong);
}
.bar {
  display: block;
  height: 7px;
  border-radius: 4px;
  background: var(--line);
  margin: 8px 0;
}
.bar-100 { width: 100%; }
.bar-92 { width: 92%; }
.bar-96 { width: 96%; }
.bar-78 { width: 78%; }

/* Mock: production search */
.mock-search {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 26px;
  box-shadow: 0 12px 32px rgba(26, 31, 41, 0.07);
}
.ms-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 10px 18px;
  margin-bottom: 18px;
}
.ms-icon { width: 16px; height: 16px; color: var(--muted); }
.ms-query { font-family: var(--mono); font-size: 0.85rem; color: var(--ink); }
.ms-count {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}
.ms-result {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.ms-result:last-child { margin-bottom: 0; }
.ms-bates {
  margin: 0 0 6px;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--navy);
}
.ms-doc {
  margin-left: 8px;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
}
.ms-text {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--ink);
}
mark {
  background: rgba(200, 154, 75, 0.25);
  color: inherit;
  padding: 1px 3px;
  border-radius: 3px;
}

/* ---------- Demos (dark section) ---------- */
.section-dark { background: var(--navy-deep); }

.demo-shell {
  background: #10233B;
  border: 1px solid rgba(200, 154, 75, 0.2);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.35);
}

.demo-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}
.demo-tab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border: 1px solid rgba(245, 242, 234, 0.16);
  border-radius: 999px;
  background: transparent;
  color: rgba(245, 242, 234, 0.65);
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.demo-tab:hover {
  border-color: rgba(200, 154, 75, 0.5);
  color: var(--paper);
}
.demo-tab.is-active {
  background: var(--gold-bright);
  border-color: transparent;
  color: var(--navy-deep);
}
.demo-tab-num {
  font-family: var(--serif);
  font-size: 0.8rem;
  opacity: 0.65;
}

.demo-panel { display: none; }
.demo-panel.is-active {
  display: block;
  animation: panelIn 0.35s ease;
}
@keyframes panelIn {
  from { opacity: 0; transform: translateY(8px); }
}

.demo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.demo-grid-search { grid-template-columns: 0.85fr 1.15fr; }

.demo-label {
  display: block;
  margin-bottom: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-bright);
}
.demo-output .demo-label { color: var(--gold); }

#md-input {
  width: 100%;
  height: 330px;
  padding: 16px;
  background: rgba(245, 242, 234, 0.06);
  border: 1px solid rgba(245, 242, 234, 0.16);
  border-radius: 12px;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.7;
  color: rgba(245, 242, 234, 0.85);
  resize: vertical;
  transition: border-color 0.18s ease;
}
#md-input:focus {
  outline: none;
  border-color: var(--gold-bright);
}

.btn-convert {
  position: relative;
  overflow: hidden;
  margin-top: 18px;
}
.btn-progress {
  position: absolute;
  inset: 0;
  background: var(--gold-bright);
  border-radius: inherit;
  transform: translateX(-101%);
}
.btn-convert.is-converting { pointer-events: none; }
.btn-convert.is-converting .btn-progress {
  transform: translateX(0);
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-convert.is-converting .btn-label { color: var(--navy-deep); }

.demo-note {
  margin: 16px 0 0;
  font-size: 0.75rem;
  line-height: 1.55;
  color: rgba(245, 242, 234, 0.45);
}
.demo-note code {
  font-family: var(--mono);
  color: var(--gold-bright);
}

.demo-output {
  background: #FFFDF8;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  padding: 22px;
  min-height: 380px;
}

/* The simulated Word document */
.doc {
  font-family: "Times New Roman", Times, serif;
  font-size: 0.95rem;
  line-height: 1.7;
  text-align: justify;
  color: #222;
}
.doc-caption {
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 3px double #999;
}
.doc-court {
  margin: 0;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.doc-party {
  margin: 5px 0;
  text-align: center;
  font-weight: 700;
}
.doc-no {
  margin: 0;
  text-align: center;
  font-size: 0.85rem;
}
.doc h3 {
  margin: 24px 0 10px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.doc p { margin: 0 0 12px; }
.doc ol {
  margin: 0 0 12px;
  padding-left: 22px;
}
.doc ol li { margin-bottom: 6px; }
.doc-sig {
  margin-top: 30px;
  font-style: italic;
}

/* Production search demo */
.demo-search-input { display: flex; flex-direction: column; }

.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(245, 242, 234, 0.06);
  border: 1px solid rgba(245, 242, 234, 0.16);
  border-radius: 999px;
  padding: 11px 18px;
  transition: border-color 0.18s ease;
}
.search-field:focus-within { border-color: var(--gold-bright); }
.search-icon { width: 16px; height: 16px; color: rgba(245, 242, 234, 0.5); }
#search-input {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  outline: none;
  color: var(--paper);
  font-family: var(--sans);
  font-size: 0.95rem;
}
#search-input::placeholder { color: rgba(245, 242, 234, 0.35); }

.search-count {
  margin: 12px 0 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: rgba(245, 242, 234, 0.55);
}

.demo-results {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.hit {
  background: #FFFDF8;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  padding: 16px 18px;
  animation: panelIn 0.3s ease;
}
.hit-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.hit-bates {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--navy);
  background: rgba(20, 38, 60, 0.07);
  padding: 3px 8px;
  border-radius: 6px;
}
.hit-doc {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
}
.hit-page {
  margin-left: auto;
  font-size: 0.72rem;
  color: var(--muted);
}
.hit-text {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.6;
  color: #2A2F38;
}
.hit-empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
}

/* ---------- Toolbox ---------- */
.toolbox-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.tool-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.tool-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: 0 16px 32px rgba(26, 31, 41, 0.08);
}
.tool-card h3 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--navy);
}
.tool-card p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--muted);
}

/* ---------- Workflow timeline ---------- */
.timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 11px;
  left: 44px;
  right: 44px;
  height: 2px;
  background: var(--line-strong);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.1s cubic-bezier(0.4, 0, 0.2, 1) 0.25s;
}
.timeline.is-drawn::before { transform: scaleX(1); }

.timeline-step {
  position: relative;
  padding: 46px 14px 0 0;
}
.step-dot {
  position: absolute;
  top: 4px;
  left: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--paper-2);
  border: 2px solid var(--line-strong);
  transition: background 0.4s ease, border-color 0.4s ease;
}
.timeline-step:nth-child(1) .step-dot { transition-delay: 0.5s; }
.timeline-step:nth-child(2) .step-dot { transition-delay: 0.8s; }
.timeline-step:nth-child(3) .step-dot { transition-delay: 1.1s; }
.timeline-step:nth-child(4) .step-dot { transition-delay: 1.4s; }
.timeline.is-drawn .step-dot {
  background: var(--gold);
  border-color: var(--gold);
}

.step-num {
  display: block;
  margin-bottom: 8px;
  font-family: var(--serif);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gold);
}
.timeline-step h3 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--navy);
}
.timeline-step p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--muted);
}

/* ---------- Why open source ---------- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-bottom: 64px;
}
.why-item {
  border-top: 2px solid var(--line-strong);
  padding-top: 20px;
}
.why-num {
  display: block;
  margin-bottom: 12px;
  font-family: var(--serif);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gold);
}
.why-item h3 {
  margin: 0 0 10px;
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--navy);
}
.why-item p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--muted);
}

.compare-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.compare {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.compare th, .compare td {
  padding: 15px 20px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.compare thead th {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.compare thead th.col-open { color: var(--gold); }
.compare thead tr th { border-top: 2px solid var(--line-strong); }
.compare tbody th[scope="row"] {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--navy);
}
.compare .col-open {
  background: rgba(168, 123, 47, 0.07);
  font-weight: 500;
  color: var(--ink);
}
.compare tbody tr:last-child th,
.compare tbody tr:last-child td { border-bottom: 2px solid var(--line-strong); }

/* ---------- Principles ---------- */
.principles {
  background: var(--paper-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 76px 0;
}
.principles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 44px;
}
.principle { margin: 0; }
.principle p {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.2vw, 1.8rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--navy);
}
.principle cite {
  display: block;
  margin: 0;
  font-size: 0.88rem;
  font-style: normal;
  line-height: 1.6;
  color: var(--muted);
}

/* ---------- Library ---------- */
.library-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.guide-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.guide-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: 0 16px 32px rgba(26, 31, 41, 0.08);
}
.guide-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.guide-tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(168, 123, 47, 0.4);
  border-radius: 999px;
  padding: 4px 11px;
}
.guide-status {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.guide-status::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  margin-right: 7px;
}
.guide-card h3 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--navy);
}
.guide-card p {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.6;
  color: var(--muted);
}
.guide-meta {
  margin-top: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold);
}

/* ---------- FAQ ---------- */
.faq-list {
  border-top: 1px solid var(--line-strong);
}
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 22px 0;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy);
  transition: color 0.15s ease;
}
.faq-q:hover { color: var(--gold); }
.faq-chev {
  flex: none;
  width: 20px;
  height: 20px;
  color: var(--gold);
  transition: transform 0.3s ease;
}
.faq-q[aria-expanded="true"] .faq-chev { transform: rotate(180deg); }

.faq-a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.faq-item.is-open .faq-a { grid-template-rows: 1fr; }
.faq-a-inner { overflow: hidden; }
.faq-a-inner p {
  max-width: 640px;
  margin: 0;
  padding: 0 0 24px;
  font-size: 0.97rem;
  line-height: 1.7;
  color: var(--muted);
}

/* ---------- CTA band ---------- */
.cta-band {
  position: relative;
  overflow: clip;
  padding: 100px 0;
  text-align: center;
  background:
    radial-gradient(60% 80% at 50% 0%, rgba(200, 154, 75, 0.14), transparent 70%),
    var(--navy);
}
.cta-band h2 {
  margin: 0 0 16px;
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--paper);
}
.cta-band p {
  max-width: 520px;
  margin: 0 auto 32px;
  color: rgba(245, 242, 234, 0.65);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-deep);
  border-top: 1px solid rgba(200, 154, 75, 0.25);
  padding: 64px 0 48px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 40px;
}
.footer-logo .brand-name { color: var(--paper); }
.footer-brand p {
  margin: 16px 0 0;
  max-width: 320px;
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(245, 242, 234, 0.5);
}
.footer-head {
  margin: 0 0 16px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-bright);
}
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col a {
  font-size: 0.88rem;
  text-decoration: none;
  color: rgba(245, 242, 234, 0.65);
  transition: color 0.15s ease;
}
.footer-col a:hover { color: var(--gold-bright); }
.footer-meta p {
  margin: 0;
  font-size: 0.82rem;
  color: rgba(245, 242, 234, 0.45);
}
.footer-meta p + p { margin-top: 6px; }

/* ---------- Scroll reveal ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.19, 0.65, 0.22, 1);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Focus visibility ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
.section-dark :is(a, button, input, textarea):focus-visible {
  outline-color: var(--gold-bright);
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
  .h-line-in { transform: none; }
  .cl { opacity: 1; transform: none; }
  .cursor { animation: none; }
  .marquee-track { animation: none; }
  .js .reveal { opacity: 1; transform: none; }
  .timeline::before { transform: scaleX(1); }
  .timeline.is-drawn .step-dot,
  .step-dot { background: var(--gold); border-color: var(--gold); }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero { padding: 84px 0 72px; }
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .console { max-width: 600px; }
  .hero-glyph { right: -10%; }
  .focus-block { grid-template-columns: 1fr; gap: 36px; margin-top: 60px; }
  .focus-block + .focus-block { margin-top: 72px; }
  .focus-block-rev .focus-copy { order: 0; }
  .focus-block-rev .focus-visual { order: 1; }
  .focus-visual { max-width: 600px; }
  .demo-grid, .demo-grid-search { grid-template-columns: 1fr; }
  .demo-output { min-height: 0; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: none; padding-left: 0; }
  .why-grid { grid-template-columns: 1fr; gap: 28px; }
  .principles-grid { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 720px) {
  .section { padding: 64px 0; }
  .section-lead { margin-bottom: 40px; }
  .header-inner { height: 64px; }
  .site-nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--card);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 32px rgba(26, 31, 41, 0.1);
    padding: 8px 0 12px;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a {
    padding: 13px 24px;
    font-size: 0.85rem;
  }
  .nav-toggle { display: flex; }
  .btn-cta { display: none; }
  .hero { padding: 64px 0 56px; }
  .hero-sub { font-size: 1.05rem; }
  .console-body { font-size: 0.75rem; }
  .toolbox-grid { grid-template-columns: 1fr 1fr; }
  .timeline { grid-template-columns: 1fr; gap: 34px; }
  .timeline::before { display: none; }
  .timeline-step {
    padding: 0 0 0 36px;
  }
  .library-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 36px; }
  .demo-shell { padding: 22px 18px; border-radius: 16px; }
  .mock-split { grid-template-columns: 1fr; }
  .mock-arrow { transform: rotate(90deg); }
  .stats-grid { gap: 24px; padding: 44px 0; }
  .stat + .stat {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid rgba(245, 242, 234, 0.12);
    padding-top: 24px;
  }
  .cta-band { padding: 72px 0; }
}

@media (max-width: 480px) {
  .toolbox-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
}
