/* ============================================================
   Syndicate — Claude-inspired design system
   Warm parchment canvas · Serif headlines · Terracotta accent
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  /* Brand / accent */
  --brand: #c96442;
  --coral: #d97757;
  --error: #b53333;

  /* Surfaces */
  --parchment: #f5f4ed;
  --ivory: #faf9f5;
  --white: #ffffff;
  --sand: #e8e6dc;
  --dark: #141413;
  --dark-surface: #30302e;

  /* Text */
  --ink: #141413;
  --charcoal: #4d4c48;
  --olive: #5e5d59;
  --stone: #87867f;
  --dark-warm: #3d3d3a;
  --silver: #b0aea5;

  /* Borders / rings */
  --border-cream: #f0eee6;
  --border-warm: #e8e6dc;
  --border-dark: #30302e;
  --ring-warm: #d1cfc5;
  --ring-deep: #c2c0b6;

  /* Fonts */
  --font-serif: 'Source Serif 4', 'Anthropic Serif', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', 'Anthropic Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Anthropic Mono', 'SF Mono', Menlo, monospace;

  /* Shadows */
  --ring: 0 0 0 1px var(--ring-warm);
  --whisper: 0px 4px 24px rgba(0, 0, 0, 0.05);
}

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

body {
  font-family: var(--font-sans);
  background: var(--parchment);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
em { font-style: italic; color: var(--brand); }
strong { font-weight: 600; color: var(--ink); }
code, pre { font-family: var(--font-mono); }

/* ---------- Layout helpers ---------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
}

.section {
  padding: 120px 0;
  position: relative;
}

.section-sand { background: var(--sand); }
.section-dark {
  background: var(--dark);
  color: var(--silver);
}

.section-head {
  margin-bottom: 72px;
  max-width: 720px;
}

.eyebrow-small {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12px;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 20px;
}
.eyebrow-small.light { color: var(--silver); }

/* ---------- Typography ---------- */
.h1, .h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  letter-spacing: normal;
  color: var(--ink);
}
.h1 {
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.10;
}
.h2 {
  font-size: clamp(28px, 3.6vw, 52px);
  line-height: 1.20;
}
.h1.light, .h2.light { color: var(--ivory); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn-brand {
  background: var(--brand);
  color: var(--ivory);
  box-shadow: 0 0 0 1px var(--brand);
}
.btn-brand:hover {
  background: #b9583a;
  box-shadow: 0 0 0 1px #b9583a, 0 4px 14px rgba(201, 100, 66, 0.25);
  transform: translateY(-1px);
}

.btn-sand {
  background: var(--sand);
  color: var(--charcoal);
  box-shadow: 0 0 0 1px var(--ring-warm);
}
.btn-sand:hover {
  background: #ddd9cb;
  box-shadow: 0 0 0 1px var(--ring-deep);
}

.btn-dark-outline {
  background: transparent;
  color: var(--ivory);
  border: 1px solid var(--dark-surface);
  padding: 9.6px 16.8px;
}
.btn-dark-outline:hover {
  background: var(--dark-surface);
}

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 244, 237, 0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border-cream);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 500;
  color: var(--ink);
}
.brand-mark {
  display: inline-flex;
  color: var(--brand);
}
.nav-links {
  display: flex;
  gap: 28px;
  font-size: 15px;
  color: var(--olive);
}
.nav-links a {
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--ink); }

.nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.lang-toggle {
  display: inline-flex;
  background: var(--ivory);
  border: 1px solid var(--border-cream);
  border-radius: 999px;
  padding: 3px;
}
.lang-btn {
  background: transparent;
  border: none;
  color: var(--olive);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  line-height: 1;
}
.lang-btn:hover:not(.is-active) { color: var(--ink); }
.lang-btn.is-active {
  background: var(--sand);
  color: var(--ink);
}

@media (max-width: 860px) {
  .nav-links { display: none; }
}
@media (max-width: 520px) {
  .lang-toggle { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  padding: 96px 0 120px;
  position: relative;
}
.hero-inner { max-width: 960px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  background: var(--ivory);
  border: 1px solid var(--border-cream);
  border-radius: 999px;
  font-size: 13px;
  color: var(--olive);
  margin-bottom: 32px;
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 3px rgba(201, 100, 66, 0.15);
}

.hero-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(40px, 6.5vw, 72px);
  line-height: 1.10;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 28px;
  max-width: 920px;
}

.hero-sub {
  font-family: var(--font-serif);
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.60;
  color: var(--olive);
  max-width: 720px;
  margin-bottom: 40px;
}

.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 96px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  max-width: 720px;
  padding-top: 40px;
  border-top: 1px solid var(--border-warm);
}
.stat-num {
  font-family: var(--font-serif);
  font-size: 44px;
  line-height: 1;
  color: var(--ink);
  font-weight: 500;
}
.stat-num .plus {
  color: var(--brand);
  font-size: 0.7em;
  font-style: italic;
}
.stat-label {
  margin-top: 8px;
  font-size: 13px;
  color: var(--stone);
}
@media (max-width: 640px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}

/* ---------- Philosophy two-column ---------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 80px;
  align-items: start;
}
@media (max-width: 900px) {
  .two-col { grid-template-columns: 1fr; gap: 32px; }
}
.prose p {
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.70;
  color: var(--charcoal);
  margin-bottom: 20px;
}
.prose p:last-child { margin-bottom: 0; }

/* ---------- Architecture flow ---------- */
.flow-wrap {
  background: var(--dark-surface);
  border: 1px solid var(--dark-surface);
  border-radius: 24px;
  padding: 48px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.flow-svg {
  width: 100%;
  height: auto;
  display: block;
  background: #1c1c1a;
  border-radius: 16px;
  padding: 24px;
}

.flow-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 32px;
  font-size: 14px;
  color: var(--silver);
}
.flow-legend > div {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.lg-chip {
  width: 20px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
  display: inline-block;
}
.lg-brand { background: var(--brand); }
.lg-solid { background: var(--ivory); border: 1.5px solid var(--ink); }
.lg-dashed { background: var(--border-cream); border: 1px dashed var(--stone); }
.lg-retry {
  background: transparent;
  border-top: 1.5px dashed var(--brand);
  height: 0;
  margin-top: 5px;
}

/* ---------- Steps list ---------- */
.steps-list {
  list-style: none;
  counter-reset: steps;
  max-width: 900px;
}
.steps-list li {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 32px;
  padding: 28px 0;
  border-top: 1px solid var(--border-warm);
}
.steps-list li:last-child { border-bottom: 1px solid var(--border-warm); }
.step-num {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 28px;
  color: var(--brand);
  line-height: 1;
  padding-top: 6px;
}
.steps-list h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 26px;
  line-height: 1.20;
  color: var(--ink);
  margin-bottom: 10px;
}
.steps-list p {
  font-size: 16px;
  line-height: 1.70;
  color: var(--olive);
}
.steps-list code {
  background: var(--sand);
  color: var(--charcoal);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.88em;
}

@media (max-width: 700px) {
  .steps-list li { grid-template-columns: 1fr; gap: 12px; }
}

/* ---------- Feature grid ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.feature {
  background: var(--ivory);
  border: 1px solid var(--border-cream);
  border-radius: 16px;
  padding: 32px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.feature:hover {
  box-shadow: var(--whisper);
  transform: translateY(-2px);
}
.feature h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.20;
  color: var(--ink);
  margin-bottom: 12px;
}
.feature p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--olive);
}

/* ---------- Tech chips ---------- */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 48px 32px;
}
.tech-group h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 20px;
  color: var(--ink);
  margin-bottom: 18px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  padding: 6px 13px;
  background: var(--ivory);
  border: 1px solid var(--border-warm);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--charcoal);
  transition: background 0.15s, border-color 0.15s;
}
.chip:hover {
  background: var(--sand);
  border-color: var(--ring-deep);
}

/* ---------- Steps code blocks ---------- */
.steps-code {
  display: flex;
  flex-direction: column;
  gap: 48px;
  max-width: 920px;
}
.step-code {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 32px;
  align-items: start;
}
.step-code-num {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--ivory);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 500;
  box-shadow: 0 0 0 1px var(--brand);
}
.step-code-body h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 26px;
  color: var(--ink);
  margin-bottom: 8px;
}
.muted { color: var(--olive); font-size: 15px; margin-bottom: 16px; }

.code-block {
  background: var(--dark);
  border: 1px solid var(--dark-surface);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--whisper);
}
.code-head {
  padding: 10px 16px;
  background: var(--dark-surface);
  border-bottom: 1px solid var(--dark-surface);
}
.code-lang {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--silver);
  text-transform: uppercase;
  letter-spacing: 0.12px;
}
.code-block pre {
  padding: 18px 20px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.70;
  color: var(--silver);
}
.code-block code { color: var(--silver); }

@media (max-width: 700px) {
  .step-code { grid-template-columns: 1fr; gap: 16px; }
}

/* ---------- CTA ---------- */
.cta {
  padding: 140px 0;
  text-align: center;
}
.cta-inner {
  max-width: 900px;
}
.cta h2 { margin-bottom: 20px; }
.light-muted {
  color: var(--silver);
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.60;
  margin-bottom: 36px;
}
.cta-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Footer ---------- */
.footer {
  padding: 32px 0;
  background: var(--parchment);
  border-top: 1px solid var(--border-cream);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 14px;
}
.muted { color: var(--stone); }
.small { font-size: 13px; }

/* ---------- Reveal animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
