/* DriveXA "Calibrated" — reading-first product site.
   Tokens from docs/drivexa-calibrated-design.html. The landing page is graphite; reading pages
   (body.reading) use the light instrument-white surface. */
/* IBM Plex, self-hosted (assets/fonts, SIL Open Font License): no request to a third party. */
@font-face { font-family: 'IBM Plex Sans'; font-weight: 400; font-style: normal; font-display: swap; src: url('./assets/fonts/IBMPlexSans-Regular.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 500; font-style: normal; font-display: swap; src: url('./assets/fonts/IBMPlexSans-Medium.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 600; font-style: normal; font-display: swap; src: url('./assets/fonts/IBMPlexSans-SemiBold.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 400; font-style: normal; font-display: swap; src: url('./assets/fonts/IBMPlexMono-Regular.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 500; font-style: normal; font-display: swap; src: url('./assets/fonts/IBMPlexMono-Medium.woff2') format('woff2'); }

:root {
  --bg: #151719;
  --panel: #212529;
  --panel-2: #2A2F34;
  --ink: #F2F3EF;
  --muted: #ACB2B8;
  --line: #3A4045;
  --control: #778087;
  --accent: #F2BC57;
  --accent-ink: #F2BC57;
  --on-accent: #151719;
  --success: #9AD6B2;
  --danger: #FFA49A;
  --sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: dark;
}

body.reading {
  --bg: #F5F5F2;
  --panel: #FFFFFF;
  --panel-2: #ECEDEA;
  --ink: #25292D;
  --muted: #596168;
  --line: #D8DCD8;
  --accent-ink: #805900;
  --success: #226B48;
  --danger: #A32A24;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  background: var(--bg);
  color: var(--ink);
}

.page {
  min-height: 100vh;
  padding: 0 24px;
}

.card {
  width: min(1120px, 100%);
  margin: 0 auto;
}

/* Header: brand, route links, language codes on one ruled line. */
.header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  order: 0;
}

.brand svg {
  width: 26px;
  height: 26px;
  color: var(--accent-ink);
  flex-shrink: 0;
}

.brand b {
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}

.top-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  order: 1;
}

.header .top-links .btn {
  border: none;
  background: none;
  padding: 10px 8px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.875rem;
}

.header .top-links .btn:hover,
.header .top-links .btn:focus-visible {
  color: var(--ink);
}

.lang-switcher {
  display: flex;
  gap: 2px;
  margin-left: auto;
  order: 2;
}

.lang-btn {
  border: 1px solid transparent;
  background: none;
  color: var(--muted);
  border-radius: 6px;
  min-width: 40px;
  min-height: 40px;
  padding: 6px 8px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.8125rem;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.lang-btn:hover {
  color: var(--ink);
}

.lang-btn.active {
  color: var(--accent-ink);
  border-color: var(--accent-ink);
  background: var(--panel);
}

a:focus-visible,
button:focus-visible,
.gallery-image:focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: 2px;
}

.kicker {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

h1 {
  margin: 18px 0 16px;
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--ink);
  font-weight: 500;
}

h2 {
  margin: 36px 0 10px;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 600;
}

h3 {
  margin: 22px 0 8px;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 600;
}

.body {
  padding: 40px 0 48px;
}

/* Reading measure: about 60–70 characters. */
.body > p,
.body > ul,
.body > ol,
.body > h2,
.body > h3,
.body > .note,
.body > .faq-list,
.body-flow > * {
  max-width: 68ch;
}

p,
li,
.muted {
  color: var(--ink);
  line-height: 1.65;
  font-size: 1rem;
}

p {
  margin: 0 0 16px;
}

.muted {
  color: var(--muted);
  margin-top: 18px;
}

ol,
ul {
  margin: 12px 0 20px 20px;
  padding: 0;
}

/* Landing: copy on the left, a product specimen on the right. */
.landing {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 48px;
  align-items: center;
  padding: 24px 0 40px;
  border-bottom: 1px solid var(--line);
}

.landing p {
  font-size: 1.0625rem;
  max-width: 46ch;
}

.product-preview {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}

.preview-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.preview-body {
  padding: 20px 22px 22px;
}

.preview-body .muted {
  margin: 0;
  font-size: 0.875rem;
}

.preview-score {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 4.25rem;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.06em;
  margin: 4px 0 8px;
}

.preview-score span {
  font-family: var(--sans);
  font-size: 1.125rem;
  letter-spacing: 0;
  color: var(--muted);
  margin-left: 6px;
}

.preview-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.875rem;
  padding: 0 0 6px;
}

.preview-row strong {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.preview-row .success {
  color: var(--success);
}

.preview-rule {
  height: 1px;
  background: var(--line);
  margin: 12px 0;
}

.metric {
  margin: 12px 0;
}

.track {
  height: 3px;
  background: var(--line);
}

.track i {
  display: block;
  height: 100%;
  background: var(--accent);
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
}

.feature-list li {
  position: relative;
  padding: 10px 0 10px 22px;
  border-bottom: 1px solid var(--line);
  line-height: 1.55;
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.05em;
  width: 8px;
  height: 8px;
  background: var(--accent);
}

.faq {
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.faq h3 {
  margin: 0 0 18px;
  font-size: 1.3rem;
}

.faq-list {
  display: grid;
  gap: 0;
  margin-top: 16px;
}

.faq-item {
  padding: 18px 0 8px;
  border-bottom: 1px solid var(--line);
}

.faq-item h2 {
  margin: 0 0 8px;
  font-size: 1.0625rem;
}

.cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
  align-items: center;
}

.cta,
.btn.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--on-accent);
  border: 1px solid var(--accent);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 600;
}

.cta:hover,
.btn.primary:hover {
  background: #F5CB7A;
}

.cta.disabled {
  background: #343A3F;
  border-color: #343A3F;
  color: #ACB2B8;
  cursor: default;
  pointer-events: none;
  user-select: none;
}

.footer-note {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
  padding: 20px 0 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8125rem;
}

.top-links + p {
  margin-top: 26px;
}

.extra-space {
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  transition: background-color 0.15s ease;
  border: 1px solid var(--control);
  background: var(--panel);
  color: var(--ink);
}

.btn.secondary {
  border: 1px solid var(--control);
  background: var(--panel);
  color: var(--ink);
}

.btn.secondary:hover {
  background: var(--panel-2);
}

.note {
  padding: 14px 16px;
  border-left: 3px solid var(--accent);
  background: var(--panel);
  color: var(--ink);
  line-height: 1.6;
}

.email-link {
  display: block;
  margin-top: 8px;
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.email-link:hover,
.email-link:focus {
  color: var(--ink);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 26px;
}

.gallery-card {
  margin: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.gallery-image {
  display: block;
  width: 100%;
  height: auto;
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: filter 0.15s ease;
}

.gallery-image:hover {
  filter: brightness(1.04);
}

.gallery-card figcaption {
  padding: 12px 14px 14px;
  color: var(--ink);
  font-size: 0.875rem;
  line-height: 1.5;
}

.image-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.image-modal.open {
  display: flex;
}

.image-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 11, 12, 0.82);
}

.image-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(92vw, 980px);
  max-height: 92vh;
  background: #151719;
  border: 1px solid #3A4045;
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.54);
  overflow: hidden;
}

.image-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border: 1px solid #778087;
  border-radius: 8px;
  background: #212529;
  color: #F2F3EF;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.image-modal-toolbar {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 16px 18px 8px;
  background: #151719;
}

.zoom-btn {
  border: 1px solid #778087;
  background: #212529;
  color: #F2F3EF;
  border-radius: 8px;
  min-height: 44px;
  min-width: 44px;
  padding: 8px 14px;
  font-family: var(--mono);
  font-weight: 500;
  cursor: pointer;
}

.zoom-btn:hover,
.zoom-btn:focus-visible {
  background: #2A2F34;
}

.image-modal-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px 18px;
  max-height: calc(92vh - 120px);
  overflow: auto;
  background: #151719;
}

#modalImage {
  display: block;
  max-width: 100%;
  max-height: 72vh;
  object-fit: contain;
  border-radius: 8px;
  transform-origin: center center;
  transition: transform 0.18s ease;
}

.image-modal-caption {
  padding: 0 18px 18px;
  text-align: center;
  color: #ACB2B8;
  font-size: 0.875rem;
}

/* Getting started: the guide on the left, the app's start-up tour beside it. */
.guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 48px;
  align-items: start;
}

.tour {
  position: sticky;
  top: 24px;
}

.tour-caption {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.tour-counter {
  display: block;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.tour-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  /* Tall enough for the score card, so Back/Next stay put while paging. */
  min-height: 216px;
  margin: 12px 0 4px;
}

.tour-icon {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  color: var(--accent-ink);
}

.tour-icon svg,
.tour-menu svg {
  width: 44px;
  height: 44px;
  fill: currentColor;
}

.tour-start {
  width: 100%;
  text-align: center;
}

.tour-start-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.tour-start-row .btn {
  flex: 1;
  justify-content: center;
  cursor: pointer;
  font-family: var(--sans);
}

.tour-chip {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.8125rem;
  color: var(--muted);
  white-space: nowrap;
}

.tour-chip.active {
  border-color: var(--success);
  color: var(--success);
}

.tour-hint {
  margin: 8px 0 0;
  font-size: 0.8125rem;
  color: var(--accent-ink);
}

.tour-score {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
}

.tour-score .preview-score {
  font-size: 2.75rem;
  margin: 0 0 4px;
}

.tour-score .metric {
  margin: 6px 0;
}

.tour-menu {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  color: var(--accent-ink);
}

.tour-menu ul {
  list-style: none;
  margin: 0;
  padding: 6px 0;
  border-radius: 8px;
  background: var(--panel-2);
}

.tour-menu li {
  padding: 3px 16px;
  font-size: 0.9375rem;
}

.tour-menu svg {
  width: 26px;
  height: 26px;
}

.tour h3 {
  margin: 12px 0 6px;
  text-align: center;
}

.tour-text {
  min-height: 8.5em;
  text-align: center;
  color: var(--muted);
  font-size: 0.9375rem;
}

.tour-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 4px 0 16px;
}

.tour-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
}

.tour-dots i.current {
  background: var(--accent);
}

.tour-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.tour-nav .btn {
  cursor: pointer;
  font-family: var(--sans);
}

.tour-nav .btn:disabled {
  opacity: 0.45;
  cursor: default;
}

@media (max-width: 860px) {
  .landing {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .guide-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .tour {
    position: static;
    max-width: 420px;
  }
}

/* ---- 2026-10-13 audit: shared chrome (site.js) ---- */

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

main:focus {
  outline: none;
}

.header .top-links .btn[aria-current="page"] {
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--accent-ink);
}

.lang-btn[aria-pressed="true"] {
  color: var(--accent-ink);
}

.menu-toggle {
  display: none;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: none;
  color: var(--ink);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}

.site-footer {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  margin-bottom: 16px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 600;
}

.footer-brand svg {
  width: 18px;
  height: 18px;
  color: var(--accent-ink);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin-bottom: 14px;
}

.footer-links a,
.footer-meta a {
  color: var(--muted);
  display: inline-block;
  padding: 6px 0;
}

.footer-links a:hover,
.footer-meta a:hover {
  color: var(--ink);
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  font-size: 0.8125rem;
}

/* ---- Home: audiences, screenshots, beta ---- */

.hero-note {
  margin-top: 14px;
  font-size: 0.875rem;
  color: var(--muted);
}

.body-flow > .audience-grid,
.body-flow > .beta-section {
  max-width: none;
}

.body-flow a:not(.cta):not(.btn) {
  color: var(--accent-ink);
  text-underline-offset: 3px;
}

.audience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin: 8px 0 28px;
}

.audience-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
}

.audience-card h3 {
  margin: 0 0 6px;
  font-size: 1.0625rem;
  font-weight: 600;
}

.audience-card p {
  margin: 0;
  color: var(--muted);
}

.shot-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 220px));
  gap: 14px;
  margin: 8px 0 4px;
}

.shot-strip img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  display: block;
}

.beta-section {
  margin-top: 36px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.beta-section:focus {
  outline: none;
}

.beta-steps {
  margin: 12px 0 4px;
  padding-left: 22px;
  display: grid;
  gap: 8px;
}

.small {
  font-size: 0.875rem;
}

@media (max-width: 640px) {
  .page {
    padding: 0 16px;
  }

  /* The links fold behind the Menu button; the language codes stay on the brand row. */
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    order: 1;
    margin-left: auto;
  }

  .header .top-links {
    display: none;
  }

  .header.menu-open .top-links {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .header.menu-open .top-links .btn {
    width: 100%;
    justify-content: flex-start;
  }

  .shot-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .body {
    padding: 28px 0 36px;
  }

  .lang-switcher {
    margin-left: 0;
    order: 3;
  }

  .top-links {
    order: 2;
    width: 100%;
  }

  .cta-row > * {
    flex: 1 1 100%;
  }
}

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