/* ---------- Tokens ---------- */
:root {
  --bg: #f7f4ef;
  --bg-deep: #efeae1;
  --surface: #ffffff;
  --border: #e5ddd1;
  --border-strong: #d4c8b7;

  --text: #1e1812;
  --text-2: #6a5c4c;
  --text-3: #a9998a;

  --accent: #7a5c3e;
  --accent-h: #5e4530;
  --accent-soft: #f0e8dc;

  --radius: 14px;
  --radius-lg: 22px;
  --radius-sm: 8px;

  --shadow-sm: 0 1px 2px rgba(46, 32, 17, 0.04), 0 2px 8px rgba(46, 32, 17, 0.04);
  --shadow: 0 1px 2px rgba(46, 32, 17, 0.05), 0 12px 36px -8px rgba(46, 32, 17, 0.12);

  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Instrument Serif', 'Times New Roman', serif;

  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent); color: #fff; }

a { color: inherit; text-decoration: none; }

code {
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Monaco, Consolas, monospace;
  font-size: .88em;
  background: var(--accent-soft);
  color: var(--accent-h);
  padding: 2px 6px;
  border-radius: 5px;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px;
}

em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: -0.01em;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .18s var(--ease), background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease);
  white-space: nowrap;
}
.btn-sm { padding: 9px 16px; font-size: 13px; }

.btn-primary {
  background: var(--text);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-h); transform: translateY(-1px); box-shadow: var(--shadow-sm); }

.btn-ghost {
  color: var(--text);
  background: transparent;
  border-color: var(--border-strong);
}
.btn-ghost:hover { border-color: var(--text); }

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 28px;
  max-width: 1180px;
  margin: 0 auto;
  backdrop-filter: blur(12px);
  background: rgba(247, 244, 239, 0.75);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.nav-links {
  display: flex;
  gap: 28px;
  font-size: 14px;
  color: var(--text-2);
}
.nav-links a { transition: color .15s var(--ease); }
.nav-links a:hover { color: var(--text); }

@media (max-width: 720px) {
  .nav-links { display: none; }
}

/* ---------- HERO ---------- */
.hero {
  padding: 72px 0 40px;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  padding: 6px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  margin-bottom: 28px;
}

.hero h1 {
  font-family: var(--font-ui);
  font-weight: 600;
  letter-spacing: -0.035em;
  font-size: clamp(40px, 6.2vw, 76px);
  line-height: 1.02;
  color: var(--text);
  max-width: 980px;
  margin: 0 auto 24px;
}
.hero h1 em {
  font-size: 1.02em;
}

.lead {
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--text-2);
  max-width: 640px;
  margin: 0 auto 36px;
  line-height: 1.55;
}

.cta-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Hero demo window */
.hero-demo {
  margin-top: 72px;
  display: flex;
  justify-content: center;
  perspective: 1200px;
}

.demo-window {
  width: 100%;
  max-width: 520px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  text-align: left;
  transform: rotateX(3deg);
  transition: transform .5s var(--ease);
}
.demo-window:hover { transform: rotateX(0deg); }

.demo-chrome {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  background: var(--bg-deep);
  border-bottom: 1px solid var(--border);
}
.demo-chrome .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--border-strong);
}
.demo-url {
  margin-left: 10px;
  font-size: 12px;
  color: var(--text-3);
  letter-spacing: -0.005em;
}

.demo-body { padding: 22px 22px 24px; }
.demo-label {
  font-size: 12px;
  color: var(--text-3);
  margin-bottom: 12px;
  letter-spacing: -0.005em;
}

.demo-presets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.demo-preset {
  font-size: 13px;
  padding: 8px 13px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-2);
  font-weight: 500;
}
.demo-preset.active {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

.demo-input {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  margin-bottom: 14px;
  font-size: 14px;
}
.demo-input-text { color: var(--text); font-weight: 500; }
.demo-input-parsed { color: var(--text-3); font-size: 12px; }

.demo-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px;
  background: var(--text);
  color: #fff;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
}

/* ---------- Use Cases ---------- */
.use-cases {
  padding: 88px 0 40px;
}

.use-case-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.use-case {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color .2s var(--ease);
}
.use-case:hover { border-color: var(--border-strong); }

.use-case h3 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 10px;
}
.use-case p {
  font-size: 14.5px;
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: 18px;
}
.use-case .chip-row { margin-top: 0; }

@media (max-width: 720px) {
  .use-case-grid { grid-template-columns: 1fr; }
}

/* ---------- Section header shared ---------- */
.section-eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 18px;
}
.section-title {
  font-weight: 600;
  font-size: clamp(30px, 4.4vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  max-width: 720px;
  margin-bottom: 48px;
}

/* ---------- Features ---------- */
.features { padding: 88px 0; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.feature-card:hover { border-color: var(--border-strong); }
.feature-card.span-2 { grid-column: span 2; }

.feature-icon {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 10px;
  margin-bottom: 18px;
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 8px;
}
.feature-card p {
  font-size: 14.5px;
  color: var(--text-2);
  line-height: 1.6;
}

.chip-row {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip {
  font-size: 12px;
  color: var(--text-2);
  padding: 5px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-weight: 500;
}

@media (max-width: 900px) {
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .feature-card.span-2 { grid-column: span 2; }
}
@media (max-width: 600px) {
  .feature-grid { grid-template-columns: 1fr; }
  .feature-card.span-2 { grid-column: span 1; }
}

/* ---------- How it works ---------- */
.how {
  padding: 88px 0;
  background: var(--bg-deep);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  counter-reset: step;
}
.steps li {
  position: relative;
  padding-top: 32px;
  border-top: 1px solid var(--border-strong);
}
.step-n {
  position: absolute;
  top: -14px;
  left: 0;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--text);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
}
.steps h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 8px;
}
.steps p {
  font-size: 14.5px;
  color: var(--text-2);
  line-height: 1.6;
}

@media (max-width: 780px) {
  .steps { grid-template-columns: 1fr; gap: 40px; }
}

/* ---------- Privacy ---------- */
.privacy { padding: 88px 0; }
.privacy-inner { max-width: 780px; }
.privacy-lead {
  font-size: 18px;
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: 32px;
  max-width: 640px;
}
.privacy-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 40px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.privacy-list div {
  font-size: 14.5px;
  color: var(--text-2);
}
.privacy-list strong {
  color: var(--text);
  font-weight: 600;
  display: block;
  margin-bottom: 2px;
}
@media (max-width: 600px) {
  .privacy-list { grid-template-columns: 1fr; }
}

/* ---------- SEO hub and article pages ---------- */
.seo-hub { padding: 88px 0; }

.seo-card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.seo-card {
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.seo-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.seo-card span {
  font-size: 12px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.seo-card strong {
  font-size: 17px;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.article-hero {
  padding: 72px 0 48px;
  border-bottom: 1px solid var(--border);
}
.article-hero .container,
.article-body .container {
  max-width: 880px;
}
.article-hero h1 {
  font-size: clamp(38px, 5.4vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  margin-bottom: 22px;
}
.article-lead {
  font-size: 19px;
  color: var(--text-2);
  line-height: 1.6;
  max-width: 720px;
}

.article-body { padding: 64px 0 96px; }
.article-body h2 {
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin: 54px 0 18px;
}
.article-body h2:first-child { margin-top: 0; }
.article-body h3 {
  font-size: 20px;
  letter-spacing: -0.015em;
  margin: 28px 0 8px;
}
.article-body p,
.article-body li {
  color: var(--text-2);
  font-size: 16px;
  line-height: 1.75;
}
.article-body p + p { margin-top: 16px; }
.article-body ul,
.article-body ol {
  padding-left: 22px;
  margin: 16px 0 26px;
}
.article-body li + li { margin-top: 8px; }
.article-callout {
  margin: 34px 0;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.article-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 42px;
}

@media (max-width: 920px) {
  .seo-card-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .seo-card-grid,
  .article-links { grid-template-columns: 1fr; }
}

/* ---------- Final CTA ---------- */
.final-cta {
  padding: 120px 0;
  text-align: center;
  background: var(--text);
  color: #fff;
}
.final-cta h2 {
  font-weight: 600;
  font-size: clamp(30px, 4.6vw, 56px);
  letter-spacing: -0.03em;
  line-height: 1.05;
  max-width: 780px;
  margin: 0 auto 36px;
}
.final-cta em { color: #d7b88a; }
.final-cta .btn-primary {
  background: #fff;
  color: var(--text);
}
.final-cta .btn-primary:hover { background: var(--accent-soft); color: var(--accent-h); }
.final-cta .btn-ghost {
  color: #fff;
  border-color: rgba(255,255,255,0.3);
}
.final-cta .btn-ghost:hover { border-color: #fff; }

/* ---------- Footer ---------- */
.footer { padding: 40px 0 56px; border-top: 1px solid var(--border); }
.footer-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-links {
  display: flex;
  gap: 24px;
  font-size: 13px;
  color: var(--text-2);
  flex: 1;
  justify-content: center;
}
.footer-links a:hover { color: var(--text); }
.footer-copy { font-size: 13px; color: var(--text-3); }
@media (max-width: 640px) {
  .footer-inner { flex-direction: column; gap: 16px; }
  .footer-links { justify-content: flex-start; flex-wrap: wrap; }
}

/* ---------- Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
