/* MZD Owner — web. "Owner's manual" concept: ceramic paper, graphite instrument panels,
   Soul Red as a painted surface. One family (Barlow): Semi Condensed for display + readouts. */

:root {
  --ceramic: #e4e6e9;
  --ceramic-2: #d6d9dd;
  --graphite: #1b1d21;
  --graphite-2: #2a2d33;
  --machine: #70747c;
  --red: #b3122d;
  --red-deep: #5c0617;
  --amber: #e59a1e;
  --ink: #1b1d21;
  --ink-soft: #4a4e55;
  --paper-line: rgba(27, 29, 33, 0.14);

  --display: "Barlow Semi Condensed", "Barlow", system-ui, sans-serif;
  --text: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;

  --measure: 64ch;
  --gutter: clamp(20px, 5vw, 64px);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ceramic);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--text);
  font-feature-settings: "tnum" 0;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); text-underline-offset: 3px; }
a:hover { color: var(--red-deep); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 4px; }

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

/* ---------------------------------------------------------------- nav */
.nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 22px; padding-bottom: 22px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font: 700 1.25rem/1 var(--display); letter-spacing: 0.01em; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.nav-links { display: flex; gap: 22px; align-items: center; font-weight: 500; }
.nav-links a { color: var(--ink-soft); text-decoration: none; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links .btn-primary, .nav-links .btn-primary:hover { color: #fff; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px; border-radius: 999px;
  font: 600 1rem/1 var(--text); text-decoration: none; border: 0; cursor: pointer;
}
.btn-primary { background: var(--graphite); color: #fff; }
.btn-primary:hover { background: #000; color: #fff; }
.btn-quiet { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-quiet:hover { background: var(--ink); color: #fff; }
.btn svg { width: 18px; height: 18px; }

/* ---------------------------------------------------------------- hero */
.hero { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(28px, 5vw, 72px); align-items: center; padding-top: clamp(24px, 5vw, 64px); padding-bottom: clamp(48px, 8vw, 96px); }
.hero h1 {
  font: 700 clamp(2.75rem, 6.4vw, 5.25rem)/0.96 var(--display);
  letter-spacing: -0.015em; margin: 0 0 22px; max-width: 12ch;
}
.hero .lede { font-size: clamp(1.125rem, 1.6vw, 1.3rem); color: var(--ink-soft); max-width: 34ch; margin: 0 0 30px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .fine { margin-top: 18px; font-size: 0.9375rem; color: var(--machine); }

/* the painted panel: Soul Red as a surface, like a paint chip */
.paint {
  position: relative; border-radius: 28px; overflow: hidden; aspect-ratio: 4 / 4.4;
  background:
    radial-gradient(120% 90% at 22% 12%, #e2304b 0%, var(--red) 34%, #7d0a1f 70%, var(--red-deep) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), inset 0 -40px 80px rgba(0,0,0,0.25);
}
.paint::after { /* clear-coat highlight */
  content: ""; position: absolute; inset: -20% -40% auto auto; width: 90%; height: 60%;
  background: linear-gradient(200deg, rgba(255,255,255,0.28), rgba(255,255,255,0) 60%);
  transform: rotate(-12deg); pointer-events: none;
}
.paint .phone {
  position: absolute; right: 7%; top: 16%; width: 50%; transform: rotate(-4deg);
  border-radius: 34px; box-shadow: 0 30px 60px rgba(30, 0, 6, 0.55), 0 0 0 8px #0d0e10;
}
.gauge {
  position: absolute; left: 6%; top: 7%; width: 36%; aspect-ratio: 1;
  color: #fff; font-family: var(--display);
}
.gauge svg { width: 100%; height: 100%; overflow: visible; }
.gauge .track { stroke: rgba(255,255,255,0.22); }
.gauge .needle-arc { stroke: #fff; stroke-dasharray: 0 400; animation: sweep 1.6s cubic-bezier(.2,.7,.2,1) 0.3s forwards; }
.gauge .readout { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.gauge .readout b { font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1; font-weight: 700; font-variant-numeric: tabular-nums; }
.gauge .readout span { font-size: 0.9rem; opacity: 0.8; }
@keyframes sweep { to { stroke-dasharray: 205 400; } }

/* ---------------------------------------------------------------- sections */
section { padding: clamp(56px, 9vw, 112px) 0; }
.section-head { max-width: var(--measure); margin-bottom: clamp(28px, 4vw, 48px); }
h2 { font: 700 clamp(2rem, 4.2vw, 3.25rem)/1.02 var(--display); letter-spacing: -0.01em; margin: 0 0 14px; }
h3 { font: 700 1.375rem/1.15 var(--display); margin: 0 0 8px; }
.section-head p { color: var(--ink-soft); margin: 0; font-size: 1.125rem; }

/* instrument cluster strip: the live readouts */
.cluster {
  background: var(--graphite); color: #fff; border-radius: 28px; padding: clamp(24px, 4vw, 44px);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
}
.cluster .r { padding: 10px 18px; border-left: 1px solid rgba(255,255,255,0.1); }
.cluster .r:first-child { border-left: 0; }
.cluster .v { font: 700 clamp(2.25rem, 4.6vw, 3.75rem)/1 var(--display); font-variant-numeric: tabular-nums; }
.cluster .v small { font-size: 0.42em; font-weight: 600; margin-left: 4px; opacity: 0.7; }
.cluster .k { color: rgba(255,255,255,0.62); margin-top: 6px; }
.cluster .v.warn { color: var(--amber); }
.cluster-note { color: var(--ink-soft); margin: 18px 0 0; max-width: var(--measure); }

/* service log: owner's-manual table */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.log { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.log caption { text-align: left; color: var(--machine); padding-bottom: 10px; }
.log th, .log td { text-align: left; padding: 14px 10px 14px 0; border-bottom: 1px solid var(--paper-line); vertical-align: top; }
.log th { font: 600 0.9375rem/1.2 var(--text); color: var(--machine); }
.log td:first-child { font-weight: 600; }
.status { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.status.due { color: var(--red); } .status.soon { color: #a8680a; } .status.ok { color: #18794e; }
.shot-frame { max-width: 340px; height: 620px; overflow: hidden; border-radius: 30px 30px 0 0;
  box-shadow: 0 0 0 7px #0d0e10; -webkit-mask-image: linear-gradient(#000 80%, transparent);
  mask-image: linear-gradient(#000 80%, transparent); }
.shot-frame img { width: 100%; }

/* trouble code */
.code-card { background: var(--graphite); color: #fff; border-radius: 28px; padding: clamp(26px, 4vw, 44px); }
.code { font: 700 clamp(3.5rem, 9vw, 6.5rem)/0.9 var(--display); letter-spacing: 0.02em; color: var(--amber); }
.code-card .q { color: rgba(255,255,255,0.62); margin: 18px 0 8px; }
.code-card .a { font-size: 1.125rem; max-width: 46ch; margin: 0; }
.code-card .src { color: rgba(255,255,255,0.5); font-size: 0.875rem; margin-top: 16px; }

/* car screen */
.carplay { border-radius: 26px; box-shadow: 0 24px 50px rgba(27, 29, 33, 0.3); }
.car-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(24px, 4vw, 48px); align-items: center; }
.car-grid figure { margin: 0; }
.car-grid figcaption { color: var(--machine); margin-top: 12px; font-size: 0.9375rem; }
.island { border-radius: 22px; background: #000; box-shadow: 0 20px 40px rgba(27, 29, 33, 0.25); }

/* steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; counter-reset: s; }
.steps li { counter-increment: s; border-top: 3px solid var(--ink); padding-top: 18px; }
.steps li::before { content: counter(s); display: block; font: 700 3rem/1 var(--display); color: var(--red); margin-bottom: 10px; }
.steps p { color: var(--ink-soft); margin: 0; }

/* faq */
.faq-list { max-width: 820px; }
.faq-list details { border-bottom: 1px solid var(--paper-line); padding: 18px 0; }
.faq-list summary { cursor: pointer; font: 600 1.1875rem/1.3 var(--text); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; font: 400 1.6rem/1 var(--display); color: var(--red); }
.faq-list details[open] summary::after { content: "–"; }
.faq-list details p { color: var(--ink-soft); margin: 12px 0 0; max-width: var(--measure); }

/* footer */
footer { background: var(--graphite); color: rgba(255,255,255,0.72); padding: 48px 0; margin-top: 40px; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
footer a { color: #fff; }
footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
footer p { margin: 0; max-width: 56ch; font-size: 0.9375rem; }

/* ---------------------------------------------------------------- legal pages */
.legal { max-width: 760px; padding: clamp(24px, 5vw, 56px) 0 64px; }
.legal h1 { font: 700 clamp(2.4rem, 5vw, 3.6rem)/1 var(--display); margin: 0 0 10px; }
.legal .updated { color: var(--machine); margin: 0 0 32px; }
.legal h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); margin-top: 40px; }
.legal p, .legal li { color: var(--ink-soft); max-width: var(--measure); }
.legal table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.legal th, .legal td { text-align: left; padding: 12px 10px 12px 0; border-bottom: 1px solid var(--paper-line); vertical-align: top; color: var(--ink-soft); }
.legal th { color: var(--ink); font-weight: 600; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 900px) {
  .hero, .split, .car-grid { grid-template-columns: 1fr; }
  .paint { max-width: 520px; }
  .paint .phone { width: 44%; right: 6%; top: 20%; }
  .cluster { grid-template-columns: repeat(2, 1fr); row-gap: 22px; }
  .cluster .r:nth-child(3) { border-left: 0; }
  .steps { grid-template-columns: 1fr; }
  .nav-links .hide-sm { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .gauge .needle-arc { animation: none; stroke-dasharray: 205 400; }
}
