/* ============================================================
   Avon Client — site styles
   Mobile-first. Breakpoints: 720 / 900 / 1024.
   ============================================================ */

/* ---------- reset + base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
svg { display: block; }
a { color: var(--accent); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--accent-hover); }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
[hidden] { display: none !important; }
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: var(--on-accent);
  padding: 10px 16px; font-size: 14px; font-weight: 600; border-radius: 0 0 var(--r-ctl) 0;
}
.skip-link:focus { left: 0; top: 0; }

/* ---------- layout ---------- */
.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: 56px; }
@media (min-width: 768px) { .section { padding-block: 96px; } }
.section-head { margin-bottom: var(--s-5); max-width: 60ch; }
.section-head .eyebrow { display: block; margin-bottom: var(--s-2); }
.section-head p { color: var(--text-2); font-size: 15px; max-width: 56ch; margin-top: var(--s-2); }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: 40px; line-height: 1.05; }
h2 { font-size: 28px; line-height: 1.1; }
h3 { font-size: 20px; line-height: 1.2; letter-spacing: -0.01em; }
@media (min-width: 768px) {
  h1 { font-size: 56px; }
  h2 { font-size: 40px; }
  h3 { font-size: 28px; }
}
p { margin: 0; }
.lead { color: var(--text-2); font-size: 16px; line-height: 1.65; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 400;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent);
}
.mono { font-family: var(--font-mono); }
.path {
  font-family: var(--font-mono); font-size: 13px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 4px;
  padding: 2px 7px; white-space: nowrap;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: 15px; line-height: 1;
  padding: 15px 22px; border-radius: var(--r-ctl); border: 1px solid transparent;
  cursor: pointer; text-align: center;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), box-shadow var(--t-fast);
}
.btn svg { flex: none; }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow-lift); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-primary .ver { font-family: var(--font-mono); font-size: 12px; font-weight: 400; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent-dim); color: var(--text); }
.btn-sm { padding: 11px 16px; font-size: 14px; }
.btn-block { width: 100%; justify-content: center; }

/* ---------- header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(8, 9, 11, 0.86);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: var(--s-4); height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.brand b { font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.brand .sub { font-weight: 500; color: var(--text-2); }
.nav-links { display: none; margin-left: auto; align-items: center; gap: var(--s-4); }
.nav-links a { color: var(--text-2); font-size: 14px; font-weight: 500; }
.nav-links a:hover { color: var(--text); }
.nav-links a[aria-current="page"] { color: var(--text); }
.nav-cta { display: none; }
@media (min-width: 900px) {
  .nav-links { display: flex; }
  .nav-cta { display: inline-flex; }
  .nav-toggle { display: none; }
}
.nav-cta { margin-left: 0; }
.nav .spacer { margin-left: auto; }
.nav-toggle {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; padding: 9px; margin-left: auto;
  background: transparent; border: 1px solid var(--line); border-radius: var(--r-ctl);
  cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; background: var(--text); border-radius: 1px; transition: transform var(--t-fast), opacity var(--t-fast); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-panel { display: none; }
.nav-panel.open { display: block; border-top: 1px solid var(--line); padding: var(--s-3) var(--gutter) var(--s-4); }
.nav-panel a { display: block; padding: 12px 0; color: var(--text-2); font-size: 16px; font-weight: 500; border-bottom: 1px solid var(--line); }
.nav-panel a:hover { color: var(--text); }
.nav-panel .btn { margin-top: var(--s-3); border-bottom: none; display: flex; }
@media (min-width: 900px) { .nav-panel { display: none !important; } }

/* ---------- hero ---------- */
.hero { padding-block: 56px 40px; }
@media (min-width: 768px) { .hero { padding-block: 96px 56px; } }
.hero .eyebrow { display: block; margin-bottom: var(--s-3); }
.hero h1 { margin-bottom: var(--s-3); }
.hero .lead { max-width: 56ch; margin-bottom: var(--s-5); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.hero-note { margin-top: var(--s-3); font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; color: var(--text-2); }
.hero-shot {
  margin: var(--s-6) 0 0; padding: 0;
  border: 1px solid var(--line); border-radius: var(--r-ctl);
  overflow: hidden; background: var(--surface);
}
.hero-shot img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.shot-bar {
  display: flex; justify-content: space-between; gap: var(--s-3);
  padding: 10px 16px; border-top: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 12px; color: var(--text-2);
}

/* ---------- cards / feature grid ---------- */
.features { display: grid; gap: var(--s-3); }
@media (min-width: 720px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .features { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-ctl);
  padding: var(--s-4);
  transition: border-color var(--t-fast);
}
.card:hover { border-color: var(--accent-dim); }
.card .icon { color: var(--accent); margin-bottom: var(--s-3); }
.card h3 { font-family: var(--font-body); font-weight: 600; font-size: 16px; letter-spacing: 0; margin-bottom: 6px; }
.card p { color: var(--text-2); font-size: 14px; line-height: 1.6; }
.card .proof { display: block; margin-top: 8px; font-size: 13px; color: var(--text-2); }
.card .proof::before { content: "→ "; color: var(--accent); }
.card a { font-weight: 600; color: var(--accent-hover); }

/* text links inside prose get an underline so they read as links */
.answer a, .lead a, .dl-note a, .prose a, .log-entry a, .notice a, .card .proof a, .steps p a {
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(46, 123, 255, 0.45);
}
.answer a:hover, .lead a:hover, .dl-note a:hover, .prose a:hover, .log-entry a:hover,
.notice a:hover, .card .proof a:hover, .steps p a:hover { text-decoration-color: currentColor; }

/* ---------- screenshots ---------- */
.shots { display: grid; gap: var(--s-3); }
@media (min-width: 720px) { .shots { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .shots { grid-template-columns: repeat(3, 1fr); } }
.shot {
  margin: 0; padding: 0; text-align: left; width: 100%;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-ctl);
  overflow: hidden; cursor: zoom-in; font: inherit; color: inherit;
  transition: border-color var(--t-fast);
}
.shot:hover { border-color: var(--accent-dim); }
.shot img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.shot figcaption {
  padding: 10px 14px; border-top: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 12px; color: var(--text-2);
}
.shot-dialog {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-ctl);
  padding: 0; max-width: min(1200px, 94vw); color: var(--text);
}
.shot-dialog::backdrop { background: rgba(4, 5, 7, 0.82); }
.shot-dialog img { width: 100%; height: auto; }
.shot-dialog .bar {
  display: flex; justify-content: space-between; align-items: center; gap: var(--s-3);
  padding: 10px 16px; border-top: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 12px; color: var(--text-2);
}
.shot-dialog .close {
  background: transparent; border: 1px solid var(--line); color: var(--text-2);
  border-radius: 4px; padding: 6px 10px; font-family: var(--font-mono); font-size: 12px;
  cursor: pointer; transition: color var(--t-fast), border-color var(--t-fast);
}
.shot-dialog .close:hover { color: var(--text); border-color: var(--accent-dim); }

/* ---------- requirements ---------- */
.reqs { display: grid; gap: var(--s-5); }
@media (min-width: 900px) { .reqs { grid-template-columns: 1.15fr 0.85fr; align-items: start; } }
.reqs ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.reqs li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-2); font-size: 15px; }
.reqs li svg { color: var(--accent); flex: none; margin-top: 3px; }
.reqs li strong { color: var(--text); font-weight: 600; }
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 30px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.steps li:last-child { border-bottom: none; }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono); font-size: 13px; color: var(--accent); padding-top: 2px;
}
.steps h3 { margin: 0 0 4px; font-size: 14px; font-weight: 600; }
.steps p { font-size: 13.5px; color: var(--text-2); line-height: 1.6; }

/* ---------- stat strip ---------- */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); border-block: 1px solid var(--line); }
.stat { padding: var(--s-4); border-right: 1px solid var(--line); }
.stat:nth-child(2n) { border-right: none; }
.stat:nth-child(n + 3) { border-top: 1px solid var(--line); }
@media (min-width: 720px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
  .stat { border-top: none !important; }
  .stat:nth-child(2n) { border-right: 1px solid var(--line); }
  .stat:last-child { border-right: none; }
}
.stat .num {
  font-family: var(--font-display); font-weight: 700; font-size: 28px; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.stat .num .unit { font-family: var(--font-body); font-weight: 500; font-size: 14px; color: var(--text-2); letter-spacing: 0; }
.stat .label {
  margin-top: 6px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 400;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-2);
}

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: var(--s-3);
  padding: 18px 0; font-weight: 600; font-size: 15px; color: var(--text);
  transition: color var(--t-fast);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent-hover); }
.faq summary .chev { flex: none; color: var(--text-2); transition: transform var(--t-reveal); }
.faq details[open] summary .chev { transform: rotate(45deg); color: var(--accent); }
.faq .answer { padding-bottom: 18px; }
.faq .answer p, .faq .answer li { color: var(--text-2); font-size: 14.5px; line-height: 1.7; max-width: 70ch; }
.faq .answer ol, .faq .answer ul { margin: 8px 0 0; padding-left: 20px; }
.faq .answer li { margin-bottom: 6px; }
.faq .answer p + p { margin-top: 8px; }
@keyframes faq-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.faq details[open] .answer { animation: faq-in var(--t-reveal) ease-out; }

/* ---------- CTA panel ---------- */
.cta-panel {
  position: relative; overflow: hidden;
  background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-ctl);
  padding: var(--s-6) var(--s-4); text-align: center;
}
.cta-panel::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
@media (min-width: 768px) { .cta-panel { padding: var(--s-7) var(--s-6); } }
.cta-panel .lead { max-width: 52ch; margin: var(--s-3) auto 0; }
.cta-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); justify-content: center; margin-top: var(--s-5); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: var(--s-6) 0 var(--s-5); }
.footer-grid { display: grid; gap: var(--s-5); }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-brand p { color: var(--text-2); font-size: 14px; max-width: 36ch; margin-top: var(--s-3); }
.footer-col .ft {
  margin: 0 0 var(--s-3);
  font-family: var(--font-mono); font-size: 11px; font-weight: 400;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-2);
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-col a { color: var(--text-2); font-size: 14px; }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 8px var(--s-4); justify-content: space-between; align-items: baseline;
  border-top: 1px solid var(--line); margin-top: var(--s-6); padding-top: var(--s-4);
  font-size: 12.5px; color: var(--text-2);
}
.footer-bottom .mono { font-size: 12px; }

/* ---------- page head (subpages) ---------- */
.page-head { padding-block: 56px 40px; }
@media (min-width: 768px) { .page-head { padding-block: 80px 48px; } }
.page-head .eyebrow { display: block; margin-bottom: var(--s-3); }
.page-head h1 { font-size: 40px; }
@media (min-width: 768px) { .page-head h1 { font-size: 48px; } }
.page-head .lead { margin-top: var(--s-3); max-width: 60ch; }

/* ---------- download page ---------- */
.dl-grid { display: grid; gap: var(--s-3); }
@media (min-width: 900px) { .dl-grid { grid-template-columns: 1.1fr 0.9fr; align-items: start; } }
.panel { background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-ctl); padding: var(--s-4); }
@media (min-width: 768px) { .panel { padding: var(--s-5); } }
.panel-label {
  font-family: var(--font-mono); font-size: 11px; font-weight: 400;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-2);
  display: block; margin-bottom: var(--s-2);
}
.build-ver { font-family: var(--font-mono); font-weight: 700; font-size: 30px; letter-spacing: -0.01em; }
.meta-list { display: grid; gap: 0; margin-top: var(--s-3); }
.meta-list div {
  display: flex; justify-content: space-between; gap: var(--s-3);
  padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px;
}
.meta-list div:last-child { border-bottom: none; }
.meta-list .k { color: var(--text-2); }
.meta-list .v { font-family: var(--font-mono); font-size: 13px; color: var(--text); text-align: right; }
.hash-row {
  display: flex; align-items: center; gap: 10px; margin-top: var(--s-3);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-line);
  padding: 10px 12px;
}
.hash-row .lbl { flex: none; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; color: var(--text-2); }
.hash-row code {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: var(--font-mono); font-size: 12.5px; color: var(--text);
}
.copy-btn {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  background: transparent; border: 1px solid var(--line); color: var(--text-2);
  border-radius: 4px; padding: 6px 10px;
  font-family: var(--font-mono); font-size: 12px; cursor: pointer;
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}
.copy-btn:hover { color: var(--text); border-color: var(--accent-dim); }
.copy-btn.copied { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.dl-actions { display: grid; gap: 10px; margin-top: var(--s-4); }
.dl-note { margin-top: 12px; font-size: 13px; color: var(--text-2); line-height: 1.6; }
.verify-box {
  margin-top: var(--s-3);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-line);
  padding: 12px 14px; overflow-x: auto; white-space: pre;
  font-family: var(--font-mono); font-size: 12.5px; color: var(--text-2); line-height: 1.8;
}
.verify-box b { color: var(--text); font-weight: 400; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface); }
.versions { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 560px; }
.versions th {
  font-family: var(--font-mono); font-size: 11px; font-weight: 400;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-2);
  text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line);
}
.versions td { padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--text-2); }
.versions tr:last-child td { border-bottom: none; }
.versions td.ver { font-family: var(--font-mono); color: var(--text); }
.versions td.sha { font-family: var(--font-mono); font-size: 12px; }
.pending { color: var(--text-2); font-style: normal; }
.notice {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line); border-left: 2px solid var(--accent-dim);
  border-radius: var(--r-line); padding: var(--s-3) var(--s-4);
}
.notice p { font-size: 13.5px; color: var(--text-2); line-height: 1.65; }
.notice svg { color: var(--accent); flex: none; margin-top: 2px; }

/* ---------- modules page ---------- */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--s-4); }
.chip {
  font-family: var(--font-mono); font-size: 12.5px;
  padding: 9px 14px; border: 1px solid var(--line); border-radius: var(--r-ctl);
  background: transparent; color: var(--text-2); cursor: pointer;
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}
.chip:hover { color: var(--text); border-color: var(--accent-dim); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.chip .n { opacity: 0.75; margin-left: 6px; font-size: 11px; }
.count-line { font-family: var(--font-mono); font-size: 12px; color: var(--text-2); margin-bottom: var(--s-3); }
.module-list { border-top: 1px solid var(--line); }
.module {
  display: grid; grid-template-columns: 1fr auto; gap: 4px var(--s-3); align-items: baseline;
  padding: 16px 0; border-bottom: 1px solid var(--line);
}
.module[hidden] { display: none; }
.module h3 { font-family: var(--font-body); font-weight: 600; font-size: 15px; letter-spacing: 0; }
.module .tag {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-2); border: 1px solid var(--line); border-radius: 4px; padding: 3px 8px; white-space: nowrap;
}
.module p { grid-column: 1 / -1; color: var(--text-2); font-size: 14px; line-height: 1.6; max-width: 76ch; }
@media (min-width: 720px) {
  .module { grid-template-columns: 220px 1fr auto; }
  .module p { grid-column: 2 / -1; grid-row: 1; }
  .module .tag { grid-column: 3; grid-row: 1; }
}

/* ---------- changelog ---------- */
.log { border-top: 1px solid var(--line); }
.log-entry { display: grid; gap: var(--s-2); padding: var(--s-5) 0; border-bottom: 1px solid var(--line); }
@media (min-width: 768px) { .log-entry { grid-template-columns: 170px 1fr; gap: var(--s-4); align-items: baseline; } }
.log-date { font-family: var(--font-mono); font-size: 13px; color: var(--text-2); }
.log-entry h3 { font-family: var(--font-body); font-weight: 600; font-size: 15px; letter-spacing: 0; }
.log-ver { font-family: var(--font-mono); color: var(--accent); }
.log-entry ul { margin: var(--s-2) 0 0; padding-left: 18px; color: var(--text-2); font-size: 14px; line-height: 1.7; }
.log-entry li { margin-bottom: 6px; }
.log-entry li::marker { color: var(--text-3); }

/* ---------- legal ---------- */
.prose { max-width: 72ch; display: grid; gap: var(--s-4); }
.prose h2 { font-family: var(--font-body); font-weight: 600; font-size: 17px; letter-spacing: 0; }
.prose p, .prose li { color: var(--text-2); font-size: 14.5px; line-height: 1.7; }
.prose ul { margin: 8px 0 0; padding-left: 18px; }
.prose li { margin-bottom: 6px; }
.callout {
  background: var(--surface); border: 1px solid var(--accent-dim); border-radius: var(--r-ctl);
  padding: var(--s-3) var(--s-4);
  font-size: 14px; color: var(--text-2);
}
.callout strong { color: var(--text); }

/* ---------- reveal motion ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity var(--t-reveal) ease-out, transform var(--t-reveal) ease-out; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .faq details[open] .answer { animation: none; }
}
