/* ============================================================
   Ranney Motorsport — style.css
   ============================================================ */

:root {
  --bg:          #0d0d0d;
  --surface:     #161616;
  --surface-2:   #1f1f1f;
  --border:      #2a2a2a;
  --gold:        #c8a951;
  --gold-light:  #e0c170;
  --text:        #e8e8e8;
  --muted:       #888;
  --nav-h:       72px;
  --radius:      6px;
  --container:   1200px;
  --transition:  0.2s 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: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

/* ── Typography ──────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.1;
}
h1 { font-size: clamp(2.8rem, 7vw, 5.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.3rem; font-weight: 500; }

.eyebrow {
  font-family: 'Oswald', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

/* ── Layout ──────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 100px 0; }

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 64px;
}
.section-header--light h2 { color: var(--text); }
.section-sub {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 1.05rem;
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-block;
  font-family: 'Oswald', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 14px 36px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--gold);
  color: #0d0d0d;
}
.btn-primary:hover { background: var(--gold-light); }

/* ── NAV ─────────────────────────────────────────────────── */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  transition: background 0.3s, box-shadow 0.3s;
}
#nav.scrolled {
  background: rgba(13, 13, 13, 0.96);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 var(--border);
}

.nav-logo img {
  height: 48px;
  width: 48px;
  object-fit: cover;
  border-radius: 50%;
  filter: grayscale(20%);
  transition: filter var(--transition);
}
.nav-logo:hover img { filter: grayscale(0%); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}
.nav-links a {
  font-family: 'Oswald', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--text); }
.nav-links .nav-cta {
  background: var(--gold);
  color: #0d0d0d;
  padding: 9px 22px;
  border-radius: var(--radius);
  transition: background var(--transition);
}
.nav-links .nav-cta:hover { background: var(--gold-light); color: #0d0d0d; }

.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: transform 0.25s, opacity 0.25s;
}
.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); }

/* ── HERO ─────────────────────────────────────────────────── */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 0;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 40%;
  transform: scale(1.04);
  transition: transform 12s ease-out;
}
.hero-bg.loaded { transform: scale(1); }
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0,0,0,0.78) 0%,
    rgba(0,0,0,0.45) 55%,
    rgba(0,0,0,0.15) 100%
  );
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
  padding: calc(var(--nav-h) + 40px) 48px 80px;
}
.hero-eyebrow {
  font-family: 'Oswald', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.25rem;
}
.hero-content h1 { color: #fff; margin-bottom: 1.25rem; text-shadow: 0 2px 20px rgba(0,0,0,0.4); }
.hero-sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.78);
  max-width: 460px;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}
.hero-scroll {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.45);
  transition: color var(--transition);
  animation: bounce 2s infinite;
}
.hero-scroll svg { width: 28px; height: 28px; }
.hero-scroll:hover { color: rgba(255,255,255,0.8); }
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* ── SERVICES ─────────────────────────────────────────────── */
#services { background: var(--surface); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}
.service-card {
  background: var(--surface-2);
  padding: 44px 36px;
  transition: background var(--transition);
}
.service-card:hover { background: #242424; }
.service-icon {
  width: 52px;
  height: 52px;
  margin-bottom: 1.5rem;
  color: var(--gold);
}
.service-icon svg { width: 100%; height: 100%; }
.service-card h3 {
  margin-bottom: 0.75rem;
  color: var(--text);
}
.service-card p { color: var(--muted); font-size: 0.95rem; line-height: 1.65; }

/* ── ABOUT ────────────────────────────────────────────────── */
#about { background: var(--bg); }

.about-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.about-image {
  position: relative;
}
.about-image::before {
  content: '';
  position: absolute;
  inset: -12px 12px 12px -12px;
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  z-index: 0;
}
.about-image img {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius);
}
.about-text h2 { margin-bottom: 1.5rem; }
.about-text p { color: var(--muted); margin-bottom: 1rem; line-height: 1.75; }

.about-stats {
  display: flex;
  gap: 32px;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-num {
  font-family: 'Oswald', sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--gold);
  line-height: 1.2;
}
.stat-label { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }

/* ── GALLERY ──────────────────────────────────────────────── */
#gallery { background: var(--surface); padding-bottom: 0; }

.gallery-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3px;
  margin-top: 48px;
}
.gallery-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
}
.gallery-item--wide { aspect-ratio: 16/9; }
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.gallery-item:hover img { transform: scale(1.04); }
.gallery-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 20px 20px 16px;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  font-family: 'Oswald', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  transform: translateY(6px);
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
}
.gallery-item:hover .gallery-caption { opacity: 1; transform: translateY(0); }

/* ── REVIEWS ──────────────────────────────────────────────── */
#reviews { background: var(--bg); }

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.review-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.review-stars { color: var(--gold); font-size: 1rem; letter-spacing: 2px; }
.review-text {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.75;
  flex: 1;
  font-style: italic;
}
.review-author {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.review-initials {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gold);
  color: #0d0d0d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.review-author strong { display: block; font-size: 0.9rem; }
.review-author span { font-size: 0.78rem; color: var(--muted); }

/* ── VISIT US ─────────────────────────────────────────────── */
#visit { background: var(--surface); }

.visit-container {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 80px;
  align-items: start;
}
.visit-info h2 { margin-bottom: 2rem; }
.visit-block { margin-bottom: 2rem; }
.visit-block h4 {
  font-family: 'Oswald', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.5rem;
}
.visit-block p { color: var(--muted); line-height: 1.8; }
.visit-block a { color: var(--text); transition: color var(--transition); }
.visit-block a:hover { color: var(--gold); }

.hours-table { border-collapse: collapse; width: 100%; }
.hours-table td { padding: 5px 0; color: var(--muted); font-size: 0.95rem; }
.hours-table td:first-child { color: var(--text); padding-right: 24px; min-width: 110px; }
.hours-table tr.closed td { color: #555; }

.visit-map {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--border);
}
.visit-map iframe {
  display: block;
  width: 100%;
  height: 440px;
  border: none;
  filter: grayscale(40%) invert(92%) hue-rotate(180deg);
}

/* ── FOOTER ──────────────────────────────────────────────── */
footer {
  background: #080808;
  border-top: 1px solid var(--border);
  padding: 48px 0;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 32px;
  justify-content: space-between;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 16px;
}
.footer-logo img {
  height: 52px;
  width: 52px;
  border-radius: 50%;
  object-fit: cover;
  filter: grayscale(30%);
}
.footer-logo p { font-size: 0.82rem; color: var(--muted); line-height: 1.6; }
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.footer-nav a {
  font-family: 'Oswald', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color var(--transition);
}
.footer-nav a:hover { color: var(--gold); }
.footer-copy { font-size: 0.78rem; color: #555; width: 100%; text-align: center; }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .about-container { grid-template-columns: 1fr; gap: 48px; }
  .about-image::before { display: none; }
  .visit-container { grid-template-columns: 1fr; gap: 48px; }
  .visit-map { position: static; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .gallery-item--wide { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  section { padding: 72px 0; }
  .section-header { margin-bottom: 48px; }

  #nav { padding: 0 20px; }
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: rgba(13,13,13,0.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
  }
  .nav-links.open { display: flex; }
  .nav-links li { border-bottom: 1px solid var(--border); }
  .nav-links a {
    display: block;
    padding: 14px 24px;
    font-size: 1rem;
  }
  .nav-links .nav-cta {
    margin: 12px 24px;
    border-radius: var(--radius);
    text-align: center;
  }

  .hero-content { padding: calc(var(--nav-h) + 24px) 24px 60px; }
  .hero-overlay {
    background: linear-gradient(to bottom,
      rgba(0,0,0,0.6) 0%,
      rgba(0,0,0,0.55) 100%
    );
  }

  .services-grid { grid-template-columns: 1fr; gap: 1px; }
  .service-card { padding: 32px 24px; }

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


.gallery-grid { grid-template-columns: 1fr; }
  .gallery-item { aspect-ratio: 16/9; }
  .gallery-item--wide { aspect-ratio: 16/9; }

  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .about-stats { flex-direction: column; gap: 20px; }
}
