/* Revv's site: the HMI's own palette and fonts (Hmi.kt), on the same blueprint grid. */

@font-face {
  font-family: "Michroma";
  src: url("fonts/michroma_regular.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/jetbrains_mono_regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/jetbrains_mono_medium.ttf") format("truetype");
  font-weight: 500 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #05070a;
  --panel: #080b10;
  --map: #03050a;
  --text: #e6edf3;
  --muted: #8d99a5;
  --faint: #3e4852;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.18);
  --cyan: #4dd8ff;
  --cyan-wash: rgba(77, 216, 255, 0.1);
  --red: #ff3b3b;
  --amber: #ffb000;
  --display: "Michroma", "Eurostile", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1200px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, .button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

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

.caption {
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.2; margin: 0; }
h1 { font-size: clamp(30px, 5.2vw, 58px); letter-spacing: -0.01em; }
h2 { font-size: clamp(22px, 3vw, 32px); }
h3 { font-size: 16px; letter-spacing: 0.04em; }

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(5, 7, 10, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; }
.brand span { font-family: var(--display); font-size: 20px; letter-spacing: 0.12em; }
.site-nav { display: flex; align-items: center; gap: clamp(12px, 2.4vw, 28px); font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; }
.site-nav a { color: var(--muted); }
.site-nav a:hover { color: var(--text); text-decoration: none; }
@media (max-width: 640px) { .site-nav .hide-small { display: none; } }
/* On a phone the hero's own download button is right below, so the header keeps just the links. */
@media (max-width: 420px) {
  .site-nav .button { display: none; }
  .brand span { font-size: 17px; }
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
}
.button:hover { text-decoration: none; border-color: var(--text); }
.button.solid { background: var(--cyan); border-color: var(--cyan); color: var(--bg); font-weight: 700; }
.button.solid:hover { background: #9ae9ff; border-color: #9ae9ff; }
.button.small { min-height: 40px; padding: 0 16px; font-size: 12px; }
.button svg { width: 18px; height: 18px; }

/* Hero */

.hero { padding: clamp(48px, 9vw, 110px) 0 clamp(40px, 6vw, 72px); }
.hero .lede { max-width: 640px; margin: 24px 0 0; color: var(--muted); font-size: clamp(16px, 1.6vw, 18px); }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero .meta { margin-top: 18px; font-size: 13px; color: var(--muted); }

/* The HMI, drawn in HTML: a scaled-down home screen with demo figures. */

.hmi {
  container-type: inline-size;
  position: relative;
  margin: clamp(40px, 6vw, 72px) 0 0;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  box-shadow: 0 40px 120px rgba(77, 216, 255, 0.07);
  overflow: hidden;
}
.hmi * { line-height: 1.1; }
.hmi-grid { display: grid; grid-template-columns: 60fr 40fr; height: 100%; }
/* The bottom padding keeps the cards clear of the dock, as on the head unit. */
.hmi-left { display: flex; flex-direction: column; gap: 1.5cqi; padding: 2.4cqi 2.2cqi 7.2cqi 3cqi; min-width: 0; }
.hmi-status { display: flex; justify-content: space-between; align-items: center; font-size: 1.15cqi; color: var(--muted); letter-spacing: 0.08em; }
.hmi-status b { color: var(--text); font-weight: 500; font-size: 1.5cqi; margin-right: 1.2cqi; letter-spacing: 0; }
.hmi-status .on { color: var(--cyan); }
.hmi-status .dot { display: inline-block; width: 0.6cqi; height: 0.6cqi; border-radius: 50%; background: var(--cyan); margin-left: 0.5cqi; vertical-align: middle; }
.hmi-status .gap { margin-left: 1.4cqi; }

.hmi-cluster { position: relative; flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 22cqi; border: 1px solid var(--line); min-height: 0; }
.hmi-cluster::before, .hmi-cluster::after { content: ""; position: absolute; width: 1.4cqi; height: 1.4cqi; border-color: var(--cyan); border-style: solid; }
.hmi-cluster::before { top: -0.5cqi; left: -0.5cqi; border-width: 2px 0 0 2px; }
.hmi-cluster::after { bottom: -0.5cqi; right: -0.5cqi; border-width: 0 2px 2px 0; }
.hmi-speed { min-width: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 1.8cqi 2cqi 1.8cqi 2.2cqi; border-right: 1px solid var(--line); }
.hmi-row { display: flex; justify-content: space-between; font-size: 0.95cqi; letter-spacing: 0.18em; color: var(--muted); }
.hmi-row .red { color: var(--red); }
.hmi-readout { display: flex; align-items: flex-end; gap: 1.1cqi; min-width: 0; }
.hmi-readout .big { font-family: var(--display); font-size: 7.4cqi; letter-spacing: -0.03em; }
.hmi-readout .side { padding-bottom: 0.6cqi; font-size: 1.45cqi; font-weight: 500; line-height: 1.5; white-space: nowrap; }
.hmi-readout .side span { font-size: 1cqi; color: var(--muted); font-weight: 400; }
/* Ticks every 5 km/h with a taller one every 50, over the bar filled to the speed. */
.hmi-scale {
  height: 2cqi;
  background:
    linear-gradient(90deg, rgba(230, 237, 243, 0.8) 1px, transparent 1px) 0 0 / 25% 100% repeat-x,
    linear-gradient(90deg, rgba(255, 255, 255, 0.25) 1px, transparent 1px) 0 100% / 2.5% 50% repeat-x;
  border-right: 1px solid rgba(230, 237, 243, 0.8);
}
.hmi-scale-bar { height: 0.35cqi; width: 53.5%; background: var(--cyan); }
.hmi-scale-labels { display: flex; justify-content: space-between; margin-top: 0.6cqi; font-size: 0.85cqi; color: var(--muted); }
.hmi-side { display: grid; grid-template-rows: 1fr auto; }
.hmi-rpm { padding: 1.8cqi 1.8cqi 1.2cqi; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; justify-content: space-between; }
.hmi-rpm .big { font-family: var(--display); font-size: 4cqi; }
.hmi-segments { display: grid; grid-template-columns: repeat(16, 1fr); gap: 0.25cqi; height: 1.3cqi; }
.hmi-segments i { background: rgba(255, 255, 255, 0.08); }
.hmi-segments i.lit { background: var(--cyan); }
.hmi-segments i.redline { background: rgba(255, 59, 59, 0.35); }
.hmi-gears { padding: 1.2cqi 1.8cqi 1.6cqi; }
.hmi-gears .strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.35cqi; margin-top: 0.9cqi; }
.hmi-gears .strip span { display: grid; place-items: center; height: 2.9cqi; border: 1px solid var(--line); font-family: var(--display); font-size: 1.3cqi; color: var(--muted); }
.hmi-gears .strip span.on { background: var(--cyan); border-color: var(--cyan); color: var(--bg); }

.hmi-cards { display: grid; grid-template-columns: 1fr 1.35fr; gap: 1.5cqi; height: 12cqi; }
.hmi-card { border: 1px solid var(--line); padding: 1.4cqi 1.6cqi; display: flex; flex-direction: column; justify-content: space-between; min-width: 0; }
.hmi-card .big { font-family: var(--display); font-size: 3cqi; }
.hmi-card .big span { font-family: var(--mono); font-size: 1cqi; color: var(--muted); margin-left: 0.5cqi; }
.hmi-bars { display: grid; grid-template-columns: repeat(10, 1fr); gap: 0.25cqi; height: 0.9cqi; }
.hmi-bars i { background: rgba(255, 255, 255, 0.09); }
.hmi-bars i.lit { background: var(--cyan); }
.hmi-card .title { font-size: 1.6cqi; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hmi-card .sub { font-size: 0.95cqi; letter-spacing: 0.14em; color: var(--muted); margin-top: 0.5cqi; }
.hmi-progress { height: 0.25cqi; background: var(--line); }
.hmi-progress i { display: block; height: 100%; width: 38%; background: var(--cyan); }

.hmi-map { position: relative; background: var(--map); border-left: 1px solid var(--line); overflow: hidden; }
.hmi-map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hmi-where { position: absolute; top: 2.4cqi; left: 2.2cqi; right: 2.2cqi; display: flex; gap: 1.4cqi; align-items: center; }
.hmi-where .box { width: 5cqi; height: 5cqi; border: 1px solid var(--cyan); display: grid; place-items: center; flex: none; }
.hmi-where .box svg { position: static; width: 2.2cqi; height: 2.2cqi; }
.hmi-where .q { font-family: var(--display); font-size: 2cqi; margin-top: 0.4cqi; }
.hmi-where .caption { font-size: 0.9cqi; }
.hmi-where .hint { font-size: 1cqi; color: var(--muted); margin-top: 0.4cqi; }

.hmi-dock { position: absolute; left: 50%; bottom: 1.4cqi; transform: translateX(-50%); display: flex; border: 1px solid var(--line-strong); background: rgba(5, 7, 10, 0.92); }
.hmi-dock span { display: flex; flex-direction: column; align-items: center; gap: 0.4cqi; width: 6.6cqi; padding: 0.8cqi 0; font-size: 0.75cqi; letter-spacing: 0.14em; color: var(--muted); border-right: 1px solid var(--line); }
.hmi-dock span:last-child { border-right: 0; }
.hmi-dock span.on { color: var(--cyan); background: rgba(77, 216, 255, 0.1); }
.hmi-dock svg { width: 1.5cqi; height: 1.5cqi; }

.hmi-note { margin-top: 12px; font-size: 12px; color: var(--muted); letter-spacing: 0.06em; }

/* Sections */

section { padding: clamp(56px, 8vw, 100px) 0; border-top: 1px solid var(--line); }
.section-head { max-width: 700px; margin-bottom: clamp(32px, 4vw, 48px); }
.section-head p { color: var(--muted); margin: 16px 0 0; }

.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.feature { background: var(--bg); padding: 30px 28px 32px; }
.feature .icon { width: 48px; height: 48px; border: 1px solid var(--cyan); display: grid; place-items: center; margin-bottom: 22px; }
.feature .icon svg { width: 24px; height: 24px; stroke: var(--cyan); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.feature p { color: var(--muted); margin: 12px 0 0; font-size: 15px; }
.feature ul { margin: 14px 0 0; padding: 0; list-style: none; font-size: 14px; color: var(--muted); }
.feature li { padding: 6px 0 6px 18px; position: relative; border-top: 1px solid var(--line); }
.feature li::before { content: ""; position: absolute; left: 0; top: 15px; width: 6px; height: 6px; background: var(--cyan); }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; }
.fact { border: 1px solid var(--line); padding: 24px; }
.fact .value { font-family: var(--display); font-size: 22px; margin-top: 10px; }
.fact p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }

.cta { text-align: left; }
.cta .panel { border: 1px solid var(--cyan); background: var(--cyan-wash); padding: clamp(28px, 5vw, 56px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.cta p { margin: 12px 0 0; color: var(--muted); max-width: 560px; }

/* Footer */

.site-footer { border-top: 1px solid var(--line); padding: 36px 0 48px; font-size: 13px; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }

/* Privacy policy */

.policy { padding: clamp(40px, 7vw, 80px) 0 clamp(56px, 8vw, 96px); }
.policy .wrap { max-width: 860px; }
.policy .effective { margin-top: 14px; color: var(--muted); font-size: 14px; }
.policy .summary { margin: 36px 0 8px; border: 1px solid var(--cyan); background: var(--cyan-wash); padding: 24px 28px; }
.policy .summary ul { margin: 12px 0 0; padding-left: 20px; }
.policy .summary li { margin: 6px 0; }
.policy h2 { font-size: clamp(18px, 2.2vw, 22px); margin: 56px 0 16px; padding-top: 24px; border-top: 1px solid var(--line); }
.policy h3 { margin: 28px 0 8px; color: var(--cyan); font-family: var(--mono); font-weight: 500; font-size: 15px; letter-spacing: 0.08em; text-transform: uppercase; }
.policy p, .policy li { color: #c3ccd5; }
.policy ul { padding-left: 20px; }
.policy li { margin: 6px 0; }
.policy strong { color: var(--text); font-weight: 500; }

.table-scroll { overflow-x: auto; margin: 16px 0; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
th, td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--line); }
th { font-weight: 500; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); background: var(--panel); }
tr:last-child td { border-bottom: 0; }
td:first-child { color: var(--text); white-space: nowrap; }

/* On a phone each table row becomes a small card, its column names as labels. */
@media (max-width: 640px) {
  table { min-width: 0; }
  thead { display: none; }
  table, tbody, tr, td { display: block; }
  tr { padding: 14px 16px; border-bottom: 1px solid var(--line); }
  tr:last-child { border-bottom: 0; }
  td { padding: 4px 0; border: 0; }
  td:first-child { white-space: normal; font-weight: 500; padding-bottom: 6px; }
  td + td::before { content: attr(data-label); display: block; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
