/* ═══════════════════════════════════════════════════════════
   Race SMB — Shared CSS
   All shared styles extracted from page-level inline CSS.
   Page-specific styles remain inline in src/pages/*.html
═══════════════════════════════════════════════════════════ */

/* ── Google Fonts ────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Outfit:ital,wght@0,700;0,800;0,900;1,700;1,800;1,900&family=DM+Sans:wght@300;400;500;600&family=DM+Mono:wght@400;500&display=swap');

/* ── Palette / Design Tokens ─────────────────────────────── */
:root {
  /* Backgrounds */
  --bg:        #F0F5F8;
  --bg-deep:   #E4ECF1;
  --bg-white:  #FAFCFD;
  --bg-panel:  #FFFFFF;

  /* Ink */
  --ink:       #1A2A33;
  --ink-soft:  #354550;
  --ink-muted: #5E7683;
  --ink-light: #8FA3AE;
  --ink-rule:  #D8E4EC;

  /* Race brand */
  --amber:     #FFAD36;
  --orange:    #F4722B;
  --red:       #FC6136;
  --teal:      #1DA2C3;
  --teal-deep: #1A8A8A;
  --green:     #2D7A4F;

  /* Dark panels */
  --dark:      #1A2A33;
  --dark-2:    #0F1B22;

  /* Motion */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Type */
  --display: 'Outfit', system-ui, sans-serif;
  --body:    'DM Sans', sans-serif;
  --mono:    'DM Mono', monospace;

  /* Type scale */
  --t-hero: clamp(2.6rem, 5vw, 4.2rem);
  --t-h2:   clamp(1.8rem, 3vw, 2.8rem);
  --t-h3:   1.2rem;
  --t-lg:   1.1rem;
  --t-base: 1rem;
  --t-sm:   0.875rem;
  --t-xs:   0.78rem;
  --t-mono: 0.72rem;
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img { display: block; max-width: 100%; }

/* ── Base ────────────────────────────────────────────────── */
body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  padding-top: 64px;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1160px; margin: 0 auto; padding: 0 2.5rem; }

/* ── Nav ─────────────────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(15,27,34,0.97);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(29,162,195,0.12);
  height: 64px; display: flex; align-items: center;
}
.nav-inner {
  max-width: 1160px; margin: 0 auto; padding: 0 2.5rem;
  width: 100%; display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  display: inline-flex; align-items: center; gap: 0.85rem;
  text-decoration: none; line-height: 1;
}
.nav-logo-img { height: 66px; width: auto; display: block; }
.nav-logo-smb { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--teal); border-left: 1px solid rgba(255,255,255,0.14); padding-left: 0.85rem; line-height: 1.2; }
.nav-logo-smb {
  font-family: var(--body); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--teal);
  border-left: 1px solid rgba(255,255,255,0.14);
  padding-left: 0.85rem; line-height: 1.2;
}
.nav-links {
  display: flex; align-items: center; gap: 2rem; list-style: none;
}
.nav-links a {
  color: rgba(255,255,255,0.72); text-decoration: none;
  font-size: 0.9rem; font-weight: 500; transition: color 0.15s;
}
.nav-links a:hover { color: white; }
.nav-cta {
  background: var(--red); color: white; padding: 0.5rem 1.25rem;
  border-radius: 6px; font-weight: 600; font-size: 0.875rem;
  text-decoration: none; transition: background 0.15s;
}
.nav-cta:hover { background: var(--orange); }

/* Hamburger button */
.nav-hamburger {
  display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  background: none; border: none; cursor: pointer;
  padding: 0.5rem; width: 40px; height: 40px;
}
.nav-hamburger span {
  display: block; height: 2px; width: 22px;
  background: rgba(255,255,255,0.8); border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

/* Mobile nav */
.nav-mobile {
  display: none;
  position: fixed; top: 64px; left: 0; right: 0; z-index: 99;
  background: rgba(10,18,24,0.98);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(29,162,195,0.12);
  padding: 1.25rem 2rem 1.5rem;
  flex-direction: column; gap: 0.25rem;
}
.nav-mobile.open { display: flex; }
.nav-mobile-link {
  color: rgba(255,255,255,0.72); text-decoration: none;
  font-size: 1rem; font-weight: 500; padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: color 0.15s;
}
.nav-mobile-link:hover { color: white; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--body); font-weight: 600; font-size: 0.95rem;
  padding: 0.85rem 1.75rem; border-radius: 6px; border: none;
  cursor: pointer; text-decoration: none;
  transition: background 0.18s, transform 0.2s var(--ease-spring), border-color 0.18s, color 0.18s;
  white-space: nowrap; letter-spacing: 0.01em;
}
.btn-primary {
  background: var(--red); color: white;
}
.btn-primary:hover { background: var(--orange); transform: translateY(-2px); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn-outline {
  background: transparent; color: var(--ink);
  border: 1.5px solid var(--ink-rule);
}
.btn-outline:hover { border-color: var(--teal); color: var(--teal-deep); }

.btn-outline-dark {
  background: transparent; color: var(--ink);
  border: 1.5px solid var(--ink-rule);
}
.btn-outline-dark:hover { border-color: var(--teal); color: var(--teal-deep); }

.btn-ghost {
  background: transparent; color: rgba(255,255,255,0.8);
  padding: 0.85rem 2rem; border-radius: 8px; font-weight: 600;
  font-size: 1rem; text-decoration: none;
  border: 1px solid rgba(255,255,255,0.2);
  transition: border-color 0.15s, color 0.15s, transform 0.15s;
  display: inline-block;
}
.btn-ghost:hover { border-color: white; color: white; transform: translateY(-1px); }

.btn-ghost-light {
  background: transparent; color: rgba(255,255,255,0.8);
  border: 1px solid rgba(255,255,255,0.22);
}
.btn-ghost-light:hover { border-color: var(--amber); color: var(--amber); }

.btn-teal { background: var(--teal-deep); color: white; }
.btn-teal:hover { background: var(--teal); transform: translateY(-2px); }

.btn-teal-sm {
  background: var(--teal-deep); color: white;
  padding: 0.65rem 1rem; border-radius: 6px; border: none; cursor: pointer;
  font-family: var(--body); font-weight: 600; font-size: 0.82rem;
}

/* ── Eyebrow ─────────────────────────────────────────────── */
.eyebrow {
  font-family: var(--mono); font-size: var(--t-mono);
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--teal-deep); display: inline-block; margin-bottom: 0.8rem;
}
.eyebrow--amber { color: var(--amber); }
.eyebrow--light { color: rgba(255,255,255,0.5); }

/* Section label (used inline on some pages) */
.section-label {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--teal); margin-bottom: 0.75rem;
  display: block;
}

/* ── Sections ────────────────────────────────────────────── */
section { padding: 5rem 2.5rem; }
.section-inner { max-width: 1160px; margin: 0 auto; }
.section--white  { background: var(--bg-panel); }
.section--deep   { background: var(--bg-deep); }
.section--dark   { background: var(--dark); }
.section--dark2  { background: var(--dark-2); }

/* ── Footer ──────────────────────────────────────────────── */
footer {
  background: var(--dark-2);
  padding: 3rem 0 2.25rem;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.footer-inner {
  max-width: 1160px; margin: 0 auto; padding: 0 2.5rem;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 3rem; margin-bottom: 2.5rem;
}
.footer-logo { height: 56px; width: auto; display: block; margin-bottom: 1rem; }
.footer-brand p {
  font-size: 0.83rem; color: rgba(255,255,255,0.35); line-height: 1.65;
  margin-bottom: 0.875rem;
}
.footer-tag { font-size: 0.83rem; color: rgba(255,255,255,0.35); line-height: 1.65; margin-bottom: 0.875rem; }
.footer-phone { font-family: var(--mono); font-size: 0.88rem; color: var(--amber); text-decoration: none; }
.footer-col h4 {
  font-weight: 600; font-size: 0.7rem; text-transform: uppercase;
  letter-spacing: 0.12em; color: rgba(255,255,255,0.3); margin-bottom: 1rem;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.55rem; }
.footer-col ul li a,
.footer-col ul a {
  font-size: 0.83rem; color: rgba(255,255,255,0.45);
  text-decoration: none; transition: color 0.18s;
}
.footer-col ul li a:hover,
.footer-col ul a:hover { color: rgba(255,255,255,0.8); }
.footer-bottom,
.footer-btm {
  max-width: 1160px; margin: 0 auto; padding: 2rem 2.5rem 0;
  border-top: 1px solid rgba(255,255,255,0.05);
  display: flex; justify-content: space-between; align-items: center;
}
.footer-bottom span,
.footer-copy { font-size: 0.75rem; color: rgba(255,255,255,0.2); }
.footer-bottom a,
.footer-legal a {
  font-size: 0.75rem; color: rgba(255,255,255,0.2);
  text-decoration: none; transition: color 0.18s;
}
.footer-bottom a:hover,
.footer-legal a:hover { color: rgba(255,255,255,0.45); }
.footer-legal { display: flex; gap: 1.5rem; }

/* ── Cookie Banner ───────────────────────────────────────── */
.cookie-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 999;
  background: rgba(10,18,24,0.97);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(29,162,195,0.15);
  padding: 1rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap;
  transform: translateY(100%);
  transition: transform 0.35s var(--ease-out);
}
.cookie-bar.visible { transform: translateY(0); }
.cookie-text {
  font-size: 0.82rem; color: rgba(255,255,255,0.55);
  line-height: 1.55; flex: 1; min-width: 220px;
}
.cookie-text a { color: var(--teal); text-decoration: none; }
.cookie-text a:hover { text-decoration: underline; }
.cookie-btns { display: flex; gap: 0.625rem; flex-shrink: 0; }
.cookie-accept {
  background: var(--teal); color: white; border: none; cursor: pointer;
  padding: 0.5rem 1.25rem; border-radius: 6px;
  font-family: var(--body); font-weight: 600; font-size: 0.8rem;
  transition: background 0.15s;
}
.cookie-accept:hover { background: var(--teal-deep); }
.cookie-decline {
  background: transparent; color: rgba(255,255,255,0.35);
  border: 1px solid rgba(255,255,255,0.12);
  cursor: pointer; padding: 0.5rem 1rem; border-radius: 6px;
  font-family: var(--body); font-size: 0.8rem;
  transition: color 0.15s, border-color 0.15s;
}
.cookie-decline:hover { color: rgba(255,255,255,0.6); border-color: rgba(255,255,255,0.25); }

/* ── Fade-in Animation ───────────────────────────────────── */
.fi {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out);
}
.fi.on { opacity: 1; transform: translateY(0); }
.fi-d1 { transition-delay: 0.08s; }
.fi-d2 { transition-delay: 0.16s; }
.fi-d3 { transition-delay: 0.24s; }
.fi-d4 { transition-delay: 0.32s; }

/* ── Modal ───────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(10,18,24,0.78);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; padding: 1.5rem;
  opacity: 0; pointer-events: none; transition: opacity 0.25s;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--bg-panel); border-radius: 16px;
  padding: 2.5rem; max-width: 520px; width: 100%;
  position: relative; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 32px 80px rgba(0,0,0,0.4);
  transform: translateY(24px) scale(0.98);
  transition: transform 0.3s var(--ease-out);
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }
.modal-close {
  position: absolute; top: 1.25rem; right: 1.25rem;
  background: var(--bg-deep); border: none; cursor: pointer;
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-muted); font-size: 1rem; transition: background 0.15s;
}
.modal-close:hover { background: var(--ink-rule); }
.modal h3 {
  font-family: var(--display); font-weight: 900;
  font-size: 1.5rem; color: var(--ink);
  letter-spacing: -0.025em; margin-bottom: 0.5rem;
}
.modal-sub { font-size: 0.88rem; color: var(--ink-muted); margin-bottom: 1.75rem; }

/* Dark modal variant (used in vertical pages) */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(8,16,22,0.9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center; padding: 1.5rem;
  opacity: 0; pointer-events: none; transition: opacity 0.22s ease;
}
.modal-backdrop.open { opacity: 1; pointer-events: auto; }
.modal-card {
  background: var(--dark); border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.08);
  width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto;
  padding: 2.5rem; position: relative;
  transform: translateY(24px) scale(0.98);
  transition: transform 0.3s var(--ease-out);
}
.modal-backdrop.open .modal-card { transform: translateY(0) scale(1); }
.modal-card .modal-close {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.45); width: 34px; height: 34px;
}
.modal-card .modal-close:hover { background: rgba(255,255,255,0.12); color: white; }
.modal-eyebrow {
  font-family: var(--mono); font-size: 0.65rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--teal); margin-bottom: 0.75rem; display: block;
}
.modal-hed {
  font-family: var(--display); font-weight: 900;
  font-size: clamp(1.5rem, 3vw, 2rem); color: white;
  line-height: 1.1; letter-spacing: -0.02em; margin-bottom: 0.4rem;
}
.modal-hed em { font-style: italic; color: var(--amber); }
.modal-sub-dark { font-size: 0.9rem; color: rgba(255,255,255,0.5); line-height: 1.6; margin-bottom: 1.75rem; }

/* Modal form elements */
.mzip-widget {
  background: rgba(255,255,255,0.04); border: 1px solid rgba(29,162,195,0.15);
  border-radius: 10px; padding: 1.2rem 1.5rem; margin-bottom: 1.5rem;
}
.mzip-label {
  font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--teal); margin-bottom: 0.75rem;
}
.mzip-row { display: flex; gap: 0.75rem; }
.mzip-in {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 5px; padding: 0.7rem 1rem; color: white;
  font-family: var(--body); font-size: 0.9rem; width: 140px;
}
.mzip-in::placeholder { color: rgba(255,255,255,0.25); }
.mzip-in:focus { border-color: var(--teal); outline: none; }
.mzip-result { font-size: 0.83rem; margin-top: 0.7rem; min-height: 1.3em; line-height: 1.55; }
.mzip-result.ok  { color: #5AC87A; }
.mzip-result.no  { color: var(--amber); }
.mzip-result.err { color: rgba(255,255,255,0.35); }
.mform-wrap {
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px; padding: 2rem;
}
.mform-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.mfgroup { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 1rem; }
.mflabel {
  font-weight: 600; font-size: 0.68rem; text-transform: uppercase;
  letter-spacing: 0.07em; color: rgba(255,255,255,0.4);
}
.mfinput {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 5px; padding: 0.7rem 0.9rem; color: white;
  font-family: var(--body); font-size: 0.88rem; transition: border-color 0.18s; width: 100%;
}
.mfinput::placeholder { color: rgba(255,255,255,0.18); }
.mfinput:focus { border-color: var(--teal); outline: none; }
.mfinput.ok { border-color: rgba(90,200,122,0.5); }
.mftextarea { resize: vertical; min-height: 80px; }
.mfsubmit { width: 100%; margin-top: 1.25rem; font-size: 0.95rem; padding: 0.95rem; border: none; cursor: pointer; }
.mfconfirm {
  text-align: center; margin-top: 0.65rem; font-size: 0.75rem;
  color: rgba(255,255,255,0.35); display: none;
}
.mtrust { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; margin-top: 1.25rem; }
.mtrust li { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.78rem; color: rgba(255,255,255,0.45); }
.mtrust li::before { content: "\2713"; color: var(--teal); font-weight: 700; flex-shrink: 0; }

/* Light modal form elements */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block; font-size: 0.78rem; font-weight: 600;
  color: var(--ink-soft); margin-bottom: 0.375rem; letter-spacing: 0.02em;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: 0.625rem 0.875rem;
  border: 1.5px solid var(--ink-rule); border-radius: 8px;
  font-family: var(--body); font-size: 0.9rem; color: var(--ink);
  background: var(--bg); transition: border-color 0.15s; outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--teal); }
.form-submit {
  width: 100%; padding: 0.875rem;
  background: var(--red); color: white; border: none; cursor: pointer;
  border-radius: 8px; font-family: var(--body); font-weight: 700;
  font-size: 0.95rem; margin-top: 0.5rem; transition: background 0.15s;
}
.form-submit:hover { background: var(--orange); }
.form-note { font-size: 0.75rem; color: var(--ink-light); text-align: center; margin-top: 0.875rem; }

/* ── Nav Hamburger Script toggle ─────────────────────────── */
/* JS for hamburger is in src/partials/nav.html              */

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  section { padding: 4rem 1.25rem; }
  .nav-inner { padding: 0 1.25rem; }
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom,
  .footer-btm { flex-direction: column; gap: 1rem; text-align: center; }
}
