/* ════════════════════════════════════════════════════════════
   MuseProtect — see DESIGN.md for the token contract
   ════════════════════════════════════════════════════════════ */
:root {
  --surface-primary: #0a0c0b;
  --surface-secondary: #101413;
  --surface-elevated: #161b19;
  --text-primary: #e7ebe9;
  --text-secondary: #9ba5a0;
  --text-tertiary: #6b7570;
  --border-default: #232926;
  --border-strong: #39413d;
  --accent-primary: #10b981;
  --accent-hover: #34d399;
  --accent-subtle: rgba(16, 185, 129, 0.08);
  --accent-text-on: #06231a;
  --code-accent: #2dd4bf;
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", monospace;
  --radius-card: 12px;
  --radius-btn: 10px;
  --shadow-hairline: 0 0 0 1px var(--border-default);
  --shadow-card-hover: 0 8px 24px rgba(0, 0, 0, 0.35);
  --section-pad: clamp(64px, 9vw, 96px);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--surface-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow { max-width: 760px; }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 100; padding: 10px 14px; background: var(--accent-primary); color: var(--accent-text-on); border-radius: var(--radius-btn); text-decoration: none; font-weight: 600; }
.skip-link:focus { top: 16px; }

/* ── Nav ─────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 12, 11, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-default);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 60px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  text-decoration: none;
}
.brand-mark { width: 22px; height: 22px; color: var(--accent-primary); }
.nav-links { display: flex; gap: 24px; }
.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  transition: color 150ms ease;
}
.nav-links a:hover { color: var(--text-primary); }
.nav-actions { display: flex; align-items: center; gap: 12px; }

.lang-toggle {
  display: inline-flex;
  border-radius: 9999px;
  box-shadow: var(--shadow-hairline);
  overflow: hidden;
}
.lang-toggle button {
  background: transparent;
  color: var(--text-secondary);
  border: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 6px 12px;
  cursor: pointer;
  transition: color 150ms ease, background 150ms ease;
}
.lang-toggle button[aria-pressed="true"] {
  background: var(--accent-subtle);
  color: var(--accent-primary);
}

/* ── Buttons ─────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  padding: 12px 22px;
  border: 0;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-primary {
  background: var(--accent-primary);
  color: var(--accent-text-on);
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  box-shadow: var(--shadow-hairline);
}
.btn-secondary:hover { border-color: var(--border-strong); box-shadow: 0 0 0 1px var(--border-strong); }

:is(a, button, summary):focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Hero ────────────────────────────────── */
.hero { padding: clamp(64px, 10vw, 110px) 0 var(--section-pad); }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 20px 0 20px;
}
.lead {
  color: var(--text-secondary);
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 28px;
  max-width: 52ch;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  background: var(--accent-subtle);
  color: var(--accent-primary);
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 5px 12px;
}

/* ── Code blocks ─────────────────────────── */
.codeblock {
  background: var(--surface-elevated);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-hairline);
  overflow: hidden;
}
.codeblock-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-default);
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-tertiary);
}
.codeblock pre {
  padding: 18px 20px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-primary);
}
.codeblock .c { color: var(--text-tertiary); }
.codeblock .k { color: var(--code-accent); }
.codeblock .f { color: var(--accent-primary); }
.codeblock .s { color: var(--text-primary); }

.copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  color: var(--text-secondary);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  transition: color 150ms ease, background 150ms ease;
}
.copy-btn:hover { color: var(--text-primary); background: var(--accent-subtle); }
.copy-btn .icon-check { display: none; color: var(--accent-primary); }
.copy-btn.copied .icon-copy { display: none; }
.copy-btn.copied .icon-check { display: block; }
.copy-btn svg { width: 15px; height: 15px; }

/* ── Sections ────────────────────────────── */
.section { padding: var(--section-pad) 0; }
.section-alt { background: var(--surface-secondary); }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head h2 {
  font-size: clamp(26px, 3.4vw, 32px);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 12px;
}
.section-head p { color: var(--text-secondary); }

/* ── Features ────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.card {
  background: var(--surface-secondary);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-hairline);
  padding: 24px;
}
.features-grid .card { background: var(--surface-primary); }
.features-grid .card:hover {
  box-shadow: var(--shadow-hairline), var(--shadow-card-hover);
  border-radius: var(--radius-card);
}
.card-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--accent-subtle);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.card-icon svg { width: 19px; height: 19px; }
.card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.card p { font-size: 14px; color: var(--text-secondary); }

/* ── How it works ────────────────────────── */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}
.step { padding: 8px 4px; }
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 9999px;
  box-shadow: var(--shadow-hairline);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-primary);
  margin-bottom: 14px;
}
.step h3 { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.step p { font-size: 14px; color: var(--text-secondary); }
.how-code { margin-top: 0; }

/* ── Executors ───────────────────────────── */
.exec-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  justify-content: center;
}
.exec-list li {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-secondary);
  border-radius: 9999px;
  box-shadow: var(--shadow-hairline);
  padding: 7px 16px;
  transition: color 150ms ease, box-shadow 150ms ease;
}
.exec-list li:hover { color: var(--text-primary); box-shadow: 0 0 0 1px var(--border-strong); }

/* ── Pricing ─────────────────────────────── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.price-card { display: flex; flex-direction: column; }
.price-card h3 { font-size: 17px; font-weight: 650; }
.price-desc { font-size: 14px; color: var(--text-secondary); margin-top: 2px; }
.price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 18px 0;
  font-family: var(--font-mono);
}
.price .amount {
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--accent-primary);
}
.price .per { font-size: 13px; color: var(--text-tertiary); }
.price-list { list-style: none; margin-bottom: 24px; flex: 1; }
.price-list li {
  font-size: 14px;
  color: var(--text-secondary);
  padding: 7px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.price-list li::before {
  content: "";
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  background: var(--accent-subtle);
  border-radius: 9999px;
  box-shadow: inset 0 0 0 4px var(--accent-subtle);
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14"><path d="M3.5 7.5l2.5 2.5 4.5-5" stroke="%2310b981" stroke-width="1.6" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>');
  background-repeat: no-repeat;
  background-position: center;
}

/* ── FAQ ─────────────────────────────────── */
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--surface-secondary);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-hairline);
  padding: 0 20px;
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  font-size: 15.5px;
  font-weight: 600;
  padding: 18px 0;
  position: relative;
  padding-right: 36px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 1.5px solid var(--text-tertiary);
  border-bottom: 1.5px solid var(--text-tertiary);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 200ms ease;
}
.faq-item[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq-item p {
  color: var(--text-secondary);
  font-size: 14.5px;
  padding-bottom: 18px;
}

/* ── Footer ──────────────────────────────── */
.footer {
  border-top: 1px solid var(--border-default);
  padding: 40px 0;
  background: var(--surface-secondary);
}
.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-brand p { font-size: 13.5px; color: var(--text-tertiary); margin-top: 10px; max-width: 34ch; }
.footer-links { display: flex; gap: 20px; }
.footer-links a {
  color: var(--text-secondary);
  font-size: 14px;
  text-decoration: none;
  transition: color 150ms ease;
}
.footer-links a:hover { color: var(--text-primary); }
.footer-copy { font-size: 12.5px; color: var(--text-tertiary); }

/* ── Reveal (the ONE scroll animation) ───── */
/* Hidden only when JS is active (.js on <html>) — see lang.js */
.js .reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 400ms ease-out, transform 400ms ease-out;
}
.js .reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: 0.01ms !important; }
}

/* ── Responsive ──────────────────────────── */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hero { padding-top: 48px; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .steps-grid { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .features-grid { grid-template-columns: 1fr; }
  .hero-cta .btn { width: 100%; }
}
