/* UsbDeck site — shared styles */
:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --ink: #16181c;
  --muted: #5d636e;
  --line: #e3e1da;
  --accent: #1f7a5c;
  --accent-ink: #ffffff;
  --accent-soft: #e2f1ea;
  --warn: #b5541c;
  --radius: 14px;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111316;
    --surface: #1a1d21;
    --ink: #eef0f2;
    --muted: #9aa1ab;
    --line: #2a2e34;
    --accent: #4cc497;
    --accent-ink: #0b1a14;
    --accent-soft: #15302a;
    --warn: #f0995e;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}
a { color: var(--accent); text-underline-offset: 3px; }
img, svg { max-width: 100%; }
.wrap { width: min(1080px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 40px); margin-inline: auto; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.brand-mark { width: 28px; height: 28px; }
.nav { display: flex; gap: 22px; font-size: 15px; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 20px; border-radius: 12px;
  font-weight: 600; font-size: 16px; text-decoration: none;
  border: 1px solid transparent; transition: transform .12s ease, background .12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn svg { width: 20px; height: 20px; fill: currentColor; }
.btn small { display: block; font-weight: 500; font-size: 11px; opacity: .75; line-height: 1.1; }
.btn .stack { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }

/* Hero */
.hero { padding: 72px 0 56px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.eyebrow { font-family: var(--mono); font-size: 13px; color: var(--accent); letter-spacing: .04em; text-transform: uppercase; margin: 0 0 14px; }
h1 { font-size: clamp(36px, 5.2vw, 58px); line-height: 1.05; letter-spacing: -0.03em; margin: 0 0 20px; }
.lede { font-size: 19px; color: var(--muted); margin: 0 0 30px; max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.fine { font-size: 14px; color: var(--muted); margin-top: 14px; }

/* Before / after illustration */
.demo { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; box-shadow: 0 1px 0 rgba(0,0,0,.02), 0 12px 30px -18px rgba(0,0,0,.25);
}
.panel h3 { margin: 0 0 12px; font-size: 12px; font-family: var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .05em; display: flex; justify-content: space-between; }
.panel.after h3 span:last-child { color: var(--accent); }
.panel.before h3 span:last-child { color: var(--warn); }
.file { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; font-family: var(--mono); font-size: 13px; margin-bottom: 6px; background: var(--bg); }
.file:last-child { margin-bottom: 0; }
.file .n { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; font-size: 11px; font-weight: 700; background: var(--line); color: var(--muted); flex: none; }
.after .file .n { background: var(--accent-soft); color: var(--accent); }
.file .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Sections */
section { padding: 64px 0; }
.section-head { max-width: 640px; margin-bottom: 36px; }
h2 { font-size: clamp(26px, 3.2vw, 36px); letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 12px; }
.section-head p { color: var(--muted); margin: 0; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card h3 { margin: 10px 0 6px; font-size: 18px; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--muted); font-size: 15.5px; }
.icon { width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.icon svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.steps { counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: step; border-top: 2px solid var(--ink); padding-top: 16px; }
.steps li::before { content: "0" counter(step); font-family: var(--mono); font-size: 13px; color: var(--muted); }
.steps h3 { margin: 6px 0 6px; font-size: 18px; }
.steps p { margin: 0; color: var(--muted); font-size: 15.5px; }

.band { background: var(--ink); color: var(--bg); border-radius: 22px; padding: 48px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.band h2 { margin: 0 0 6px; }
.band p { margin: 0; opacity: .7; }
.band .btn-primary { background: var(--bg); color: var(--ink); }

/* Doc pages (support / privacy) */
.doc { padding: 56px 0 80px; }
.doc h1 { font-size: clamp(32px, 4.4vw, 46px); }
.doc h2 { font-size: 24px; margin-top: 44px; }
.doc h3 { font-size: 18px; margin: 28px 0 6px; }
.doc p, .doc li { color: var(--ink); }
.doc .meta { color: var(--muted); font-size: 15px; margin-top: -8px; }
.doc ul { padding-left: 1.2em; }
.doc li { margin-bottom: 6px; }
.callout { background: var(--accent-soft); border-radius: var(--radius); padding: 18px 22px; margin: 24px 0; }
.callout p { margin: 0; }
.callout strong { color: var(--accent); }

.contact-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin: 28px 0 8px; }
.contact-card p { margin: 0; color: var(--muted); }
.contact-card strong { display: block; color: var(--ink); font-size: 18px; }

details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 20px; margin-bottom: 10px; }
details[open] { padding-bottom: 6px; }
summary { cursor: pointer; padding: 16px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-family: var(--mono); color: var(--muted); font-weight: 400; }
details[open] summary::after { content: "–"; }
details p, details ul, details ol { margin-top: 0; color: var(--muted); }
code { font-family: var(--mono); font-size: .88em; background: var(--line); padding: 1px 6px; border-radius: 5px; }

.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.toc a { font-size: 14px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }
.site-footer nav { display: flex; gap: 18px; }

/* Redirect page */
.redirect { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 24px; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto 18px; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
  .grid-3, .steps { grid-template-columns: 1fr; }
  .band { padding: 32px; }
  .nav { gap: 16px; }
}
@media (max-width: 480px) {
  .demo { grid-template-columns: 1fr; }
  .nav a.hide-sm { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .btn, .spinner { transition: none; animation: none; }
}
