/* ============================================================
   RJR Motorsport Fabrications — Main Stylesheet
   ============================================================ */

:root {
  --bg:          #0d0d0d;
  --bg-card:     #161616;
  --bg-nav:      #0a0a0a;
  --accent:      #d4200f;
  --accent-hover:#e8321f;
  --gold:        #c8a84b;
  --text:        #f0f0f0;
  --text-muted:  #999;
  --border:      #2a2a2a;
  --radius:      4px;
  --max-width:   1280px;
  --font-body:   'Segoe UI', system-ui, sans-serif;
  --font-heading:'Georgia', serif;
  --transition:  0.25s ease;
}

/* ── Reset ── */
*, *::before, *::after { 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: 16px;
  line-height: 1.7;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }
ul { list-style: none; }

/* ── Utility ── */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.section    { padding: 80px 0; }
.section-sm { padding: 48px 0; }

.section-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
}

.section-lead {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 640px;
  margin-bottom: 48px;
}

.divider {
  width: 48px;
  height: 3px;
  background: var(--accent);
  margin: 20px 0 32px;
}

.btn {
  display: inline-block;
  padding: 13px 32px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--text);
}
.btn-outline:hover {
  background: var(--text);
  color: var(--bg);
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
  padding: 10px 24px;
  font-size: 13px;
}
.btn-ghost:hover {
  background: var(--accent);
  color: #fff;
}

/* ── Tag / Badge ── */
.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.tag-red   { background: var(--accent); color: #fff; }
.tag-gold  { background: var(--gold);   color: #000; }
.tag-dark  { background: var(--border); color: var(--text-muted); }

/* ── Placeholder image ── */
.img-placeholder {
  background: linear-gradient(135deg, #1a1a1a 0%, #222 50%, #1a1a1a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
}
.img-placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 10px,
    rgba(255,255,255,0.02) 10px,
    rgba(255,255,255,0.02) 11px
  );
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(10, 10, 10, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

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

.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-mark {
  width: 44px;
  height: 44px;
  background: var(--accent);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 20px;
  color: #fff;
  letter-spacing: -1px;
  flex-shrink: 0;
  /* TODO: Replace with actual logo image when available */
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text);
}

.logo-sub {
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: color var(--transition);
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}
.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-cta { margin-left: 8px; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav */
.nav-mobile {
  display: none;
  flex-direction: column;
  background: var(--bg-nav);
  border-top: 1px solid var(--border);
  padding: 16px 24px 24px;
  gap: 4px;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  transition: color var(--transition);
}
.nav-mobile a:hover,
.nav-mobile a.active { color: var(--accent); }
.nav-mobile a:last-child { border-bottom: none; }

/* Page offset for fixed nav */
.page-content { padding-top: 70px; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  /* TODO: Replace background-color with: background-image: url('images/hero-car.jpg'); background-size: cover; background-position: center; */
  background: linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 40%, #0a0a0a 100%);
}

.hero-bg-pattern {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 70% 50%, rgba(212, 32, 15, 0.15) 0%, transparent 60%),
    repeating-linear-gradient(
      45deg,
      transparent 0,
      transparent 40px,
      rgba(255,255,255,0.015) 40px,
      rgba(255,255,255,0.015) 41px
    );
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(13,13,13,0.95) 0%,
    rgba(13,13,13,0.4) 50%,
    rgba(13,13,13,0.2) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 80px 0 100px;
  max-width: 680px;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.hero-eyebrow span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--accent);
}
.hero-eyebrow::before {
  content: '';
  display: block;
  width: 32px;
  height: 2px;
  background: var(--accent);
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -1px;
  margin-bottom: 24px;
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero-desc {
  font-size: 17px;
  color: rgba(240,240,240,0.75);
  margin-bottom: 40px;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-stats {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
}
.hero-stat {
  flex: 1;
  padding: 24px 32px;
  border-right: 1px solid var(--border);
  text-align: center;
}
.hero-stat:last-child { border-right: none; }
.hero-stat-value {
  display: block;
  font-size: 28px;
  font-weight: 900;
  color: var(--accent);
  font-family: var(--font-heading);
  line-height: 1;
  margin-bottom: 6px;
}
.hero-stat-label {
  display: block;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ============================================================
   ABOUT STRIP
   ============================================================ */
.about-strip {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 64px 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-image {
  /* TODO: Replace with: <img src="images/workshop.jpg" alt="RJR workshop"> */
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* ============================================================
   FEATURED CARS GRID
   ============================================================ */
.cars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.car-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition);
}
.car-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.car-card-image {
  /* TODO: Replace div with <img src="..." alt="..."> */
  aspect-ratio: 16/10;
  position: relative;
}

.car-card-badge {
  position: absolute;
  top: 12px; right: 12px;
  z-index: 1;
}

.car-card-body {
  padding: 20px 24px 24px;
}

.car-card-body h3 {
  font-family: var(--font-heading);
  font-size: 20px;
  margin-bottom: 8px;
}

.car-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 12px 0 16px;
}

.car-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
}

.car-meta-item .icon {
  width: 14px;
  height: 14px;
  fill: var(--accent);
}

.car-price {
  font-size: 22px;
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 16px;
}

.car-price-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 4px;
}

/* ============================================================
   EVENTS
   ============================================================ */
.events-list { display: flex; flex-direction: column; gap: 16px; }

.event-card {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 24px;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  transition: border-color var(--transition);
}
.event-card:hover { border-color: var(--accent); }

.event-date {
  text-align: center;
  background: var(--accent);
  border-radius: var(--radius);
  padding: 12px 8px;
}
.event-date .day {
  display: block;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
  color: #fff;
}
.event-date .month {
  display: block;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.8);
  margin-top: 4px;
}

.event-info h3 { font-size: 17px; margin-bottom: 4px; }
.event-info p  { font-size: 13px; color: var(--text-muted); }

/* ============================================================
   NEWS
   ============================================================ */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition);
}
.news-card:hover { border-color: var(--accent); }

.news-card-image {
  /* TODO: Replace with actual image */
  aspect-ratio: 16/9;
}

.news-card-body {
  padding: 20px 24px 24px;
}

.news-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.news-date { font-size: 12px; color: var(--text-muted); }

.news-card-body h3 {
  font-size: 18px;
  margin-bottom: 10px;
  line-height: 1.3;
}
.news-card-body p { font-size: 14px; color: var(--text-muted); margin-bottom: 16px; }

/* ============================================================
   KIT OPTIONS
   ============================================================ */
.kits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.kit-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition);
  position: relative;
}
.kit-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}
.kit-card.featured {
  border-color: var(--accent);
}

.kit-card-header {
  padding: 28px 28px 20px;
  border-bottom: 1px solid var(--border);
}

.kit-featured-badge {
  display: inline-block;
  padding: 4px 10px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  border-radius: 2px;
  margin-bottom: 12px;
}

.kit-card-header h3 {
  font-family: var(--font-heading);
  font-size: 22px;
  margin-bottom: 8px;
}

.kit-price {
  font-size: 32px;
  font-weight: 900;
  color: var(--gold);
  font-family: var(--font-heading);
  line-height: 1;
}
.kit-price-note {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.kit-card-body { padding: 24px 28px; }

.kit-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.kit-feature {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--text-muted);
}

.kit-feature::before {
  content: '✓';
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ============================================================
   PAGE HERO (inner pages)
   ============================================================ */
.page-hero {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 64px 0;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  right: -100px;
  top: -100px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212,32,15,0.08) 0%, transparent 70%);
}

.page-hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 900;
  margin-bottom: 12px;
}

.page-hero p { font-size: 17px; color: var(--text-muted); max-width: 560px; }

/* ============================================================
   CONTACT STRIP
   ============================================================ */
.contact-strip {
  background: var(--accent);
  padding: 60px 0;
}

.contact-strip-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

.contact-strip h2 {
  font-family: var(--font-heading);
  font-size: clamp(24px, 3vw, 36px);
  color: #fff;
}
.contact-strip p { color: rgba(255,255,255,0.85); margin-top: 4px; }

.contact-strip .btn-outline {
  border-color: #fff;
  color: #fff;
  white-space: nowrap;
}
.contact-strip .btn-outline:hover {
  background: #fff;
  color: var(--accent);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--bg-nav);
  border-top: 1px solid var(--border);
  padding: 60px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
}

.footer-brand .logo-text { margin-top: 12px; }
.footer-brand p {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 16px;
  max-width: 280px;
  line-height: 1.7;
}

.footer-col h4 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 16px;
}

.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color var(--transition);
}
.footer-col ul li a:hover { color: var(--accent); }

.footer-contact { display: flex; flex-direction: column; gap: 10px; }
.footer-contact a {
  font-size: 14px;
  color: var(--text-muted);
}

.social-links { display: flex; gap: 12px; margin-top: 20px; }
.social-link {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  transition: all var(--transition);
}
.social-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

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

.footer-bottom p { font-size: 13px; color: var(--text-muted); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .about-grid  { gap: 48px; }
}

@media (max-width: 768px) {
  .nav-links  { display: none; }
  .nav-toggle { display: flex; }
  .nav-cta    { display: none; }

  .section    { padding: 56px 0; }

  .hero { min-height: 85vh; }
  .hero-content { padding: 60px 0 80px; }

  .hero-stats { flex-direction: column; }
  .hero-stat  { border-right: none; border-bottom: 1px solid var(--border); }
  .hero-stat:last-child { border-bottom: none; }

  .about-grid { grid-template-columns: 1fr; gap: 40px; }

  .event-card { grid-template-columns: 70px 1fr; }
  .event-card .btn { display: none; }

  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }

  .contact-strip-inner { flex-direction: column; text-align: center; }

  .kits-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; }
  .cars-grid    { grid-template-columns: 1fr; }
  .news-grid    { grid-template-columns: 1fr; }
}
