/* ClipSpeak — shared styles. No build step, no external assets. */

:root {
  --bg: #fbfbfd;
  --nav-bg: rgba(251, 251, 253, 0.82);
  --surface: #ffffff;
  --panel: #f2f2f6;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: rgba(0, 0, 0, 0.1);
  --accent: #c8401a;
  --accent-ink: #ffffff;
  --accent-soft: rgba(200, 64, 26, 0.09);
  --shadow: 0 18px 44px rgba(29, 29, 31, 0.14);
  --kbd-bg: #ffffff;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f12;
    --nav-bg: rgba(15, 15, 18, 0.82);
    --surface: #17171b;
    --panel: #1c1c22;
    --ink: #f5f5f7;
    --muted: #9b9ba3;
    --line: rgba(255, 255, 255, 0.12);
    --accent: #ff7757;
    --accent-ink: #24100a;
    --accent-soft: rgba(255, 119, 87, 0.13);
    --shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
    --kbd-bg: #24242b;
  }
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

kbd {
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
  font-size: 0.82em;
  font-weight: 600;
  background: var(--kbd-bg);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 0.15em 0.5em;
  white-space: nowrap;
}

code {
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: var(--panel);
  border-radius: 6px;
  padding: 0.12em 0.4em;
}

pre {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  overflow-x: auto;
  margin: 1.2rem 0;
}
pre code { background: none; padding: 0; font-size: 0.88rem; }

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 56px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand:hover { text-decoration: none; }
.brand svg { width: 22px; height: 22px; color: var(--accent); flex: none; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 0.92rem;
  font-weight: 500;
}
.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--ink); text-decoration: none; }
.nav-links .btn { color: var(--accent-ink); }
@media (max-width: 720px) {
  .nav-links a:not(.btn) { display: none; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  padding: 0.78em 1.25em;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.07); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--panel); }
.nav .btn { padding: 0.55em 1em; font-size: 0.88rem; }

/* ---------- Type ---------- */

.eyebrow {
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
h1 {
  font-size: clamp(2.5rem, 6.5vw, 4.1rem);
  line-height: 1.04;
  letter-spacing: -0.032em;
  font-weight: 700;
}
h2 {
  font-size: clamp(1.7rem, 3.8vw, 2.35rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  font-weight: 700;
  margin-bottom: 0.6em;
}
h3 { font-size: 1.08rem; letter-spacing: -0.01em; margin-bottom: 0.35em; }
.lede { font-size: 1.16rem; color: var(--muted); max-width: 34em; }
.muted { color: var(--muted); }

/* ---------- Sections ---------- */

.section { padding: 88px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { max-width: 60ch; margin-bottom: 40px; }

/* ---------- Hero ---------- */

.hero { padding: 84px 0 96px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.hero-copy p.lede { margin: 20px 0 30px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-note { margin-top: 14px; font-size: 0.88rem; color: var(--muted); }
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero { padding: 56px 0 72px; }
}

/* ---------- Menu bar + popover mock (pure CSS) ---------- */

.mock-desktop {
  position: relative;
  background:
    radial-gradient(120% 90% at 85% 0%, var(--accent-soft), transparent 60%),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding-bottom: 26px;
  overflow: hidden;
}
.mbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 14px;
  font-size: 12px;
  color: var(--muted);
  background: color-mix(in srgb, var(--surface) 65%, transparent);
  border-bottom: 1px solid var(--line);
}
.mbar-left, .mbar-right { display: flex; align-items: center; gap: 14px; }
.mbar-left .app { font-weight: 700; color: var(--ink); }
.mbar-right svg { width: 14px; height: 14px; display: block; }
.mb-active {
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 5px;
  padding: 2px 5px;
  margin: -2px 0;
}
.mb-active svg { width: 15px; height: 15px; }
@media (max-width: 420px) {
  .mbar-left span:nth-child(n+3) { display: none; }
}

.pop {
  width: min(348px, calc(100% - 28px));
  margin: 14px 14px 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  font-size: 13.5px;
  position: relative;
}
.pop::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 26px;
  width: 12px;
  height: 12px;
  background: var(--surface);
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
  transform: rotate(45deg);
  border-top-left-radius: 3px;
}
.pop-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
}
.pop-title { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; }
.pop-title svg { width: 16px; height: 16px; color: var(--accent); }
.pop-toggle { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--muted); }
.switch {
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: var(--accent);
  position: relative;
  flex: none;
}
.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.pop-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 12px 10px;
  padding: 7px 10px;
  background: var(--panel);
  border-radius: 9px;
  color: var(--muted);
  font-size: 12.5px;
}
.pop-search svg { width: 13px; height: 13px; flex: none; }
.pop-search kbd { margin-left: auto; font-size: 10px; padding: 0.1em 0.4em; }
.pop-list { list-style: none; }
.pop-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 11px;
  align-items: center;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
}
.pop-item .text { min-width: 0; }
.pop-item .text p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.35;
}
.pop-item .text small {
  display: block;
  font-size: 10.5px;
  color: var(--muted);
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
  margin-top: 2px;
}
.pop-item .text small b { color: var(--accent); font-weight: 600; }
.play {
  width: 27px;
  height: 27px;
  border-radius: 50%;
  border: none;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.play svg { width: 11px; height: 11px; }
.pop-item.playing { background: var(--accent-soft); }
.pop-item.playing .play { background: var(--accent); color: var(--accent-ink); }
.star { color: var(--accent); display: inline-flex; }
.star svg { width: 14px; height: 14px; }
.eq { display: flex; align-items: flex-end; gap: 2.5px; height: 15px; }
.eq i {
  width: 3px;
  border-radius: 2px;
  background: var(--accent);
  height: 40%;
  animation: eq-bounce 1.05s ease-in-out infinite;
}
.eq i:nth-child(2) { animation-delay: 0.18s; }
.eq i:nth-child(3) { animation-delay: 0.36s; }
.eq i:nth-child(4) { animation-delay: 0.54s; }
@keyframes eq-bounce {
  0%, 100% { height: 30%; }
  50% { height: 100%; }
}
.pop-item.secret { color: var(--muted); }
.pop-item.secret .play { background: var(--panel); color: var(--muted); }
.pop-foot {
  border-top: 1px solid var(--line);
  padding: 8px 14px;
  font-size: 11px;
  color: var(--muted);
  text-align: center;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .eq i { animation: none; height: 70%; }
  .eq i:nth-child(2), .eq i:nth-child(4) { height: 40%; }
}

/* ---------- Cards ---------- */

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
}
.card p { font-size: 0.94rem; color: var(--muted); }
.card .app-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  margin-bottom: 8px;
}
.card .app-name svg { width: 18px; height: 18px; color: var(--muted); }
.card .issue-links { margin-top: 12px; font-size: 0.85rem; }
@media (max-width: 780px) { .cards { grid-template-columns: 1fr; } }

.punchline {
  margin-top: 36px;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

/* ---------- Language rows ---------- */

.lang-rows { display: grid; gap: 12px; max-width: 720px; }
.lang-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 20px;
}
.lang-row .from { font-size: 1.05rem; overflow-wrap: anywhere; }
.lang-row .arrow { color: var(--muted); }
.lang-row .to {
  text-align: right;
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
}
.lang-row .to small { display: block; color: var(--muted); font-weight: 400; margin-top: 2px; }
@media (max-width: 560px) {
  .lang-row { grid-template-columns: 1fr; gap: 6px; }
  .lang-row .arrow { display: none; }
  .lang-row .to { text-align: left; }
}

/* ---------- Feature list ---------- */

.feature-list { list-style: none; display: grid; gap: 14px; max-width: 640px; }
.feature-list li { display: grid; grid-template-columns: auto 1fr; gap: 12px; }
.feature-list .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 9px;
}
.feature-list b { font-weight: 650; }

/* ---------- Pricing ---------- */

.price-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 16px;
  align-items: stretch;
  max-width: 860px;
}
.price-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  background: var(--surface);
}
.price-card.them { background: transparent; color: var(--muted); }
.price-card.them ul, .price-card.us ul { list-style: none; margin-top: 16px; display: grid; gap: 9px; font-size: 0.94rem; }
.price-card.them li::before { content: "— "; }
.price-card.us { border-color: var(--accent); box-shadow: var(--shadow); }
.price-card.us li::before { content: "✓ "; color: var(--accent); font-weight: 700; }
.price-big {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}
.price-big small { display: block; margin-top: 8px; font-size: 1rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.price-card .btn { margin-top: 22px; }
.price-card h3 { margin-bottom: 10px; }
@media (max-width: 720px) { .price-grid { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */

.faq { max-width: 720px; }
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 4px 0;
}
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  font-weight: 600;
  padding: 14px 28px 14px 0;
  list-style: none;
  position: relative;
  letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-weight: 400;
  font-size: 1.2rem;
}
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); padding: 0 0 16px; max-width: 62ch; }
.faq details p + p { margin-top: -6px; }

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--line);
  padding: 48px 0 56px;
  font-size: 0.9rem;
  color: var(--muted);
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: space-between;
}
.footer h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink);
  margin-bottom: 10px;
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
}
.footer ul { list-style: none; display: grid; gap: 7px; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--ink); }
.footer .fine { margin-top: 36px; font-size: 0.8rem; }

/* ---------- Article pages ---------- */

.article { padding: 64px 0 88px; }
.article-body { max-width: 70ch; }
.article-body h1 { font-size: clamp(2rem, 5vw, 2.9rem); margin-bottom: 0.4em; }
.article-body .lede { margin-bottom: 2.2rem; }
.article-body h2 { font-size: 1.45rem; margin: 2.4em 0 0.5em; }
.article-body h3 { font-size: 1.1rem; margin: 1.8em 0 0.3em; }
.article-body p { margin: 0.9em 0; }
.article-body ul, .article-body ol { margin: 0.9em 0 0.9em 1.4em; }
.article-body li { margin: 0.45em 0; }
.article-body li::marker { color: var(--accent); }
.callout {
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 14px;
  padding: 20px 22px;
  margin: 2.2rem 0;
}
.callout p { margin: 0.4em 0; }
.callout .btn { margin-top: 10px; }
.article-meta {
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
