/* ==========================================================================
   RoadbookX — site stylesheet
   Single file. No build step, no CDN, no framework.
   Palette mirrors the app's rally-instrument dark theme; the layout grammar is
   wireframe/blueprint: square corners, hairline rules, corner registration marks.
   ========================================================================== */

:root {
  /* ---- Brand tokens (edit these to re-skin the whole site) ---- */
  --bg:          #080808;
  --panel:       #111111;
  --panel-high:  #1a1a1a;
  --stroke:      #2a2a2a;
  --stroke-soft: #1d1d1d;
  --amber:       #ffb726;
  --amber-dim:   #9e7218;
  --paper:       #f0e8d4;
  --go:          #34c759;
  --danger:      #ff453a;
  --info:        #4a90d9;

  /* ---- Type ---- */
  --font-cond: "Barlow Condensed", "Oswald", "Roboto Condensed",
               "Avenir Next Condensed", "HelveticaNeue-CondensedBold",
               ui-sans-serif, system-ui, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", ui-sans-serif,
               system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Monaco, "Cascadia Mono",
               "Courier New", monospace;

  /* ---- Rhythm ---- */
  --gut:  clamp(20px, 4vw, 40px);
  --sec:  clamp(56px, 9vw, 112px);
  --maxw: 1160px;

  /* corner registration mark */
  --mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11'%3E%3Cpath d='M5.5 0v11M0 5.5h11' stroke='%239e7218' stroke-width='1'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  text-wrap: pretty;
  min-height: 100vh;
}

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

a { color: var(--amber); text-decoration: none; }
a:hover { color: var(--paper); }

:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
::selection { background: rgba(255, 183, 38, 0.28); color: var(--paper); }

/* ---- Shared primitives ------------------------------------------------- */

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut); }

/* blueprint frame + four registration marks */
.bp { position: relative; border: 1px solid var(--stroke); background: transparent; }
.bp::before {
  content: "";
  position: absolute;
  inset: -5.5px;
  pointer-events: none;
  background-image: var(--mark), var(--mark), var(--mark), var(--mark);
  background-repeat: no-repeat;
  background-position: 0 0, 100% 0, 0 100%, 100% 100%;
}

.kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber-dim);
}

h1, h2, h3 {
  font-family: var(--font-cond);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: 0.005em;
  text-transform: uppercase;
}

.sec-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px 24px;
  border-bottom: 1px solid var(--stroke);
  padding-bottom: 16px;
  margin-bottom: 40px;
}
.sec-head h2 { font-size: clamp(30px, 4.6vw, 50px); }
.sec-head p { font-size: 15px; color: var(--paper); opacity: 0.6; max-width: 42ch; margin-left: auto; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 15px 26px;
  border: 1px solid var(--amber);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-primary { background: var(--amber); color: #0a0a0a; }
.btn-primary:hover { background: #ffc84f; color: #0a0a0a; }
.btn-primary:active { background: #e0a01d; }
.btn-ghost { background: transparent; color: var(--amber); border-color: var(--stroke); }
.btn-ghost:hover { border-color: var(--amber); color: var(--amber); background: rgba(255, 183, 38, 0.06); }

/* ---- Header ------------------------------------------------------------ */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8, 8, 8, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--stroke);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gut);
  min-height: 62px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 28px;
}
.nav-brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-cond);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--paper);
  padding: 14px 0;
}
.nav-brand b { color: var(--amber); font-weight: 700; }
.nav-brand span {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--amber-dim);
  text-transform: uppercase;
}
.nav-links { display: flex; flex-wrap: wrap; gap: 8px 26px; list-style: none; padding-bottom: 6px; }
.nav-links a {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber-dim);
}
.nav-links a:hover { color: var(--amber); }

/* ---- Hero -------------------------------------------------------------- */

.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--stroke); }
.hero-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--stroke-soft) 1px, transparent 1px),
    linear-gradient(to bottom, var(--stroke-soft) 1px, transparent 1px);
  background-size: 96px 96px;
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 20%, transparent 78%);
}
.hero-inner {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(52px, 8vw, 96px) var(--gut) clamp(40px, 6vw, 72px);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero h1 {
  font-size: clamp(52px, 9vw, 116px);
  letter-spacing: 0.01em;
  margin: 18px 0 0;
}
.hero h1 em { font-style: normal; color: var(--amber); }
.hero-lede {
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--paper);
  opacity: 0.78;
  max-width: 46ch;
  margin-top: 22px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero-note {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber-dim);
  margin-top: 20px;
}

.phone { position: relative; margin: 0 auto; max-width: 320px; }
.phone .bp { padding: 10px; background: var(--panel); }
.phone img { width: 100%; }
.phone figcaption {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber-dim);
  text-align: center;
  margin-top: 18px;
}

/* ---- Instrument strip -------------------------------------------------- */

.instruments {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--stroke);
  border-bottom: 1px solid var(--stroke);
}
.inst {
  padding: 22px var(--gut);
  border-left: 1px solid var(--stroke);
  text-align: center;
}
.inst:first-child { border-left: none; }
.inst-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--amber-dim);
}
.inst-value {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(24px, 3.4vw, 38px);
  color: var(--amber);
  letter-spacing: -0.02em;
  margin-top: 6px;
}
.inst-value span { font-size: 0.4em; letter-spacing: 0.08em; color: var(--amber-dim); margin-left: 3px; }
.inst-desc { font-size: 12px; color: var(--paper); opacity: 0.45; margin-top: 6px; }

/* ---- Section shell ----------------------------------------------------- */

.section { padding: var(--sec) 0; border-bottom: 1px solid var(--stroke); }
.section > .wrap > .lede { font-size: 17px; opacity: 0.7; max-width: 62ch; }

/* ---- Quote plate ------------------------------------------------------- */

.creed { padding: clamp(44px, 7vw, 88px) 0; border-bottom: 1px solid var(--stroke); }
.creed blockquote {
  font-family: var(--font-cond);
  font-size: clamp(28px, 5.4vw, 62px);
  font-weight: 700;
  line-height: 1.04;
  text-transform: uppercase;
  color: var(--amber);
  max-width: 22ch;
}
.creed p { margin-top: 22px; font-size: 16px; opacity: 0.7; max-width: 52ch; }

/* ---- Numbered workflow plate ------------------------------------------ */

.steps { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--stroke); }
.step { padding: 30px 26px 34px; border-left: 1px solid var(--stroke); }
.step:first-child { border-left: none; }
.step-num {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--amber-dim);
}
.step h3 { font-size: 26px; margin: 14px 0 10px; color: var(--paper); }
.step p { font-size: 14.5px; opacity: 0.62; }

/* ---- Feature grid ----------------------------------------------------- */

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); gap: 1px; background: var(--stroke); border: 1px solid var(--stroke); }
.feature { background: var(--bg); padding: 30px 26px 32px; transition: background 0.15s; }
.feature:hover { background: var(--panel); }
.feature .ico { color: var(--amber); margin-bottom: 16px; }
.feature h3 { font-size: 23px; color: var(--paper); margin-bottom: 8px; }
.feature p { font-size: 14.5px; opacity: 0.62; }
.feature code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  color: var(--amber);
  background: var(--panel-high);
  padding: 1px 5px;
}

/* ---- Screen gallery ---------------------------------------------------- */

.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: clamp(24px, 4vw, 44px); }
.shot .bp { padding: 8px; background: var(--panel); }
.shot img { width: 100%; }
.shot figcaption { margin-top: 16px; }
.shot .cap-t {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber);
}
.shot .cap-d { font-size: 13.5px; opacity: 0.55; margin-top: 5px; }

/* ---- Modes table ------------------------------------------------------- */

.modes { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.modes caption { text-align: left; font-size: 13px; opacity: 0.5; padding-bottom: 14px; }
.modes th, .modes td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--stroke); vertical-align: top; }
.modes thead th {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber-dim);
  border-bottom-color: var(--amber-dim);
}
.modes td:first-child {
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper);
  white-space: nowrap;
  font-size: 13px;
}
.modes td:last-child { opacity: 0.6; }
.modes tbody tr:hover td { background: var(--panel); }

/* ---- Two-column privacy / spec block ---------------------------------- */

.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1px; background: var(--stroke); border: 1px solid var(--stroke); }
.cols div { background: var(--bg); padding: 28px 26px; }
.cols h3 { font-size: 21px; color: var(--amber); margin-bottom: 8px; }
.cols p { font-size: 14.5px; opacity: 0.62; }

/* ---- Closing CTA ------------------------------------------------------- */

.cta { padding: var(--sec) 0; text-align: center; border-bottom: 1px solid var(--stroke); }
.cta h2 { font-size: clamp(34px, 6vw, 68px); }
.cta p { margin: 20px auto 0; max-width: 48ch; opacity: 0.7; }
.cta .hero-actions { justify-content: center; }

/* ---- Footer ------------------------------------------------------------ */

footer { padding: 44px 0 56px; }
.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  align-items: center;
  justify-content: space-between;
}
.foot-links { display: flex; flex-wrap: wrap; gap: 12px 26px; list-style: none; }
.foot-links a, .foot-copy {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber-dim);
}
.foot-copy { opacity: 0.6; }

/* ---- Legal pages ------------------------------------------------------- */

.legal { max-width: 760px; margin: 0 auto; padding: clamp(48px, 7vw, 88px) var(--gut) clamp(64px, 9vw, 112px); }
.legal h1 { font-size: clamp(34px, 6vw, 58px); color: var(--paper); margin-bottom: 10px; }
.legal .meta {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber-dim);
  margin-bottom: 48px;
}
.legal h2 { font-size: 24px; color: var(--amber); margin: 44px 0 12px; }
.legal p, .legal ul { font-size: 15.5px; opacity: 0.82; margin-bottom: 16px; }
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 6px; }
.legal strong { color: var(--paper); }
.legal code { font-family: var(--font-mono); font-size: 0.9em; color: var(--amber); background: var(--panel-high); padding: 1px 5px; }
.legal .uppercase-warn { font-family: var(--font-mono); font-size: 13px; opacity: 0.7; line-height: 1.7; }
.legal hr { border: none; border-top: 1px solid var(--stroke); margin: 48px 0; }

/* ---- Pre-launch banner & notice box ------------------------------------ */

.prelaunch-bar {
  background: var(--amber);
  color: #080808;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  padding: 10px 20px;
  letter-spacing: 0.01em;
  line-height: 1.5;
}
.prelaunch-bar a { color: #080808; text-decoration: underline; margin-left: 8px; }
.prelaunch-bar a:hover { opacity: 0.7; }
.prelaunch-badge {
  display: inline-block;
  background: #080808;
  color: var(--amber);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 2px 8px;
  border-radius: 2px;
  margin-right: 10px;
  vertical-align: middle;
}

.notice-box {
  border: 1px solid var(--amber);
  background: color-mix(in srgb, var(--amber) 8%, var(--panel-high));
  border-radius: 4px;
  padding: 16px 20px;
  margin-bottom: 32px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--paper);
}
.notice-box strong { color: var(--amber); }

/* ---- Responsive -------------------------------------------------------- */

@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .phone { order: -1; max-width: 260px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step:nth-child(3) { border-left: none; }
  .step:nth-child(n+3) { border-top: 1px solid var(--stroke); }
}

@media (max-width: 640px) {
  .instruments { grid-template-columns: repeat(2, 1fr); }
  .inst:nth-child(3) { border-left: none; }
  .inst:nth-child(n+3) { border-top: 1px solid var(--stroke); }
  .steps { grid-template-columns: 1fr; }
  .step { border-left: none; }
  .step + .step { border-top: 1px solid var(--stroke); }
  .sec-head p { margin-left: 0; }
  .modes th:last-child, .modes td:last-child { display: none; }
  .btn { flex: 1 1 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
