/* ==========================================================================
   Basil Hunter Motorsport — basilhunter.com
   Dark, sleek, soft-on-the-eyes. Barlow Condensed headings, Inter body.
   ========================================================================== */

:root {
  --bg: #14161a;          /* warm charcoal, not pure black */
  --bg-raised: #1c1f25;   /* cards, nav */
  --bg-inset: #101216;    /* footer, deep sections */
  --line: #2a2e36;        /* borders */
  --text: #e8e6e1;        /* bone white */
  --text-soft: #a9aab2;   /* secondary text */
  --accent: #7e9cd2;      /* steel blue, readable on dark */
  --accent-soft: #9db5e2; /* hover */
  --brand-navy: #1b3a6b;      /* Sapphire Blue — brand color */
  --brand-navy-deep: #12294d; /* gradient low end */
  --brand-navy-high: #24467a; /* gradient high end */
  --radius: 10px;
  --font-head: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Inter", -apple-system, "Segoe UI", sans-serif;
  --font-brand: "EB Garamond", Georgia, "Times New Roman", serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.15;
  text-transform: uppercase;
}

h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin-bottom: 0.6em; }
h3 { font-size: 1.25rem; margin-bottom: 0.4em; }

p { margin-bottom: 1em; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-soft); }
img { max-width: 100%; display: block; border-radius: var(--radius); }

.kicker {
  color: var(--accent);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 0.5em;
}

.lede { color: var(--text-soft); font-size: 1.15rem; max-width: 46em; }

/* --- Nav ----------------------------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(20, 22, 26, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }

.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }

.brand-text { display: flex; flex-direction: column; gap: 3px; line-height: 1.1; }

/* 3A lockup — EB Garamond, tracked wide, endorsement line in the same voice */
.brand-name {
  font-family: var(--font-brand);
  font-weight: 400; font-size: 1.22rem;
  letter-spacing: 0.2em; margin-right: -0.2em;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand-sub {
  font-family: var(--font-brand);
  font-size: 0.6rem; font-weight: 400;
  letter-spacing: 0.3em; margin-right: -0.3em;
  text-transform: uppercase;
  color: var(--text-soft);
  white-space: nowrap;
}

@media (max-width: 480px) { .brand-sub { display: none; } }

.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; }
.nav-links a {
  color: var(--text-soft);
  font-size: 0.92rem; font-weight: 500;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.nav-links a:hover { color: var(--text); }

.nav-cta {
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 8px 18px;
  color: var(--accent) !important;
}
.nav-cta:hover { background: var(--accent); color: var(--bg) !important; }

.nav-toggle { display: none; }
.nav-toggle-label { display: none; cursor: pointer; }
.nav-toggle-label span {
  display: block; width: 24px; height: 2px;
  background: var(--text); margin: 5px 0; border-radius: 2px;
}

@media (max-width: 820px) {
  .nav-toggle-label { display: block; }
  .nav-links {
    display: none;
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start;
    gap: 0;
    background: var(--bg-raised);
    border-bottom: 1px solid var(--line);
    padding: 8px 24px 16px;
  }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 12px 0; }
  .nav-cta { display: inline-block; margin-top: 8px; }
  .nav-toggle:checked ~ .nav-links { display: flex; }
}

/* --- Hero ----------------------------------------------------------------- */

.hero {
  padding: 110px 0 90px;
  background:
    radial-gradient(1100px 500px at 80% -10%, rgba(126, 156, 210, 0.10), transparent 60%),
    linear-gradient(180deg, var(--bg-inset), var(--bg));
  border-bottom: 1px solid var(--line);
}

.hero h1 { max-width: 12em; }
.hero .lede { margin-top: 1em; }

.hero-actions { margin-top: 2em; display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 600; font-size: 1.02rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 13px 28px;
  border-radius: 7px;
  transition: transform 0.12s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary { background: var(--accent); color: var(--bg); }
.btn-primary:hover { background: var(--accent-soft); color: var(--bg); }

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

/* --- Page hero (interior pages) ------------------------------------------ */

.page-hero {
  padding: 70px 0 44px;
  background: linear-gradient(180deg, var(--bg-inset), var(--bg));
  border-bottom: 1px solid var(--line);
}

.page-body { padding: 56px 0 90px; }

/* --- Sections & cards ----------------------------------------------------- */

.section { padding: 72px 0; }
.section-alt { background: var(--bg-inset); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
@media (max-width: 820px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
.card h3 { color: var(--text); }
.card p { color: var(--text-soft); font-size: 0.97rem; margin-bottom: 0; }

.card-link { display: block; transition: border-color 0.15s ease; }
.card-link:hover { border-color: var(--accent); }
.card-date {
  color: var(--accent);
  font-family: var(--font-head);
  font-size: 0.9rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
}

/* --- Spec tables (The Car) ------------------------------------------------ */

.spec-table { width: 100%; border-collapse: collapse; margin: 1.2em 0 2em; }
.spec-table th, .spec-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 0.96rem;
}
.spec-table th {
  color: var(--accent);
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  width: 34%;
}
.spec-table td { color: var(--text-soft); }

/* --- Events table ---------------------------------------------------------- */

.events-table { width: 100%; border-collapse: collapse; margin: 1.2em 0 2.4em; }
.events-table th {
  font-family: var(--font-head);
  font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent); font-size: 0.9rem;
  text-align: left; padding: 10px 14px;
  border-bottom: 2px solid var(--line);
}
.events-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--text-soft); font-size: 0.96rem;
}

/* --- Gallery ---------------------------------------------------------------- */

.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 820px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .gallery-grid { grid-template-columns: 1fr; } }

.gallery-grid img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
  border: 1px solid var(--line);
}

.video-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  margin: 1.5em 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* --- Posts ------------------------------------------------------------------ */

.post-meta { color: var(--text-soft); font-size: 0.95rem; margin-top: 0.6em; }
.post-body { max-width: 720px; }
.post-body h2 { margin-top: 1.6em; }
.post-body img { margin: 1.4em 0; }

.post-share {
  margin-top: 3em; padding-top: 1.4em;
  border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 18px;
}
.share-label {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase;
}
.back-link { margin-top: 2.4em; }

/* --- Forms ------------------------------------------------------------------ */

.form-grid { display: grid; gap: 18px; max-width: 620px; }

label {
  display: block;
  font-family: var(--font-head);
  font-weight: 600; font-size: 0.95rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 6px;
}

input, textarea, select {
  width: 100%;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
}

/* --- Partner banner (home) ---------------------------------------------------- */

.partners-strip {
  background: linear-gradient(160deg, var(--brand-navy-high) 0%, var(--brand-navy) 45%, var(--brand-navy-deep) 100%);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 56px 0;
  text-align: center;
}

.partners-strip .kicker { color: #dbe2ec; opacity: 0.85; }

.partners-strip h2 {
  color: #fff;
  font-family: var(--font-brand);
  font-weight: 400;
  letter-spacing: 0.2em; margin-right: -0.2em;
}

.partners-logos {
  display: flex; justify-content: center; align-items: center;
  gap: 48px; flex-wrap: wrap;
  margin-top: 30px;
}

.partners-logos a { display: block; opacity: 0.85; transition: opacity 0.15s ease; }
.partners-logos a:hover { opacity: 1; }

.partners-logos img {
  height: 56px; width: auto;
  border-radius: 0;
}

.partners-cta {
  display: inline-block;
  margin-top: 32px;
  color: #fff;
  font-family: var(--font-head);
  font-weight: 600; font-size: 0.95rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  padding-bottom: 2px;
}
.partners-cta:hover { color: #fff; border-color: #fff; }

/* --- Footer ------------------------------------------------------------------ */

.site-footer {
  background: var(--bg-inset);
  border-top: 1px solid var(--line);
  padding: 48px 0 0;
  margin-top: 40px;
}

.footer-grid {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 24px; flex-wrap: wrap;
  padding-bottom: 32px;
}

.footer-brand {
  font-family: var(--font-brand);
  font-weight: 400; font-size: 1.3rem;
  letter-spacing: 0.2em; margin-right: -0.2em;
  text-transform: uppercase;
  margin-bottom: 6px;
  white-space: nowrap;
}

/* 3A endorsement line — hairline rules either side */
.footer-sub {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-brand);
  color: var(--text-soft);
  font-size: 0.66rem; letter-spacing: 0.3em; margin-right: -0.3em;
  text-transform: uppercase;
  white-space: nowrap;
  margin: 0;
}
.footer-sub::before, .footer-sub::after {
  content: ""; width: 32px; height: 1px;
  background: var(--line); flex: none;
}

.footer-links { list-style: none; display: flex; gap: 26px; flex-wrap: wrap; }
.footer-links a { color: var(--text-soft); font-size: 0.92rem; }
.footer-links a:hover { color: var(--text); }

.footer-legal {
  border-top: 1px solid var(--line);
  padding: 18px 24px;
}
.footer-legal p { color: var(--text-soft); font-size: 0.85rem; margin: 0; }
