/* Crankovox — shared styles */

:root {
  --gold: #cfa902;
  --gold-light: #e2c54f;
  --gold-deep: #9c7f00;
  --ink: #17150f;
  --bg: #fbf8ef;
  --bg-alt: #f3eedc;
  --surface: #ffffff;
  --text: #1d1b16;
  --text-muted: #5f5a4c;
  --border: #e3dcc6;
  --accent: #8a6f00;          /* gold that passes contrast on light backgrounds */
  --accent-contrast: #17150f;
  --lcd-dark: #322f28;
  --lcd-light: #b1aea7;
  --radius: 18px;
  --shadow: 0 1px 2px rgb(40 30 0 / 6%), 0 8px 30px rgb(40 30 0 / 8%);
  --max: 1080px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14130f;
    --bg-alt: #1b1a14;
    --surface: #222019;
    --text: #f3efe2;
    --text-muted: #b2ab97;
    --border: #353226;
    --accent: #f0cd3c;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 10px 30px rgb(0 0 0 / 35%);
  }
}

*,
*::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: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

h1, h2, h3 {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.3rem, 6vw, 3.8rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
h3 { font-size: 1.15rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--gold); color: var(--ink); padding: 8px 14px; border-radius: 8px; z-index: 10;
}
.skip:focus { left: 8px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 60px; flex-wrap: wrap;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.1rem; letter-spacing: -0.01em;
}
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.site-nav { display: flex; gap: 4px 18px; flex-wrap: wrap; }
.site-nav a { color: var(--text-muted); text-decoration: none; font-size: 0.95rem; padding: 6px 0; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px; border-radius: 999px;
  font-weight: 600; font-size: 1rem; text-decoration: none; border: 0; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: #fff; box-shadow: var(--shadow); }
@media (prefers-color-scheme: dark) { .btn-primary { background: var(--gold); color: var(--ink); } }
.btn-secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn[aria-disabled="true"] { cursor: default; }
.btn small { display: block; font-weight: 500; font-size: 0.72rem; opacity: 0.75; line-height: 1.1; }
.btn .btn-label { display: flex; flex-direction: column; line-height: 1.2; text-align: left; }
.btn svg { width: 22px; height: 22px; flex: none; }

/* Hero */
.hero { padding: clamp(48px, 9vw, 104px) 0 clamp(40px, 7vw, 80px); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: center; }
.hero-video { margin: 0; }
.hero-video video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: var(--radius); box-shadow: var(--shadow); background: #0b1020; }
.hero-video figcaption { font-size: 0.9rem; color: var(--text-muted); margin-top: 10px; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; gap: 36px; } }
.hero-icon { width: 88px; height: 88px; border-radius: 22px; box-shadow: var(--shadow); margin-bottom: 22px; }
.eyebrow {
  display: inline-block; font-size: 0.82rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 12px;
}
.lede { font-size: 1.2rem; color: var(--text-muted); max-width: 34em; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.fineprint { font-size: 0.85rem; color: var(--text-muted); margin-top: 16px; }

/* Sections */
section { padding: clamp(56px, 8vw, 96px) 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 40em; margin-bottom: 40px; }
.section-head p { color: var(--text-muted); font-size: 1.1rem; }

.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
}
.card p { color: var(--text-muted); margin: 0; }
.card .icon {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(180deg, var(--gold-light), var(--gold)); color: var(--ink); margin-bottom: 16px;
}
.card .icon svg { width: 22px; height: 22px; }

/* How it works */
.flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 14px; align-items: stretch; }
.flow-step { text-align: center; }
.flow-step .card { height: 100%; }
.flow-step strong { display: block; font-size: 1.1rem; margin-bottom: 4px; }
.flow-arrow {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: var(--accent); font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
}
.flow-arrow svg { width: 34px; height: 20px; }
.flow-note { margin-top: 24px; color: var(--text-muted); max-width: 44em; }

/* Screenshots */
.shots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.shots figure { margin: 0; }
.shots .shot-wide { grid-column: 1 / -1; }
.shots img { display: block; width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow); }
.shots figcaption { font-size: 0.95rem; color: var(--text-muted); margin-top: 12px; }
.mac-shot { display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: center; margin-top: 64px; }
.mac-shot p { color: var(--text-muted); max-width: 32em; }
.mac-shot img { width: min(100%, 380px); height: auto; justify-self: center; }
@media (max-width: 720px) {
  .shots { grid-template-columns: 1fr; }
  .mac-shot { grid-template-columns: 1fr; gap: 24px; }
}

/* Requirements */
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; }
.checklist li::before {
  content: ""; flex: none; width: 22px; height: 22px; margin-top: 2px; border-radius: 50%;
  background: var(--gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2317150f' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat;
}

/* FAQ */
.faq details {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 0 22px; margin-bottom: 12px;
}
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 28px 18px 0; font-weight: 600; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  font-size: 1.4rem; font-weight: 400; color: var(--accent);
}
.faq details[open] summary::after { content: "–"; }
.faq details > *:not(summary) { color: var(--text-muted); }
.faq details > p:last-child { padding-bottom: 18px; margin-bottom: 0; }

/* CTA band */
.cta-band {
  text-align: center;
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  color: var(--ink);
}
.cta-band h2 { color: var(--ink); }
.cta-band p { color: rgb(23 21 15 / 78%); font-size: 1.1rem; }
.cta-band .cta-row { justify-content: center; }
.cta-band .btn-primary { background: var(--ink); color: #fff; }

/* Long-form pages (support, privacy, terms) */
.page-head { padding: clamp(44px, 7vw, 80px) 0 12px; }
.page-head p { color: var(--text-muted); font-size: 1.1rem; max-width: 40em; }
.prose { max-width: 46em; padding-bottom: 80px; }
.prose h2 { font-size: 1.5rem; margin-top: 2.2em; }
.prose h3 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.4em; }
.prose .meta { color: var(--text-muted); font-size: 0.95rem; }
.callout {
  border-left: 4px solid var(--gold); background: var(--bg-alt);
  padding: 16px 20px; border-radius: 0 12px 12px 0; margin: 1.5em 0;
}
.callout p:last-child { margin-bottom: 0; }
.callout h2:first-child { margin-top: 0; }

.table-wrap { overflow-x: auto; margin: 0 0 1.5em; border: 1px solid var(--border); border-radius: 14px; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; background: var(--surface); }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--bg-alt); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
kbd {
  font: 600 0.85em ui-monospace, SFMono-Regular, Menlo, monospace;
  padding: 1px 6px; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 6px; background: var(--bg);
}

.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 8px; padding: 0; list-style: none; }
.toc a {
  display: inline-block; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border);
  text-decoration: none; color: var(--text); font-size: 0.9rem; background: var(--surface);
}

/* 404 */
.notfound { text-align: center; padding: 120px 0; }
.notfound .code { font-size: clamp(4rem, 14vw, 8rem); font-weight: 800; color: var(--gold); line-height: 1; margin-bottom: 12px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0 48px; font-size: 0.9rem; color: var(--text-muted); }
.site-footer .wrap { display: grid; gap: 14px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-nav a { color: var(--text-muted); text-decoration: none; }
.footer-nav a:hover { color: var(--text); }
.site-footer p { margin: 0; }

/* Responsive */
@media (max-width: 860px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .flow { grid-template-columns: 1fr; }
  .flow-arrow { flex-direction: row; padding: 4px 0; }
  .flow-arrow svg { transform: rotate(90deg); }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .site-header .wrap { padding-top: 10px; padding-bottom: 10px; }
  .site-nav { width: 100%; gap: 4px 16px; }
  .btn { width: 100%; justify-content: center; }
}

.table-wrap td:last-child { white-space: nowrap; }
