/* Visual system follows elayadesign/ai-design-skills landing-page-design:
   Tailwind type scale, fixed spacing tokens, flat dark backgrounds, base curve motion. */
:root {
  /* Spacing tokens */
  --s-25: 2px; --s-50: 4px; --s-75: 8px; --s-100: 12px; --s-200: 16px; --s-300: 24px;
  --s-400: 32px; --s-500: 40px; --s-600: 48px; --s-700: 64px; --s-800: 80px; --s-900: 96px;

  /* Surfaces (approved dark backgrounds) */
  --bg: #000000;
  --surface-1: #181818;
  --surface-2: #1F1F1F;
  --surface-3: #272727;
  --surface-4: #313131;

  --text: #FFFFFF;
  --text-muted: #9B9B9B;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --accent: #9D8CFF;
  --ok: #4ADE80;
  --warn: #FBBF24;
  --err: #F87171;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--s-900); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px; line-height: 24px;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { text-wrap: balance; margin: 0; font-weight: 600; }
p, li { text-wrap: pretty; }
p { margin: 0; }
a { color: inherit; }
code, pre { font-family: var(--mono); }
img { max-width: 100%; }
i.ph { font-size: 20px; line-height: 1; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip {
  position: absolute; left: var(--s-200); top: var(--s-200); z-index: 100;
  padding: var(--s-75) var(--s-100); border-radius: 8px;
  background: var(--text); color: var(--bg); font-weight: 600;
  transform: translateY(-200%); transition: transform 300ms var(--ease);
}
.skip:focus { transform: translateY(0); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 var(--s-300); }
.narrow { max-width: 768px; }
.center { text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: var(--s-75);
  padding: var(--s-75) var(--s-100);
  border: 1px solid transparent; border-radius: 8px;
  font: 600 16px/24px var(--font); text-decoration: none; cursor: pointer;
  transition: background-color 300ms var(--ease), transform 300ms var(--ease), opacity 300ms var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn-sm { font-size: 14px; line-height: 20px; }
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { background: #E4E4E4; transform: translateY(-1px); }
.btn-primary:active { transform: scale(0.98); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---------- Navigation ---------- */
.nav-wrap { position: fixed; top: var(--s-200); left: 0; right: 0; z-index: 50; display: flex; justify-content: center; padding: 0 var(--s-200); pointer-events: none; }
.nav {
  pointer-events: auto;
  display: flex; align-items: center; gap: var(--s-300);
  padding: var(--s-75) var(--s-75) var(--s-75) var(--s-200);
  background: rgba(24, 24, 24, 0.72);
  border: 1px solid var(--border); border-radius: 16px;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.brand { display: inline-flex; align-items: center; gap: var(--s-75); font-weight: 600; text-decoration: none; }
.brand-mark { color: var(--accent); font-size: 20px; line-height: 28px; }
.nav-links { display: flex; gap: var(--s-50); list-style: none; margin: 0; padding: 0; }
.nav-links a, .nav-gh {
  display: inline-flex; align-items: center; padding: var(--s-50) var(--s-100); border-radius: 8px;
  color: var(--text-muted); font-size: 14px; line-height: 20px; text-decoration: none;
  transition: color 300ms var(--ease), background-color 300ms var(--ease);
}
.nav-links a:hover, .nav-gh:hover { color: var(--text); background: var(--surface-3); }
.nav-links a[aria-current="true"] { color: var(--text); background: var(--surface-3); }
.nav-gh { padding: var(--s-75); }

.menu-toggle {
  display: none; position: relative; width: 40px; height: 40px;
  background: transparent; border: 0; border-radius: 8px; cursor: pointer;
}
.menu-toggle .bar {
  position: absolute; left: 12px; width: 16px; height: 2px; background: var(--text); border-radius: 2px;
  transition: transform 500ms var(--ease);
}
.menu-toggle .bar-top { transform: translateY(-4px); top: 19px; }
.menu-toggle .bar-bottom { transform: translateY(4px); top: 19px; }
.menu-toggle[aria-expanded="true"] .bar-top { transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bar-bottom { transform: rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  padding: var(--s-900) var(--s-300) var(--s-300);
}
.mobile-menu ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-200); }
.mobile-menu a { font-size: 30px; line-height: 36px; font-weight: 600; text-decoration: none; display: block; padding: var(--s-75) 0; }
.mobile-menu li { opacity: 0; transform: translateY(var(--s-300)); }
.mobile-menu.open li { opacity: 1; transform: none; transition: opacity 500ms var(--ease), transform 500ms var(--ease); transition-delay: var(--d, 0ms); }

/* ---------- Hero ---------- */
.hero { padding: 160px 0 var(--s-900); }
.hero-inner { display: flex; flex-direction: column; align-items: center; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--s-75);
  padding: var(--s-50) var(--s-100); margin-bottom: var(--s-300);
  border: 1px solid var(--border); border-radius: 9999px; background: var(--surface-1);
  color: var(--text-muted); font-size: 14px; line-height: 20px;
}
.eyebrow i { font-size: 16px; }
.hero-title {
  max-width: 680px;
  font-size: 60px; line-height: 1; letter-spacing: -0.02em;
  background: linear-gradient(90deg, #FFFFFF, #9B9B9B);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { max-width: 680px; margin-top: var(--s-300); color: var(--text-muted); font-size: 18px; line-height: 28px; }

.install {
  display: flex; align-items: center; gap: var(--s-75);
  margin-top: var(--s-500); padding: var(--s-75) var(--s-75) var(--s-75) var(--s-200);
  background: var(--surface-1); border: 1px solid var(--border-strong); border-radius: 16px;
  max-width: 100%;
}
.install-cmd { font-size: 14px; line-height: 20px; color: var(--text); white-space: nowrap; overflow-x: auto; }
.install .btn { border-radius: 8px; flex-shrink: 0; }
.copy-status { min-height: 20px; margin-top: var(--s-75); font-size: 14px; line-height: 20px; color: var(--ok); }
.copy-status.error { color: var(--err); }
.proof { display: inline-flex; align-items: center; gap: var(--s-75); margin-top: var(--s-200); color: var(--text-muted); font-size: 14px; line-height: 20px; }
.proof i { color: var(--ok); font-size: 16px; }

/* Terminal mockup */
.terminal {
  width: 100%; max-width: 880px; margin: var(--s-700) 0 0;
  background: var(--surface-1); border: 1px solid var(--border-strong); border-radius: 16px;
  text-align: left; overflow: hidden;
}
.terminal-bar { display: flex; align-items: center; gap: var(--s-75); padding: var(--s-100) var(--s-200); border-bottom: 1px solid var(--border); background: var(--surface-2); }
.terminal-bar span { width: 12px; height: 12px; border-radius: 9999px; background: var(--surface-4); }
.terminal-bar p { margin-left: var(--s-75); color: var(--text-muted); font: 12px/16px var(--mono); }
.terminal-body { padding: var(--s-300); font: 14px/20px var(--mono); overflow-x: auto; }
.t-line { white-space: pre-wrap; margin-bottom: var(--s-50); opacity: 0; transform: translateY(var(--s-75)); }
.terminal.play .t-line { opacity: 1; transform: none; transition: opacity 500ms var(--ease), transform 500ms var(--ease); transition-delay: var(--d, 0ms); }
.t-head { margin-bottom: var(--s-100); }
.t-accent { color: var(--accent); font-weight: 600; }
.t-muted { color: var(--text-muted); }
.t-ok { color: var(--ok); }
.t-err { color: var(--err); }
.t-warn { color: var(--warn); }

/* ---------- Sections ---------- */
.section { padding: var(--s-900) 0; }
.section-title { font-size: 36px; line-height: 40px; letter-spacing: -0.01em; max-width: 680px; margin-bottom: var(--s-600); }
.center .section-title, .section-title.center { margin-left: auto; margin-right: auto; }
.section-sub { color: var(--text-muted); font-size: 18px; line-height: 28px; max-width: 680px; margin: calc(-1 * var(--s-400)) 0 var(--s-600); }
.section-sub.center, .center .section-sub { margin-left: auto; margin-right: auto; }
.section-sub a { color: var(--text); }
.section-sub code, .faq code { font-size: 14px; line-height: 20px; padding: var(--s-25) var(--s-50); background: var(--surface-3); border-radius: 4px; }

.card { background: var(--surface-1); border: 1px solid var(--border); border-radius: 16px; padding: var(--s-300); }
.card-title { font-size: 18px; line-height: 28px; display: flex; align-items: center; gap: var(--s-75); margin-bottom: var(--s-75); }
.card p { color: var(--text-muted); }
.card-accent { border-color: rgba(157, 140, 255, 0.4); }

.grid { display: grid; gap: var(--s-200); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-200); }
.list { margin: var(--s-100) 0 0; padding-left: var(--s-300); color: var(--text-muted); display: grid; gap: var(--s-75); }

.feature-icon { font-size: 24px; color: var(--accent); display: block; margin-bottom: var(--s-200); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-200); }
.step-num {
  display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin-bottom: var(--s-200);
  border-radius: 8px; background: var(--surface-3); font: 600 14px/20px var(--mono); color: var(--accent);
}
.step pre {
  margin: var(--s-200) 0 0; padding: var(--s-100); background: var(--bg);
  border: 1px solid var(--border); border-radius: 8px; overflow-x: auto;
  font-size: 12px; line-height: 16px; color: var(--text);
}

.risk-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-200); }
.risk { display: flex; flex-direction: column; gap: var(--s-75); }
.risk-label { display: flex; align-items: center; gap: var(--s-75); color: var(--text) !important; font-weight: 600; font-size: 18px; line-height: 28px; }
.risk-rule { font-size: 14px; line-height: 20px; margin-bottom: var(--s-75); }
.risk code { display: block; font-size: 12px; line-height: 16px; padding: var(--s-50) var(--s-75); background: var(--bg); border: 1px solid var(--border); border-radius: 4px; color: var(--text-muted); }
.risk-warn { border-color: rgba(251, 191, 36, 0.35); }
.risk-warn .risk-label i { color: var(--warn); }
.risk-block { border-color: rgba(248, 113, 113, 0.35); }
.risk-block .risk-label i { color: var(--err); }
.facts { list-style: none; padding: 0; margin: var(--s-400) 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-200); color: var(--text-muted); font-size: 14px; line-height: 20px; }
.facts li { display: flex; gap: var(--s-75); align-items: flex-start; }
.facts i { color: var(--accent); font-size: 20px; }

.provider code { display: inline-block; margin-top: var(--s-200); font-size: 12px; line-height: 16px; padding: var(--s-50) var(--s-75); background: var(--bg); border: 1px solid var(--border); border-radius: 4px; color: var(--text-muted); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-200); margin-bottom: var(--s-600); }
.stat { padding: var(--s-300); border: 1px solid var(--border); border-radius: 16px; background: var(--surface-1); }
.stat-num { font-size: 48px; line-height: 1; font-weight: 600; font-family: var(--mono); }
.stat-label { margin-top: var(--s-100); color: var(--text-muted); font-size: 14px; line-height: 20px; }

/* Gallery */
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-300); }
.shot { margin: 0; }
.shot img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--border-strong); border-radius: 16px; background: var(--surface-1);
  transition: transform 500ms var(--ease);
}
.shot img:hover { transform: translateY(-4px); }
.shot figcaption { margin-top: var(--s-100); color: var(--text-muted); font-size: 14px; line-height: 20px; }
.gallery-note { margin-top: var(--s-400); margin-bottom: 0; font-size: 14px; line-height: 20px; }
.feature code, .provider p code { font-size: 14px; line-height: 20px; padding: var(--s-25) var(--s-50); background: var(--surface-3); border-radius: 4px; color: var(--text); }

/* FAQ */
.faq { display: grid; gap: var(--s-100); }
.faq details { background: var(--surface-1); border: 1px solid var(--border); border-radius: 12px; padding: 0 var(--s-300); transition: background-color 300ms var(--ease); }
.faq details:hover { background: var(--surface-2); }
.faq summary {
  list-style: none; cursor: pointer; padding: var(--s-200) 0; font-weight: 600; font-size: 16px; line-height: 24px;
  display: flex; justify-content: space-between; align-items: center; gap: var(--s-200); border-radius: 4px;
}
.faq summary > span { flex: 1; }
.faq summary code { font-size: 14px; line-height: 20px; padding: var(--s-25) var(--s-50); background: var(--surface-3); border-radius: 4px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--text-muted); font-family: var(--mono); transition: transform 300ms var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: var(--s-200); color: var(--text-muted); }

/* Tagline reveal */
.tagline { padding: var(--s-900) 0; }
.tagline-text { max-width: 680px; font-size: 48px; line-height: 1; font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; }
.tagline-text .w { color: rgba(255, 255, 255, 0.3); transition: color 500ms var(--ease); }
.tagline-text .w.on { color: var(--text); }

/* Final CTA */
.final .install { margin: 0 auto; width: fit-content; }
.final .copy-status { text-align: center; }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: var(--s-600) 0; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-300); }
.footer-links { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-300); margin: 0; padding: 0; }
.footer-links a { color: var(--text-muted); font-size: 14px; line-height: 20px; text-decoration: none; transition: color 300ms var(--ease); }
.footer-links a:hover { color: var(--text); }
.footer-note { width: 100%; color: var(--text-muted); font-size: 12px; line-height: 16px; }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(var(--s-400)); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* Simple pages (privacy, 404) */
.page { min-height: 100vh; display: flex; flex-direction: column; }
.page main { flex: 1; padding: 160px 0 var(--s-900); }
.page h1 { font-size: 48px; line-height: 1; margin-bottom: var(--s-300); background: linear-gradient(90deg, #FFFFFF, #9B9B9B); -webkit-background-clip: text; background-clip: text; color: transparent; }
.page h2 { font-size: 24px; line-height: 32px; margin: var(--s-500) 0 var(--s-100); }
.page p, .page li { color: var(--text-muted); }
.page p + p { margin-top: var(--s-200); }
.page .btn { margin-top: var(--s-400); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid-3, .grid-4, .risk-grid, .stats { grid-template-columns: repeat(2, 1fr); }
  .steps, .facts { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav-links, .nav-gh, .nav-cta { display: none; }
  .menu-toggle { display: block; }
  .nav { gap: var(--s-200); }
  .hero { padding-top: 128px; }
  .hero-title { font-size: 36px; line-height: 40px; }
  .hero-title br, .section-title br { display: none; }
  .hero-sub { font-size: 16px; line-height: 24px; }
  .section-title { font-size: 30px; line-height: 36px; }
  .tagline-text { font-size: 36px; line-height: 40px; }
  .compare, .grid-3, .grid-4, .risk-grid, .stats, .gallery { grid-template-columns: 1fr; }
  .install { flex-direction: column; align-items: stretch; padding: var(--s-100); width: 100%; }
  .install-cmd { padding: var(--s-75) var(--s-50); text-align: center; }
  .install .btn { justify-content: center; }
  .terminal-body { font-size: 12px; line-height: 16px; padding: var(--s-200); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .t-line, .mobile-menu li { transform: none !important; }
  .reveal, .terminal.play .t-line, .mobile-menu.open li { transition: opacity 300ms linear !important; transition-delay: 0ms !important; }
  .menu-toggle .bar, .btn { transition: none; }
}

/* ---------- Provider logos ---------- */
svg.logo { width: 20px; height: 20px; fill: currentColor; flex-shrink: 0; }
.works-with { margin-top: var(--s-500); display: flex; flex-direction: column; align-items: center; gap: var(--s-200); }
.works-label { color: var(--text-muted); font-size: 12px; line-height: 16px; letter-spacing: 0.08em; text-transform: uppercase; }
.logo-strip { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-200) var(--s-400); }
.logo-strip li {
  display: inline-flex; align-items: center; gap: var(--s-75);
  color: var(--text-muted); font-weight: 500; font-size: 16px; line-height: 24px;
  transition: color 300ms var(--ease);
}
.logo-strip li:hover { color: var(--text); }
.logo-strip svg.logo { width: 24px; height: 24px; }
.provider-logo {
  display: inline-flex; align-items: center; gap: var(--s-75); margin-bottom: var(--s-200);
  padding: var(--s-100); border-radius: 12px; background: var(--surface-3); color: var(--text);
}
.provider-logo svg.logo { width: 24px; height: 24px; }
.provider-logo i.ph { font-size: 24px; color: var(--accent); }

/* ---------- Keyboard ---------- */
kbd {
  display: inline-block; min-width: 24px; padding: 0 var(--s-75); text-align: center;
  font: 500 12px/22px var(--mono); color: var(--text);
  background: var(--surface-3); border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 6px;
}
.keys { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-200); align-items: start; }
.keys-list dl { margin: var(--s-200) 0 0; display: grid; gap: var(--s-200); }
.keys-list dl > div { display: grid; grid-template-columns: 128px 1fr; gap: var(--s-200); align-items: baseline; }
.keys-list dt { white-space: nowrap; }
.keys-list dd { margin: 0; color: var(--text-muted); font-size: 14px; line-height: 20px; }
.keys-demo { margin: 0; max-width: none; }
.keys-demo .terminal-body p { white-space: pre; margin-bottom: var(--s-50); }
.k-input { padding: var(--s-75) var(--s-100); margin-bottom: var(--s-100) !important; border: 1px solid var(--border-strong); border-radius: 8px; }
.k-caret { display: inline-block; width: 8px; height: 16px; margin-left: 1px; vertical-align: -3px; background: var(--text); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.k-status { margin-top: var(--s-100); }
.k-cmds { margin: var(--s-200) 0 0; padding-top: var(--s-200); border-top: 1px solid var(--border); display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s-75) var(--s-200); }
.k-cmds div { display: flex; gap: var(--s-75); }
.k-cmds dt { color: var(--accent); }
.k-cmds dd { margin: 0; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 960px) { .keys { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .keys-list dl > div { grid-template-columns: 1fr; gap: var(--s-50); }
  .logo-strip { gap: var(--s-200) var(--s-300); }
}
@media (prefers-reduced-motion: reduce) { .k-caret { animation: none; } }
