/* apexr — dark theme, black + white + racing red, modern geometry matching the logo */
:root {
  --bg: #07070B;                /* near-black with the faintest violet-blue tint */
  --surface: #0F0F15;
  --surface-elev: #15151D;
  --surface-hi:  #1C1C26;
  --border: #23232D;
  --border-strong: #3A3A48;
  --text: #FFFFFF;
  --text-dim: #C8C9D2;
  --text-muted: #7C7D8A;

  --accent: #E10600;             /* racing red — matches the logo A */
  --accent-strong: #FF1A0E;      /* slight brightness for glow usage on dark bg */
  --accent-dim: #A00400;
  --accent-soft: rgba(225, 6, 0, 0.12);

  --danger: #FF2B2B;
  --warn:   #FFB400;
  --success:#2AE08A;

  --display: "Rajdhani", "Impact", system-ui, sans-serif;
  --ui: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", "Menlo", "Consolas", monospace;

  --content-max: 1240px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--ui);
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Subtle technical grid overlay — reads like a pit-wall display */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(225, 6, 0, 0.10), transparent 60%),
    radial-gradient(900px 500px at -10% 40%, rgba(225, 6, 0, 0.05), transparent 60%);
  pointer-events: none;
  z-index: 0;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  z-index: 0;
}

main, nav, footer { position: relative; z-index: 1; }

/* ---------- Typography ---------- */
h1, h2, h3, .display {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0;
  color: var(--text);
}
.display-xl { font-size: clamp(48px, 7vw, 88px); line-height: 0.95; letter-spacing: 0.02em; }
.display-lg { font-size: clamp(40px, 5vw, 56px); line-height: 1.0; }
.display-md { font-size: clamp(32px, 4vw, 44px); line-height: 1.05; }
.display-sm { font-size: 28px; line-height: 1.15; }
h2 { font-size: 24px; }
h3 { font-size: 20px; }
.micro {
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}
.mono { font-family: var(--mono); font-size: 13px; color: var(--text-dim); letter-spacing: 0.02em; }
.tagline {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 6px 0;
}
.tagline-mark {
  width: 28px;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(225, 6, 0, 0.6);
  flex: 0 0 28px;
}

/* Hero spec strip — telemetry-style callout of the technical claims */
.spec-strip {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
  padding: 10px 16px;
  background: rgba(225, 6, 0, 0.06);
  border: 1px solid rgba(225, 6, 0, 0.25);
  border-left: 2px solid var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}
.spec-strip .sep {
  display: inline-block;
  width: 4px; height: 4px;
  background: var(--accent);
  transform: rotate(45deg);
}
.muted { color: var(--text-muted); }
.accent { color: var(--accent); }

a { color: var(--text); }
a:hover { color: var(--accent); }

/* ---------- Layout ---------- */
.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 24px;
}
@media (max-width: 720px) { .container { padding: 0 16px; } }
.section { padding: 64px 0; }

/* ---------- Top nav ---------- */
.nav {
  height: 72px;
  background: rgba(7, 7, 11, 0.75);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  position: sticky; top: 0; z-index: 10;
}
.nav::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent) 35%, var(--accent) 65%, transparent);
  opacity: 0.6;
}
.nav .inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
}
.nav .brand {
  display: flex; align-items: center;
  text-decoration: none;
}
.nav .brand-logo {
  height: 44px; width: auto; display: block;
  filter: drop-shadow(0 0 12px rgba(225, 6, 0, 0.35));
}
.nav .brand .dot { display: none; }   /* old dot marker — replaced by logo */

.nav .links { display: flex; gap: 8px; justify-content: center; }
.nav .links a {
  text-decoration: none; color: var(--text-dim);
  padding: 10px 18px;
  display: flex; align-items: center;
  border: 1px solid transparent;
  transition: all 140ms ease-out;
}
.nav .links a .label {
  font-family: var(--display); font-size: 14px; letter-spacing: 0.12em;
  text-transform: uppercase; font-weight: 700;
}
.nav .links a:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--surface-elev);
}
.nav .right { justify-self: end; display: flex; align-items: center; }
.nav .right a {
  color: var(--text-muted); text-decoration: none;
  font-family: var(--display); font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase;
}
.nav .right a:hover { color: var(--accent); }

/* Login link styling */
.nav-login {
  padding: 8px 16px;
  border: 1px solid var(--border-strong);
  transition: all 140ms ease-out;
}
.nav-login:hover {
  color: var(--text);
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* Signed-in user chip — circle avatar + credits count */
.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 6px;
  border: 1px solid var(--border-strong);
  transition: all 140ms ease-out;
  color: var(--text) !important;
  font-family: var(--display);
  letter-spacing: 0.08em !important;
  text-transform: none !important;
}
.user-chip:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.user-avatar {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0;
}
.user-credits { display: flex; align-items: baseline; gap: 4px; }
.user-credits-num { color: var(--accent); font-weight: 700; font-size: 14px; }
.user-credits-lbl { color: var(--text-muted); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; }

/* Hamburger + drawer — desktop-hidden, shown on mobile via the media query below. */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px; height: 18px;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  justify-self: end;
}
.nav-burger span {
  display: block;
  width: 100%; height: 2px;
  background: var(--text);
  transition: transform 220ms ease, opacity 160ms ease;
  transform-origin: center;
}
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.nav-drawer {
  display: none;
  position: fixed;
  top: 72px; left: 0; right: 0;
  max-height: calc(100vh - 72px);
  overflow-y: auto;
  background: rgba(7, 7, 11, 0.98);
  border-bottom: 2px solid var(--accent);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  transform: translateY(-12px);
  opacity: 0;
  pointer-events: none;
  transition: transform 240ms ease, opacity 220ms ease;
  z-index: 60;
  padding: 8px 0 20px;
}
.nav-drawer.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.nav-drawer a {
  display: block;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  transition: color 120ms ease, background 120ms ease;
}
.nav-drawer a:last-child { border-bottom: 0; }
.nav-drawer a:active,
.nav-drawer a:hover {
  color: var(--accent);
  background: var(--surface-elev);
}
body.nav-locked { overflow: hidden; }

@media (max-width: 720px) {
  .nav .inner { grid-template-columns: auto 1fr; padding: 0 12px; }
  .nav .right { display: none; }
  .nav .links { display: none; }
  .nav .brand-logo { height: 28px; }
  .nav-burger { display: flex; }
  .nav-drawer { display: block; }
}

/* ---------- Footer ---------- */
footer.foot {
  margin-top: 128px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  position: relative;
}
footer.foot::before {
  content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent) 50%, transparent);
  opacity: 0.7;
}
/* Get in Touch footer */
.contact-foot .contact-inner {
  max-width: 840px;
  margin: 0 auto;
  padding: 64px 24px 56px;
  text-align: center;
}
.contact-head {
  color: var(--text);
  margin-top: 10px;
  letter-spacing: 0.02em;
}
.contact-prompt {
  margin-top: 20px;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: var(--display);
  font-weight: 600;
}
.contact-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 24px auto 32px;
  max-width: 640px;
  text-align: left;
}
.contact-tile {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface-elev);
  border: 1px solid var(--border);
  border-left: 2px solid var(--border-strong);
  color: var(--text);
  padding: 20px 20px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: all 160ms ease-out;
  border-radius: 0 0 10px 0;
}
.contact-tile:hover {
  border-color: var(--accent);
  border-left-color: var(--accent);
  background: var(--surface-hi);
}
.contact-tile.on {
  border-color: var(--accent);
  border-left-color: var(--accent);
  background: var(--surface-hi);
  box-shadow: 0 0 0 1px var(--accent), 0 0 28px rgba(225, 6, 0, 0.25);
}
.contact-tile .tile-num {
  font-family: var(--mono);
  font-size: 18px;
  color: var(--accent);
  min-width: 32px;
}
.contact-tile .tile-body { display: flex; flex-direction: column; gap: 2px; }
.contact-tile .tile-head {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
}
.contact-tile .tile-sub {
  font-family: var(--ui);
  font-size: 13px;
  color: var(--text-muted);
}
.contact-tile.on .tile-head { color: var(--accent); }

.contact-send {
  margin-top: 4px;
}
.contact-send.ready {
  box-shadow: 0 0 0 1px var(--accent), 0 0 36px rgba(225, 6, 0, 0.35);
}
.contact-address {
  display: block;
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
@media (max-width: 640px) {
  .contact-options { grid-template-columns: 1fr; }
}

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 13px;
  padding: 14px 26px;
  border-radius: 2px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 160ms ease-out;
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 35%, rgba(255, 255, 255, 0.25) 50%, transparent 65%);
  transform: translateX(-110%);
  transition: transform 600ms ease-out;
}
.btn:hover {
  background: #fff;
  color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 0 32px rgba(225, 6, 0, 0.35);
  transform: translateY(-1px);
}
.btn:hover::after { transform: translateX(110%); }
.btn:active { transform: translateY(0); }

.btn.ghost {
  border-color: var(--border-strong);
  color: var(--text);
  background: transparent;
}
.btn.ghost:hover {
  border-color: var(--accent);
  background: transparent;
  color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface-elev);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  border-radius: 0 0 10px 0;
  padding: 28px;
  transition: all 180ms ease-out;
  position: relative;
}
.card-elev { background: var(--surface-hi); }
.card-hover:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(225, 6, 0, 0.15);
}

/* ---------- Badge ---------- */
.badge {
  display: inline-flex; align-items: center;
  padding: 5px 10px;
  font-family: var(--display);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  border: 1px solid var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 2px;
}
.badge.warn { border-color: var(--warn); color: var(--warn); background: rgba(255, 180, 0, 0.08); }
.badge.danger { border-color: var(--danger); color: var(--danger); background: rgba(255, 43, 43, 0.10); }
.badge.success { border-color: var(--success); color: var(--success); background: rgba(42, 224, 138, 0.08); }
.badge.muted {
  border-color: var(--border-strong); color: var(--text-dim); background: var(--surface-elev);
}

/* ---------- Inputs ---------- */
input[type="text"], input[type="search"] {
  background: var(--surface-elev);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--ui);
  font-size: 14px;
  padding: 10px 14px;
  outline: none;
  transition: all 160ms;
  width: 100%;
  border-radius: 2px;
}
input[type="text"]:focus, input[type="search"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(225, 6, 0, 0.15);
}
input::placeholder { color: var(--text-muted); }

/* ---------- Hero ---------- */
.hero {
  min-height: 560px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 0 64px;
  position: relative;
}
.hero h1 { color: var(--text); }
.hero h1 .accent { color: var(--accent); }
.hero .sub {
  color: var(--text-dim); font-size: 18px; margin-top: 20px;
  max-width: 560px; line-height: 1.55;
}

/* Split hero — text left, onboard video right */
.hero-split {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
}
.hero-copy { display: flex; flex-direction: column; }
.hero-video {
  position: relative;
  width: 100%;
  max-width: 520px;
  justify-self: center;
  border: 1px solid var(--border-strong);
  border-bottom: 3px solid var(--accent);
  overflow: hidden;
  background: #000;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(225, 6, 0, 0.15),
    0 0 80px -20px rgba(225, 6, 0, 0.4);
}
.hero-video::before {
  content: "";
  display: block;
  padding-top: 100%;           /* force 1:1 via the padding trick — bulletproof */
}
.hero-video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-video .live-tag {
  position: absolute; top: 14px; left: 14px;
  background: rgba(7, 7, 11, 0.85);
  backdrop-filter: blur(8px);
  color: #fff;
  padding: 7px 12px;
  font-family: var(--display); font-size: 11px;
  letter-spacing: 0.2em; font-weight: 700;
  display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid var(--border-strong);
  border-left: 2px solid var(--accent);
}
.hero-video .live-dot {
  width: 8px; height: 8px; background: var(--accent); border-radius: 50%;
  box-shadow: 0 0 10px var(--accent);
  animation: livepulse 1.4s ease-in-out infinite;
}
@keyframes livepulse { 50% { opacity: 0.35; } }

@media (max-width: 900px) {
  .hero-split { grid-template-columns: 1fr; gap: 40px; }
}

/* Diagonal speed slash between sections */
.speed-slash {
  position: relative;
  height: 2px;
  margin: 64px 0;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
}
.speed-slash::after {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 48px; height: 2px; background: var(--accent);
  transform: translate(-50%, -50%) skewX(-20deg);
  box-shadow: 0 0 14px rgba(225, 6, 0, 0.6);
}

/* ---------- Video trim panel (Video Review upload) ---------- */
#trim-panel {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
}
.trim-video-wrap {
  position: relative;
  width: 100%;
  background: #000;
  border: 1px solid var(--border);
  overflow: hidden;
}
.trim-video-wrap::before {
  content: "";
  display: block;
  padding-top: 56.25%;         /* 16:9 via padding trick */
}
.trim-video-wrap video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #000;
}

.trim-timeline {
  position: relative;
  height: 56px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 2px;
  user-select: none;
}
.trim-select {
  position: absolute; top: 0; bottom: 0;
  background: rgba(225, 6, 0, 0.16);
  border-left: 2px solid var(--accent);
  border-right: 2px solid var(--accent);
  pointer-events: none;
}
.trim-playhead {
  position: absolute; top: 0; bottom: 0;
  width: 1px;
  background: var(--text);
  pointer-events: none;
  opacity: 0.6;
}
.trim-handle {
  position: absolute; top: -4px; bottom: -4px;
  width: 14px;
  background: var(--accent);
  transform: translateX(-50%);
  cursor: ew-resize;
  box-shadow: 0 0 12px rgba(225, 6, 0, 0.5);
  outline: none;
}
.trim-handle::before {
  content: ""; position: absolute;
  left: 50%; top: 50%;
  width: 2px; height: 28px;
  background: #fff;
  transform: translate(-50%, -50%);
}
.trim-handle:focus, .trim-handle.drag {
  background: #fff;
  box-shadow: 0 0 0 2px var(--accent), 0 0 20px rgba(225, 6, 0, 0.8);
}
.trim-handle:focus::before, .trim-handle.drag::before {
  background: var(--accent);
}

.trim-readouts {
  display: flex;
  gap: 28px;
  justify-content: center;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 2px;
  font-size: 14px;
  color: var(--text);
  letter-spacing: 0.03em;
}
.trim-readouts .trim-label {
  color: var(--accent); margin-right: 4px; font-weight: 500;
}
.trim-readouts .trim-val {
  font-weight: 500; color: var(--text);
}
.trim-max-flash {
  color: var(--danger);
  font-weight: 600;
  animation: flash 0.9s ease-out;
}
@keyframes flash {
  0%, 80% { opacity: 1; }
  100% { opacity: 0; }
}
.trim-hint {
  text-align: center;
  font-size: 12px;
}
.trim-warn {
  padding: 12px 16px;
  background: rgba(255, 180, 0, 0.06);
  border: 1px solid rgba(255, 180, 0, 0.4);
  border-left: 3px solid var(--warn);
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
}
.trim-warn strong { color: var(--warn); display: block; margin-bottom: 2px; }

/* ---------- Compact upload pages (Video Review / Racing Line) ---------- */
.upload-page {
  padding: 24px 0 32px;
  display: flex; flex-direction: column; align-items: center;
  gap: 20px;
}
.upload-head { max-width: 640px; }
.upload-head .display-lg { margin-top: 8px; }
.upload-head .sub {
  font-size: 15px; color: var(--text-dim);
  margin-top: 10px; line-height: 1.5;
}

/* ---------- Drop zone ---------- */
.dropzone {
  width: 100%;
  max-width: 560px;
  min-height: 240px;
  border: 2px dashed var(--accent);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0 auto;
  position: relative;
  cursor: pointer;
  transition: all 180ms;
  background:
    repeating-linear-gradient(-45deg,
      transparent 0 28px,
      rgba(225, 6, 0, 0.04) 28px 56px),
    var(--surface);
  border-radius: 2px;
  padding: 24px;
}
.dropzone.drag {
  background:
    repeating-linear-gradient(-45deg,
      transparent 0 28px,
      rgba(225, 6, 0, 0.10) 28px 56px),
    var(--surface-elev);
  box-shadow: 0 0 0 3px rgba(225, 6, 0, 0.25), 0 0 48px rgba(225, 6, 0, 0.20);
}
.dropzone h3 { color: var(--text); }
.dropzone .sel { color: var(--accent); text-decoration: underline; cursor: pointer; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 20px; }

/* ---------- Ring gauge ---------- */
.ring-wrap { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.ring {
  width: 240px; height: 240px;
  border-radius: 50%;
  border: 1px solid var(--border);
  position: relative;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(circle at center, rgba(225, 6, 0, 0.04) 0%, transparent 70%),
    var(--surface);
}
.ring::before {
  content: "";
  position: absolute; inset: -1px;
  border-radius: 50%;
  border: 1px solid transparent;
  border-top-color: var(--accent);
  border-right-color: var(--accent);
  animation: ringsweep 1.6s linear infinite;
  box-shadow: 0 0 24px rgba(225, 6, 0, 0.4);
}
@keyframes ringsweep { to { transform: rotate(360deg); } }
.ring .val {
  font-family: var(--mono); font-size: 36px; color: var(--text); font-weight: 500;
  letter-spacing: -0.02em;
}

/* ---------- Progress bar ---------- */
.progress {
  height: 6px;
  background: var(--surface-elev);
  border: 1px solid var(--border);
  overflow: hidden;
  position: relative;
  border-radius: 2px;
}
.progress .fill {
  height: 100%;
  background: repeating-linear-gradient(-45deg,
    var(--accent) 0 8px,
    var(--accent-dim) 8px 16px);
  background-size: 32px 32px;
  width: 0%;
  transition: width 300ms ease-out;
  animation: stripemove 0.9s linear infinite;
  box-shadow: 0 0 12px rgba(225, 6, 0, 0.4);
}
@keyframes stripemove { to { background-position: 32px 0; } }

/* ---------- Video scan-line overlay ---------- */
.scan { position: relative; background: #000; }
.scan::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg,
    rgba(255, 255, 255, 0.03) 0 1px,
    transparent 1px 3px);
}

/* ---------- Clip card (VOD result) ---------- */
.clip-card {
  display: grid;
  grid-template-columns: 4px auto 1fr;
  gap: 0 16px;
  min-height: 160px;
  background: var(--surface-elev);
  border: 1px solid var(--border);
  border-radius: 0 0 10px 0;
  margin-bottom: 12px;
  padding: 18px 20px 18px 0;
  cursor: pointer;
  transition: all 180ms;
}
.clip-card:hover {
  border-color: var(--accent);
  transform: translateX(2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), -3px 0 0 var(--accent);
}
.clip-card .sev-bar { background: var(--text-muted); }
.clip-card .sev-bar.major { background: var(--danger); box-shadow: 0 0 12px rgba(255, 43, 43, 0.5); }
.clip-card .sev-bar.notable { background: var(--warn); }
.clip-card .sev-bar.minor { background: var(--success); }
.clip-card .ts {
  font-family: var(--mono); font-size: 13px; color: #fff;
  padding: 4px 8px; background: var(--accent); display: inline-block; margin-bottom: 8px;
  font-weight: 500;
}
.clip-card .body { padding: 4px 0; }
.clip-card .obs { font-size: 14px; margin: 6px 0; color: var(--text); }
.clip-card .rec { font-size: 13px; color: var(--text-dim); margin: 4px 0; }
.clip-card .linked {
  margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
  color: var(--accent); text-decoration: none; font-size: 12px;
  font-family: var(--display); letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700;
}
.clip-card .linked:hover { text-decoration: underline; }

/* ---------- Feature card grid (landing) ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .feature-grid { grid-template-columns: 1fr; } }
.feature-card {
  padding: 32px 28px; min-height: 300px; display: flex; flex-direction: column;
  position: relative; overflow: hidden;
}
.feature-card::after {
  content: ""; position: absolute; bottom: 0; right: 0;
  width: 120px; height: 2px; background: var(--accent);
  box-shadow: 0 0 12px rgba(225, 6, 0, 0.5);
}
.feature-card .kicker {
  color: var(--accent); font-family: var(--display); font-size: 10px;
  letter-spacing: 0.22em; text-transform: uppercase; margin-bottom: 16px; font-weight: 700;
}
.feature-card h3 { font-size: 30px; color: var(--text); margin-bottom: 12px; letter-spacing: 0.04em; }
.feature-card p { color: var(--text-dim); flex: 1; }

/* ---------- Exercise library ---------- */
.filter-strip {
  display: flex; gap: 16px; flex-wrap: wrap; align-items: center;
  padding: 20px 0; position: sticky; top: 72px;
  background: rgba(7, 7, 11, 0.85);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border); z-index: 5;
}
.pill {
  padding: 7px 14px;
  border: 1px solid var(--border-strong);
  color: var(--text-dim);
  font-family: var(--display); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; font-weight: 700;
  cursor: pointer;
  background: var(--surface);
  border-radius: 2px;
  transition: all 140ms;
}
.pill.on { background: var(--accent); color: #fff; border-color: var(--accent);
           box-shadow: 0 0 16px rgba(225, 6, 0, 0.4); }
.pill:hover { border-color: var(--accent); color: var(--text); }
.pill.on:hover { color: #fff; background: var(--accent-dim); border-color: var(--accent-dim); }

.seg {
  display: flex; border: 1px solid var(--border-strong);
  border-radius: 2px; overflow: hidden; background: var(--surface);
}
.seg > button {
  background: transparent; border: none; color: var(--text-dim);
  padding: 7px 14px; cursor: pointer;
  font-family: var(--display); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; font-weight: 700;
}
.seg > button.on { background: var(--accent); color: #fff; }

.exercise-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 32px;
}
@media (max-width: 900px) { .exercise-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .exercise-grid { grid-template-columns: 1fr; } }

.exercise-card {
  background: var(--surface-elev);
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  border-radius: 0 0 10px 0;
  text-decoration: none;
  color: var(--text);
  overflow: hidden;
  display: flex; flex-direction: column;
  min-height: 400px;
  transition: all 180ms;
}
.exercise-card:hover {
  border-color: var(--accent); border-top-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(225, 6, 0, 0.2);
}
.exercise-card .thumb {
  aspect-ratio: 4/3;
  background:
    repeating-linear-gradient(-45deg,
      transparent 0 12px,
      rgba(225, 6, 0, 0.05) 12px 24px),
    var(--surface-hi);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}
.exercise-card .thumb svg {
  opacity: 0.9;
  width: 96px; height: 96px;
  color: var(--accent);
  filter: drop-shadow(0 0 8px rgba(225, 6, 0, 0.35));
}
.exercise-card .body { padding: 20px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.exercise-card h3 { font-size: 18px; color: var(--text); letter-spacing: 0.03em; }
.exercise-card .meta {
  display: flex; align-items: center; gap: 12px; font-size: 12px;
  margin-top: auto; color: var(--text-muted);
}

.dots { display: inline-flex; gap: 4px; }
.dots span {
  width: 6px; height: 6px; background: transparent; border-radius: 50%;
  border: 1px solid var(--border-strong);
}
.dots span.on { background: var(--accent); border-color: var(--accent);
                box-shadow: 0 0 6px rgba(225, 6, 0, 0.6); }

/* ---------- Strengths list (VOD result "what you did well") ---------- */
.strengths-list {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.strengths-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface-elev);
  border: 1px solid var(--border);
  border-left: 2px solid var(--success);
  border-radius: 0 0 8px 0;
  font-size: 13px;
}
.strengths-list .str-loc {
  color: var(--success);
  font-weight: 500;
  font-size: 12px;
  white-space: nowrap;
  align-self: start;
  padding-top: 1px;
}
.strengths-list .str-obs { color: var(--text-dim); }

/* ---------- Utility ---------- */
.stack-8 > * + * { margin-top: 8px; }
.stack-16 > * + * { margin-top: 16px; }
.stack-24 > * + * { margin-top: 24px; }
.row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.text-center { text-align: center; }
.hidden { display: none !important; }

/* ---------- Line result ---------- */
.line-result-img {
  width: 100%; max-height: 720px; object-fit: contain;
  background: #000;
  border: 1px solid var(--border);
  border-bottom: 3px solid var(--accent);
}
.turn-note {
  display: grid; grid-template-columns: 80px auto 1fr; gap: 16px;
  align-items: center;
  min-height: 80px;
  padding: 16px 20px;
  background: var(--surface-elev);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  border-radius: 0 0 10px 0;
  margin-bottom: 12px;
}
.turn-note .tnum { font-family: var(--display); font-size: 40px; color: var(--accent); font-weight: 700; letter-spacing: 0.02em; }
.turn-note .ttype { text-align: center; }
.turn-note .tnote { font-size: 14px; color: var(--text-dim); }

/* ---------- Processing screen ---------- */
.processing {
  min-height: 60vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 20px;
}
.stage-label {
  font-family: var(--display); font-size: 14px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--accent); font-weight: 700;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed; top: 88px; right: 16px; z-index: 20;
  min-width: 240px; max-width: 360px;
  background: var(--surface-elev); border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  padding: 12px 16px;
  font-size: 13px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
  animation: slideup 240ms ease-out;
  color: var(--text);
  border-radius: 2px;
}
.toast.success { border-left-color: var(--success); }
.toast.warn { border-left-color: var(--warn); }
.toast.error { border-left-color: var(--danger); }
@keyframes slideup { from { transform: translateY(12px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* page-load slide-up */
main { animation: slideup 200ms ease-out; }

/* selection */
::selection { background: var(--accent); color: #fff; }

/* scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-dim); }

/* =============================================================== */
/* Mobile polish — touch targets, spacing, typography, layout tweaks */
/* =============================================================== */

/* Safety net — no horizontal scroll on mobile regardless of a stray wide child. */
@media (max-width: 720px) {
  html, body { overflow-x: hidden; max-width: 100%; }
  .container { max-width: 100%; }
}

/* Phones / small tablets */
@media (max-width: 640px) {
  /* Compress section chrome so content gets more of the viewport */
  .section { padding: 40px 0; }
  .speed-slash { margin: 40px 0; }
  footer.foot { margin-top: 72px; padding: 48px 0; }

  /* Slightly smaller base body for tight layouts */
  body { font-size: 14.5px; }

  /* Hero — the hero-split already stacks at 900px. At phone widths, loosen
     letterspacing on the big display type and stack the spec strip vertically
     so the " · " separators don't look weird on a 2-line wrap. */
  .hero .display-xl { letter-spacing: 0; }
  .hero .sub { font-size: 15px; }
  .spec-strip {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    font-size: 12px;
  }
  .spec-strip .sep { display: none; }

  /* Tap targets — Apple HIG minimum is 44×44. Buttons have plenty of padding
     via .btn but force a floor anyway. */
  .btn { min-height: 44px; padding: 10px 18px; }
  .btn.btn-sm { min-height: 36px; padding: 6px 14px; }

  /* Nav links — larger hit boxes without changing visual text size */
  .nav .links a { padding: 10px 12px; }

  /* Feature cards — tighter padding and smaller headings on phones */
  .feature-card { padding: 24px 20px; min-height: 0; }
  .feature-card h3 { font-size: 22px; }

  /* Hero carousel arrows — smaller + pulled to the edge so they don't cover content */
  #hero-carousel .hero-nav { width: 32px; height: 32px; }
  #hero-carousel .hero-nav.prev { left: 6px; }
  #hero-carousel .hero-nav.next { right: 6px; }

  /* VOD result — release the "above the fold" viewport cap on mobile so
     content flows naturally. The fold idea only works on desktop-class heights. */
  .result-grid { max-height: none !important; }
  .notes-col { max-height: none; overflow-y: visible; }
  #player { max-height: none; }

  /* Result-pane shared styling */
  .pane-head { flex-wrap: wrap; gap: 8px; }

  /* Prepare (line) — handles need bigger touch targets on phones */
  .prepare-stage .handle { width: 26px; height: 26px; margin-left: -13px; margin-top: -13px; }
  .prepare-stage .handle::after { top: -30px; font-size: 11px; }
}

/* Very small phones */
@media (max-width: 400px) {
  .section { padding: 32px 0; }
  .nav .links a { padding: 8px 8px; }
  .feature-card h3 { font-size: 20px; }
  .display-lg { font-size: 34px; }
  .display-md { font-size: 26px; }
}

/* Touch-first devices regardless of width — bump interactive hit areas */
@media (hover: none) and (pointer: coarse) {
  .btn { min-height: 44px; }
  .turn-dot { width: 24px; height: 24px; margin-left: -12px; margin-top: -12px; }
  .ts-marker { width: 22px; height: 22px; margin-left: -11px; margin-top: -11px; }
}
