/* DiffCue marketing site — shared styles. Depends on tokens.css. */

/* ============ Reset ============ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body, h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: none; padding: 0; }
a { color: inherit; }
input { font: inherit; }

/* ============ Base ============ */
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: var(--text-base);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.mono { font-family: var(--font-mono); }

h1, h2, h3 { font-weight: 650; letter-spacing: -0.03em; text-wrap: balance; color: var(--ink); }
p { text-wrap: pretty; }
code { font-family: var(--font-mono); font-size: 0.9em; background: var(--surface); padding: 0.1em 0.4em; border-radius: 4px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; top: -48px; left: 12px; z-index: 200;
  background: var(--brand); color: #fff; padding: 10px 16px;
  border-radius: var(--radius-md); font-size: var(--text-sm); font-weight: 600;
  transition: top 160ms var(--ease-out-expo);
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.hero :focus-visible,
.mockup-section :focus-visible { outline-color: var(--on-chrome); }

.container {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section-space { padding-block: var(--section-space); }

.section-intro { max-width: 62ch; margin-bottom: clamp(36px, 5vw, 56px); }
.section-intro h2 { font-size: var(--text-2xl); margin-bottom: 14px; }
.section-intro p { font-size: var(--text-lg); color: var(--ink-soft); }

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: var(--radius-md);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms var(--ease-out-expo), color 160ms var(--ease-out-expo), border-color 160ms var(--ease-out-expo);
  white-space: nowrap;
}
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--paper), 0 0 0 6px var(--brand-ring); }

.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-card); }
.btn-primary:hover { background: var(--brand-hover); }

.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--border-2); }
.btn-ghost:hover { border-color: var(--muted); }
.hero .btn-ghost { color: var(--on-chrome); border-color: rgba(255,255,255,0.4); }
.hero .btn-ghost:hover { border-color: var(--on-chrome); background: rgba(255,255,255,0.08); }

.btn-lg { font-size: var(--text-base); padding: 14px 24px; }
.btn-sm { font-size: var(--text-sm); padding: 8px 16px; }
.btn-xs { font-size: var(--text-xs); padding: 8px 14px; }

/* ============ Header / Nav ============ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; gap: 24px;
  min-height: 68px;
}
.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 650; letter-spacing: -0.01em;
  color: var(--ink); text-decoration: none; flex: none;
}
.wordmark .mark { color: var(--brand); flex: none; }

.nav-toggle {
  display: none;
  flex-direction: column; justify-content: center; gap: 4px;
  width: 36px; height: 36px; margin-left: auto;
  border-radius: var(--radius-sm);
}
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 200ms var(--ease-out-expo), opacity 200ms var(--ease-out-expo); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.site-nav {
  margin-left: auto;
  display: flex; align-items: center; gap: 28px;
}
.site-nav a:not(.btn) {
  font-size: var(--text-sm); font-weight: 550; color: var(--ink-soft);
  text-decoration: none;
}
.site-nav a:not(.btn):hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); }

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    margin-left: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--border);
    padding: 8px var(--gutter) 16px;
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a:not(.btn) { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .site-nav .btn { margin-top: 14px; align-self: flex-start; }
}

/* ============ Hero ============ */
.hero {
  background: var(--brand);
  color: var(--on-chrome);
  padding-block: clamp(72px, 12vw, 132px) clamp(64px, 10vw, 108px);
}
.hero-inner { max-width: 860px; }
.hero-heading {
  font-size: var(--text-hero);
  line-height: 1.04;
  letter-spacing: -0.04em;
  color: #fff;
  max-width: 18ch;
}
.hero-sub {
  margin-top: 22px;
  font-size: var(--text-lg);
  line-height: 1.55;
  color: rgba(255,255,255,0.86);
  max-width: 52ch;
}
.hero-cta-row {
  margin-top: 36px;
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center;
}
.hero-fact {
  margin-top: 22px;
  font-size: 12.5px;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.01em;
}

@keyframes hero-in { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.hero-heading, .hero-sub, .hero-cta-row, .hero-fact {
  opacity: 0;
  animation: hero-in var(--dur-hero) var(--ease-out-expo) forwards;
}
.hero-heading { animation-delay: 0ms; }
.hero-sub { animation-delay: 110ms; }
.hero-cta-row { animation-delay: 220ms; }
.hero-fact { animation-delay: 300ms; }

/* ============ Scroll reveal ============ */
[data-reveal] {
  opacity: 0; transform: translateY(18px);
  transition: opacity var(--dur-reveal) var(--ease-out-expo), transform var(--dur-reveal) var(--ease-out-expo);
}
[data-reveal].is-visible { opacity: 1; transform: none; }

.section-intro > *:nth-child(1) { transition-delay: 0ms; }
.section-intro > *:nth-child(2) { transition-delay: 90ms; }

.compare-list > li:nth-child(1) { transition-delay: 0ms; }
.compare-list > li:nth-child(2) { transition-delay: 70ms; }
.compare-list > li:nth-child(3) { transition-delay: 140ms; }
.compare-list > li:nth-child(4) { transition-delay: 210ms; }
.compare-list > li:nth-child(5) { transition-delay: 280ms; }

.steps-list > li:nth-child(1) { transition-delay: 0ms; }
.steps-list > li:nth-child(2) { transition-delay: 90ms; }
.steps-list > li:nth-child(3) { transition-delay: 180ms; }
.steps-list > li:nth-child(4) { transition-delay: 270ms; }

.pricing-facts > li:nth-child(1) { transition-delay: 0ms; }
.pricing-facts > li:nth-child(2) { transition-delay: 60ms; }
.pricing-facts > li:nth-child(3) { transition-delay: 120ms; }
.pricing-facts > li:nth-child(4) { transition-delay: 180ms; }

@media (prefers-reduced-motion: reduce) {
  .hero-heading, .hero-sub, .hero-cta-row, .hero-fact { animation: none; opacity: 1; transform: none; }
  [data-reveal] { transition: none; opacity: 1; transform: none; }
}

/* ============ Product mockup section ============ */
.mockup-section {
  background: var(--chrome);
  color: var(--on-chrome);
  padding-block: var(--section-space);
}
.mockup-section .section-intro h2 { color: var(--on-chrome); }
.mockup-section .section-intro p { color: var(--on-chrome-muted); }

.app-window {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-window);
  border: 1px solid var(--chrome-border);
}

.app-titlebar {
  height: 44px; flex: none;
  display: flex; align-items: center; gap: 14px; padding: 0 16px;
  background: linear-gradient(var(--surface-2), var(--surface));
  border-bottom: 1px solid var(--border);
}
.traffic-lights { display: flex; gap: 8px; align-items: center; flex: none; }
.traffic-lights span { width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 0 0.5px rgba(0,0,0,.14) inset; }
.tl-red { background: #F45C4F; }
.tl-yellow { background: #F6BE4F; }
.tl-green { background: #61C554; }
.app-title {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: #2A2723; letter-spacing: -0.01em;
}
.app-title-sub { font-weight: 500; color: var(--muted); }
.app-titlebar-spacer { width: 76px; flex: none; }

.app-toolbar {
  height: 52px; display: flex; align-items: center; gap: 14px; padding: 0 16px;
  border-bottom: 1px solid var(--border); background: var(--surface-2);
  flex-wrap: wrap; row-gap: 6px;
}
.toolbar-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; color: #2A2723;
  background: #fff; border: 1px solid var(--border-2); border-radius: 7px; padding: 6px 12px 6px 9px;
}
.active-file { font-size: 12.5px; font-weight: 500; color: #2A2723; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { font-size: 11px; font-weight: 600; width: 20px; height: 20px; border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.badge-m { background: #EDEAFB; color: #4239A4; }
.toolbar-spacer { margin-left: auto; }
.hunk-label { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.stepper { display: flex; border: 1px solid var(--border-2); border-radius: 7px; overflow: hidden; background: #fff; margin-left: 10px; }
.stepper button { width: 32px; height: 28px; color: #56524C; font-size: 13px; border-right: 1px solid var(--border); }
.stepper button:last-child { border-right: none; }

.app-body { display: flex; min-height: 0; }
.diff-pane { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--paper); }
.diff-pane-head {
  display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--border);
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted-2);
}
.diff-pane-head span { padding: 8px 16px; }
.diff-pane-head span:first-child { border-right: 1px solid var(--border); }

.diff-scroll { padding: 14px 14px 20px; }
.hunk-card { border-radius: 9px; overflow: hidden; border: 1px solid #C9C4F2; box-shadow: 0 0 0 3px rgba(79,70,196,.12); }
.hunk-head { display: flex; align-items: center; gap: 10px; padding: 7px 12px; background: #F4F3FD; border-bottom: 1px solid var(--border); }
.hunk-head .mono { font-size: 11px; color: var(--muted); }
.hunk-tag { margin-left: auto; font-size: 11px; font-weight: 600; color: var(--brand); }

.diff-row { display: grid; grid-template-columns: 1fr 1fr; font-family: var(--font-mono); font-size: 12px; line-height: 1.65; }
.diff-cell { display: flex; min-height: 20px; background: #fff; }
.diff-cell.diff-left { border-right: 1px solid var(--border); }
.diff-cell .ln { flex: none; width: 40px; text-align: right; padding-right: 8px; color: var(--muted-2); user-select: none; }
.diff-cell .code { white-space: pre-wrap; word-break: break-word; padding-right: 8px; color: #4A463F; }
.diff-cell.is-del { background: var(--del-bg); }
.diff-cell.is-del .code { color: var(--del-fg); }
.diff-cell.is-add { background: var(--add-bg); }
.diff-cell.is-add .code { color: var(--add-fg); }
.diff-cell.is-blank { background: var(--diff-blank); }

.side-panel { width: 340px; flex: none; border-left: 1px solid var(--border); background: var(--surface); display: flex; flex-direction: column; }
.side-panel-head { padding: 18px 20px 16px; border-bottom: 1px solid var(--border); }
.side-panel-top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.side-panel-top .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); flex: none; }
.side-label { font-size: 11.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brand); }
.side-loc { margin-left: auto; font-size: 11px; color: var(--muted-2); }
.side-explain { font-size: 13.5px; line-height: 1.55; color: #33302B; }
.side-points { list-style: none; margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.side-points li { display: flex; gap: 8px; font-size: 12.5px; line-height: 1.5; color: var(--ink-soft); }
.side-points li::before { content: "—"; color: var(--muted-2); flex: none; }

.chat-thread { flex: 1; padding: 16px 20px; display: flex; flex-direction: column; gap: 10px; }
.chat-msg { max-width: 92%; font-size: 13px; line-height: 1.55; padding: 9px 12px; border-radius: 11px; }
.chat-user { align-self: flex-end; background: var(--brand); color: #fff; }
.chat-ai { align-self: flex-start; background: #fff; color: #33302B; border: 1px solid var(--border); }

.chat-controls { padding: 12px 20px 18px; border-top: 1px solid var(--border); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.chip-btn { font-size: 12px; color: var(--ink-soft); background: #fff; border: 1px solid var(--border-2); border-radius: var(--radius-pill); padding: 5px 11px; }
.chat-fake-form { display: flex; gap: 8px; align-items: center; }
.chat-fake-input { flex: 1; min-width: 0; font-size: 13px; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--border-2); background: #fff; color: var(--muted); }

.mockup-caption { margin-top: 18px; font-size: 12.5px; color: var(--on-chrome-muted); text-align: center; }

@media (max-width: 860px) {
  .app-body { flex-direction: column; }
  .side-panel { width: auto; border-left: none; border-top: 1px solid var(--border); }
}

@media (max-width: 640px) {
  .diff-row { grid-template-columns: 1fr; }
  .diff-cell.diff-left { border-right: none; border-bottom: 1px solid var(--border); }
  .diff-cell.is-blank { display: none; }
  .app-title { font-size: 12px; }
  .diff-scroll { padding: 10px 10px 16px; }
}

/* ============ Differentiation ============ */
.compare-list { list-style: none; border-top: 1px solid var(--border); }
.compare-list li {
  padding: 26px 0; border-bottom: 1px solid var(--border);
  font-size: var(--text-lg); line-height: 1.6; color: var(--ink-soft);
}
.compare-list li strong { color: var(--ink); font-weight: 650; }

/* ============ How it works ============ */
.steps-list { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.steps-list li { display: flex; flex-direction: column; gap: 10px; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border-2);
  font-size: 13px; color: var(--ink-soft);
}
.steps-list h3 { font-size: var(--text-lg); letter-spacing: -0.01em; }
.steps-list p { font-size: 14.5px; line-height: 1.6; color: var(--ink-soft); }

@media (max-width: 860px) {
  .steps-list { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .steps-list { grid-template-columns: 1fr; }
}

/* ============ Pricing ============ */
.pricing-panel {
  max-width: 620px;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface); padding: clamp(32px, 5vw, 48px);
}
.price-figure { display: flex; align-items: baseline; gap: 10px; margin: 20px 0 28px; }
.price-amount { font-size: clamp(2.75rem, 2rem + 3vw, 3.5rem); font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
.price-period { font-size: var(--text-base); color: var(--muted); }
.pricing-facts { list-style: none; display: flex; flex-direction: column; gap: 14px; margin-bottom: 30px; }
.pricing-facts li { display: flex; gap: 10px; font-size: 15px; line-height: 1.5; color: var(--ink-soft); }
.pricing-facts li svg { flex: none; margin-top: 3px; }
.pricing-fineprint { margin-top: 16px; font-size: 13px; color: var(--muted); line-height: 1.5; }

/* ============ Footer ============ */
.site-footer { border-top: 1px solid var(--border); padding-block: 48px; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; }
.footer-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; color: var(--ink); font-size: 14px; }
.footer-brand .mark { color: var(--brand); }
.footer-meta { font-size: 13.5px; color: var(--ink-soft); }
.footer-links { display: flex; gap: 20px; margin-left: auto; }
.footer-links a { font-size: 13.5px; color: var(--ink-soft); text-decoration: none; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; }
.footer-copy { width: 100%; font-size: 12.5px; color: var(--muted); }

@media (max-width: 640px) {
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-links { margin-left: 0; }
}

/* ============ Privacy / prose page ============ */
.page-header { padding-block: clamp(56px, 9vw, 96px) clamp(28px, 5vw, 40px); }
.page-header h1 { font-size: var(--text-2xl); }
.page-header .updated { margin-top: 12px; font-size: 13px; color: var(--muted); }

.prose { max-width: var(--prose-max); padding-block: 0 var(--section-space); }
.prose h2 { font-size: var(--text-xl); margin-top: 44px; margin-bottom: 14px; letter-spacing: -0.02em; }
.prose h2:first-child { margin-top: 0; }
.prose p { font-size: 15.5px; line-height: 1.75; color: var(--ink-soft); margin-bottom: 16px; }
.prose ul { margin: 0 0 16px; padding-left: 1.2em; display: flex; flex-direction: column; gap: 8px; }
.prose li { font-size: 15.5px; line-height: 1.7; color: var(--ink-soft); }
.prose li strong { color: var(--ink); }
.prose a { color: var(--brand); text-decoration: underline; text-decoration-color: var(--brand-tint); text-underline-offset: 2px; }
.prose a:hover { color: var(--brand-hover); }
