/* ============================================================
   RevvOn Autosports — Base Styles
   Reset, typography, shared components.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:ital,wght@0,400;0,700;0,800;0,900;1,700;1,900&family=Barlow:wght@300;400;500&display=swap');
@import './variables.css';

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--body);
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a   { color: inherit; }
button { font-family: inherit; }

/* ── Grain overlay ─────────────────────────────────────────── */
body::after {
  content: '';
  position: fixed; inset: 0; z-index: 999;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.025;
  mix-blend-mode: screen;
}

/* ── Top bar ────────────────────────────────────────────────── */
#topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 201;
  height: var(--topbar-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--page-px);
  background: var(--black);
  border-bottom: 1px solid var(--border);
}
.topbar-contact {
  display: flex; align-items: center; gap: 24px;
}
.topbar-item {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--body);
  font-size: 13px; letter-spacing: 0.3px;
  color: var(--muted);
  text-decoration: none;
  transition: color var(--t-fast);
  white-space: nowrap;
}
.topbar-item:hover { color: var(--yellow); }
.topbar-item svg   { flex-shrink: 0; }
.topbar-socials {
  display: flex; align-items: center; gap: 14px;
}
.topbar-social {
  display: flex; align-items: center;
  color: var(--muted);
  text-decoration: none;
  transition: color var(--t-fast);
}
.topbar-social:hover { color: var(--yellow); }

/* ── Navigation ────────────────────────────────────────────── */
#nav {
  position: fixed; top: var(--topbar-h); left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--page-px);
  height: var(--nav-h);
  transition: background var(--t-slow), border-color var(--t-slow);
  border-bottom: 1px solid transparent;
}
#nav.stuck {
  background: rgba(8, 8, 7, 0.97);
  backdrop-filter: blur(16px);
  border-color: var(--border);
}

.nav-logo img {
  height: 64px;
  display: block;
}

.nav-links {
  display: flex; gap: 40px;
  position: absolute; left: 50%; transform: translateX(-50%);
}
.nav-links a {
  font-family: var(--sans);
  font-size: 12px; font-weight: 700; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--muted);
  text-decoration: none;
  transition: color var(--t-normal);
  position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: -4px;
  width: 0; height: 1px; background: var(--yellow);
  transition: width var(--t-slow);
}
.nav-links a:hover       { color: var(--white); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active      { color: var(--yellow); }
.nav-links a.active::after { width: 100%; }

.nav-btn {
  font-family: var(--sans);
  font-size: 12px; font-weight: 800; letter-spacing: 2px;
  text-transform: uppercase; color: var(--black);
  text-decoration: none;
  background: var(--grad-short);
  padding: 11px 28px;
  clip-path: polygon(10px 0%, 100% 0%, calc(100% - 10px) 100%, 0% 100%);
  transition: opacity var(--t-normal);
}
.nav-btn:hover { opacity: 0.85; }

/* ── Buttons ────────────────────────────────────────────────── */
.btn-primary {
  display: inline-block;
  font-family: var(--sans);
  font-size: 13px; font-weight: 800; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--black);
  background: var(--grad-short);
  padding: 15px 44px; text-decoration: none; border: none; cursor: pointer;
  clip-path: polygon(12px 0%, 100% 0%, calc(100% - 12px) 100%, 0% 100%);
  transition: opacity var(--t-normal);
}
.btn-primary:hover { opacity: 0.85; }

.btn-ghost {
  display: inline-block;
  font-family: var(--sans);
  font-size: 12px; font-weight: 700; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--muted);
  background: none;
  border: 1px solid var(--border);
  padding: 15px 36px; text-decoration: none; cursor: pointer;
  clip-path: polygon(10px 0%, 100% 0%, calc(100% - 10px) 100%, 0% 100%);
  transition: color var(--t-normal), border-color var(--t-normal);
}
.btn-ghost:hover { color: var(--yellow); border-color: rgba(245,163,0,.4); }

/* ── Section shared ─────────────────────────────────────────── */
.sec-tag {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans);
  font-size: 12px; font-weight: 700; letter-spacing: 3px;
  text-transform: uppercase; color: var(--yellow);
  margin-bottom: 14px;
}
.sec-tag::before {
  content: ''; width: 28px; height: 2px;
  background: var(--grad-short);
}

.sec-h {
  font-family: var(--sans);
  font-size: clamp(40px, 6vw, 76px);
  font-weight: 900; text-transform: uppercase;
  letter-spacing: -1px; line-height: 0.95;
  margin-bottom: 60px;
}
.sec-h em {
  font-style: italic;
  background: var(--grad-short);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Divider ────────────────────────────────────────────────── */
.divider {
  width: 100%; height: 1px;
  background: var(--border);
  position: relative;
}
.divider::before {
  content: ''; position: absolute;
  top: 0; left: var(--page-px);
  width: 80px; height: 1px;
  background: var(--yellow);
}

/* ── Tachometer scroll indicator (vertical) ────────────────── */
#tacho-scroll {
  position: fixed;
  right: 14px;
  top: calc(var(--topbar-h) + var(--nav-h) + 28px);
  bottom: 28px;
  z-index: 100;
  display: flex;
  flex-direction: row-reverse;
  align-items: stretch;
  gap: 6px;
  pointer-events: none;
}
.tacho-track {
  width: 4px;
  border-radius: 2px;
  background: var(--border);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.tacho-fill {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 0%;
  background: linear-gradient(180deg, #F5A300 0%, #E05000 55%, #C01010 100%);
  transition: height 0.08s linear;
  border-radius: 2px;
}
.tacho-marks {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.tacho-num {
  font-family: var(--sans);
  font-size: 9px; font-weight: 700; letter-spacing: 1px;
  color: var(--faint);
  transition: color var(--t-normal);
  line-height: 1;
}
.tacho-num.active { color: var(--yellow); }

/* ── Scroll reveal ──────────────────────────────────────────── */
.rv {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.rv.on  { opacity: 1; transform: none; }
.rv.d1  { transition-delay: 0.10s; }
.rv.d2  { transition-delay: 0.22s; }
.rv.d3  { transition-delay: 0.34s; }

/* ── Footer ─────────────────────────────────────────────────── */
footer {
  padding: 36px var(--page-px);
  background: var(--deep);
  border-top: 3px solid transparent;
  border-image: var(--grad-full) 1;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
}
.ft-logo img { height: 34px; }
.ft-copy {
  font-family: var(--sans);
  font-size: 10px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--muted);
}
.ft-socials { display: flex; gap: 10px; }
.ft-social-link {
  font-family: var(--sans);
  font-size: 9px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--muted);
  text-decoration: none; padding: 8px 16px;
  border: 1px solid var(--border);
  transition: color var(--t-normal), border-color var(--t-normal);
}
.ft-social-link:hover { color: var(--yellow); border-color: rgba(245,163,0,.4); }

/* ── Status badges ──────────────────────────────────────────── */
.badge-available {
  font-family: var(--sans);
  font-size: 9px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--yellow);
  border: 1px solid rgba(245,163,0,.4); padding: 4px 10px;
}
.badge-reserved {
  font-family: var(--sans);
  font-size: 9px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--red);
  border: 1px solid rgba(200,16,16,.4); padding: 4px 10px;
}
.badge-sold {
  font-family: var(--sans);
  font-size: 9px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase;
  color: #fff; background: var(--red);
  border: 1px solid var(--red); padding: 4px 10px;
}

/* ── WhatsApp float ─────────────────────────────────────────── */
.wa-float {
  position: fixed; bottom: 28px; right: 28px; z-index: 999;
  display: flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25D366;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(37,211,102,.45);
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.wa-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(37,211,102,.6);
}
.wa-float svg { display: block; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .nav-links { display: none; }
  footer { justify-content: center; text-align: center; }
  .divider::before { left: var(--page-px-sm); }
  .topbar-item.topbar-email { display: none; }
}
@media (max-width: 480px) {
  #topbar { padding: 0 var(--page-px-sm); }
  .topbar-contact { gap: 12px; }
}
