/* ============================================================
   maverick25.com — KTM Terminal Theme
   Palette: Navy #0a1428 | KTM Orange #ff6200 | RB Blue #0b2d6e
   Fonts: B612 Mono (heading/label) + Barlow (body) via Bunny CDN
   ============================================================ */

@import url('https://fonts.bunny.net/css?family=b612-mono:400,700|barlow:400,600,700|barlow-condensed:700,800');

/* ─── Custom Properties ─────────────────────────────────── */
:root {
  --ktm:        #ff6200;
  --navy:       #0a1428;
  --navy-mid:   #0d1c38;
  --blue:       #0b2d6e;
  --blue-dim:   rgba(11,45,110,0.3);
  --text:       #d1e3ff;
  --text-dim:   rgba(209,227,255,0.55);
  --text-muted: rgba(209,227,255,0.3);
  --border:     rgba(11,45,110,0.7);
  --border-acc: rgba(255,98,0,0.35);
  --mono:       'B612 Mono', 'Courier New', monospace;
  --sans:       'Barlow', system-ui, sans-serif;
  --cond:       'Barlow Condensed', 'Barlow', system-ui, sans-serif;
  --max-w:      1520px;
  --pad:        clamp(1rem, 4vw, 2rem);
  --radius:     0;
}

/* ─── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  background-color: var(--navy);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--ktm); }
ul { list-style: none; }
button { cursor: pointer; font: inherit; }
table { border-collapse: collapse; width: 100%; }

/* ─── Typography ─────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--mono);
  font-weight: 700;
  line-height: 1.1;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2.4rem, 6vw, 5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.4rem); margin-bottom: .75rem; }
h3 { font-size: clamp(1rem, 2vw, 1.4rem); margin-bottom: .5rem; }
p  { margin-bottom: 1rem; color: var(--text-dim); }
strong { color: var(--text); font-weight: 700; }

.label {
  font-family: var(--mono);
  font-size: .65rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.ktm { color: var(--ktm); }
.badge-12 {
  display: inline-block;
  background: var(--ktm);
  color: var(--navy);
  font-family: var(--mono);
  font-size: .65rem;
  font-weight: 700;
  padding: .15em .5em;
  line-height: 1.4;
}

/* ─── Layout Helpers ────────────────────────────────────── */
.container { max-width: var(--max-w); margin-inline: auto; padding-inline: var(--pad); }
.grid-12 { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1.5rem; }
.col-4  { grid-column: span 4; }
.col-5  { grid-column: span 5; }
.col-6  { grid-column: span 6; }
.col-7  { grid-column: span 7; }
.col-8  { grid-column: span 8; }
.col-12 { grid-column: span 12; }

/* ─── Grid Pattern Background ────────────────────────────── */
.grid-bg {
  background-image:
    linear-gradient(rgba(255,98,0,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,98,0,.04) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* ─── Scanline Animation ─────────────────────────────────── */
.scanline {
  position: absolute; width: 100%; height: 80px; pointer-events: none; z-index: 2;
  background: linear-gradient(0deg, transparent 0%, rgba(255,98,0,.03) 50%, transparent 100%);
  animation: scanline 8s linear infinite;
  bottom: 100%;
}
@keyframes scanline {
  0%   { bottom: 100%; }
  100% { bottom: -80px; }
}

/* ─── Chequered Flag Divider ─────────────────────────────── */
.chequered {
  height: 4px; width: 100%;
  background-image:
    linear-gradient(45deg, #fff 25%, transparent 25%),
    linear-gradient(-45deg, #fff 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #fff 75%),
    linear-gradient(-45deg, transparent 75%, #fff 75%);
  background-size: 8px 8px;
  background-position: 0 0, 0 4px, 4px 4px, 4px 0;
  background-color: #000;
  opacity: .35;
}

/* ─── Navigation ─────────────────────────────────────────── */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--navy);
  border-bottom: 1px solid var(--border-acc);
  height: 64px;
  display: flex; align-items: center;
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; max-width: var(--max-w); margin-inline: auto; padding-inline: var(--pad);
}
.nav-logo { display: flex; align-items: center; gap: .75rem; }
.nav-logo svg { flex-shrink: 0; }
.nav-sys  { font-family: var(--mono); font-size: .6rem; color: var(--text-muted); display: none; }
.nav-links { display: flex; align-items: stretch; height: 64px; }
.nav-links a {
  display: flex; align-items: center; padding-inline: 1rem;
  font-family: var(--mono); font-size: .65rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-dim);
  border-right: 1px solid var(--border-acc);
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s, background .2s;
}
.nav-links a:hover  { color: #fff; background: rgba(255,98,0,.06); border-bottom-color: var(--ktm); }
.nav-links a.active { color: #fff; border-bottom-color: var(--ktm); }
.nav-cta {
  display: flex; align-items: center; margin-left: .75rem; padding: .4rem 1rem;
  border: 1px solid var(--ktm); color: var(--ktm);
  font-family: var(--mono); font-size: .65rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  background: rgba(255,98,0,.06); transition: background .2s, color .2s;
}
.nav-cta:hover { background: var(--ktm); color: var(--navy); }
.nav-time { font-family: var(--mono); font-size: .65rem; color: var(--ktm); white-space: nowrap; }
.nav-hamburger { display: none; background: none; border: none; color: var(--ktm); font-size: 1.4rem; padding: .5rem; }

/* ─── Hero Section ───────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  min-height: 75vh; display: flex; align-items: center;
  background: var(--navy); border-bottom: 1px solid var(--border);
}
.hero-content { position: relative; z-index: 5; padding-block: 4rem; }
.hero-status {
  display: flex; align-items: center; gap: .75rem; margin-bottom: 1.5rem;
}
.status-dot {
  width: 8px; height: 8px; background: var(--ktm); flex-shrink: 0;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }
.status-label { font-family: var(--mono); font-size: .6rem; letter-spacing: .2em; color: var(--ktm); text-transform: uppercase; }
.hero-heading { margin-bottom: 2rem; }
.hero-heading .sub { display: block; color: var(--ktm); font-size: clamp(1.8rem, 4vw, 3.2rem); }
.hero-sectors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 2rem; }
.sector {
  border-left: 2px solid var(--ktm); padding: .6rem .75rem;
  background: var(--blue-dim);
}
.sector.dim { border-left-color: var(--blue); }
.sector .s-label { font-family: var(--mono); font-size: .55rem; letter-spacing: .12em; color: var(--text-muted); display: block; margin-bottom: .25rem; }
.sector .s-val   { font-family: var(--mono); font-size: 1.2rem; color: #fff; font-weight: 700; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }
.btn-primary {
  padding: .75rem 2rem; background: var(--ktm); color: var(--navy);
  font-family: var(--mono); font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  transition: background .2s, color .2s; border: none;
}
.btn-primary:hover { background: #fff; color: var(--navy); }
.btn-secondary {
  padding: .75rem 2rem; border: 1px solid var(--blue);
  color: #fff; font-family: var(--mono); font-size: .7rem;
  font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
  background: var(--blue-dim); transition: border-color .2s, background .2s;
}
.btn-secondary:hover { border-color: var(--ktm); background: rgba(11,45,110,.5); }

/* Hero visuals side */
.hero-visual {
  display: flex; align-items: center; justify-content: center;
  height: 100%; padding: 2rem;
  border-left: 1px solid rgba(11,45,110,.4);
  background: rgba(11,45,110,.08);
  position: relative;
}
.hero-bike { width: 100%; max-width: 420px; opacity: .85; }
.hero-spec {
  position: absolute; bottom: 1.5rem; right: 1.5rem;
  border: 1px solid var(--border-acc); padding: .5rem .75rem;
  text-align: right;
}
.hero-spec .s-label { display: block; }
.hero-spec .s-id    { font-family: var(--mono); color: #fff; font-size: 1.1rem; }

/* Hero circuit background trace */
.circuit-trace {
  position: absolute; right: 0; top: 0; width: 50%; height: 100%;
  opacity: .08; pointer-events: none; z-index: 1;
}

/* ─── Section Panels (Terminal Style) ────────────────────── */
.section { padding-block: 3rem; }
.section.dark { background: var(--navy); }
.section.mid  { background: var(--navy-mid); }

.panel {
  border: 1px solid var(--border);
  background: rgba(11,45,110,.05);
}
.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--blue); border-bottom: 1px solid rgba(255,98,0,.2);
  padding: .6rem 1rem;
}
.panel-header .panel-title {
  font-family: var(--mono); font-size: .65rem; font-weight: 700;
  color: #fff; text-transform: uppercase; letter-spacing: .1em;
}
.panel-header .panel-action {
  font-family: var(--mono); font-size: .6rem; color: var(--ktm);
}
.panel-body { padding: 1.5rem; }

/* ─── Data Table (Standings) ─────────────────────────────── */
.data-table { width: 100%; font-family: var(--mono); font-size: .8rem; }
.data-table th {
  background: rgba(11,45,110,.5); color: var(--text-muted);
  padding: .75rem 1rem; text-align: left; font-size: .6rem;
  letter-spacing: .1em; text-transform: uppercase;
  border-right: 1px solid rgba(255,255,255,.05);
}
.data-table td {
  padding: .75rem 1rem; border-bottom: 1px solid rgba(255,255,255,.05);
  border-right: 1px solid rgba(255,255,255,.04);
  transition: background .15s;
}
.data-table tr:hover td { background: rgba(255,98,0,.04); }
.data-table .row-featured td {
  background: rgba(11,45,110,.35);
  border-top: 1px solid rgba(255,98,0,.25);
  border-bottom: 1px solid rgba(255,98,0,.25);
}
.data-table .rank { font-weight: 700; color: var(--text-muted); }
.data-table .rank.top { color: var(--ktm); }
.data-table .pilot-name { color: #fff; font-weight: 700; }
.data-table .pts   { text-align: right; font-weight: 700; color: #fff; }
.data-table .diff  { text-align: right; color: var(--text-muted); }
.data-table .team  { color: var(--text-muted); font-size: .65rem; }
.table-scroll { overflow-x: auto; }

/* ─── Last Race Panel ────────────────────────────────────── */
.race-result-card {
  padding: 1rem; background: rgba(11,45,110,.2);
  border-left: 4px solid var(--ktm); margin-bottom: 1rem;
}
.race-result-card .pos {
  font-family: var(--mono); font-size: 3rem; font-weight: 700; color: #fff; line-height: 1;
}
.race-result-card .pilot { font-weight: 700; color: #fff; text-transform: uppercase; font-size: .9rem; }
.race-result-card .detail { font-family: var(--mono); font-size: .65rem; color: var(--text-muted); line-height: 1.7; }
.tyre-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .75rem; }
.tyre-chip {
  background: rgba(11,45,110,.3); border: 1px solid rgba(255,255,255,.07);
  font-family: var(--mono); font-size: .65rem; color: #fff; padding: .35rem .5rem;
}

/* ─── Article / Editorial Section ────────────────────────── */
.article-body { color: var(--text-dim); }
.article-body h2 { color: var(--ktm); margin-top: 2rem; margin-bottom: .75rem; font-size: 1.2rem; }
.article-body h3 { color: #fff; margin-top: 1.5rem; margin-bottom: .5rem; font-size: 1rem; }
.article-body p  { margin-bottom: 1rem; }
.article-body ul { list-style: disc; padding-left: 1.5rem; margin-bottom: 1rem; }
.article-body ul li { margin-bottom: .4rem; color: var(--text-dim); }
.article-body strong { color: #fff; }

/* ─── Rider Cards ────────────────────────────────────────── */
.riders-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.rider-card {
  border: 1px solid var(--border); padding: 1.25rem;
  background: rgba(11,45,110,.08); transition: border-color .2s, background .2s;
}
.rider-card:hover { border-color: var(--border-acc); background: rgba(11,45,110,.18); }
.rider-num { font-family: var(--mono); font-size: 2rem; font-weight: 700; color: var(--ktm); opacity: .5; line-height: 1; }
.rider-name { font-family: var(--mono); font-size: .9rem; font-weight: 700; color: #fff; text-transform: uppercase; margin-block: .3rem; }
.rider-team { font-size: .7rem; color: var(--text-muted); }
.rider-flag { font-size: .75rem; }
.rider-card.featured { border-color: var(--border-acc); background: rgba(11,45,110,.2); }
.rider-card.featured .rider-num { opacity: 1; }

/* ─── Calendar Table ─────────────────────────────────────── */
.calendar-table { width: 100%; font-family: var(--mono); font-size: .78rem; }
.calendar-table th {
  background: rgba(11,45,110,.5); color: var(--text-muted);
  padding: .6rem 1rem; text-align: left; font-size: .6rem; letter-spacing: .1em; text-transform: uppercase;
}
.calendar-table td { padding: .7rem 1rem; border-bottom: 1px solid rgba(255,255,255,.05); }
.calendar-table tr.past td { color: var(--text-muted); }
.calendar-table tr.next td { background: rgba(255,98,0,.08); }
.calendar-table tr.next td:first-child { border-left: 3px solid var(--ktm); }
.calendar-table .gp-name { color: #fff; font-weight: 700; }
.calendar-table .circuit { color: var(--text-muted); font-size: .65rem; }
.calendar-table .flag { font-size: .85rem; }

/* ─── FAQ Section ────────────────────────────────────────── */
.faq-section { padding-block: 3rem; }
.faq-section h2 { margin-bottom: 2rem; }
.faq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 1rem; }
.faq-item {
  border: 1px solid var(--border); padding: 1.25rem 1.5rem;
  background: rgba(11,45,110,.05);
}
.faq-q {
  font-family: var(--mono); font-size: .75rem; font-weight: 700;
  color: var(--ktm); text-transform: uppercase; letter-spacing: .05em;
  margin-bottom: .5rem;
}
.faq-a { font-size: .85rem; color: var(--text-dim); line-height: 1.6; }

/* ─── SVG Infographic Wrapper ────────────────────────────── */
.infographic-wrap { overflow-x: auto; padding-block: 1.5rem; }
.infographic-wrap svg { min-width: 520px; }

/* ─── Predictions Teaser / Section ───────────────────────── */
.pred-teaser {
  border: 1px solid var(--border-acc);
  background: rgba(255,98,0,.04); padding: 2rem;
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2rem;
}
.pred-teaser .pred-kicker { font-family: var(--mono); font-size: .6rem; letter-spacing: .2em; color: var(--ktm); text-transform: uppercase; margin-bottom: .5rem; }
.pred-teaser h2 { margin-bottom: .5rem; font-size: 1.2rem; }
.pred-teaser p  { margin-bottom: 0; }

/* ─── Breadcrumb ──────────────────────────────────────────── */
.breadcrumb { padding-block: .75rem; border-bottom: 1px solid var(--border); margin-bottom: 2rem; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: .25rem; font-family: var(--mono); font-size: .65rem; color: var(--text-muted); }
.breadcrumb li + li::before { content: ' / '; margin-right: .25rem; }
.breadcrumb a { color: var(--text-dim); }
.breadcrumb a:hover { color: var(--ktm); }

/* ─── Page Header Strip ──────────────────────────────────── */
.page-header {
  background: var(--navy-mid); border-bottom: 1px solid var(--border);
  padding-block: 2.5rem;
}
.page-header .kicker { font-family: var(--mono); font-size: .6rem; letter-spacing: .2em; color: var(--ktm); text-transform: uppercase; margin-bottom: .75rem; }
.page-header h1 { margin-bottom: .75rem; }
.page-header .meta { font-family: var(--mono); font-size: .7rem; color: var(--text-muted); }

/* ─── Footer ─────────────────────────────────────────────── */
.site-footer {
  background: #060e1e; border-top: 1px solid var(--border);
  padding-block: 3rem 1.5rem;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2.5rem; margin-bottom: 2rem; }
.footer-brand .foot-logo { margin-bottom: .75rem; }
.footer-brand p { font-size: .8rem; color: var(--text-muted); line-height: 1.6; }
.footer-col h4 { font-family: var(--mono); font-size: .65rem; color: var(--text-muted); letter-spacing: .15em; text-transform: uppercase; margin-bottom: 1rem; }
.footer-col ul li { margin-bottom: .5rem; }
.footer-col ul a { font-size: .82rem; color: var(--text-dim); transition: color .2s; }
.footer-col ul a:hover { color: var(--ktm); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  padding-top: 1.5rem; border-top: 1px solid var(--border);
  font-family: var(--mono); font-size: .62rem; color: var(--text-muted);
}
.footer-bottom .tagline { color: rgba(255,98,0,.5); }

/* ─── Responsive ─────────────────────────────────────────── */
@media (min-width: 1024px) {
  .nav-sys     { display: block; }
  .nav-hamburger { display: none; }
}
@media (max-width: 1023px) {
  .nav-links   { display: none; }
  .nav-time    { display: none; }
  .nav-hamburger { display: block; }

  /* When menu is open: site-nav expands to fit links in normal flow */
  .site-nav.menu-open {
    height: auto;
    flex-wrap: wrap;
    align-items: flex-start;
    padding-bottom: .5rem;
  }
  .site-nav.menu-open .nav-inner {
    flex-wrap: wrap;
    align-items: center;
  }
  .site-nav.menu-open .nav-links {
    display: flex; flex-direction: column;
    width: 100%; order: 3;
    border-top: 1px solid var(--border);
    padding: .5rem 0; gap: 0;
  }
  .site-nav.menu-open .nav-links a {
    padding: .75rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,.06);
    font-size: .9rem; width: 100%;
  }
  .site-nav.menu-open .nav-links a:last-child { border-bottom: none; }
  .grid-12 { grid-template-columns: 1fr; }
  .col-4, .col-5, .col-6, .col-7, .col-8, .col-12 { grid-column: span 1; }
  .hero { min-height: auto; }
  .hero-sectors { grid-template-columns: 1fr 1fr 1fr; }
  .hero-visual { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .pred-teaser { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .hero-sectors { grid-template-columns: 1fr; }
  .footer-grid  { grid-template-columns: 1fr; }
  .faq-grid     { grid-template-columns: 1fr; }
  .riders-grid  { grid-template-columns: 1fr 1fr; }
}

/* ─── Print / Accessibility ──────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .scanline, .status-dot { animation: none; }
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
