/* ==========================================================================
   eCommerceInsights.AI — main stylesheet
   Modern tool aesthetic. Cool greys, sans-serif throughout, softened blue accent.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* Color — Cool neutral palette + softened indigo-blue accent.
     The blue is intentionally one tone deeper than electric (#2563EB vs #0099FF) —
     same hue family, lower saturation, modern-tool refined. */
  --color-ink: #171717;            /* neutral-900 — primary ink */
  --color-ink-2: #404040;          /* neutral-700 — secondary ink */
  --color-paper: #FFFFFF;          /* pure white */
  --color-paper-2: #FAFAFA;        /* faint section wash */
  --color-paper-3: #F5F5F5;        /* card / deeper surface */
  --color-rule: #0A0A0A;
  --color-rule-soft: rgba(0, 0, 0, 0.08);
  --color-rule-softer: rgba(0, 0, 0, 0.04);
  --color-accent: #2563EB;         /* refined blue — softer than electric, still distinctive */
  --color-accent-2: #1D4ED8;       /* deeper hover state */
  --color-accent-soft: rgba(37, 99, 235, 0.08);
  --color-accent-ink: #FFFFFF;
  --color-muted: #525252;
  --color-muted-2: #737373;        /* neutral-500 — true neutral */
  --color-success: #16A34A;
  --color-success-soft: rgba(22, 163, 74, 0.10);
  --color-warn: #B45309;
  --color-error: #DC2626;
  --color-ink-inv: #FFFFFF;

  /* Type — DM Sans throughout (variable, distinctive, not Inter per design-skill).
     Display uses heavier weight + tighter tracking for editorial feel. */
  --font-display: 'DM Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-sans: 'DM Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: var(--font-sans);
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Spacing — 8px base */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  --space-24: 96px;
  --space-32: 128px;

  /* Layout */
  --content-max: 1280px;
  --prose-max: 68ch;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;

  /* Motion */
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --dur-fast: 200ms;
  --dur-med: 400ms;
  --dur-slow: 700ms;

  /* Layered surfaces */
  --shadow-1: 0 1px 0 rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-2: 0 6px 18px rgba(0, 0, 0, 0.06), 0 1px 0 rgba(0, 0, 0, 0.04);
}

/* --------------------------------------------------------------------------
   2. Reset / base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--color-ink);
  background: var(--color-paper);
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
  display: block;
}

img, svg, video {
  display: block;
  max-width: 100%;
  height: auto;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
}

ul, ol {
  padding-left: 1.25rem;
}

hr {
  border: 0;
  height: 1px;
  background: var(--color-rule);
}

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

/* Visible focus rings */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  background: var(--color-ink);
  color: var(--color-paper);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  z-index: 100;
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 13px;
}
.skip-link:focus {
  top: var(--space-4);
}

/* --------------------------------------------------------------------------
   3. Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  color: var(--color-ink);
}

/* Display headings — DM Sans with tighter tracking for editorial weight without serif. */
h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(36px, 5.2vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.028em;
}

h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.022em;
}

h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.15;
  letter-spacing: -0.015em;
}

h4 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(17px, 1.3vw, 19px);
  line-height: 1.25;
  letter-spacing: -0.005em;
}

p {
  margin: 0;
}

.lede {
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.5;
  color: var(--color-muted);
  max-width: 60ch;
}

.muted { color: var(--color-muted); }
.muted-2 { color: var(--color-muted-2); }
.ink-inv { color: var(--color-ink-inv); }

.tag,
.sku-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Title sizes used as H3-equivalents inline */
.h3 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.15;
  letter-spacing: -0.015em;
}

/* --------------------------------------------------------------------------
   4. Layout utilities
   -------------------------------------------------------------------------- */
.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

@media (max-width: 600px) {
  .container { padding: 0 var(--space-4); }
}

.prose {
  max-width: var(--prose-max);
  margin: 0 auto;
}
.prose > p + p { margin-top: var(--space-6); }
.prose h2 { margin-top: var(--space-16); margin-bottom: var(--space-6); }
.prose h3 { margin-top: var(--space-12); margin-bottom: var(--space-4); }
.prose ul, .prose ol { margin-top: var(--space-4); }
.prose li + li { margin-top: var(--space-2); }
.prose a {
  color: var(--color-ink);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  text-decoration-color: var(--color-accent);
}
.prose a:hover {
  background: var(--color-accent);
  color: var(--color-accent-ink);
  text-decoration: none;
}
.prose code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--color-paper-2);
  padding: 1px 6px;
  border-radius: 3px;
}
.prose pre {
  background: var(--color-ink);
  color: var(--color-ink-inv);
  padding: var(--space-6);
  border-radius: var(--radius-md);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.5;
}
.prose pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}
.prose blockquote {
  margin: var(--space-8) 0;
  padding-left: var(--space-6);
  border-left: 3px solid var(--color-accent);
  color: var(--color-muted);
  font-style: normal;
}

section {
  padding: var(--space-24) 0;
}

@media (max-width: 768px) {
  section { padding: var(--space-12) 0; }
}

.section-tight { padding: var(--space-12) 0; }
.section-flush { padding: 0; }

.bg-paper-2 { background: var(--color-paper-2); }
.bg-ink { background: var(--color-ink); color: var(--color-ink-inv); }
.bg-ink h1, .bg-ink h2, .bg-ink h3, .bg-ink h4 { color: var(--color-ink-inv); }

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-6);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-8);
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
}

@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.stack-2 > * + * { margin-top: var(--space-2); }
.stack-3 > * + * { margin-top: var(--space-3); }
.stack-4 > * + * { margin-top: var(--space-4); }
.stack-6 > * + * { margin-top: var(--space-6); }
.stack-8 > * + * { margin-top: var(--space-8); }
.stack-12 > * + * { margin-top: var(--space-12); }

.flex-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.005em;
  text-decoration: none;
  transition: background var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease);
  cursor: pointer;
  border: 1px solid transparent;
  line-height: 1;
  white-space: nowrap;
}

.btn-sm {
  padding: 10px 16px;
  font-size: 14px;
}

.btn-lg {
  padding: 18px 32px;
  font-size: 17px;
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-accent-ink);
}
.btn-primary:hover {
  background: var(--color-accent-2);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--color-ink);
  border-color: var(--color-paper-3);
}
.btn-ghost:hover {
  background: var(--color-paper-2);
}

.btn-ink {
  background: var(--color-ink);
  color: var(--color-ink-inv);
}
.btn-ink:hover {
  background: #000;
}

.btn-inline {
  background: transparent;
  color: var(--color-ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  text-decoration-color: var(--color-accent);
  padding: 4px 0;
  border-radius: 0;
}
.btn-inline:hover {
  background: var(--color-accent);
  color: var(--color-accent-ink);
  text-decoration: none;
}

.btn-arrow::after {
  content: "→";
  transition: transform var(--dur-fast) var(--ease);
}
.btn-arrow:hover::after { transform: translateX(3px); }

/* --------------------------------------------------------------------------
   6. Distinctive components
   -------------------------------------------------------------------------- */

/* SKU Tag */
.sku-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 8px;
  border: 1px solid var(--color-paper-3);
  border-radius: 999px;
  background: var(--color-paper);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-ink);
}
.sku-tag-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--color-accent);
}
.sku-tag.is-warn .sku-tag-dot { background: var(--color-warn); }
.sku-tag.is-success .sku-tag-dot { background: var(--color-success); }
.sku-tag.is-muted .sku-tag-dot { background: var(--color-muted-2); }
.sku-tag.is-inv {
  background: var(--color-ink);
  color: var(--color-ink-inv);
  border-color: var(--color-ink);
}

/* Shelf Rule */
.shelf-rule {
  position: relative;
  border: 0;
  height: 1px;
  background: var(--color-rule);
  margin: var(--space-16) 0;
}
.shelf-rule::before {
  content: "";
  position: absolute;
  left: 0;
  top: -3px;
  width: 24px;
  height: 7px;
  background: var(--color-accent);
}

/* Price Tag Card */
.price-tag {
  position: relative;
  background: var(--color-paper);
  border: 1px solid var(--color-paper-3);
  padding: var(--space-12) var(--space-8) var(--space-8);
  border-radius: var(--radius-md) var(--radius-md) var(--radius-md) 28px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 24px 100%, 0 calc(100% - 24px));
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-1);
}
.price-tag::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 14px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-paper);
  border: 1px solid var(--color-paper-3);
}
.price-tag.is-featured {
  background: var(--color-ink);
  color: var(--color-ink-inv);
  border-color: var(--color-ink);
}
.price-tag.is-featured .price-period,
.price-tag.is-featured .muted { color: var(--color-muted-2); }
.price-tag.is-featured .price-tag-features { border-top-color: rgba(255, 255, 255, 0.2); }
.price-tag-header { margin-bottom: var(--space-6); }
.price-tag-name {
  font-family: var(--font-display);
  font-size: 34px;
  margin-top: var(--space-2);
  letter-spacing: -0.02em;
}
.price-tag-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.price-amount {
  font-family: var(--font-display);
  font-size: 52px;
  letter-spacing: -0.035em;
  font-weight: 600;
}
.price-period {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--color-muted);
}
.price-tag-features {
  list-style: none;
  padding: 0;
  margin: var(--space-8) 0;
  border-top: 1px solid var(--color-rule-soft);
  padding-top: var(--space-6);
}
.price-tag-features li {
  padding: 6px 0;
  font-size: 16px;
  position: relative;
  padding-left: 22px;
}
.price-tag-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  width: 12px;
  height: 2px;
  background: var(--color-accent);
}
.price-tag .btn { margin-top: auto; align-self: flex-start; }

/* Citation Badge */
.cite-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  background: var(--color-paper);
  border: 1px solid var(--color-paper-3);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-ink);
}
.cite-badge strong {
  font-weight: 500;
}
.cite-count {
  color: var(--color-accent);
  font-weight: 500;
}

/* Editorial Pull-Quote */
.pull-quote {
  position: relative;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: var(--space-16) 0;
  padding-left: var(--space-8);
  border: 0;
}
.pull-quote::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 4px;
  height: calc(100% - 16px);
  background: var(--color-accent);
}
.pull-quote p { margin: 0; }
.pull-quote cite {
  display: block;
  font-family: var(--font-body);
  font-size: 14px;
  font-style: normal;
  color: var(--color-muted);
  margin-top: var(--space-6);
  letter-spacing: 0.02em;
}

/* Early access pill */
.early-access-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: var(--color-ink);
  color: var(--color-paper);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 999px;
  white-space: nowrap;
}
.early-access-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
  margin-right: 6px;
}

/* Generic content card */
.card {
  background: var(--color-paper);
  border: 1px solid var(--color-rule-soft);
  border-radius: var(--radius-md);
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  box-shadow: var(--shadow-1);
}
.card.is-soft {
  background: var(--color-paper-2);
  border-color: transparent;
  box-shadow: none;
}

/* Feature spec — high-density block */
.spec {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: var(--space-4) var(--space-6);
  font-family: var(--font-mono);
  font-size: 13px;
  border-top: 1px solid var(--color-rule-soft);
  padding-top: var(--space-6);
}
.spec dt {
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 11px;
  padding-top: 2px;
}
.spec dd { margin: 0; }

/* SKU card stack illustration */
.sku-stack {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
}
.sku-stack-card {
  position: absolute;
  background: var(--color-paper);
  border: 1px solid var(--color-paper-3);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  width: 78%;
  box-shadow: var(--shadow-2);
}

/* --------------------------------------------------------------------------
   7. Header & navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(160%) blur(8px);
  -webkit-backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--color-rule-soft);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  height: 72px;
}

.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--color-ink);
  flex-shrink: 0;
}

.nav-main {
  flex: 1;
  display: flex;
  justify-content: center;
}
.nav-main > ul {
  display: flex;
  gap: var(--space-2);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-main a,
.nav-main button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-ink);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: background var(--dur-fast) var(--ease);
  font-family: var(--font-body);
  line-height: 1;
}
.nav-main a:hover,
.nav-main button:hover {
  background: var(--color-paper-2);
}
.nav-main .has-dropdown > button::after {
  content: "▾";
  font-size: 10px;
  margin-left: 2px;
  color: var(--color-muted);
}

/* Dropdown */
.has-dropdown {
  position: relative;
}
.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 280px;
  background: var(--color-paper);
  border: 1px solid var(--color-paper-3);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  box-shadow: var(--shadow-2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease),
              visibility 0s linear var(--dur-fast);
  z-index: 60;
}
.has-dropdown.is-open .dropdown,
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease),
              visibility 0s linear 0s;
}
.dropdown.dropdown-wide {
  min-width: 560px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-2) var(--space-6);
}
.dropdown-section-label {
  grid-column: 1 / -1;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-muted);
  padding: var(--space-2) var(--space-3);
  border-top: 1px solid var(--color-rule-soft);
  margin-top: var(--space-2);
  padding-top: var(--space-4);
}
.dropdown-section-label:first-child {
  border-top: 0;
  margin-top: 0;
  padding-top: var(--space-2);
}
.dropdown a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--color-ink);
  font-size: 14px;
}
.dropdown a:hover {
  background: var(--color-paper-2);
}
.dropdown a .dropdown-desc {
  font-size: 12px;
  color: var(--color-muted);
  font-weight: 400;
}
.dropdown a strong { font-weight: 500; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

.nav-burger {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  position: relative;
}
.nav-burger span {
  display: block;
  position: absolute;
  left: 10px;
  right: 10px;
  height: 2px;
  background: var(--color-ink);
  transition: transform var(--dur-fast) var(--ease),
              opacity var(--dur-fast) var(--ease),
              top var(--dur-fast) var(--ease);
}
.nav-burger span:nth-child(1) { top: 13px; }
.nav-burger span:nth-child(2) { top: 19px; }
.nav-burger span:nth-child(3) { top: 25px; }
.nav-burger[aria-expanded="true"] span:nth-child(1) {
  top: 19px;
  transform: rotate(45deg);
}
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) {
  top: 19px;
  transform: rotate(-45deg);
}

@media (max-width: 980px) {
  .nav-main { display: none; }
  .nav-burger { display: block; }
  .nav-actions .btn,
  .nav-actions .early-access-pill { display: none; }
}

/* Mobile drawer */
.mobile-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(420px, 88vw);
  background: var(--color-paper);
  border-left: 1px solid var(--color-paper-3);
  padding: var(--space-12) var(--space-6) var(--space-8);
  transform: translateX(100%);
  transition: transform var(--dur-med) var(--ease);
  z-index: 70;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}
.mobile-drawer.is-open { transform: translateX(0); }
.mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-med) var(--ease), visibility 0s linear var(--dur-med);
  z-index: 65;
}
.mobile-drawer-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity var(--dur-med) var(--ease), visibility 0s linear 0s;
}
.mobile-drawer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.mobile-drawer ul a {
  display: block;
  padding: var(--space-3) 0;
  font-size: 17px;
  text-decoration: none;
  color: var(--color-ink);
  border-bottom: 1px solid var(--color-paper-3);
}
.mobile-drawer .drawer-section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-muted);
  margin-top: var(--space-6);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--color-rule-soft);
}
.mobile-drawer .drawer-actions {
  margin-top: auto;
  padding-top: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

body.is-drawer-open { overflow: hidden; }

/* --------------------------------------------------------------------------
   8. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--color-ink);
  color: var(--color-ink-inv);
  padding: var(--space-16) 0 var(--space-8);
  margin-top: var(--space-24);
  border-top: 4px solid var(--color-accent);
}
.site-footer a {
  color: var(--color-ink-inv);
  text-decoration: none;
  opacity: 0.85;
}
.site-footer a:hover {
  opacity: 1;
  text-decoration: underline;
  text-decoration-color: var(--color-accent);
  text-underline-offset: 3px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(5, 1fr);
  gap: var(--space-8);
  margin-bottom: var(--space-16);
}
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
  color: var(--color-muted-2);
  margin-bottom: var(--space-4);
}
.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-col li { padding: 4px 0; font-size: 14px; }
.footer-brand { padding-right: var(--space-6); }
.footer-brand .footer-tagline {
  margin-top: var(--space-4);
  color: var(--color-muted-2);
  font-size: 14px;
  max-width: 28ch;
}
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: var(--space-6);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-muted-2);
}
.footer-social {
  display: flex;
  gap: var(--space-4);
}
.footer-social a {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
}
@media (max-width: 980px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   9. Hero (asymmetric)
   -------------------------------------------------------------------------- */
.hero {
  padding: var(--space-24) 0 var(--space-16);
}
.hero-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-6);
  align-items: end;
}
.hero-copy {
  grid-column: 2 / span 7;
}
.hero-visual {
  grid-column: 9 / span 4;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}
.hero-sub {
  margin-top: var(--space-6);
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.5;
  color: var(--color-muted);
  max-width: 56ch;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-8);
}
.hero-meta {
  margin-top: var(--space-12);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
@media (max-width: 980px) {
  .hero-copy { grid-column: 1 / -1; }
  .hero-visual { grid-column: 1 / -1; margin-top: var(--space-12); }
}

/* Hero stagger */
@keyframes hero-rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-stagger > * {
  opacity: 0;
  animation: hero-rise 700ms var(--ease) forwards;
}
.hero-stagger > *:nth-child(1) { animation-delay: 0ms; }
.hero-stagger > *:nth-child(2) { animation-delay: 120ms; }
.hero-stagger > *:nth-child(3) { animation-delay: 240ms; }
.hero-stagger > *:nth-child(4) { animation-delay: 360ms; }
.hero-stagger > *:nth-child(5) { animation-delay: 480ms; }

/* --------------------------------------------------------------------------
   10. Scroll reveals
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--dur-slow) var(--ease),
              transform var(--dur-slow) var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   11. Forms
   -------------------------------------------------------------------------- */
.form-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 460px;
}
.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted);
}
input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
textarea,
select {
  font-family: var(--font-sans);
  font-size: 16px;
  padding: 12px 14px;
  background: var(--color-paper);
  border: 1px solid var(--color-paper-3);
  border-radius: var(--radius-md);
  color: var(--color-ink);
  width: 100%;
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
input:focus, textarea:focus, select:focus {
  outline: 0;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(199, 62, 29, 0.18);
}
.form-success {
  background: var(--color-paper-2);
  border-left: 3px solid var(--color-success);
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-sm);
  font-size: 15px;
}

/* --------------------------------------------------------------------------
   12. Breadcrumbs
   -------------------------------------------------------------------------- */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted);
  padding: var(--space-6) 0 0;
  list-style: none;
  margin: 0;
}
.breadcrumbs li { display: inline-flex; align-items: center; gap: 6px; }
.breadcrumbs li + li::before {
  content: "/";
  color: var(--color-muted-2);
  margin-right: 4px;
}
.breadcrumbs a {
  color: var(--color-muted);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease);
}
.breadcrumbs a:hover { color: var(--color-ink); }
.breadcrumbs li[aria-current="page"] { color: var(--color-ink); }

/* --------------------------------------------------------------------------
   13. FAQ
   -------------------------------------------------------------------------- */
.faq {
  max-width: 820px;
  margin: 0 auto;
}
.faq h2 { margin-bottom: var(--space-8); }
.faq-item {
  border-top: 1px solid var(--color-rule-soft);
  padding: var(--space-6) 0;
}
.faq-item:last-child {
  border-bottom: 1px solid var(--color-rule-soft);
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-6);
  font-family: var(--font-sans);
  font-size: clamp(18px, 1.6vw, 22px);
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--color-ink);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: 24px;
  color: var(--color-accent);
  line-height: 1;
  transition: transform var(--dur-fast) var(--ease);
  flex-shrink: 0;
}
.faq-item[open] summary::after { content: "−"; }
.faq-answer {
  margin-top: var(--space-4);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-muted);
  max-width: 64ch;
}

/* --------------------------------------------------------------------------
   14. Ask AI block
   -------------------------------------------------------------------------- */
.ask-ai {
  background: var(--color-paper-2);
  border: 1px solid var(--color-paper-3);
  border-radius: var(--radius-lg);
  padding: var(--space-12);
  margin: var(--space-16) 0;
  position: relative;
}
.ask-ai::before {
  content: "AEO";
  position: absolute;
  top: -10px;
  left: var(--space-8);
  background: var(--color-accent);
  color: var(--color-accent-ink);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  border-radius: 999px;
}
.ask-ai h2,
.ask-ai .h3 {
  margin-bottom: var(--space-3);
}
.ask-ai-links {
  list-style: none;
  padding: 0;
  margin: var(--space-6) 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.ask-ai-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--color-paper);
  border: 1px solid var(--color-paper-3);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--color-ink);
  text-decoration: none;
  transition: background var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease);
}
.ask-ai-links a:hover {
  background: var(--color-ink);
  color: var(--color-ink-inv);
}
.ask-ai-links a::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--color-accent);
  border-radius: 50%;
}

/* --------------------------------------------------------------------------
   15. Code copy buttons
   -------------------------------------------------------------------------- */
.code-block {
  position: relative;
}
.copy-btn {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 6px 10px;
  background: var(--color-paper);
  color: var(--color-ink);
  border: 1px solid var(--color-paper-3);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease);
}
.copy-btn:hover { background: var(--color-paper-2); }
.copy-btn.is-copied { background: var(--color-success); color: var(--color-ink-inv); border-color: var(--color-success); }

/* --------------------------------------------------------------------------
   16. Tables
   -------------------------------------------------------------------------- */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.table th, .table td {
  padding: var(--space-4) var(--space-3);
  text-align: left;
  border-bottom: 1px solid var(--color-rule-soft);
  vertical-align: top;
}
.table th {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
  color: var(--color-muted);
}
.table tbody tr:hover { background: var(--color-paper-2); }
.table .yes { color: var(--color-success); }
.table .no  { color: var(--color-muted-2); }

/* --------------------------------------------------------------------------
   17. Eyebrow / section header
   -------------------------------------------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-muted);
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--color-accent);
}
.section-head {
  margin-bottom: var(--space-12);
  max-width: 56ch;
}
.section-head .eyebrow { margin-bottom: var(--space-4); }

/* --------------------------------------------------------------------------
   18. Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero-stagger > * { opacity: 1; }
}

/* --------------------------------------------------------------------------
   19. Print
   -------------------------------------------------------------------------- */
@media print {
  .site-header, .site-footer, .ask-ai, .nav-burger { display: none; }
  body { background: white; color: black; }
  a { color: black; text-decoration: underline; }
}
