:root {
  /* --- Light Mode (Default) --- */
  --bg-body: #ffffff;
  --bg-surface: #f3f5f7;
  --bg-panel: #ffffff;
  
  --text-main: #111827;     /* Deep slate for readability */
  --text-muted: #6b7280;    /* Muted cool gray */
  --line: rgba(0, 0, 0, 0.08);
  
  --primary: #e11d2e;       /* Racing Red */
  --primary-hover: #b91523;
  --accent-glow: rgba(225, 29, 46, 0.08); /* Subtle red tint for light mode */
  
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  
  --radius: 12px;
  --font-display: "Oswald", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --container: 1160px;
}

/* --- Dark Mode Override --- */
[data-theme="dark"] {
  --bg-body: #0b0d10;
  --bg-surface: #11151b;
  --bg-panel: #161b22;
  
  --text-main: #f5f7fa;
  --text-muted: #9ca3af;
  --line: rgba(255, 255, 255, 0.12);
  
  --primary: #ff2a3d;       /* Brighter red for dark backgrounds */
  --primary-hover: #ff5c6b;
  --accent-glow: rgba(225, 29, 46, 0.20);
  
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg: 0 12px 30px rgba(0,0,0,0.5);
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; }

html { 
  scroll-behavior: smooth; 
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Background Gradients (Dynamic based on theme) */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0; height: 100vh;
  background: 
    radial-gradient(800px 500px at 0% 0%, var(--accent-glow), transparent 60%),
    radial-gradient(600px 400px at 100% 100%, var(--accent-glow), transparent 60%);
  pointer-events: none;
  z-index: -1;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--primary); }

h1, h2, h3 { 
  font-family: var(--font-display); 
  letter-spacing: 0.02em; 
  margin: 0 0 0.8rem; 
  line-height: 1.1; 
  color: var(--text-main);
}
h1 { font-size: clamp(2.2rem, 4vw, 3.8rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 600; }
h3 { font-size: 1.4rem; font-weight: 600; }
p { margin-bottom: 1.2rem; max-width: 70ch; }

.container {
  width: min(var(--container), 100% - 2rem);
  margin: 0 auto;
}

/* --- Utilities --- */
.muted { color: var(--text-muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link {
  position: absolute; left: -999px; top: 1rem;
  background: var(--primary); color: white;
  padding: 0.75rem 1.25rem; border-radius: 8px; font-weight: 700; z-index: 10000;
}
.skip-link:focus { left: 1rem; }

/* --- Header --- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.8); /* Fallback light */
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
[data-theme="dark"] .site-header { background: rgba(11, 13, 16, 0.75); }

.header__row { display: flex; align-items: center; justify-content: space-between; padding: 0.8rem 0; gap: 1rem; }

.brand { display: flex; align-items: center; gap: 0.75rem; user-select: none; }
.brand__mark {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), #860b14);
  color: white; font-family: var(--font-display); font-weight: 700;
  box-shadow: 0 4px 10px rgba(225,29,46,0.3);
}
.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__name { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; }
.brand__tag { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }

/* Navigation */
.nav { display: flex; align-items: center; gap: 0.5rem; }
.nav a {
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-main);
}
.nav a:hover { background: var(--bg-surface); color: var(--primary); text-decoration: none; }
.nav__pill {
  border: 1px solid var(--primary);
  color: var(--primary) !important;
}
.nav__pill:hover { background: var(--primary) !important; color: white !important; }

/* Theme Toggle Button */
.theme-toggle {
  background: none; border: none; cursor: pointer;
  padding: 0.5rem; border-radius: 50%;
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.theme-toggle:hover { background: var(--bg-surface); color: var(--text-main); }
.theme-toggle svg { width: 20px; height: 20px; fill: currentColor; }

/* --- Mobile Nav --- */
.nav-toggle { display: none; background: transparent; border: 1px solid var(--line); padding: 0.5rem; border-radius: 8px; cursor: pointer; }
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
  display: block; width: 20px; height: 2px; background: var(--text-main); position: relative;
}
.nav-toggle__bars::before { content: ""; position: absolute; top: -6px; }
.nav-toggle__bars::after { content: ""; position: absolute; top: 6px; }

/* --- Hero Section --- */
.hero { padding: 4rem 0 3rem; border-bottom: 1px solid var(--line); }
.hero__grid { display: grid; grid-template-columns: 1.3fr 0.9fr; gap: 3rem; align-items: center; }

.eyebrow { 
  display: inline-block; font-size: 0.8rem; font-weight: 700; 
  text-transform: uppercase; letter-spacing: 0.1em; 
  color: var(--primary); margin-bottom: 0.5rem; 
}
.lead { font-size: 1.15rem; color: var(--text-muted); margin-bottom: 1.5rem; }

.hero__cta { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 2rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.8rem 1.4rem; border-radius: 10px; font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  font-size: 0.95rem;
}
.btn--primary {
  background: var(--primary); color: white;
  box-shadow: 0 4px 14px rgba(225, 29, 46, 0.3);
}
.btn--primary:hover {
  transform: translateY(-1px);
  background: var(--primary-hover);
  color: white;
  box-shadow: 0 6px 20px rgba(225, 29, 46, 0.4);
}
.btn--ghost {
  background: var(--bg-surface); color: var(--text-main);
  border: 1px solid var(--line);
}
.btn--ghost:hover {
  background: rgba(0,0,0,0.05); /* slightly darker for light mode */
  border-color: var(--text-muted);
  color: var(--text-main);
}
[data-theme="dark"] .btn--ghost:hover { background: rgba(255,255,255,0.1); }

/* Panels & Cards */
.panel {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
}
.panel__links li + li { margin-top: 0.5rem; }
.panel__links a {
  display: block; padding: 0.8rem;
  background: var(--bg-surface); border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s;
}
.panel__links a:hover {
  background: var(--primary); color: white;
  transform: translateX(4px);
}

.trustbar { 
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; 
  padding-top: 1rem; border-top: 1px solid var(--line); 
}
.trustbar__kicker { font-weight: 700; display: block; font-size: 0.9rem; color: var(--text-main); }
.trustbar__text { font-size: 0.85rem; color: var(--text-muted); line-height: 1.4; }

/* --- Sections & Grid --- */
.section { padding: 4rem 0; }
.section--dark { background: var(--bg-surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.grid { display: grid; gap: 1.5rem; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s;
  height: 100%;
}
.card--action:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}
.card__icon { font-size: 2rem; margin-bottom: 0.75rem; }
.card h3 { margin-bottom: 0.5rem; }
.card p { color: var(--text-muted); font-size: 0.95rem; flex-grow: 1; }
.card__arrow { 
  margin-top: 1rem; font-weight: 700; color: var(--primary); 
  font-size: 0.9rem; text-transform: uppercase; 
}

.tag {
  display: inline-block; padding: 0.25rem 0.75rem;
  border-radius: 100px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
  background: var(--bg-surface); color: var(--text-muted);
  border: 1px solid var(--line); margin-bottom: 0.75rem;
}

/* --- Forms --- */
.cta { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; }
input[type="email"], input[type="text"], textarea {
  width: 100%; padding: 0.9rem 1rem;
  border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg-body); color: var(--text-main);
  font-family: inherit; font-size: 1rem;
}
input:focus, textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* --- Footer --- */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--line);
  padding: 4rem 0 2rem;
  font-size: 0.9rem;
}
.footer__grid { display: grid; grid-template-columns: 1.5fr 0.8fr 0.8fr; gap: 2rem; }
.linklist li { margin-bottom: 0.6rem; }
.linklist a { color: var(--text-muted); }
.linklist a:hover { color: var(--primary); text-decoration: underline; }

.footer__bottom {
  margin-top: 3rem; padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  text-align: center; color: var(--text-muted); opacity: 0.8;
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .hero__grid, .cta, .footer__grid, .grid--3, .trustbar { grid-template-columns: 1fr; }
  .trustbar { gap: 2rem; }
  
  .nav {
    display: none; position: absolute;
    top: 100%; right: 1rem; left: 1rem;
    background: var(--bg-panel);
    border: 1px solid var(--line); border-radius: 12px;
    padding: 1rem; flex-direction: column; align-items: stretch;
    box-shadow: var(--shadow-lg);
  }
  .nav.is-open { display: flex; }
  .nav-toggle { display: block; margin-left: auto; }
  
  /* Hide theme toggle on mobile or move it next to hamburger? */
  .theme-toggle { margin-left: 0.5rem; }
}