/* ================================================
   COPYNSYNC — Landing Page

   Typography: DM Sans (body) + Space Grotesk (section headers) + Instrument Serif (display italic)
   Palette: near-black bg, brighter off-white text, lighter blue accent
   ================================================ */

:root {
  --bg: #0a0a0b;
  --surface: #111113;
  --line: rgba(255,255,255,0.06);
  --line2: rgba(255,255,255,0.10);
  --text: #f5f3f0;
  --text2: #cbc6c0;
  --text3: #938d88;
  --accent: #93a3ff;
  --accent-dim: rgba(147,163,255,0.12);
  --accent-mid: rgba(147,163,255,0.22);
  --nav-bg: rgba(10,10,11,0.8);
  --nav-link: var(--text2);
  --soft-fill: rgba(255,255,255,0.04);
  --soft-panel: rgba(255,255,255,0.015);
  --chrome-dot: rgba(255,255,255,0.08);
  --preview-glow: rgba(147,163,255,0.10);
  --preview-border: rgba(255,255,255,0.06);
  --preview-bg: #0b0d10;
  --theme-toggle-bg: rgba(255,255,255,0.03);
  --theme-toggle-hover: rgba(255,255,255,0.06);
  --brand-mark-filter: none;
  --mesh-line: rgba(255,255,255,0.05);
  --mesh-fade: rgba(10,10,11,0.22);
  --noise-opacity: 0.1;
  --red: #ef6461;
  --red-dim: rgba(239,100,97,0.08);
  --mono: 'Space Mono', monospace;
  --sans: 'DM Sans', system-ui, sans-serif;
  --display: 'Space Grotesk', 'DM Sans', system-ui, sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;
}

:root[data-theme='light'] {
  --bg: #f3f0ea;
  --surface: #ffffff;
  --line: rgba(26,27,75,0.14);
  --line2: rgba(46,42,232,0.24);
  --text: #111111;
  --text2: #514c46;
  --text3: #706961;
  --accent: #465dff;
  --accent-dim: rgba(70,93,255,0.12);
  --accent-mid: rgba(70,93,255,0.22);
  --nav-bg: rgba(248,246,241,0.94);
  --nav-link: #46413b;
  --soft-fill: rgba(26,27,75,0.06);
  --soft-panel: rgba(26,27,75,0.04);
  --chrome-dot: rgba(26,27,75,0.14);
  --preview-glow: rgba(70,93,255,0.12);
  --preview-border: rgba(26,27,75,0.12);
  --preview-bg: #edf1ff;
  --theme-toggle-bg: rgba(26,27,75,0.05);
  --theme-toggle-hover: rgba(26,27,75,0.10);
  --brand-mark-filter: brightness(0) saturate(100%);
  --mesh-line: rgba(26,27,75,0.07);
  --mesh-fade: rgba(243,240,234,0.38);
  --noise-opacity: 0.06;
  --red-dim: rgba(239,100,97,0.10);
}

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

html {
  scroll-behavior: smooth;
  scrollbar-width: none;
}
html::-webkit-scrollbar { display: none; }

body {
  position: relative;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  isolation: isolate;
  transition: background-color 0.25s ease, color 0.25s ease;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(var(--mesh-fade), var(--mesh-fade)),
    linear-gradient(to right, var(--mesh-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--mesh-line) 1px, transparent 1px);
  background-size: 100% 100%, 72px 72px, 72px 72px;
  background-position: center;
  mask-image: radial-gradient(circle at top center, black 0%, rgba(0,0,0,0.82) 46%, transparent 88%);
  -webkit-mask-image: radial-gradient(circle at top center, black 0%, rgba(0,0,0,0.82) 46%, transparent 88%);
}

body > * {
  position: relative;
  z-index: 1;
}

/* ---- Selection ---- */
::selection {
  background: var(--accent);
  color: var(--bg);
}

/* ---- Links ---- */
a { color: inherit; text-decoration: none; }

/* ---- Layout ---- */
section {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ---- Nav ---- */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px;
  height: 52px;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.brand-mark {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.theme-adaptive-brand {
  filter: var(--brand-mark-filter);
}
.nav-brand-mark,
.footer-brand-mark {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.nav-right {
  display: flex; align-items: center; gap: 28px;
}
.nav-right a {
  font-size: 13px;
  color: var(--nav-link);
  transition: color 0.2s;
}
.nav-right a:hover { color: var(--text); }
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line2);
  border-radius: 999px;
  background: var(--theme-toggle-bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.theme-toggle:hover {
  background: var(--theme-toggle-hover);
  border-color: var(--accent-mid);
}
.theme-toggle-icon {
  width: 15px;
  height: 15px;
  color: var(--accent);
}
.theme-toggle-label {
  line-height: 1;
}
.nav-x iconify-icon {
  width: 15px;
  height: 15px;
}

/* ================================================
   HERO
   ================================================ */
.hero {
  padding: 148px 32px 28px;
}
.hero-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 40px;
}
.hero h1 {
  font-size: clamp(38px, 5.5vw, 56px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.035em;
  color: var(--text);
}
.hero h1 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
}
.hero-h1-alt {
  margin-top: 4px;
  margin-bottom: 40px;
  color: var(--text2) !important;
}
.hero-p {
  max-width: 520px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text2);
}

.section-head {
  margin-bottom: 28px;
}
.section-head h2 {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}
.section-head p {
  max-width: 560px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text2);
}

/* ================================================
   NUMBERS
   ================================================ */
.numbers {
  display: flex;
  gap: 0;
  padding: 64px 32px;
  border-top: 1px solid var(--line);
}
.number-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.number-item + .number-item {
  border-left: 1px solid var(--line);
  padding-left: 40px;
}
.n-val {
  font-family: var(--mono);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}
.n-unit {
  font-size: 18px;
  font-weight: 400;
  color: var(--text2);
}
.n-context {
  font-size: 13px;
  color: var(--text3);
  line-height: 1.5;
  max-width: 280px;
}
.count {
  display: inline-block;
}

/* ================================================
   CODE
   ================================================ */
.code-section {
  padding: 64px 32px;
}
.code-window {
  background: var(--surface);
  border: 1px solid var(--line2);
  border-radius: 12px;
  overflow: hidden;
}
.code-chrome {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--soft-panel);
}
.dots {
  display: flex; gap: 6px;
}
.dots i {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--chrome-dot);
  display: block;
}
.code-tabs {
  display: flex; gap: 0;
  margin-left: 8px;
}
.ct {
  background: none; border: none; cursor: pointer;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text3);
  padding: 4px 12px;
  border-radius: 4px;
  transition: all 0.15s;
}
.ct.active {
  color: var(--text2);
  background: var(--soft-fill);
}
.ct:hover:not(.active) { color: var(--text2); }
.code-body {
  padding: 24px;
  margin: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.code-body::-webkit-scrollbar { display: none; }
.code-body.hidden { display: none; }
.preview-window {
  overflow: hidden;
}
.preview-body {
  padding: 28px;
  background:
    radial-gradient(circle at top, var(--preview-glow), transparent 36%),
    linear-gradient(180deg, var(--soft-panel), rgba(255,255,255,0));
}
.preview-image {
  width: 100%;
  display: block;
  border-radius: 18px;
}
.mobile-image {
  max-width: 420px;
  margin: 0 auto;
}

/* ================================================
   WHY
   ================================================ */
.why {
  padding: 80px 32px;
}
.why-header {
  margin-bottom: 48px;
}
.why-header h2 {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}
.why-header p {
  max-width: 560px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text2);
}
.why-header em {
  font-family: var(--serif);
  font-style: italic;
}
.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 32px;
}
.why-card {
  padding: 28px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.accent-card {
  border-color: rgba(123,140,255,0.16);
  background: linear-gradient(135deg, rgba(123,140,255,0.05), transparent);
}
.why-label {
  font-family: var(--display);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
}
.bad-label { color: var(--text3); }
.good-label { color: var(--accent); }
.why-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}
.ws {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text2);
  line-height: 1.5;
}
.ws-n {
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  border-radius: 5px;
  background: var(--soft-fill);
  color: var(--text3);
  flex-shrink: 0;
}
.ws-n.gn {
  background: var(--accent-dim);
  color: var(--accent);
}
.why-bottom {
  display: flex;
  gap: 16px;
  padding: 12px 16px;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 12px;
}
.bad-bottom {
  background: var(--red-dim);
  color: var(--red);
}
.good-bottom {
  background: var(--accent-dim);
  color: var(--accent);
}

.latency-note {
  padding: 20px 24px;
  border-left: 2px solid var(--accent);
  background: var(--accent-dim);
  border-radius: 0 8px 8px 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text2);
}
.latency-note strong {
  color: var(--text);
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ================================================
   OUTPUT
   ================================================ */
.output {
  padding: 80px 32px;
  border-top: 1px solid var(--line);
}
.output h2 {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}
.output-sub {
  color: var(--text2);
  font-size: 15px;
  margin-bottom: 36px;
}
.output-note {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text2);
}
.story-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
.story-card {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.card-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  border-radius: 14px;
  background: var(--soft-fill);
  color: var(--accent);
}
.card-icon iconify-icon {
  width: 22px;
  height: 22px;
}
.story-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 28px;
  padding: 0 6px;
  border-radius: 6px;
  margin-bottom: 14px;
  background: var(--accent-dim);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.story-card h3 {
  font-family: var(--display);
  font-size: 18px;
  line-height: 1.3;
  margin-bottom: 10px;
  color: var(--text);
}
.story-card p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text2);
}

/* ================================================
   FALLBACK
   ================================================ */
.fallback {
  padding: 80px 32px;
  border-top: 1px solid var(--line);
}
.fallback h2 {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}
.fallback-sub {
  color: var(--text2);
  font-size: 15px;
  line-height: 1.7;
  max-width: 560px;
  margin-bottom: 36px;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 36px;
}
.detail-card {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.detail-card h3 {
  font-family: var(--display);
  font-size: 17px;
  line-height: 1.3;
  margin-bottom: 10px;
  color: var(--text);
}
.detail-card p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text2);
}

/* ================================================
   INSTALL
   ================================================ */
.install {
  padding: 80px 32px;
  border-top: 1px solid var(--line);
}
.install h2 {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}
.install-sub {
  color: var(--text2);
  font-size: 15px;
  margin-bottom: 36px;
}
.release-status {
  margin-bottom: 28px;
  color: var(--text3);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.release-status[data-state='loading'] {
  color: var(--accent);
}
.release-status[data-state='fallback'] {
  color: var(--text2);
}
.release-status[data-state='error'] {
  color: var(--red);
}
.install-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: 720px;
  margin: 0 auto;
}
.install-card {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.platform-card {
  padding: 28px;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
}
.platform-title {
  font-family: var(--display);
  display: block;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 10px;
}
.platform-copy {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text2);
  margin-bottom: 0;
}
.download-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.download-option-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.download-option-icon iconify-icon {
  width: 18px;
  height: 18px;
}
.download-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  white-space: nowrap;
  position: relative;
}
.download-btn span:last-child {
  white-space: nowrap;
}
.download-btn.is-loading,
.download-btn[aria-disabled='true'] {
  pointer-events: none;
  opacity: 0.78;
}
.download-btn.is-loading::after {
  content: '';
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  flex-shrink: 0;
  animation: download-spin 0.8s linear infinite;
}

@keyframes download-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ================================================
   API
   ================================================ */
.api {
  padding: 80px 32px;
  border-top: 1px solid var(--line);
}
.api h2 {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 48px;
}
.api-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.api-item {
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 160px 1fr auto;
  gap: 24px;
  align-items: start;
}
.api-item:first-child { border-top: 1px solid var(--line); }
.api-name {
  font-family: var(--display);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
}
.api-item p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text2);
}
.api-ret {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text3);
  white-space: nowrap;
}

/* ================================================
   CTA
   ================================================ */
.cta {
  padding: 88px 32px 64px;
}
.cta-inner {
  text-align: center;
}
.cta-inner h2 {
  font-family: var(--display);
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin-bottom: 16px;
}
.cta-inner p {
  font-size: 14px;
  color: var(--text3);
  margin-bottom: 0;
}
.cta-btn {
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
}
.cta-btn.primary {
  background: var(--text);
  color: var(--bg);
}
.cta-btn.primary:hover {
  opacity: 0.85;
}
.cta-btn.secondary {
  border: 1px solid var(--line2);
  background: transparent;
  color: var(--text2);
}
.cta-btn.secondary:hover:not(:disabled) {
  border-color: var(--text3);
  color: var(--text);
}
.cta-btn:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}
.cta-btn.secondary:disabled {
  border-color: var(--line);
  color: var(--text3);
}

/* ================================================
   FOOTER
   ================================================ */
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 40px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--text3);
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}
.footer-brand span {
  font-family: var(--mono);
  font-weight: 700;
}

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 768px) {
  section { padding-left: 20px; padding-right: 20px; }
  nav { padding: 0 20px; }
  .nav-right { gap: 14px; }
  .nav-logo span {
    display: none;
  }
  .theme-toggle {
    padding: 0 10px;
  }
  .theme-toggle-label {
    display: none;
  }
  .numbers { flex-direction: column; gap: 32px; }
  .number-item + .number-item { border-left: none; padding-left: 0; border-top: 1px solid var(--line); padding-top: 32px; }
  .why-grid, .install-grid, .story-grid, .detail-grid { grid-template-columns: 1fr; }
  .api-item { grid-template-columns: 1fr; gap: 8px; }
  .platform-card { min-height: 0; }
  .preview-body { padding: 18px; }
  footer {
    padding: 24px 20px;
  }
}

/* ================================================
   REVEAL ANIMATION (subtle)
   ================================================ */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ================================================
   CONTRIBUTE
   ================================================ */
.contribute {
  padding: 80px 32px;
  border-top: 1px solid var(--line);
}
.contribute h2 {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 40px;
}
.contrib-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.contrib-card {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: border-color 0.3s, transform 0.3s;
}
.contrib-card:hover {
  border-color: var(--line2);
  transform: translateY(-2px);
}
.contrib-card h3 {
  font-family: var(--display);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text);
}
.contrib-card p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text2);
}
.detail-card .card-icon,
.contrib-card .card-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  margin-bottom: 16px;
  border-radius: 8px;
  background: var(--accent-dim);
  line-height: 0;
}
.detail-card .card-icon iconify-icon,
.contrib-card .card-icon iconify-icon {
  display: block;
  width: 20px;
  height: 20px;
}

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

/* ================================================
   HONEST NOTE
   ================================================ */
.honest {
  padding: 0 32px;
  margin-top: -20px;
  margin-bottom: 28px;
}
.honest-card {
  padding: 28px 32px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.honest-card h3 {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
}
.honest-card p {
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--text2);
  max-width: 600px;
}
.honest-card p + p { margin-top: 10px; }
.honest-card strong { color: var(--text); }
.honest-card em {
  font-family: var(--serif);
  font-style: italic;
}

/* ================================================
   WORKS BEST
   ================================================ */
.works-best {
  padding: 80px 32px;
  border-top: 1px solid var(--line);
}
.works-best h2 {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}
.works-sub {
  color: var(--text2);
  font-size: 15px;
  line-height: 1.7;
  max-width: 560px;
  margin-bottom: 40px;
}
.works-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.works-card {
  padding: 28px 32px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.works-card.best {
  border-color: rgba(123,140,255,0.16);
  background: linear-gradient(135deg, rgba(123,140,255,0.05), transparent);
}
.works-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.works-badge {
  font-family: var(--display);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 4px;
}
.best-badge { background: var(--accent-dim); color: var(--accent); }
.mostly-badge { background: rgba(251,191,36,0.08); color: #fbbf24; }
.fallback-badge { background: var(--red-dim); color: var(--red); opacity: 0.8; }
.works-pct {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text3);
}
.works-desc {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text2);
  margin-bottom: 16px;
  max-width: 600px;
}
.works-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.works-card li {
  font-size: 13px;
  color: var(--text3);
  line-height: 1.5;
}
.works-card li strong {
  color: var(--text2);
}

/* ---- Footer link ---- */
.footer-link {
  color: var(--text2);
  transition: color 0.2s;
}
.footer-link:hover { color: var(--accent); }

/* ---- X link in nav ---- */
.nav-x { display: flex; }

/* ================================================
   ANIMATIONS
   ================================================ */

/* Staggered hero entrance */
.hero-eyebrow,
.hero h1,
.hero-h1-alt,
.hero-p {
  opacity: 0;
  /* transform: translateY(16px); */
  animation: rise 0.7s ease forwards;
}
.hero-eyebrow  { animation-delay: 0.1s; }
.hero h1       { animation-delay: 0.25s; }
.hero-h1-alt   { animation-delay: 0.4s; }
.hero-p        { animation-delay: 0.55s; }

@keyframes rise {
  to { opacity: 1; transform: none; }
}

/* Number items entrance */
.number-item {
  opacity: 0;
  /* transform: translateY(12px); */
  animation: rise 0.5s ease forwards;
}
.number-item:nth-child(1) { animation-delay: 0.7s; }
.number-item:nth-child(2) { animation-delay: 0.85s; }
.number-item:nth-child(3) { animation-delay: 1.0s; }

/* Subtle pulse on hover for cards */
.why-card, .works-card, .install-card {
  /* transition: border-color 0.3s ease, transform 0.3s ease; */
}
.why-card:hover, .works-card:hover, .install-card:hover {
  border-color: var(--line2);
  /* transform: translateY(-2px); */
}

/* Code window lift */
.code-window {
  /* transition: box-shadow 0.4s ease, transform 0.3s ease; */
}
.code-window:hover {
  box-shadow: 0 16px 64px rgba(0,0,0,0.4);
  /* transform: translateY(-2px); */
}

/* Counter flash on complete */
@keyframes flash {
  0% { color: var(--text); }
  50% { color: var(--accent); }
  100% { color: var(--text); }
}
.count.done {
  animation: flash 0.6s ease;
}

/* Responsive adjustments for new sections */
@media (max-width: 768px) {
  .works-grid { gap: 12px; }
  .honest-card { padding: 20px; }
}
