/* ═══════════════════════════════════════════════
   AI Drift Story — Colorful Manifesto Design
   ═══════════════════════════════════════════════ */

/* ─── Reset & Base ─── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --text: #1a1a2e;
  --text-secondary: #4a4a68;
  --text-muted: #8888a4;
  --bg: #ffffff;
  --bg-warm: #fafaf9;
  --border: #e8e8ee;
  --violet: #8b5cf6;
  --cyan: #06b6d4;
  --emerald: #10b981;
  --amber: #f59e0b;
  --rose: #f43f5e;
  --pink: #ec4899;
  --orange: #ea580c;
  --blue: #2563eb;
  --toc-width: 250px;
  --content-max: 760px;
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;
}

html {
  scroll-behavior: smooth;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--serif);
  color: var(--text);
  background: var(--bg);
  line-height: 1.75;
  display: flex;
  min-height: 100vh;
}

/* ─── Gradient text utility ─── */
.gradient-text {
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── Table of Contents (Sidebar) ─── */
.toc {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--toc-width);
  height: 100vh;
  overflow-y: auto;
  background: linear-gradient(180deg, #ecfdf5 0%, #ecfeff 100%);
  border-right: 1px solid var(--border);
  z-index: 100;
  padding: 2rem 0;
}

.toc-inner {
  padding: 0 1.5rem;
}

.toc-logo {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}

.toc-logo-icon {
  display: flex;
  flex-shrink: 0;
}

.toc-list {
  list-style: none;
  counter-reset: toc-counter;
}

.toc-list li {
  counter-increment: toc-counter;
  margin-bottom: 0.35rem;
}

.toc-list a {
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  display: block;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  transition: all 0.2s;
  line-height: 1.4;
}

.toc-list a::before {
  content: counter(toc-counter) ". ";
  font-variant-numeric: tabular-nums;
  opacity: 0.6;
}

.toc-list a:hover {
  background: rgba(16, 185, 129, 0.10);
  color: var(--emerald);
}

.toc-list a.active {
  background: rgba(16, 185, 129, 0.14);
  color: var(--emerald);
  font-weight: 600;
}

/* Mobile toggle */
.toc-toggle {
  display: none;
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 200;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.toc-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.2s;
}

/* ─── Main Content ─── */
.content {
  margin-left: var(--toc-width);
  flex: 1;
  max-width: calc(var(--content-max) + 8rem);
  padding: 0 4rem 6rem;
}

/* ─── Hero ─── */
.hero {
  position: relative;
  padding: 6rem 0 4rem;
  overflow: hidden;
}

.hero-bg-art {
  position: absolute;
  top: 0;
  right: -100px;
  width: 800px;
  height: 400px;
  pointer-events: none;
  opacity: 0.55;
  /* Fade the left edge so the background chart doesn't compete with the
     subtitle text block sitting over its left half. */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.35) 30%, #000 60%);
          mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.35) 30%, #000 60%);
}

.hero-illustration {
  width: 100%;
  height: 100%;
}

.hero-label {
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--emerald);
  margin-bottom: 0.75rem;
  position: relative;
}

.hero-title {
  font-family: var(--sans);
  font-size: 4rem;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  position: relative;
}

.hero-subtitle {
  font-size: 1.25rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 560px;
  position: relative;
}

.hero-subtitle-tease {
  margin-top: 1.1rem;
  font-size: 1.05rem;
  color: #52525b;
}

.hero-subtitle-tease em {
  font-style: italic;
  font-weight: 700;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-pills {
  display: flex;
  gap: 0.6rem;
  margin-top: 2rem;
  flex-wrap: wrap;
  position: relative;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.25rem;
  position: relative;
}

.cta-btn {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.cta-primary {
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  color: #ffffff;
}

.cta-primary:hover { filter: brightness(0.95); }

.cta-secondary {
  background: #ffffff;
  color: var(--text);
  border-color: #d1d5db;
}

.cta-secondary:hover { border-color: #9ca3af; }

.cta-tertiary {
  background: #f8fafc;
  color: #334155;
  border-color: #e2e8f0;
}

.cta-tertiary:hover { border-color: #cbd5e1; }

.pill {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.9rem;
  border-radius: 100px;
  letter-spacing: 0.01em;
}

.pill-violet  { background: #f5f3ff; color: #7c3aed; }
.pill-cyan    { background: #ecfeff; color: #0891b2; }
.pill-amber   { background: #fffbeb; color: #b45309; }
.pill-emerald { background: #ecfdf5; color: #047857; }

.hero-video {
  margin-top: 2rem;
  position: relative;
}

.hero-video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: #0f172a;
  border: 1px solid rgba(16, 185, 129, 0.22);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
}

.hero-video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.hero-tagline {
  font-family: var(--sans);
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 1.5rem;
  background: linear-gradient(135deg, var(--emerald), var(--cyan), var(--violet));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
}

/* ─── Sections ─── */
section {
  position: relative;
  padding: 4rem 0;
  border-top: 1px solid var(--border);
}

.section-number {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  color: white;
}

section h2 {
  font-family: var(--sans);
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

section h3 {
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--text);
}

section p {
  margin-bottom: 1.25rem;
}

section ul {
  margin-bottom: 1.25rem;
  padding-left: 1.25rem;
}

section li {
  margin-bottom: 0.5rem;
}

/* ─── Colored section backgrounds ─── */
.section-colored {
  margin-left: -4rem;
  margin-right: -4rem;
  padding-left: 4rem;
  padding-right: 4rem;
  border-top: none;
}

.section-rose { background: linear-gradient(180deg, #fff1f2 0%, #ffffff 100%); }
.section-blue { background: linear-gradient(180deg, #eff6ff 0%, #ffffff 100%); }
.section-violet { background: linear-gradient(180deg, #f5f3ff 0%, #ffffff 100%); }
.section-emerald { background: linear-gradient(180deg, #ecfdf5 0%, #ffffff 100%); }
.section-teal { background: linear-gradient(180deg, #f0fdfa 0%, #ffffff 100%); }
.section-slate { background: linear-gradient(180deg, #f1f5f9 0%, #ffffff 100%); }
.section-gradient {
  background: linear-gradient(135deg, #ecfdf5 0%, #ecfeff 50%, #faf5ff 100%);
}

/* ─── Section illustrations ─── */
.section-illustration {
  max-width: 500px;
  margin: 0 auto 2rem;
}

.section-illustration svg {
  width: 100%;
  height: auto;
}

/* ─── Get Started visual ─── */
.getting-started-visual {
  margin: 1rem 0 1.35rem;
}

.getting-started-visual img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  border: 1px solid rgba(37, 99, 235, 0.20);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.14);
}

/* ─── Blockquote ─── */
blockquote {
  border-left: 4px solid;
  border-image: linear-gradient(180deg, var(--emerald), var(--cyan)) 1;
  padding: 1.25rem 0 1.25rem 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  background: linear-gradient(90deg, rgba(16,185,129,0.05), transparent);
}

blockquote em {
  font-style: normal;
  font-weight: 700;
  color: var(--text);
}

.quote-gradient {
  border-image: linear-gradient(180deg, var(--emerald), var(--cyan), var(--violet), var(--amber)) 1;
}

/* ─── Consequence cards ─── */
.consequence-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 2rem 0;
}

.consequence-card {
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid;
}

.card-rose { background: #fff1f2; border-color: #fecdd3; }
.card-amber { background: #fffbeb; border-color: #fde68a; }
.card-slate { background: #f8fafc; border-color: #e2e8f0; }

.consequence-icon {
  width: 32px;
  height: 32px;
  margin-bottom: 0.75rem;
}

.consequence-icon svg {
  width: 100%;
  height: 100%;
}

.consequence-card h4 {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.consequence-card p {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-secondary);
  margin-bottom: 0;
}

/* ─── Pipeline Visual ─── */
.pipeline-visual {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  margin: 3rem 0;
  padding: 2rem 0;
}

.pipeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  flex: 1;
  max-width: 140px;
}

.pipeline-icon-wrap {
  width: 64px;
  height: 64px;
  margin-bottom: 0.75rem;
}

.pipeline-icon-wrap svg {
  width: 100%;
  height: 100%;
}

.pipeline-label {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--step-color);
}

.pipeline-desc {
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.pipeline-connector {
  position: absolute;
  right: -22px;
  top: 26px;
  width: 40px;
  height: 12px;
}

.pipeline-connector svg {
  width: 100%;
  height: 100%;
}

.pipeline-step:last-child .pipeline-connector {
  display: none;
}

/* ─── How Steps ─── */
.how-steps {
  margin: 2rem 0;
}

.how-step {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.25rem;
  align-items: start;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
}

.how-step:last-child {
  border-bottom: none;
}

.how-step-number {
  font-family: var(--mono);
  font-size: 2rem;
  font-weight: 500;
  color: var(--accent);
  opacity: 0.25;
  line-height: 1;
  min-width: 50px;
}

.how-step-body h3 {
  margin-top: 0;
}

.how-step-body p {
  margin-bottom: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.how-step-figure {
  width: 160px;
  flex-shrink: 0;
}

.how-step-figure svg {
  width: 100%;
  height: auto;
}

/* ─── Validation Tower ─── */
.validation-tower {
  margin: 2.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tower-layer {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: var(--layer-bg);
  border-left: 4px solid var(--layer-color);
  transition: transform 0.2s, box-shadow 0.2s;
}

.tower-layer:hover {
  transform: translateX(4px);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.tower-badge {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: white;
  background: var(--layer-color);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  min-width: 2rem;
  text-align: center;
  flex-shrink: 0;
}

.tower-body {
  font-size: 0.9rem;
  line-height: 1.5;
}

.tower-body strong {
  font-family: var(--sans);
  font-weight: 700;
  color: var(--layer-color);
}

.tower-body span {
  color: var(--text-secondary);
  margin-left: 0.3rem;
}

/* ─── Timeline ─── */
.timeline {
  margin: 2.5rem 0;
  position: relative;
  padding-left: 2.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, #10b981, #06b6d4, #8b5cf6, #f59e0b, #ef4444);
}

.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
}

.timeline-item:last-child { margin-bottom: 0; }

.timeline-marker {
  position: absolute;
  left: -2.5rem;
  top: 5px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: white;
  border: 3px solid var(--tl-color);
  z-index: 1;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.10);
}

.timeline-date {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--tl-color);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.15rem;
}

.timeline-content h4 {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  color: var(--text);
}

.timeline-content p {
  font-size: 0.9rem;
  margin-bottom: 0;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ─── Architecture Diagram ─── */
.arch-diagram {
  margin: 2.5rem 0;
  overflow-x: auto;
  padding: 1rem 0;
}

.arch-svg {
  width: 100%;
  max-width: 700px;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* ─── Section helpers ─── */
.section-intro {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-secondary, #64748b);
  max-width: 640px;
  margin-bottom: 1.5rem;
}

.pull-quote {
  margin: 2.5rem auto 0;
  max-width: 600px;
  padding: 1.5rem 2rem;
  border-left: 4px solid var(--emerald);
  background: rgba(16, 185, 129, 0.05);
  border-radius: 0 12px 12px 0;
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-secondary, #64748b);
}

.privacy-banner {
  margin-top: 2.5rem;
  display: flex;
  gap: 1.25rem;
  padding: 1.5rem 2rem;
  border-radius: 16px;
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
  border: 1px solid #ddd6fe;
  align-items: flex-start;
}

.privacy-banner-icon svg {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.privacy-banner-content h4 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: #5b21b6;
}

.privacy-banner-content p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.65;
  color: #4c1d95;
}

/* ─── Intelligence Grid ─── */
.intel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin: 2rem 0;
}

.intel-card {
  background: var(--card-bg);
  border: 1px solid color-mix(in srgb, var(--card-accent) 20%, transparent);
  border-radius: 14px;
  padding: 1.5rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.intel-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.intel-card-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 1rem;
}

.intel-card-icon svg {
  width: 100%;
  height: 100%;
}

.intel-card h3 {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--card-accent);
}

.intel-card p {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-secondary);
  margin-bottom: 0;
}

/* ─── Enterprise Features ─── */
.enterprise-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin: 2rem 0;
}

/* Each cell stacks vertically so the heading is the first thing the eye
   lands on, regardless of how long the body text is. Icons sit above
   the title rather than competing with it on a horizontal axis — this
   keeps every card the same shape, even when descriptions vary in length. */
.ent-feature {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.1rem 1.15rem;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.ent-icon-wrap {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--ent-color) 8%, white);
  border: 1px solid color-mix(in srgb, var(--ent-color) 20%, transparent);
}

.ent-icon-wrap svg {
  width: 24px;
  height: 24px;
}

.ent-feature h3 {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
  color: #0f172a;
}

.ent-feature p {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0;
}

/* ─── Stats Grid ─── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 2rem 0;
}

.stat-card {
  background: white;
  border-radius: 14px;
  padding: 1.75rem 1rem;
  text-align: center;
  border: 1px solid color-mix(in srgb, var(--stat-accent) 15%, transparent);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: transform 0.2s;
}

.stat-card:hover {
  transform: scale(1.03);
}

.stat-number {
  font-family: var(--sans);
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.4rem;
  color: var(--stat-accent);
}

.stat-label {
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ─── Tech pills ─── */
.tech-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin: 1.5rem 0;
}

.tech-pill {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.4rem 1rem;
  border-radius: 100px;
  background: var(--pill-bg);
  color: var(--pill-color);
  border: 1px solid color-mix(in srgb, var(--pill-color) 20%, transparent);
}

/* ─── ML Lifecycle Section ─── */
.section-ml-lifecycle {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 100%);
  color: #e2e8f0;
  border-top: none;
}

.section-ml-lifecycle h2 {
  color: #f1f5f9;
}

.section-ml-lifecycle h3 {
  color: #e2e8f0;
}

.section-ml-lifecycle p {
  color: #94a3b8;
}

.section-ml-lifecycle em {
  color: #f1f5f9;
  font-style: normal;
  font-weight: 600;
}

.section-ml-lifecycle blockquote {
  color: #cbd5e1;
  background: linear-gradient(90deg, rgba(139,92,246,0.08), transparent);
}

.section-ml-lifecycle blockquote em {
  color: #f1f5f9;
}

.section-ml-lifecycle .section-number {
  background: linear-gradient(135deg, #8b5cf6, #06b6d4);
}

/* ML Pipeline (Train → Register → Predict) */
.ml-pipeline {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  margin: 2.5rem 0 3rem;
  padding: 2rem 0;
}

.ml-pipeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  flex: 1;
  max-width: 180px;
}

.ml-pipeline-icon {
  width: 72px;
  height: 72px;
  margin-bottom: 0.75rem;
}

.ml-pipeline-icon svg {
  width: 100%;
  height: 100%;
}

.ml-pipeline-label {
  font-family: var(--sans);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--ml-color);
  letter-spacing: -0.01em;
}

.ml-pipeline-desc {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: #94a3b8;
  margin-top: 0.25rem;
  max-width: 150px;
}

.ml-pipeline-connector {
  position: absolute;
  right: -26px;
  top: 30px;
  width: 48px;
  height: 16px;
}

.ml-pipeline-connector svg {
  width: 100%;
  height: 100%;
}

.ml-pipeline-step:last-child .ml-pipeline-connector {
  display: none;
}

/* ML Feature Cards Grid */
.ml-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin: 2.5rem 0;
}

.ml-feature-card {
  background: color-mix(in srgb, var(--mlf-bg) 8%, #1e293b);
  border: 1px solid color-mix(in srgb, var(--mlf-accent) 25%, transparent);
  border-radius: 14px;
  padding: 1.5rem;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.ml-feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  border-color: color-mix(in srgb, var(--mlf-accent) 50%, transparent);
}

.ml-feature-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 1rem;
}

.ml-feature-icon svg {
  width: 100%;
  height: 100%;
}

.ml-feature-card h3 {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--mlf-accent);
}

.ml-feature-card p {
  font-size: 0.85rem;
  line-height: 1.6;
  color: #94a3b8;
  margin-bottom: 0;
}

.ml-feature-card code {
  font-family: var(--mono);
  font-size: 0.8rem;
  background: rgba(139, 92, 246, 0.12);
  color: #c4b5fd;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

/* ML Lineage DAG */
.ml-lineage-dag {
  margin: 2.5rem 0;
  overflow-x: auto;
  padding: 1rem 0;
}

.ml-dag-svg {
  width: 100%;
  max-width: 700px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.ml-dag-caption {
  font-family: var(--sans);
  font-size: 0.8rem;
  color: #64748b;
  text-align: center;
  margin-top: 1rem;
  margin-bottom: 0;
}

/* ─── Pricing ─── */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.25rem;
  margin: 2.5rem 0 1.5rem;
  align-items: stretch;
}

.pricing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 1.75rem 1.5rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.pricing-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

/* Featured (Pro) tier — gradient border + slight lift so it reads as the
   default recommendation without hiding the other two. */
.pricing-card-featured {
  border: 1px solid transparent;
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(135deg, #10b981 0%, #06b6d4 60%, #8b5cf6 100%) border-box;
  box-shadow: 0 14px 34px rgba(16, 185, 129, 0.14);
  transform: translateY(-6px);
}

.pricing-card-featured:hover {
  transform: translateY(-8px);
}

.pricing-badge {
  position: absolute;
  top: -0.7rem;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #10b981, #06b6d4);
  color: #ffffff;
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  white-space: nowrap;
}

.pricing-card-head {
  margin-bottom: 1rem;
}

.pricing-tier {
  font-family: var(--sans);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  color: #0f172a;
}

.pricing-desc {
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0;
}

.pricing-price {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin: 0.5rem 0 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #f1f5f9;
}

.pricing-amount {
  font-family: var(--sans);
  font-size: 2.25rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
}

.pricing-period {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  flex: 1;
}

.pricing-features li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.88rem;
  line-height: 1.55;
  color: #334155;
  margin-bottom: 0.55rem;
}

.pricing-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 0.95rem;
  height: 0.95rem;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'><circle cx='10' cy='10' r='10' fill='%23ecfdf5'/><path d='M6 10l3 3 5-6' stroke='%2310b981' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-size: contain;
  background-repeat: no-repeat;
}

.pricing-features li strong {
  color: #0f172a;
  font-weight: 700;
}

.pricing-cta {
  display: block;
  text-align: center;
  text-decoration: none;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 600;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}

.pricing-cta-primary {
  background: linear-gradient(135deg, #10b981, #06b6d4);
  color: #ffffff;
  border: 1px solid transparent;
}

.pricing-cta-primary:hover {
  filter: brightness(0.96);
}

.pricing-cta-outline {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #cbd5e1;
}

.pricing-cta-outline:hover {
  border-color: #10b981;
  color: #047857;
}

.pricing-fineprint {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 1.5rem;
}

@media (max-width: 900px) {
  .pricing-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .pricing-card-featured {
    transform: none;
  }
  .pricing-card-featured:hover {
    transform: translateY(-2px);
  }
}

/* ─── Future section art ─── */
.future-art {
  margin: 0 -4rem 2rem;
  overflow: hidden;
}

.future-art svg {
  width: 100%;
  height: auto;
  display: block;
}

/* ─── Footer ─── */
.footer {
  margin-top: 3rem;
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.footer-inner p {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.footer-sub {
  color: var(--text-muted) !important;
  font-size: 0.78rem !important;
}

.footer-links {
  margin-top: 0.8rem;
  display: flex;
  justify-content: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: #0f766e;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* ─── Scroll animations ─── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── Responsive ─── */
@media (max-width: 960px) {
  :root { --toc-width: 0px; }
  html { font-size: 16px; }

  .toc {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    width: 270px;
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.12);
  }
  .toc.open { transform: translateX(0); }
  .toc-toggle { display: flex; }

  .content {
    margin-left: 0;
    padding: 0 1.5rem 4rem;
  }

  .section-colored {
    margin-left: -1.5rem;
    margin-right: -1.5rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .hero { padding: 4rem 0 3rem; }
  .hero-title { font-size: 2.8rem; }
  .hero-bg-art { display: none; }
  .hero-cta { gap: 0.55rem; }

  section h2 { font-size: 1.7rem; }

  .consequence-cards { grid-template-columns: 1fr; }
  .pipeline-visual { flex-wrap: wrap; gap: 1.5rem; }
  .pipeline-connector { display: none; }
  .pipeline-step { max-width: none; width: calc(50% - 0.75rem); }

  .how-step {
    grid-template-columns: auto 1fr;
  }
  .how-step-figure { display: none; }

  .intel-grid { grid-template-columns: 1fr; }
  .enterprise-features { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  .arch-diagram { overflow-x: auto; }
  .arch-svg { min-width: 600px; }

  .ml-pipeline { flex-wrap: wrap; gap: 1.5rem; }
  .ml-pipeline-connector { display: none; }
  .ml-pipeline-step { max-width: none; width: calc(50% - 0.75rem); }
  .ml-features-grid { grid-template-columns: repeat(2, 1fr); }
  .ml-dag-svg { min-width: 600px; }

  .future-art { margin-left: -1.5rem; margin-right: -1.5rem; }
}

@media (max-width: 480px) {
  .content { padding: 0 1rem 3rem; }
  .hero-title { font-size: 2.2rem; }
  .pipeline-step { width: 100%; }
  .ml-pipeline-step { width: 100%; }
  .ml-features-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-number { font-size: 2.2rem; }
  .section-colored {
    margin-left: -1rem;
    margin-right: -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* ─── Remote Compute Section ─── */
.remote-compute-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin: 2.5rem 0;
}

.rc-card {
  background: white;
  border: 1px solid #99f6e4;
  border-radius: 14px;
  padding: 1.5rem;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.rc-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(13, 148, 136, 0.12);
  border-color: #2dd4bf;
}

.rc-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 1rem;
}

.rc-icon svg {
  width: 100%;
  height: 100%;
}

.rc-card h3 {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: #0d9488;
}

.rc-card p {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .remote-compute-grid { grid-template-columns: 1fr; }
}

/* ─── Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .toc { transition: none; }
  .tower-layer:hover { transform: none; }
  .intel-card:hover { transform: none; }
  .stat-card:hover { transform: none; }
  .ml-feature-card:hover { transform: none; }
  .rc-card:hover { transform: none; }
}

/* ─── Print ─── */
@media print {
  .toc, .toc-toggle { display: none; }
  .content { margin-left: 0; max-width: 100%; }
  .section-colored { background: white !important; }
  .section-ml-lifecycle { color: var(--text) !important; }
  .section-ml-lifecycle p, .section-ml-lifecycle .ml-pipeline-desc, .section-ml-lifecycle .ml-feature-card p { color: var(--text-secondary) !important; }
  .ml-feature-card { background: white !important; }
  body { font-size: 11pt; }
}

/* Inline prose link (used by methodology callout and similar) */
.inline-link {
  color: #0891b2;
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px dotted #0891b2;
  transition: color 0.15s, border-color 0.15s;
}
.inline-link:hover {
  color: #0e7490;
  border-bottom-color: #0e7490;
  border-bottom-style: solid;
}

/* Methodology page (standalone article) */
.methodology-article {
  max-width: 780px;
  margin: 4rem auto 3rem;
  padding: 0 1.5rem;
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text);
}
.methodology-article h1 {
  font-family: 'Inter', sans-serif;
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 0.5rem;
  color: #0f172a;
}
.methodology-article .subtitle {
  font-family: 'Inter', sans-serif;
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 2.5rem;
}
.methodology-article h2 {
  font-family: 'Inter', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2.5rem 0 0.75rem;
  color: #0f172a;
}
.methodology-article h3 {
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1.75rem 0 0.5rem;
  color: #0f172a;
}
.methodology-article p { margin: 0 0 1rem; }
.methodology-article ul { padding-left: 1.25rem; }
.methodology-article li { margin-bottom: 0.4rem; }
.methodology-article blockquote {
  border-left: 3px solid #06b6d4;
  padding: 0.25rem 0 0.25rem 1.25rem;
  color: var(--text-secondary);
  font-style: italic;
  margin: 1.5rem 0;
}
.methodology-article .back-link {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: #0891b2;
  text-decoration: none;
  font-weight: 600;
}
.methodology-article .back-link:hover { color: #0e7490; }
.methodology-article .appendix {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem 1.75rem;
  margin-top: 2.5rem;
}
.methodology-article .appendix h2 { margin-top: 0; }
.methodology-article .appendix ul li strong { color: #0f172a; }
