/* ============================================================
   OTR EARTHMOVER TYRE — DESIGN SYSTEM (DS09 v02)
   Brand: cool technical authority. Reference site.
   By Jewell Tyres (independent).
   ============================================================ */

/* Helvetica Neue is the primary typeface on Apple devices; Inter is loaded as
   the refined cross-platform companion so every visitor gets a premium grotesk
   (not Arial). IBM Plex Mono is retained for technical data labels. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

/* ====== TOKENS ====== */
:root {
  /* Brand */
  --otr-graphite: #0F1419;
  --otr-graphite-deep: #060A0E;
  --otr-graphite-soft: #1A2128;
  --otr-amber: #BF6E1B;
  --otr-amber-bright: #E08428;
  --otr-amber-deep: #8C4D10;
  --otr-steel: #3D5A6C;
  --otr-steel-light: #5C7A8C;
  --otr-bone: #F5F4F0;
  --otr-mist: #E8E6DF;
  --otr-fog: #D4D2CB;
  --otr-rule: rgba(255,255,255,0.08);
  --otr-rule-strong: rgba(255,255,255,0.16);
  --otr-rule-light: #D4D2CB;
  --otr-rule-medium: #A8A69E;

  /* RESERVED — Jewell Yellow for endorsement only */
  --jt-endorse: #FEC013;

  /* Typography */
  --otr-display: 'Helvetica Neue', 'Inter', system-ui, Helvetica, Arial, sans-serif;
  --otr-sans: 'Helvetica Neue', 'Inter', system-ui, Helvetica, Arial, sans-serif;
  --otr-serif: 'Helvetica Neue', 'Inter', Helvetica, Georgia, serif;
  --otr-mono: 'IBM Plex Mono', ui-monospace, monospace;

  /* Type scale */
  --fs-eyebrow: 0.7rem;
  --fs-body: 1rem;
  --fs-body-lg: 1.125rem;
  --fs-h4: 1.25rem;
  --fs-h3: 1.5rem;
  --fs-h2: 2rem;
  --fs-h1: 2.5rem;
  --fs-display: 3.5rem;
  --fs-display-xl: 5rem;

  /* Line height & letter-spacing */
  --lh-display: 1.02;
  --lh-heading: 1.12;
  --lh-body: 1.62;
  --ls-display: -0.035em;
  --ls-eyebrow: 0.2em;
  --ls-mono: 0.04em;

  /* Spacing */
  --s-1: 0.25rem; --s-2: 0.5rem; --s-3: 0.75rem; --s-4: 1rem;
  --s-5: 1.5rem; --s-6: 2rem; --s-7: 3rem; --s-8: 4rem;
  --s-9: 6rem; --s-10: 8rem;

  /* Layout */
  --container-max: 1320px;
  --container-narrow: 920px;
  --container-text: 720px;
  --container-tight: 560px;

  /* Motion */
  --t-fast: 120ms ease-out;
  --t-base: 220ms cubic-bezier(0.2, 0.7, 0.2, 1);
  --t-slow: 400ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ====== BASE ====== */
*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--otr-graphite);
}

body {
  margin: 0;
  font-family: var(--otr-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  letter-spacing: -0.005em;
  color: var(--otr-bone);
  background: var(--otr-graphite);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern", "liga";
}

/* Default: dark theme. Light theme via .theme-light class on section/main */
.theme-light {
  background: var(--otr-bone);
  color: var(--otr-graphite);
}

h1, h2, h3, h4 { margin: 0; font-weight: 400; }

.display, .display-xl {
  font-family: var(--otr-display);
  font-weight: 700;
  line-height: var(--lh-display);
  letter-spacing: var(--ls-display);
}
.display-xl { font-size: clamp(2.5rem, 6vw, 5rem); }
.display { font-size: clamp(1.75rem, 4vw, 3.5rem); }

h1.heading, .h1 { font-size: var(--fs-h1); font-weight: 700; line-height: var(--lh-heading); letter-spacing: -0.01em; }
h2.heading, .h2 { font-size: var(--fs-h2); font-weight: 700; line-height: var(--lh-heading); letter-spacing: -0.01em; }
h3.heading, .h3 { font-size: var(--fs-h3); font-weight: 600; line-height: 1.25; }
h4.heading, .h4 { font-size: var(--fs-h4); font-weight: 600; line-height: 1.3; }

p { margin: 0 0 var(--s-4); }
p:last-child { margin-bottom: 0; }

a {
  color: var(--otr-amber-bright);
  text-decoration: none;
  border-bottom: 1px solid rgba(224,132,40,0.3);
  transition: all var(--t-fast);
}
a:hover { color: var(--otr-amber-bright); border-bottom-color: var(--otr-amber-bright); }
.theme-light a { color: var(--otr-amber-deep); border-bottom-color: rgba(140,77,16,0.3); }
.theme-light a:hover { color: var(--otr-amber); border-bottom-color: var(--otr-amber); }

strong { font-weight: 600; }

/* Mono */
.mono {
  font-family: var(--otr-mono);
  letter-spacing: var(--ls-mono);
  font-size: 0.92em;
}

/* Eyebrow */
.eyebrow {
  font-family: var(--otr-mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  font-weight: 500;
  color: var(--otr-steel-light);
}
.theme-light .eyebrow { color: var(--otr-steel); }
.eyebrow--amber { color: var(--otr-amber-bright); }

/* Layout */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--s-5);
  padding-right: var(--s-5);
}
.container--narrow { max-width: var(--container-narrow); }
.container--text { max-width: var(--container-text); }
.container--tight { max-width: var(--container-tight); }

@media (min-width: 768px) {
  .container { padding-left: var(--s-7); padding-right: var(--s-7); }
}

.section { padding-block: var(--s-8); }
.section--lg { padding-block: var(--s-9); }
.section--sm { padding-block: var(--s-6); }

@media (min-width: 768px) {
  .section { padding-block: var(--s-9); }
  .section--lg { padding-block: var(--s-10); }
}

/* Grounds */
.ground--graphite {
  background: var(--otr-graphite);
  color: var(--otr-bone);
}
.ground--graphite-deep {
  background: var(--otr-graphite-deep);
  color: var(--otr-bone);
  position: relative;
}
.ground--graphite-deep::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 80% 20%, rgba(191,110,27,0.05) 0%, transparent 50%),
    radial-gradient(circle at 20% 80%, rgba(61,90,108,0.08) 0%, transparent 50%);
  pointer-events: none;
}
.ground--graphite-soft { background: var(--otr-graphite-soft); color: var(--otr-bone); }
.ground--bone { background: var(--otr-bone); color: var(--otr-graphite); }
.ground--mist { background: var(--otr-mist); color: var(--otr-graphite); }
.ground--steel { background: var(--otr-steel); color: var(--otr-bone); }
.ground--amber { background: var(--otr-amber); color: var(--otr-graphite); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: var(--s-3) var(--s-5);
  font-family: var(--otr-mono);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
  border: 1px solid var(--otr-amber);
  background: var(--otr-amber);
  color: var(--otr-graphite);
  cursor: pointer;
  border-radius: 980px;
  transition: transform var(--t-base), box-shadow var(--t-base),
              background var(--t-base), border-color var(--t-base), color var(--t-base);
}
.btn:hover {
  background: var(--otr-amber-bright);
  border-color: var(--otr-amber-bright);
  color: var(--otr-graphite);
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.35);
}
.btn:active { transform: translateY(0) scale(0.98); }
.btn--jt { background: var(--jt-endorse); border-color: var(--jt-endorse); color: var(--otr-graphite); }
.btn--jt:hover { background: #ffce3a; border-color: #ffce3a; color: var(--otr-graphite); }
.btn--ghost {
  background: transparent;
  color: var(--otr-bone);
  border-color: var(--otr-rule-strong);
}
.theme-light .btn--ghost { color: var(--otr-graphite); border-color: var(--otr-graphite); }
.btn--ghost:hover { background: var(--otr-bone); color: var(--otr-graphite); border-color: var(--otr-bone); }
.btn--small { padding: var(--s-2) var(--s-3); font-size: 0.75rem; }

.btn::after {
  content: '→';
  font-family: var(--otr-mono);
  transition: transform var(--t-base);
}
.btn:hover::after { transform: translateX(4px); }
.btn--no-arrow::after { display: none; }

/* Tags */
.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  padding: 0.2rem var(--s-2);
  font-family: var(--otr-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: transparent;
  color: var(--otr-bone);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 2px;
}
.theme-light .tag { background: transparent; color: var(--otr-graphite); border-color: var(--otr-fog); }
.tag--amber { background: transparent; color: var(--otr-amber-bright); border-color: rgba(224,132,40,0.5); }
.tag--steel { background: transparent; color: var(--otr-steel-light); border-color: rgba(92,122,140,0.5); }

/* Site Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: transparent;
  color: var(--otr-bone);
  border-bottom: 1px solid transparent;
  transition: background var(--t-base), border-color var(--t-base), color var(--t-base),
              transform 320ms cubic-bezier(0.2, 0.7, 0.2, 1);
  will-change: transform;
}
/* Hide on scroll-down, reveal on scroll-up */
.site-header.is-hidden { transform: translateY(-100%); }
/* Frosted tint once the page is scrolled, so text stays legible over content.
   Stays fully transparent at the very top (over the hero). */
.site-header.is-scrolled {
  background: rgba(6, 10, 14, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--otr-rule);
}
.site-header.is-light.is-scrolled {
  background: rgba(245, 244, 240, 0.62);
  border-bottom-color: rgba(15, 20, 25, 0.12);
}
/* Adaptive text colour — light text on dark backgrounds (default),
   dark text on light backgrounds. Active/hover links are always the accent. */
.site-header.is-light .site-header__logo-text,
.site-header.is-light .site-nav a { color: var(--otr-graphite); }
.site-header.is-light .site-header__logo-text-sub { color: var(--otr-steel); }
.site-header.is-light .mobile-toggle span { background: var(--otr-graphite); }
.site-header.is-light .site-nav a:hover,
.site-header.is-light .site-nav a.is-active { color: var(--otr-amber-bright); }

.site-header__strip {
  padding: var(--s-2) 0;
  background: rgba(0,0,0,0.4);
  border-bottom: 1px solid var(--otr-rule);
  font-family: var(--otr-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.site-header__strip-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: var(--s-4);
  flex-wrap: wrap;
}
.site-header__strip a {
  color: var(--otr-fog);
  border-bottom: 0;
}
.site-header__strip a:hover { color: var(--otr-amber-bright); }
.endorse {
  color: var(--jt-endorse);
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  border-bottom: 0;
}

.site-header__main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--s-4);
  gap: var(--s-6);
}

.site-header__logo {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  text-decoration: none;
  color: var(--otr-bone);
  border-bottom: 0;
}
.site-header__logo svg { display: block; }
.site-header__logo-img { display: block; height: 40px; width: auto; }
/* Dark header (default): show the white-wordmark logo. Light header: swap. */
.site-header__logo-img--dark { display: none; }
.site-header.is-light .site-header__logo-img--light { display: none; }
.site-header.is-light .site-header__logo-img--dark { display: block; }
.site-header__logo-text {
  font-family: var(--otr-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 1;
  color: var(--otr-bone);
}
.site-header__logo-text .ot { color: var(--otr-amber-bright); }
.site-header__logo-text-sub {
  display: block;
  font-family: var(--otr-mono);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  color: var(--otr-steel-light);
  margin-top: 2px;
  font-weight: 400;
}

.site-nav {
  display: none;
  align-items: center;
  gap: var(--s-5);
  margin-left: auto;
}
.site-nav a {
  font-family: var(--otr-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--otr-fog);
  padding-block: var(--s-2);
  border-bottom: 1px solid transparent;
  transition: all var(--t-fast);
}
.site-nav a:hover, .site-nav a.is-active {
  color: var(--otr-amber-bright);
  border-bottom-color: var(--otr-amber-bright);
}

.mobile-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0;
}
.mobile-toggle span { display: block; height: 1px; width: 100%; background: var(--otr-bone); }

/* Header Contact CTA — desktop only (mobile uses the menu) */
.site-header__cta { display: none; }

@media (min-width: 1024px) {
  .site-nav { display: flex; }
  .site-header__cta { display: inline-flex; }
  .mobile-toggle { display: none; }
}

.mobile-menu { display: none; background: var(--otr-graphite); padding: var(--s-5) 0; border-top: 1px solid var(--otr-rule); }
.mobile-menu.is-open { display: block; }
.mobile-menu a {
  display: block;
  padding: var(--s-3) 0;
  font-family: var(--otr-mono);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--otr-bone);
  border-bottom: 1px solid var(--otr-rule);
}

/* Footer */
.site-footer {
  background: var(--otr-graphite-deep);
  color: var(--otr-bone);
  border-top: 1px solid var(--otr-rule);
}
.site-footer__main {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-7);
  padding-block: var(--s-8);
}
@media (min-width: 768px) {
  .site-footer__main { grid-template-columns: 2fr 1fr 1fr 1fr; }
}
.site-footer__col h4 {
  font-family: var(--otr-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--otr-amber-bright);
  margin-bottom: var(--s-4);
  font-weight: 500;
}
.site-footer__col ul { list-style: none; padding: 0; margin: 0; }
.site-footer__col li { margin-bottom: var(--s-2); }
.site-footer__col a {
  color: var(--otr-fog);
  font-size: 0.9rem;
  border-bottom: 0;
}
.site-footer__col a:hover { color: var(--otr-bone); }

.site-footer__brand {
  display: inline-block;
  border-bottom: 0;
}
.site-footer__brand-img { display: block; height: 46px; width: auto; }
.site-footer__endorse {
  margin-top: var(--s-3);
  padding: var(--s-2) var(--s-3);
  background: rgba(254,192,19,0.08);
  border-left: 2px solid var(--jt-endorse);
  font-family: var(--otr-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--jt-endorse);
  display: inline-block;
}

.site-footer__legal {
  padding-block: var(--s-5);
  border-top: 1px solid var(--otr-rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s-4);
  font-family: var(--otr-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--otr-steel-light);
}

/* Section header */
.section-header {
  display: flex;
  gap: var(--s-5);
  align-items: end;
  margin-bottom: var(--s-7);
  flex-wrap: wrap;
  padding-bottom: var(--s-4);
  border-bottom: 1px solid var(--otr-rule);
}
.theme-light .section-header { border-color: var(--otr-fog); }
.section-header__main { flex: 1; min-width: 280px; }
.section-header__title {
  font-family: var(--otr-display);
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-top: var(--s-3);
}
.section-header__meta {
  font-family: var(--otr-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--otr-steel-light);
  text-align: right;
}

/* Hero */
.hero {
  position: relative;
  /* Pull up under the transparent fixed-feel header so the video shows behind
     the nav, then pad the content back down so it clears the nav. */
  margin-top: calc(-1 * var(--header-h, 92px));
  padding-top: calc(var(--header-h, 92px) + var(--s-7));
  padding-bottom: var(--s-9);
  overflow: hidden;
  isolation: isolate;
}
@media (min-width: 768px) { .hero { padding-bottom: var(--s-10); } }
/* Full-viewport hero (video fills the page; content vertically centred) */
.hero--full { min-height: 100vh; display: flex; align-items: center; }
.hero--full > .container { width: 100%; }

/* Full-bleed background video */
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}

/* Legibility overlay above the video: left-weighted darkening + vignette,
   plus a slow-scrolling technical scan-grid. */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(100deg,
      var(--otr-graphite-deep) 0%,
      rgba(6,10,14,0.86) 28%,
      rgba(6,10,14,0.5) 60%,
      rgba(6,10,14,0.66) 100%),
    radial-gradient(125% 120% at 50% 0%, transparent 52%, rgba(6,10,14,0.7) 100%);
}
/* Any hero content following the overlay must sit above it (fixes inner-page
   heroes that reuse .hero__bg without a video). */
.hero__bg ~ .container { position: relative; z-index: 2; }
.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent 0px, transparent 80px, rgba(255,255,255,0.02) 80px, rgba(255,255,255,0.02) 81px);
  background-size: 100% 81px;
  animation: otr-grid-scroll 22s linear infinite;
}

@keyframes otr-grid-scroll {
  from { background-position: 0 0; }
  to   { background-position: 0 81px; }
}

/* Manual play control — only shown if the browser blocks muted autoplay
   (e.g. battery/efficiency mode). Self-hides once playback starts. */
.hero__play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  width: 76px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid rgba(245, 244, 240, 0.7);
  background: rgba(6, 10, 14, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: var(--otr-bone);
  cursor: pointer;
  transition: color var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}
.hero__play[hidden] { display: none; }
.hero__play svg { width: 30px; height: 30px; margin-left: 3px; }
.hero__play:hover {
  color: var(--otr-amber-bright);
  border-color: var(--otr-amber-bright);
  transform: translate(-50%, -50%) scale(1.06);
}

.hero__inner {
  position: relative;
  z-index: 2;
  max-width: 680px;
}

.hero__display {
  font-family: var(--otr-display);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 4.5rem);
  line-height: 1.0;
  letter-spacing: -0.025em;
  margin-bottom: var(--s-5);
}
/* Lead line at half the display size */
.hero__display .hero__lead {
  display: inline-block;
  font-size: 0.5em;
  font-weight: 700;
}
.hero__display .accent {
  color: var(--otr-amber-bright);
  font-family: var(--otr-serif);
  font-style: normal;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hero__sub {
  font-size: 1.15rem;
  line-height: 1.5;
  color: var(--otr-fog);
  max-width: 580px;
  margin-bottom: var(--s-6);
}

.hero__actions {
  display: flex;
  gap: var(--s-3);
  flex-wrap: wrap;
}

/* Quick index — box-free, editorial-style interactive list below the hero */
.quicknav {
  padding-block: var(--s-7);
}
.quicknav__head {
  font-family: var(--otr-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--otr-amber-bright);
  margin-bottom: var(--s-3);
}
.quicknav__list {
  display: grid;
  grid-template-columns: 1fr;
  column-gap: var(--s-8);
  /* top hairline so the list reads as a divided index, not a box */
  border-top: 1px solid var(--otr-rule);
}
@media (min-width: 768px) { .quicknav__list { grid-template-columns: 1fr 1fr; } }

.qx {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-4) var(--s-3);
  text-decoration: none;
  border-bottom: 1px solid var(--otr-rule);
  overflow: hidden;
}
/* soft amber wash that sweeps in from the left on hover (no box outline) */
.qx::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(224,132,40,0.12) 0%, rgba(224,132,40,0.04) 45%, transparent 80%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-base);
  pointer-events: none;
}
.qx:hover::before, .qx:focus-visible::before { transform: scaleX(1); }
/* growing baseline accent on hover */
.qx::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 1px;
  width: 100%;
  background: var(--otr-amber-bright);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-base);
}
.qx:hover::after, .qx:focus-visible::after { transform: scaleX(1); }
.qx > * { position: relative; z-index: 1; }

.qx__num {
  font-family: var(--otr-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--otr-steel-light);
  transition: color var(--t-fast);
}
.qx:hover .qx__num { color: var(--otr-amber-bright); }
.qx__body { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.qx__title {
  font-family: var(--otr-sans);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--otr-bone);
  transition: color var(--t-fast), transform var(--t-base);
}
.qx:hover .qx__title { color: var(--otr-amber-bright); transform: translateX(2px); }
.qx__meta {
  font-family: var(--otr-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--otr-steel-light);
}
.qx__arrow {
  font-family: var(--otr-mono);
  font-size: 1rem;
  color: var(--otr-amber-bright);
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity var(--t-base), transform var(--t-base);
}
.qx:hover .qx__arrow, .qx:focus-visible .qx__arrow { opacity: 1; transform: translateX(0); }

/* Stat block */
/* Endorsement + stats block */
.proof { padding-block: var(--s-7); }
.proof__endorse {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  flex-wrap: wrap;
  padding-bottom: var(--s-6);
  margin-bottom: var(--s-7);
  border-bottom: 1px solid var(--otr-rule);
}
.proof__endorse-bar {
  width: 8px;
  height: 18px;
  background: var(--jt-endorse);
  flex-shrink: 0;
}
.proof__endorse-text {
  font-family: var(--otr-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--jt-endorse);
}
.proof__endorse-link {
  margin-left: auto;
  font-family: var(--otr-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--jt-endorse);
  border-bottom: 1px solid rgba(254,192,19,0.35);
  transition: border-color var(--t-fast);
}
.proof__endorse-link:hover { border-bottom-color: var(--jt-endorse); }

.stats-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-6) var(--s-5);
}
@media (min-width: 768px) { .stats-row { grid-template-columns: repeat(4, 1fr); } }
/* Box-free "ledger" stat — a thin left accent rule instead of a boxed cell */
.stat-cell {
  position: relative;
  padding: var(--s-1) 0 var(--s-1) var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  border-left: 2px solid var(--otr-rule-strong);
  transition: border-color var(--t-base);
}
.stat-cell:hover { border-left-color: var(--otr-amber-bright); }
.stat-cell__value {
  font-family: var(--otr-display);
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--otr-amber-bright);
  font-variant-numeric: tabular-nums;
}
.stat-cell__label {
  font-family: var(--otr-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--otr-steel-light);
}

/* Reference cards */
.ref-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-5);
}
@media (min-width: 640px) { .ref-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .ref-grid { grid-template-columns: repeat(3, 1fr); } }

/* Apple-inspired: soft elevated surfaces, no borders or divider lines, a
   gentle lift + soft shadow on hover. */
.ref-card {
  background: var(--otr-graphite-soft);
  padding: var(--s-6);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  text-decoration: none;
  color: var(--otr-bone);
  border-bottom: 0;
  will-change: transform;
  transition: transform 450ms cubic-bezier(0.2, 0.7, 0.2, 1),
              background 450ms ease, box-shadow 450ms ease;
}
.ref-card:hover {
  background: #212a33;
  transform: translateY(-6px);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.5);
}
.theme-light .ref-card { background: #ffffff; color: var(--otr-graphite); }
.theme-light .ref-card:hover {
  background: #ffffff;
  box-shadow: 0 24px 50px rgba(15, 20, 25, 0.12);
}

.ref-card__code {
  font-family: var(--otr-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--otr-amber-bright);
}
.ref-card__title {
  font-family: var(--otr-display);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--otr-bone);
}
.theme-light .ref-card__title { color: var(--otr-graphite); }
.ref-card__body { font-size: 0.92rem; color: var(--otr-fog); line-height: 1.5; }
.theme-light .ref-card__body { color: var(--otr-steel); }
.ref-card__footer {
  margin-top: auto;
  padding-top: var(--s-4);
  display: flex;
  justify-content: space-between;
  gap: var(--s-3);
  font-family: var(--otr-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--otr-steel-light);
}
/* Action label brightens on hover (no coloured line). */
.ref-card__footer span:first-child { transition: color var(--t-fast); }
.ref-card:hover .ref-card__footer span:first-child { color: var(--otr-bone); }
.theme-light .ref-card:hover .ref-card__footer span:first-child { color: var(--otr-graphite); }

/* About section */
.about__title {
  margin-top: var(--s-4);
  margin-bottom: var(--s-6);
  max-width: 740px;
}
.about__lead {
  font-size: clamp(1.2rem, 2.2vw, 1.45rem);
  line-height: 1.5;
  color: var(--otr-bone);
  max-width: 760px;
  margin-bottom: var(--s-5);
}
.about__body {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--otr-fog);
  max-width: 700px;
  margin-bottom: 0;
}

/* Trading promo card — rounded elevated surface, no harsh border bar */
.trade-card {
  margin-top: var(--s-8);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-6);
  align-items: center;
  padding: clamp(var(--s-6), 4vw, var(--s-8));
  border-radius: 22px;
  background: var(--otr-graphite-soft);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05),
              0 24px 60px rgba(0, 0, 0, 0.35);
}
@media (min-width: 760px) {
  .trade-card { grid-template-columns: 1.7fr 1fr; gap: var(--s-8); }
}
.trade-card__eyebrow {
  display: inline-block;
  font-family: var(--otr-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--jt-endorse);
  margin-bottom: var(--s-3);
}
.trade-card__title {
  font-family: var(--otr-display);
  font-size: clamp(1.4rem, 2.6vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--otr-bone);
  margin: 0 0 var(--s-3);
}
.trade-card__text {
  color: var(--otr-fog);
  line-height: 1.6;
  margin: 0;
  max-width: 52ch;
}
.trade-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
}
@media (min-width: 760px) {
  .trade-card__actions { flex-direction: column; align-items: stretch; }
}

/* Portal */
.portal {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--otr-graphite-deep);
  color: var(--otr-bone);
  /* Extended (taller) section, pulled up under the transparent header so the
     background video runs behind the nav. */
  min-height: 100vh;
  margin-top: calc(-1 * var(--header-h, 92px));
  padding-top: calc(var(--header-h, 92px) + var(--s-8));
  padding-bottom: var(--s-9);
  display: flex;
  align-items: center;
}
.portal__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}
/* Strong dark scrim so text stays legible over the bright light-trails. */
.portal__bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(6,10,14,0.88) 0%, rgba(6,10,14,0.68) 45%, rgba(6,10,14,0.88) 100%),
    radial-gradient(130% 120% at 50% 35%, transparent 0%, rgba(6,10,14,0.6) 100%);
}
.portal > .container { position: relative; z-index: 2; width: 100%; }
.portal__search {
  display: flex;
  gap: 0;
  padding: 5px 5px 5px 6px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 16px;
  overflow: hidden;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color var(--t-base), background var(--t-base), box-shadow var(--t-base);
}
.portal__search:focus-within {
  border-color: var(--otr-amber-bright);
  background: rgba(255,255,255,0.08);
  box-shadow: 0 0 0 4px rgba(224,132,40,0.12);
}
.portal__input {
  flex: 1;
  background: transparent;
  border: 0;
  padding: var(--s-3) var(--s-4);
  font-family: var(--otr-sans);
  font-size: 1.1rem;
  color: var(--otr-bone);
  outline: none;
}
.portal__input::placeholder { color: var(--otr-steel-light); }
.portal__btn {
  padding: var(--s-3) var(--s-5);
  background: var(--otr-amber);
  color: var(--otr-graphite);
  border: 0;
  border-radius: 11px;
  font-family: var(--otr-mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: background var(--t-fast), transform 120ms ease;
}
.portal__btn:hover { background: var(--otr-amber-bright); }
.portal__btn:active { transform: scale(0.95); }

/* Click ripple (added on .portal__btn, .portal__suggestion, .btn) */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.45);
  transform: scale(0);
  pointer-events: none;
  animation: otr-ripple 600ms ease-out forwards;
}
@keyframes otr-ripple {
  to { transform: scale(2.6); opacity: 0; }
}

.portal__suggestions {
  display: flex;
  gap: var(--s-2);
  margin-top: var(--s-4);
  flex-wrap: wrap;
}
.portal__suggestion {
  position: relative;
  overflow: hidden;
  padding: var(--s-2) var(--s-4);
  font-family: var(--otr-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.14);
  color: var(--otr-fog);
  cursor: pointer;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: border-color var(--t-fast), color var(--t-fast),
              background var(--t-fast), transform 140ms ease;
}
.portal__suggestion:hover {
  border-color: var(--otr-amber-bright);
  color: var(--otr-amber-bright);
  transform: translateY(-2px);
}
.portal__suggestion:active { transform: scale(0.95); }

.portal__answer {
  margin-top: var(--s-7);
  padding: var(--s-6);
  background: var(--otr-graphite-soft);
  border: 1px solid var(--otr-rule-strong);
  border-left: 4px solid var(--otr-amber);
}
.portal__answer-lede {
  font-family: var(--otr-display);
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: var(--s-5);
  color: var(--otr-bone);
}
.portal__answer-body { font-size: 1rem; line-height: 1.6; color: var(--otr-fog); }
.portal__answer-body p { margin-bottom: var(--s-4); }
.portal__answer-body strong { color: var(--otr-bone); }

.portal__sources {
  margin-top: var(--s-5);
  padding-top: var(--s-4);
  border-top: 1px solid var(--otr-rule);
}
.portal__sources-label {
  font-family: var(--otr-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--otr-amber-bright);
  margin-bottom: var(--s-3);
}
.portal__source {
  display: flex;
  gap: var(--s-2);
  align-items: baseline;
  padding: var(--s-2) 0;
  font-family: var(--otr-mono);
  font-size: 0.78rem;
  color: var(--otr-steel-light);
}
.portal__source-num { color: var(--otr-amber-bright); }

.portal__escalation {
  margin-top: var(--s-5);
  padding: var(--s-5);
  background: rgba(254,192,19,0.06);
  border: 1px solid rgba(254,192,19,0.3);
  border-left: 4px solid var(--jt-endorse);
}
.portal__escalation-label {
  font-family: var(--otr-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--jt-endorse);
  margin-bottom: var(--s-2);
}
.portal__escalation-text {
  font-size: 1rem;
  color: var(--otr-bone);
}
.portal__escalation-text strong { color: var(--jt-endorse); }

/* Spec sheet */
.spec-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-2);
  padding: var(--s-3) 0;
  border-bottom: 1px solid var(--otr-rule);
  font-size: 0.92rem;
}
.theme-light .spec-row { border-color: var(--otr-fog); }
.spec-row__label {
  font-family: var(--otr-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--otr-steel-light);
}
.spec-row__value { font-weight: 500; }

/* Utility */
.text-amber { color: var(--otr-amber-bright); }
.text-bone { color: var(--otr-bone); }
.text-fog { color: var(--otr-fog); }
.text-center { text-align: center; }
.no-wrap { white-space: nowrap; }
.gap-2 { gap: var(--s-2); }
.gap-3 { gap: var(--s-3); }
.gap-4 { gap: var(--s-4); }
.gap-5 { gap: var(--s-5); }
.mt-4 { margin-top: var(--s-4); }
.mt-5 { margin-top: var(--s-5); }
.mt-6 { margin-top: var(--s-6); }
.mb-4 { margin-bottom: var(--s-4); }
.mb-5 { margin-bottom: var(--s-5); }
.mb-6 { margin-bottom: var(--s-6); }
.flex { display: flex; }
.grid { display: grid; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ============================================================
   HERO ANIMATION — OTR
   One slide-in on page load. Honours prefers-reduced-motion.
   ============================================================ */

@keyframes otr-slide-in {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes otr-fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero__display { animation: otr-slide-in 500ms cubic-bezier(0.2, 0.7, 0.2, 1) 100ms both; }
.hero__sub { animation: otr-fade-up 500ms ease-out 300ms both; }
.hero__actions { animation: otr-fade-up 500ms ease-out 450ms both; }

/* ============================================================
   ACCESSIBILITY — prefers-reduced-motion
   WCAG 2.2 AA. Disables all transitions and animations for
   users who have requested reduced motion.
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   AUTHOR BLOCK — David Jewell E-E-A-T
   Replaces text-only bylines on Market Notes and news articles.
   ============================================================ */
.author-block {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin: var(--s-5) 0;
  padding: var(--s-4) var(--s-5);
  background: rgba(0, 0, 0, 0.25);
  border-left: 3px solid var(--otr-amber);
}
.author-block__avatar {
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border: 2px solid var(--otr-rule-strong);
}
.author-block__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.author-block__name {
  font-family: var(--otr-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--otr-bone);
  letter-spacing: -0.01em;
}
.author-block__role {
  font-family: var(--otr-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--otr-fog);
  text-transform: uppercase;
}
.author-block__date {
  font-family: var(--otr-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--otr-steel-light);
  margin-top: 4px;
}

/* Font display — non-blocking font loads */
@font-face {
  font-family: 'IBM Plex Mono';
  font-display: swap;
}

/* Image placeholders */
.img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--otr-steel);
  background-image:
    repeating-linear-gradient(45deg, transparent 0px, transparent 24px, rgba(0,0,0,0.12) 24px, rgba(0,0,0,0.12) 25px);
  color: var(--otr-amber-bright);
  font-family: var(--otr-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  min-height: 240px;
  border: 1px solid var(--otr-rule-strong);
}

/* ============================================================
   SCROLL REVEAL — subtle, opt-in via [data-reveal]
   Honours prefers-reduced-motion (no transform when reduced).
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  [data-reveal] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 650ms cubic-bezier(0.2, 0.7, 0.2, 1),
                transform 650ms cubic-bezier(0.2, 0.7, 0.2, 1);
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, transform;
  }
  [data-reveal].is-visible { opacity: 1; transform: none; }
}

/* ============================================================
   FAQ ACCORDION — native <details>, box-free, reusable
   ============================================================ */
.faq { border-top: 1px solid var(--otr-rule); }
.theme-light .faq { border-top-color: rgba(15,20,25,0.12); }
.faq__item { border-bottom: 1px solid var(--otr-rule); }
.theme-light .faq__item { border-bottom-color: rgba(15,20,25,0.12); }
.faq__q {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-5) 0;
  font-family: var(--otr-display);
  font-weight: 600;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: var(--otr-bone);
  transition: color var(--t-fast);
}
.theme-light .faq__q { color: var(--otr-graphite); }
.faq__q::-webkit-details-marker { display: none; }
.faq__q:hover { color: var(--otr-amber-bright); }
.theme-light .faq__q:hover { color: var(--otr-amber-deep); }
.faq__icon { position: relative; width: 16px; height: 16px; flex-shrink: 0; }
.faq__icon::before, .faq__icon::after {
  content: "";
  position: absolute;
  background: var(--otr-amber-bright);
  transition: transform var(--t-base), opacity var(--t-base);
}
.theme-light .faq__icon::before, .theme-light .faq__icon::after { background: var(--otr-amber-deep); }
.faq__icon::before { top: 7px; left: 0; width: 16px; height: 2px; }
.faq__icon::after { left: 7px; top: 0; width: 2px; height: 16px; }
.faq__item[open] .faq__icon::after { transform: rotate(90deg); opacity: 0; }
.faq__a {
  padding: 0 0 var(--s-5);
  max-width: 64ch;
  color: var(--otr-fog);
  line-height: 1.65;
}
.theme-light .faq__a { color: var(--otr-steel); }
.faq__a p { margin: 0; }
.faq__item[open] .faq__a { animation: otr-fade-up 360ms ease-out; }

/* ============================================================
   FORM FIELDS — rounded, glass, focus-glow (reusable)
   ============================================================ */
.field { display: block; margin-bottom: var(--s-5); }
.field__label {
  display: block;
  font-family: var(--otr-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--otr-steel-light);
  margin-bottom: var(--s-2);
}
.field__control {
  width: 100%;
  padding: var(--s-3) var(--s-4);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--otr-rule-strong);
  border-radius: 12px;
  color: var(--otr-bone);
  font-family: var(--otr-sans);
  font-size: 1rem;
  line-height: 1.5;
  transition: border-color var(--t-base), background var(--t-base), box-shadow var(--t-base);
}
.field__control::placeholder { color: var(--otr-steel-light); }
.field__control:focus {
  outline: none;
  border-color: var(--otr-amber-bright);
  background: rgba(255,255,255,0.07);
  box-shadow: 0 0 0 4px rgba(224,132,40,0.12);
}
textarea.field__control { min-height: 170px; resize: vertical; }
select.field__control {
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--otr-steel-light) 50%),
                    linear-gradient(135deg, var(--otr-steel-light) 50%, transparent 50%);
  background-position: calc(100% - 20px) 1.15rem, calc(100% - 14px) 1.15rem;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: var(--s-7);
}
.field__row { display: grid; grid-template-columns: 1fr; gap: 0 var(--s-5); }
@media (min-width: 640px) { .field__row { grid-template-columns: 1fr 1fr; } }
