/* ============================================
   TXR Motorsport — marketing/support site
   Shared stylesheet — no build step, plain CSS
   Palette matches the TXR logo: black, red, gunmetal gray
   ============================================ */

:root {
  --accent:       #e31e24;
  --accent-dark:  #b8181d;
  --ink:          #f2f2f2;
  --muted:        #9b9b9b;
  --bg:           #0a0a0a;
  --bg-alt:       #151515;
  --border:       #2a2a2a;
  --radius:       10px;
  --max-width:    1120px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

#txr-gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.txr-gate-box {
  max-width: 360px;
  width: 100%;
  text-align: center;
}

.txr-gate-brand {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 8px;
}

.txr-gate-box p {
  color: var(--muted);
  margin-bottom: 20px;
}

#txr-gate-form {
  display: flex;
  gap: 8px;
}

#txr-gate-input {
  flex: 1;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--ink);
  font-size: 16px;
}

#txr-gate-form button {
  padding: 10px 18px;
  border-radius: var(--radius);
  border: none;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

#txr-gate-form button:hover { background: var(--accent-dark); }

#txr-gate-error {
  display: none;
  color: var(--accent);
  margin-top: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

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

/* ── Top nav ─────────────────────────────────────────── */
.site-nav {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky; top: 0; z-index: 100;
}
.site-nav .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 152px;
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 18px; color: var(--ink);
}
.nav-brand img { height: 120px; width: auto; }
.nav-links {
  display: flex; align-items: center; gap: 28px;
  list-style: none;
}
.nav-links a {
  color: var(--muted); font-weight: 500; font-size: 15px;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); text-decoration: none; }
.nav-cta {
  display: inline-block;
  background: var(--accent); color: #fff !important;
  padding: 9px 18px; border-radius: 6px;
  font-weight: 600; font-size: 14px;
}
.nav-cta:hover { background: var(--accent-dark); text-decoration: none; }

.nav-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  font-size: 24px; color: var(--ink);
}

@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
    position: absolute; top: 152px; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 12px 24px 20px;
  }
}

/* ── Hero ────────────────────────────────────────────── */
.hero {
  padding: 88px 0 72px;
  background: linear-gradient(180deg, var(--bg-alt), var(--bg));
  text-align: center;
}
.hero h1 {
  font-size: 44px; line-height: 1.15; letter-spacing: -0.5px;
  margin-bottom: 18px;
}
.hero .lede {
  font-size: 19px; color: var(--muted);
  max-width: 640px; margin: 0 auto 32px;
}
.hero-ctas { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 13px 26px; border-radius: 6px;
  font-weight: 600; font-size: 15px; cursor: pointer; border: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

.hero-shot {
  margin-top: 56px; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); box-shadow: 0 20px 60px rgba(227,30,36,.15);
  max-width: 920px; margin-left: auto; margin-right: auto;
}
.hero-shot .placeholder {
  aspect-ratio: 16/10; background: var(--bg-alt);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 14px;
}
.hero-shot img { display: block; width: 100%; }

/* ── Section shell ───────────────────────────────────── */
section.section { padding: 72px 0; }
section.section.alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 48px; }
.section-head .eyebrow {
  color: var(--accent); font-weight: 700; font-size: 13px;
  text-transform: uppercase; letter-spacing: .8px; margin-bottom: 10px;
}
.section-head h2 { font-size: 32px; margin-bottom: 14px; letter-spacing: -.3px; }
.section-head p { color: var(--muted); font-size: 17px; }

/* ── Feature grid ────────────────────────────────────── */
.feature-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
@media (max-width: 860px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .feature-grid { grid-template-columns: 1fr; } }

.feature-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px;
}
.feature-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: rgba(227,30,36,.14); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; margin-bottom: 16px;
}
.feature-card h3 { font-size: 21px; font-weight: 800; letter-spacing: -.2px; margin-bottom: 10px; color: var(--ink); }
.feature-card p { color: var(--muted); font-size: 15px; }

/* ── Feature detail rows (features.html) ────────────── */
.feature-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
  padding: 56px 0; border-bottom: 1px solid var(--border);
}
.feature-row:last-child { border-bottom: none; }
.feature-row.reverse .feature-row-text { order: 2; }
.feature-row.reverse .feature-row-shot { order: 1; }
.feature-row-text .eyebrow {
  color: var(--accent); font-weight: 700; font-size: 13px;
  text-transform: uppercase; letter-spacing: .8px; margin-bottom: 10px;
}
.feature-row-text h2 { font-size: 28px; margin-bottom: 14px; letter-spacing: -.3px; }
.feature-row-text p { color: var(--muted); font-size: 16px; margin-bottom: 16px; }
.feature-row-text ul { color: var(--muted); font-size: 15px; padding-left: 20px; }
.feature-row-text li { margin-bottom: 6px; }
.feature-row-shot .placeholder {
  aspect-ratio: 4/3; background: var(--bg-alt); border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 14px;
}
.feature-row-shot img {
  width: 100%; border: 1px solid var(--border); border-radius: var(--radius);
}
@media (max-width: 760px) {
  .feature-row, .feature-row.reverse { grid-template-columns: 1fr; }
  .feature-row.reverse .feature-row-text,
  .feature-row.reverse .feature-row-shot { order: initial; }
}

/* ── Docs layout ─────────────────────────────────────── */
.docs-layout {
  display: grid; grid-template-columns: 240px 1fr; gap: 48px;
  padding: 48px 0 80px;
  align-items: start;
}
.docs-nav {
  position: sticky; top: 172px;
  border-right: 1px solid var(--border);
  padding-right: 24px;
}
.docs-nav .docs-nav-title {
  font-size: 12px; text-transform: uppercase; letter-spacing: .6px;
  color: var(--muted); font-weight: 700; margin-bottom: 12px;
}
.docs-nav ul { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.docs-nav a {
  display: block; padding: 7px 10px; border-radius: 6px;
  color: var(--muted); font-size: 14px; font-weight: 500;
}
.docs-nav a:hover { background: var(--bg-alt); color: var(--ink); text-decoration: none; }
.docs-nav a.active { background: rgba(227,30,36,.12); color: var(--accent); }

.docs-content h1 { font-size: 32px; margin-bottom: 8px; letter-spacing: -.3px; }
.docs-content .docs-lede { color: var(--muted); font-size: 17px; margin-bottom: 32px; }
.docs-content h2 { font-size: 22px; margin: 36px 0 12px; }
.docs-content h3 { font-size: 17px; margin: 24px 0 8px; }
.docs-content p { color: var(--ink); margin-bottom: 14px; }
.docs-content ul, .docs-content ol { padding-left: 22px; margin-bottom: 14px; }
.docs-content li { margin-bottom: 6px; }
.docs-content code {
  background: var(--bg-alt); border: 1px solid var(--border);
  border-radius: 4px; padding: 1px 6px; font-size: .9em;
  font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace;
}
.docs-content .callout {
  background: var(--bg-alt); border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0; padding: 14px 18px; margin: 18px 0;
  font-size: 15px; color: var(--muted);
}

@media (max-width: 860px) {
  .docs-layout { grid-template-columns: 1fr; }
  .docs-nav { position: static; border-right: none; border-bottom: 1px solid var(--border); padding: 0 0 24px; }
}

/* ── Docs index cards ────────────────────────────────── */
.docs-card-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 32px;
}
@media (max-width: 640px) { .docs-card-grid { grid-template-columns: 1fr; } }
.docs-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; display: block; color: var(--ink);
}
.docs-card:hover { border-color: var(--accent); text-decoration: none; }
.docs-card h3 { font-size: 16px; margin-bottom: 6px; }
.docs-card p { color: var(--muted); font-size: 14px; }

/* ── FAQ ──────────────────────────────────────────────── */
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}
.faq-item summary {
  cursor: pointer; font-weight: 600; font-size: 16px;
  list-style: none; display: flex; align-items: center; justify-content: space-between;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+'; color: var(--accent); font-size: 20px; font-weight: 400;
  margin-left: 12px; flex-shrink: 0;
}
.faq-item[open] summary::after { content: '\2212'; }
.faq-item .faq-answer { color: var(--muted); margin-top: 12px; font-size: 15px; }

/* ── Support page ─────────────────────────────────────── */
.support-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
@media (max-width: 760px) { .support-grid { grid-template-columns: 1fr; } }
.support-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; text-align: center;
}
.support-card .feature-icon { margin: 0 auto 16px; }
.support-card h3 { font-size: 17px; margin-bottom: 8px; }
.support-card p { color: var(--muted); font-size: 14px; margin-bottom: 14px; }

/* ── Footer ──────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 48px 0 32px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px;
  margin-bottom: 32px;
}
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-brand { font-weight: 700; font-size: 16px; margin-bottom: 8px; }
.footer-tagline { color: var(--muted); font-size: 14px; max-width: 280px; }
.footer-col-title {
  font-size: 12px; text-transform: uppercase; letter-spacing: .6px;
  color: var(--muted); font-weight: 700; margin-bottom: 12px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-col a { color: var(--ink); font-size: 14px; }
.footer-bottom {
  border-top: 1px solid var(--border); padding-top: 20px;
  color: var(--muted); font-size: 13px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}
