:root {
  --bg:         #09090B;
  --bg-card:    #111113;
  --border:     #1C1C1F;
  --text:       #FAFAFA;
  --muted:      #A1A1AA;
  --accent:     #F59E0B;
  --accent-dim: rgba(245, 158, 11, 0.12);
  --mono:       'SF Mono', 'JetBrains Mono', 'Fira Code', Menlo, Monaco, monospace;
  --heading:    'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', Georgia, serif;
  --body:       'Avenir Next', 'Segoe UI Variable', 'Segoe UI', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Subtle noise texture ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  z-index: 0;
}

a { color: inherit; }

/* ── Container ── */
.container {
  width: min(1120px, 100% - 48px);
  margin: 0 auto;
}

/* ── Hero ── */
.hero {
  position: relative;
  padding: 120px 0 100px;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -180px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(245, 158, 11, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
}

.hero-eyebrow::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.5);
}

.hero h1 {
  font-family: var(--heading);
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.03em;
  max-width: 14ch;
  margin-bottom: 24px;
}

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

.hero-skill-note {
  font-size: 0.82rem;
  line-height: 1.55;
  color: #71717A;
  max-width: 560px;
  margin-bottom: 32px;
  padding: 10px 14px;
  border-left: 2px solid var(--border);
  border-radius: 0 6px 6px 0;
  background: rgba(255, 255, 255, 0.02);
}

.hero-skill-note strong {
  color: var(--muted);
  font-weight: 600;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  font-family: var(--body);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 150ms ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}
.btn-primary:hover {
  background: #D97706;
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: #3F3F46;
  background: rgba(255,255,255,0.03);
}

/* ── Hero code example ── */
.hero-code {
  margin-bottom: 32px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  max-width: 560px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hero-code-inner {
  overflow-x: auto;
}

.hero-code code {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
  white-space: nowrap;
}

.hero-code .code-prompt {
  color: var(--accent);
  user-select: none;
}

.hero-code .code-command {
  color: var(--text);
}

.hero-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  list-style: none;
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 32px;
}

.hero-signals li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.hero-signals li::before {
  content: '\2192';
  color: var(--accent);
  font-family: var(--mono);
  font-weight: 700;
  flex-shrink: 0;
}

/* ── Hero trust badges ── */
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: #71717A;
  letter-spacing: 0.02em;
}

.hero-badges span {
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.02);
}

.hero-badges .badge-sep {
  border: none;
  background: none;
  padding: 0 2px;
  color: #3F3F46;
}

/* ── Section base ── */
.section {
  position: relative;
  z-index: 1;
  padding: 80px 0;
}

.section--tight {
  padding: 60px 0;
}

.section--spacious {
  padding: 100px 0 80px;
}

.section--compact {
  padding: 48px 0;
}

.section--dark {
  background: var(--bg-card);
}

.divider {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 0;
}

.section-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--heading);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 28px;
  max-width: 20ch;
}

/* ── How It Works (3-step) ── */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
  align-items: stretch;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 700;
  flex-shrink: 0;
}

.step-card h3 {
  font-family: var(--heading);
  font-size: 1.2rem;
  font-weight: 600;
}

.step-code {
  padding: 10px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.step-code-inner {
  overflow-x: auto;
}

.step-code code {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text);
  white-space: nowrap;
}

.step-card p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.55;
}

/* Invoke examples list */
.step-examples {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.step-examples code {
  display: block;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
  padding: 8px 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 6px;
  white-space: normal;
}

/* Ship checklist */
.step-checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.step-checklist li {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.step-checklist li::before {
  content: '\2713';
  color: var(--accent);
  font-family: var(--mono);
  font-weight: 700;
  flex-shrink: 0;
}

/* ── Capabilities Grid ── */
.cap-grid {
  margin-top: 40px;
}

.cap-grid--primary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.cap-grid--secondary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 2px;
}

.cap-item {
  padding: 28px 24px;
  background: var(--bg-card);
  transition: all 200ms ease;
  border-left: 2px solid transparent;
}

.cap-item:hover {
  background: #18181B;
  border-left-color: var(--accent);
  box-shadow: inset 0 0 20px rgba(245, 158, 11, 0.04);
}

.cap-item--featured {
  padding: 36px 28px;
}

.cap-item--featured h3 {
  font-size: 1.1rem;
}

.cap-item--clickable {
  cursor: pointer;
  position: relative;
}

.cap-item--clickable:hover {
  background: #1A1A1E;
  border-left-color: var(--accent);
}

.cap-item-cta {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  margin-top: 8px;
  display: block;
  opacity: 0;
  transition: opacity 200ms ease;
}

.cap-item--clickable:hover .cap-item-cta {
  opacity: 1;
}

.cap-item h3 {
  font-family: var(--heading);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cap-item h3::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.cap-item p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ── Install Section ── */
.install-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 32px;
}

.install-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.install-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.install-block-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  cursor: pointer;
  transition: all 150ms ease;
}

.copy-btn:hover {
  color: var(--text);
  border-color: #3F3F46;
}

.copy-btn.copied {
  color: var(--accent);
  border-color: var(--accent);
}

.install-block pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  background: transparent;
  border: none;
  border-radius: 0;
}

.install-block code {
  font-family: var(--mono);
  font-size: 0.88rem;
  color: var(--text);
}

.install-note {
  margin-top: 20px;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
  max-width: 640px;
}

/* ── Who This Is For (audience grid) ── */
.audience-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.audience-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 24px;
  transition: border-color 200ms ease;
}

.audience-card:hover {
  border-color: #3F3F46;
}

.audience-card h3 {
  font-family: var(--heading);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 16px;
  color: var(--text);
}

.audience-card p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ── Scenarios Carousel ── */
.carousel-wrapper {
  position: relative;
  margin-top: 40px;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  gap: 16px;
  transition: transform 600ms cubic-bezier(0.25, 0.1, 0.25, 1);
  will-change: transform;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 200ms ease;
}

.carousel-dot.active {
  background: var(--accent);
  width: 24px;
  border-radius: 4px;
}

.carousel-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
}

.carousel-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 1rem;
  cursor: pointer;
  transition: all 150ms ease;
  flex-shrink: 0;
}

.carousel-arrow:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.scenario-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 0 0 auto;
  min-height: 340px;
}

.scenario-num {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.scenario-card h3 {
  font-family: var(--heading);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.3;
}

.scenario-situation {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.55;
  padding: 12px 14px;
  background: rgba(255,255,255, 0.02);
  border-left: 2px solid var(--border);
  border-radius: 0 6px 6px 0;
}

.scenario-result {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.55;
  padding: 12px 14px;
  background: var(--accent-dim);
  border-left: 2px solid var(--accent);
  border-radius: 0 6px 6px 0;
}

.scenario-takeaway {
  font-size: 0.82rem;
  color: #71717A;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

/* ── FAQ ── */
.faq-list {
  margin-top: 32px;
  max-width: 780px;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item:first-child {
  border-top: 1px solid var(--border);
}

.faq-q {
  width: 100%;
  background: none;
  border: none;
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  text-align: left;
  font-family: var(--heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

.faq-q::after {
  content: '+';
  font-family: var(--mono);
  font-size: 1.2rem;
  color: var(--muted);
  flex-shrink: 0;
  transition: transform 200ms ease;
}

.faq-item.open .faq-q::after {
  content: '\2212';
  color: var(--accent);
}

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 300ms ease, padding 300ms ease;
}

.faq-item.open .faq-a {
  max-height: 200px;
  padding-bottom: 20px;
}

.faq-a p {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.6;
}

.faq-a code {
  font-family: var(--mono);
  font-size: 0.82rem;
  background: rgba(255,255,255,0.05);
  padding: 2px 6px;
  border-radius: 3px;
}

/* ── Modal ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-overlay.open {
  display: flex;
}

.modal-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  max-width: 640px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 40px 36px;
  animation: modalIn 200ms ease;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 1.3rem;
  cursor: pointer;
  transition: all 150ms ease;
}

.modal-close:hover {
  color: var(--text);
  border-color: #3F3F46;
}

.modal-body h3 {
  font-family: var(--heading);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 20px;
  padding-right: 40px;
}

.modal-situation,
.modal-action {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.modal-situation strong,
.modal-action strong {
  color: var(--text);
}

.modal-code {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 18px;
  overflow-x: auto;
  margin-top: 8px;
}

.modal-code code {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.6;
  white-space: pre;
}

/* ── Footer ── */
.footer {
  padding: 48px 0 32px;
  font-size: 0.88rem;
  color: #71717A;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.footer-name {
  font-family: var(--heading);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 4px;
}

.footer-tagline {
  color: #71717A;
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer a {
  text-decoration: none;
  color: var(--muted);
  transition: color 150ms ease;
}

.footer a:hover {
  color: var(--accent);
}

.footer-bottom {
  padding-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.footer-badge {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: #52525B;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  letter-spacing: 0.02em;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .cap-grid--primary,
  .cap-grid--secondary {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .audience-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hero { padding: 80px 0 60px; }

  .hero h1 { max-width: none; }

  .hero-signals {
    flex-direction: column;
    gap: 12px;
  }

  .cap-grid--primary,
  .cap-grid--secondary {
    grid-template-columns: 1fr;
  }

  .cap-item--featured {
    padding: 28px 24px;
  }

  .cap-item--featured h3 {
    font-size: 1rem;
  }

  .install-methods {
    grid-template-columns: 1fr;
  }

  .steps-grid {
    grid-template-columns: 1fr;
  }

  .audience-grid {
    grid-template-columns: 1fr;
  }

  .container {
    width: min(1120px, 100% - 32px);
  }

  .scenario-card {
    min-height: auto;
  }

  .modal-card {
    padding: 28px 20px;
    max-height: 90vh;
  }

  .modal-body h3 {
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  .hero { padding: 60px 0 48px; }

  .hero h1 {
    font-size: 2.4rem;
  }

  .section { padding: 48px 0; }

  .container {
    width: min(1120px, 100% - 24px);
  }

  .footer-top {
    flex-direction: column;
    gap: 16px;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 14px;
  }

  .modal-card {
    padding: 24px 16px;
    border-radius: 12px;
  }
}
