/* ==========================================================================
   MSK Motorsport — shared stylesheet
   Concept: a dark "chrome frame" (header + footer, like an instrument
   bezel) around light, paper-clean content in between. The recurring
   motif is a "harness line" — a thin rule with small square connector
   nodes — standing in for the wiring looms this business builds. Spec
   data is set in a monospace face because it reads as real telemetry
   data, not as decoration.
   ========================================================================== */

:root {
  /* page (content) */
  --bg: #ffffff;
  --panel: #f2f3f4;
  --panel-raised: #e9eaec;
  --line: #dfe2e6;
  --text: #16181c;
  --text-muted: #5b6169;

  /* accents on light content — deep enough to stay legible on white */
  --amber: #e8a33d;      /* small accents, borders, bars, button fills (dark text on top keeps contrast) */
  --teal: #1e8f73;       /* text-weight accent on light backgrounds */

  /* dark frame (header + footer) */
  --frame-bg: #14171c;
  --frame-text: #e9ebee;
  --frame-text-muted: #9aa1ac;
  --frame-line: #2b303a;
  --frame-accent: #4fd1ae; /* bright teal, reserved for the dark frame */

  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --content-width: 1100px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1 0 auto;
}

.site-footer {
  flex-shrink: 0;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

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

/* -- harness line motif -------------------------------------------------- */

.harness-line {
  position: relative;
  height: 1px;
  background: var(--line);
  margin: 0;
}

.harness-line::before,
.harness-line::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 7px;
  height: 7px;
  transform: translateY(-50%);
  background: var(--amber);
}

.harness-line::before { left: 0; }
.harness-line::after { right: 0; background: var(--frame-accent); }

/* -- header / nav (dark frame) -------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(20, 23, 28, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--frame-line);
  color: var(--frame-text);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  color: var(--frame-text);
}

.brand-mark {
  display: block;
  width: 148px;
  height: auto;
}

.main-nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.main-nav a {
  position: relative;
  display: block;
  padding: 10px 14px;
  text-decoration: none;
  font-size: 15px;
  color: var(--frame-text-muted);
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.main-nav a:hover {
  color: var(--frame-text);
}

.main-nav a[aria-current="page"] {
  color: var(--frame-text);
  border-bottom-color: var(--amber);
}

/* -- hero ------------------------------------------------------------------ */

.hero {
  padding: 72px 0 56px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: 0.55;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
  pointer-events: none;
}

.hero .wrap { position: relative; }

.eyebrow-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--teal);
  margin-bottom: 18px;
}

.eyebrow-tag::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--teal);
}

h1.display {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.02;
  margin: 0 0 22px;
  max-width: 18ch;
  color: var(--text);
}

.lede {
  font-size: 19px;
  color: var(--text-muted);
  max-width: 58ch;
  margin: 0 0 28px;
}

.btn {
  display: inline-block;
  padding: 13px 26px;
  background: var(--amber);
  color: #14171c;
  font-weight: 600;
  text-decoration: none;
  font-size: 15px;
  border: 1px solid var(--amber);
  transition: background 0.15s ease, color 0.15s ease;
}

.btn:hover {
  background: transparent;
  color: var(--amber);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  background: var(--panel-raised);
  color: var(--text);
  border-color: var(--text-muted);
}

/* -- generic sections -------------------------------------------------- */

section {
  padding: 64px 0;
}

section + section {
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  gap: 18px;
  align-items: baseline;
  margin-bottom: 34px;
}

.section-head .bar {
  width: 4px;
  align-self: stretch;
  background: var(--amber);
  flex-shrink: 0;
}

h2.display {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(30px, 4vw, 42px);
  margin: 0;
  line-height: 1.05;
  color: var(--text);
}

.section-intro {
  color: var(--text-muted);
  max-width: 62ch;
  margin: 0 0 34px;
}

/* -- gallery -------------------------------------------------------------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.gallery figure {
  margin: 0;
  border: 1px solid var(--line);
  background: var(--panel);
}

.gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.gallery figcaption {
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-muted);
  border-top: 1px solid var(--line);
}

/* -- spec sheet (drift car) ------------------------------------------------ */

.spec-sheet {
  border: 1px solid var(--line);
  background: var(--panel);
}

.spec-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  border-bottom: 1px solid var(--line);
}

.spec-row:last-child { border-bottom: none; }

.spec-row dt {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--teal);
  padding: 13px 16px;
  border-right: 1px solid var(--line);
}

.spec-row dd {
  margin: 0;
  padding: 13px 16px;
  color: var(--text);
  font-size: 15px;
}

/* -- two column layout ----------------------------------------------------- */

.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: start;
}

.split img {
  border: 1px solid var(--line);
}

/* -- product feature list --------------------------------------------- */

.feature-list {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.feature-list li {
  padding: 16px 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 16px;
}

.feature-list li:last-child {
  border-bottom: 1px solid var(--line);
}

.feature-list .fdot {
  display: block;
  width: 8px;
  height: 8px;
  margin-top: 8px;
  background: var(--amber);
}

/* -- contact ---------------------------------------------------------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.contact-block dt {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-top: 20px;
}

.contact-block dt:first-child { margin-top: 0; }

.contact-block dd {
  margin: 4px 0 0;
  font-size: 18px;
  color: var(--text);
}

.contact-block a { text-decoration: none; }
.contact-block a:hover { color: var(--amber); }

.social-links {
  display: flex;
  gap: 14px;
  margin-top: 28px;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--text-muted);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.social-links a:hover {
  color: var(--teal);
  border-color: var(--teal);
}

/* -- footer (dark frame) ---------------------------------------------------- */

.site-footer {
  background: var(--frame-bg);
  border-top: 1px solid var(--frame-line);
  padding: 28px 0;
  color: var(--frame-text-muted);
  font-size: 13.5px;
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.site-footer .social-links a {
  border-color: var(--frame-line);
  color: var(--frame-text-muted);
}

.site-footer .social-links a:hover {
  color: var(--frame-accent);
  border-color: var(--frame-accent);
}

/* -- responsive ------------------------------------------------------------ */

@media (max-width: 820px) {
  .split,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .spec-row {
    grid-template-columns: 1fr;
  }

  .spec-row dt {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .site-header .wrap {
    flex-wrap: wrap;
    min-height: auto;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .main-nav {
    width: 100%;
    justify-content: flex-start;
    gap: 0 6px;
  }
}

@media (max-width: 520px) {
  .gallery {
    grid-template-columns: 1fr;
  }

  .feature-list li {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .brand-mark {
    width: 122px;
  }
}

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

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}
