/* ==========================================================
   obdash.bkhalid.dev: OBDash. Always dark (data-theme="dark"),
   teal accent from the app icon. Loads after base.css.
   ========================================================== */

:root[data-theme="dark"] {
  --bg: #0a1216;
  --bg-2: #0d181d;
  --surface: #101c21;
  --surface-2: #15242a;
  --accent: #4dd8c0;
  --accent-ink: #032019;
  --amber: #ffb951;
  --danger: #ff6e6e;
  --glow: rgba(77, 216, 192, .1);
  --nav-bg: rgba(10, 18, 22, .66);
}

/* ---------- hero ---------- */
.hero { position: relative; padding-block: 150px 40px; overflow: hidden; isolation: isolate; text-align: center; }
.hero__bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero__grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px; background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 30%, #000 10%, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 55% at 50% 30%, #000 10%, transparent 75%);
}
.hero__glow { position: absolute; left: 50%; top: 38%; width: 70vmax; height: 70vmax; translate: -50% -50%; border-radius: 50%; background: radial-gradient(circle, rgba(77, 216, 192, .2), transparent 62%); filter: blur(30px); }

.hero__inner { display: grid; justify-items: center; gap: 26px; }
.hero__inner .h-display { max-width: 14ch; }
.hero__inner .lead { margin-inline: auto; }
.teal .w > span, .no-split .teal, html:not(.js) .teal { background: linear-gradient(100deg, #b6f5ea, var(--accent) 50%, #25a58f); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 6px; }

.hero__stage { position: relative; display: grid; justify-items: center; margin-top: clamp(56px, 8vw, 88px); }
.hero__stage .phone { --pw: min(320px, 72vw); transform: perspective(1400px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .9s var(--ease); box-shadow: inset 0 0 0 1.5px #24343a, inset 0 0 0 5px #0b1215, inset 0 0 0 6px #33474e, 0 60px 120px -40px rgba(77, 216, 192, .35), 0 40px 80px -30px #000; }

/* animated gauge behind the phone */
.dial { position: absolute; top: -30px; left: 50%; width: min(620px, 96vw); translate: -50% 0; pointer-events: none; z-index: -1; opacity: .9; }
.dial__track { fill: none; stroke: var(--line-2); stroke-width: 2; stroke-dasharray: 2 10; }
.dial__arc { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1000; stroke-dashoffset: 1000; filter: drop-shadow(0 0 8px rgba(77, 216, 192, .7)); }
.loaded .dial__arc { animation: sweep 2.4s var(--ease) .6s forwards; }
@keyframes sweep { to { stroke-dashoffset: 380; } }

.hud { display: inline-flex; align-items: center; gap: 10px; margin-top: 28px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.hud i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); animation: blink 1.6s ease-in-out infinite; }
.hud span { transition: opacity .4s; }
.hud span.swap { opacity: 0; }
@keyframes blink { 50% { opacity: .3; } }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.stat { display: grid; gap: 10px; padding-top: 22px; border-top: 1px solid var(--line); }
.stat strong { font-size: clamp(52px, 7vw, 88px); font-weight: 600; letter-spacing: -.06em; line-height: .9; font-variant-numeric: tabular-nums; }
.stat strong sup { font-size: .45em; vertical-align: top; margin-left: 2px; color: var(--accent); letter-spacing: 0; }
.stat span { color: var(--muted); }

/* ---------- split sections (text + screenshot) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.split--flip .split__media { order: -1; }
.split__copy { display: grid; gap: 22px; align-content: center; }
.split__copy .head { margin-bottom: 0; }
.split__media { display: grid; justify-items: center; }
.screen { position: relative; width: min(340px, 100%); aspect-ratio: 1 / 2; border-radius: 40px; overflow: hidden; background: #000; border: 1px solid var(--line-2); box-shadow: 0 50px 100px -40px rgba(77, 216, 192, .3), 0 30px 60px -30px #000; }
.screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.screen .shot { opacity: 0; transition: opacity 1s var(--ease); }
.screen .shot.is-on { opacity: 1; }

.ticks { display: grid; gap: 12px; }
.ticks li { display: flex; gap: 12px; color: var(--ink-2); }
.ticks li::before { content: ""; flex: none; width: 20px; height: 20px; margin-top: 3px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 18%, transparent) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='none' stroke='%234dd8c0' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='M6 12.5l4 4L18 8'/></svg>") center / 13px no-repeat; }

.codes-demo { display: grid; gap: 10px; max-width: 460px; }
.code { display: flex; align-items: center; gap: 16px; padding: 14px 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.code b { font: 600 20px/1 var(--mono); color: var(--danger); min-width: 74px; }
.code--pending b { color: var(--amber); }
.code span { flex: 1; color: var(--ink-2); font-size: 15px; line-height: 1.35; }
.code i { width: 34px; height: 34px; display: grid; place-items: center; flex: none; border-radius: 50%; background: var(--surface-2); color: var(--accent); }
.code i .ico { width: 16px; height: 16px; }

/* ---------- features ---------- */
.feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 44px 32px; }
.feat { display: grid; gap: 10px; align-content: start; padding-top: 24px; border-top: 1px solid var(--line); }
.feat__ico { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--accent); margin-bottom: 10px; transition: transform .6s var(--ease); }
.feat:hover .feat__ico { transform: rotate(-8deg) scale(1.06); }
.feat h3 { font-size: 19px; letter-spacing: -.025em; }
.feat p { color: var(--muted); font-size: 15.5px; }

/* ---------- Android Auto ---------- */
.auto__panel {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 64px); align-items: center;
  padding: clamp(28px, 5vw, 64px); border-radius: 36px; border: 1px solid var(--line);
  background: radial-gradient(60% 90% at 100% 0%, rgba(77, 216, 192, .12), transparent 70%), var(--bg-2);
}
.carscreen { position: relative; aspect-ratio: 16 / 8; border-radius: 22px; padding: 14px; background: #05090b; border: 1px solid var(--line-2); box-shadow: 0 40px 80px -30px #000; display: grid; grid-template-columns: 44px 1fr; gap: 12px; }
.carscreen__rail { display: grid; align-content: start; gap: 12px; padding-top: 4px; }
.carscreen__rail i { width: 28px; height: 28px; border-radius: 50%; background: #1b282d; justify-self: center; }
.carscreen__rail i:first-child { background: var(--accent); box-shadow: 0 0 14px rgba(77, 216, 192, .6); }
.carscreen__grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: auto 1fr 1fr; gap: 10px; }
.carscreen__title { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; font: 500 13px/1 var(--mono); color: var(--ink-2); }
.carscreen__title em { font-style: normal; padding: 5px 10px; border-radius: 999px; background: #13262b; color: var(--accent); }
.cell { display: grid; justify-items: center; align-content: center; gap: 4px; border-radius: 14px; background: #0e171b; padding: 8px 4px; }
.cell svg { width: 54%; max-width: 70px; }
.cell svg path:first-child { fill: none; stroke: #23343a; stroke-width: 7; stroke-linecap: round; }
.cell svg path + path { fill: none; stroke: var(--accent); stroke-width: 7; stroke-linecap: round; }
.cell--warn svg path + path { stroke: var(--amber); }
.cell b { font-size: 13px; font-weight: 600; }
.cell small { font: 400 11px/1 var(--mono); color: var(--muted); }

/* ---------- adapters ---------- */
.adapters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.adapter { display: grid; gap: 12px; align-content: start; padding: clamp(22px, 3vw, 30px); }
.adapter:hover { translate: 0 -3px; border-color: var(--line-2); }
.adapter__ico { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.adapter h3 { font-size: 22px; letter-spacing: -.03em; }
.adapter p { color: var(--muted); font-size: 15.5px; }
.adapter .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.adapter .tags li { padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 12.5px; color: var(--ink-2); }
.adapters__note { margin-top: 26px; font-size: 14px; color: var(--muted); max-width: 72ch; }

/* ---------- screenshots gallery ---------- */
.shots .head { margin-bottom: 28px; }

/* ---------- privacy ---------- */
.privacy__panel {
  display: grid; justify-items: center; gap: 24px; text-align: center;
  padding: clamp(36px, 7vw, 96px) clamp(20px, 5vw, 72px); border-radius: 36px; border: 1px solid var(--line);
  background: radial-gradient(70% 90% at 50% 0%, rgba(77, 216, 192, .1), transparent 70%), var(--bg-2);
}
.privacy__panel .h-section { max-width: 18ch; }
.privacy__panel .lead { margin-inline: auto; }

/* ---------- get ---------- */
.get__inner { display: grid; justify-items: center; gap: 22px; text-align: center; }
.get__icon { width: 104px; height: 104px; border-radius: 26px; box-shadow: 0 0 0 1px var(--line), 0 30px 70px -20px rgba(77, 216, 192, .5); margin-bottom: 10px; }
.get .lead { margin-inline: auto; }
.get__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.get__talk { color: var(--muted); font-size: 15px; }
.get__talk a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.get__talk a:hover { text-decoration-color: currentColor; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 36px; }
  .split--flip .split__media { order: 0; }
  .feats { grid-template-columns: repeat(2, 1fr); }
  .auto__panel { grid-template-columns: 1fr; }
  .adapters { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .hero { padding-top: 120px; }
  .feats { grid-template-columns: 1fr; gap: 32px; }
  .carscreen { aspect-ratio: auto; grid-template-columns: 1fr; }
  .carscreen__rail { display: none; }
  .code b { font-size: 17px; min-width: 62px; }
}

@media (prefers-reduced-motion: reduce) {
  .hud i { animation: none; }
  .dial__arc { stroke-dashoffset: 380; }
  .loaded .dial__arc { animation: none; }
}
