/* Invictus RangeLog — site styles. Same system as the app (docs/DESIGN.md "Visual system"):
   ink pages, charcoal cards, one gold accent, hairline gold edges. */

:root {
  --ink: #0e1013;
  --surface: #1a1d22;
  --surface-2: #22262c;
  --gold: #d4a848;
  --gold-pale: #f4dc96;
  --gold-deep: #a77e2a;
  --text: #ededef;
  --muted: rgba(255, 255, 255, 0.62);
  --faint: rgba(255, 255, 255, 0.38);
  --stroke: rgba(212, 168, 72, 0.28);
  --rule: rgba(255, 255, 255, 0.08);
  --good: #34c759;
  --warn: #ff9f0a;
  --danger: #ff453a;
  --radius: 20px;
  --radius-sm: 12px;
  --max: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-pale); }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 0.4em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); font-weight: 750; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}
.lede { font-size: 1.2rem; color: var(--muted); max-width: 42rem; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(14, 16, 19, 0.82);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--rule);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand img { width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--stroke); }
.brand strong { font-weight: 800; letter-spacing: -0.01em; }
.brand small { display: block; color: var(--gold); font-style: italic; font-size: 0.72rem; line-height: 1; margin-top: 2px; }
.nav nav { display: flex; gap: 4px; }
.nav nav a {
  color: var(--muted); font-weight: 600; font-size: 0.95rem;
  padding: 8px 12px; border-radius: 10px;
}
.nav nav a:hover, .nav nav a[aria-current="page"] { color: var(--gold-pale); background: rgba(212, 168, 72, 0.12); }
.nav .menu { display: none; }

/* Hero */
.hero { padding: 72px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 20px; border-radius: 14px; font-weight: 700; font-size: 1rem;
  border: 1px solid var(--stroke); color: var(--gold-pale);
  background: linear-gradient(180deg, rgba(14,16,19,.92), var(--ink));
  transition: transform .12s ease, background .12s ease;
}
.btn:hover { transform: translateY(-1px); color: var(--gold-pale); }
.btn.primary { background: linear-gradient(180deg, var(--gold-pale), var(--gold)); color: var(--ink); border-color: transparent; }
.btn.primary:hover { color: var(--ink); filter: brightness(1.04); }
.btn.quiet { background: rgba(212,168,72,.1); }

/* Phone frame for screenshots */
.phone {
  width: min(320px, 100%); margin: 0 auto;
  border-radius: 44px; padding: 10px;
  background: #050607; border: 1px solid var(--stroke);
  box-shadow: 0 30px 80px rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,255,255,.04);
}
.phone img { border-radius: 36px; width: 100%; }
.phone.sm { width: min(260px, 100%); border-radius: 36px; padding: 8px; }
.phone.sm img { border-radius: 30px; }

/* Sections and cards */
section { padding: 56px 0; }
section + section { border-top: 1px solid var(--rule); }
.grid { display: grid; gap: 18px; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: 24px;
}
.card.gold { border-color: var(--stroke); }
.card h3 { display: flex; align-items: center; gap: 10px; }
.icon {
  width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center;
  background: rgba(212,168,72,.16); color: var(--gold); flex: 0 0 auto;
}
.icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.pill {
  display: inline-block; padding: 4px 9px; border-radius: 999px;
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
  background: rgba(212,168,72,.18); color: var(--gold);
}
.pill.green { background: rgba(52,199,89,.16); color: var(--good); }
.pill.red { background: rgba(255,69,58,.16); color: var(--danger); }

/* Panel: the "data book" look */
.panel {
  background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--radius);
  padding: 28px;
}
.panel .eyebrow { margin-bottom: 8px; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 10px 20px; align-items: baseline; }
.kv div:nth-child(even) { text-align: right; font-variant-numeric: tabular-nums; color: var(--gold-pale); font-weight: 700; }
.rule { height: 1px; background: var(--rule); margin: 18px 0; }

/* Flow / steps */
.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; counter-reset: step; }
.flow .step { position: relative; padding: 22px 18px 18px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-sm); }
.flow .step::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: -12px; left: 16px;
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--gold); color: var(--ink); font-weight: 800; font-size: 0.85rem;
}
.flow .step h4 { margin: 0 0 6px; font-size: 1rem; }
.flow .step p { margin: 0; color: var(--muted); font-size: 0.93rem; }

/* Tables */
table { width: 100%; border-collapse: collapse; font-size: 0.96rem; }
th, td { text-align: left; padding: 12px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { color: var(--gold); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }
code { font-family: var(--mono); font-size: 0.9em; background: rgba(255,255,255,.06); padding: 2px 6px; border-radius: 6px; }
pre {
  font-family: var(--mono); font-size: 0.86rem; line-height: 1.5;
  background: #0a0b0d; border: 1px solid var(--rule); border-radius: var(--radius-sm);
  padding: 16px 18px; overflow-x: auto; color: var(--gold-pale);
}

/* Prose pages (privacy, terms) */
.prose { max-width: 46rem; }
.prose h2 { font-size: 1.45rem; margin-top: 2.2em; }
.prose h3 { font-size: 1.1rem; margin-top: 1.6em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin: 0.35em 0; }
.prose .meta { color: var(--faint); font-size: 0.9rem; }
.callout {
  border-left: 3px solid var(--gold); background: rgba(212,168,72,.08);
  padding: 14px 18px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 1.2em 0;
}

/* FAQ */
details {
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-sm);
  padding: 4px 18px; margin: 10px 0;
}
details[open] { border-color: var(--stroke); }
summary { cursor: pointer; font-weight: 700; padding: 12px 0; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--gold); font-weight: 800; font-size: 1.2rem; }
details[open] summary::after { content: "–"; }
details .body { padding: 0 0 14px; color: var(--muted); }
details .body p:last-child { margin-bottom: 0; }

/* Tutorial */
.tut { display: grid; grid-template-columns: 1fr 300px; gap: 36px; align-items: start; }
.tut.flip { grid-template-columns: 300px 1fr; }
.tut ol { padding-left: 1.2em; }
.tut li { margin: 0.5em 0; }
.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.shots figure { margin: 0; text-align: center; }
.shots figcaption { color: var(--muted); font-size: 0.9rem; margin-top: 10px; }

/* Footer */
footer { border-top: 1px solid var(--rule); padding: 36px 0 48px; color: var(--faint); font-size: 0.92rem; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; align-items: center; }
footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
footer nav a { color: var(--muted); }
footer .tag { color: var(--gold); font-style: italic; }

@media (max-width: 860px) {
  .hero { padding: 44px 0 24px; }
  .hero-grid, .tut, .tut.flip { grid-template-columns: 1fr; }
  .tut .phone, .tut.flip .phone { order: -1; }
  .grid.cols-3, .grid.cols-2, .flow, .shots { grid-template-columns: 1fr; }
  .nav nav { display: none; }
  .nav .menu { display: inline-flex; }
  .nav.open nav {
    display: flex; flex-direction: column; position: absolute; left: 0; right: 0; top: 64px;
    background: var(--ink); border-bottom: 1px solid var(--rule); padding: 10px 16px 16px;
  }
  section { padding: 40px 0; }
}
