/* ============================================
   HWBT Builds — Main Stylesheet
   Shared across homepage and car subpages.
   ============================================ */

:root {
  --black: #0a0a0a;
  --dark: #111111;
  --panel: #141414;
  --border: #222222;
  --accent: #f0f0f0;
  --accent2: #e03428;
  --text: #e8e8e8;
  --muted: #666;
  --card-hover: #1c1c1c;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--text);
  font-family: 'Barlow', sans-serif;
  font-weight: 300;
  overflow-x: hidden;
}

/* ——— NOISE TEXTURE ——— */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1000;
  opacity: 0.4;
}

/* ============================================
   NAV
   ============================================ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 3rem;
  background: linear-gradient(to bottom, rgba(10,10,10,0.95), transparent);
  backdrop-filter: blur(8px);
}

/* Subpage nav has border and solid bg */
body.page-sub nav {
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  letter-spacing: 0.12em;
  color: var(--text);
  text-decoration: none;
  font-weight: 300;
}

.nav-logo span { color: var(--muted); font-weight: 300; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--accent);
}

.nav-link-shop {
  color: var(--accent2);
}

.nav-link-shop:hover {
  color: var(--accent);
}

.nav-back {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-back:hover { color: var(--accent); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* ============================================
   MARQUEE TICKER (shared)
   ============================================ */
.marquee-band {
  background: var(--accent);
  overflow: hidden;
  padding: 0.65rem 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.marquee-track {
  display: flex;
  gap: 0;
  animation: marquee-scroll 22s linear infinite;
  white-space: nowrap;
  width: max-content;
}

.marquee-item {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #000;
  padding: 0 2.5rem;
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.marquee-item::after {
  content: '—';
  opacity: 0.4;
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ============================================
   HOMEPAGE HERO
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 3rem 5rem;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 75% 60%, rgba(224,52,40,0.07) 0%, transparent 55%),
    radial-gradient(ellipse at 15% 80%, rgba(255,255,255,0.03) 0%, transparent 50%),
    linear-gradient(160deg, #080808 0%, #0e0e0e 50%, #080808 100%);
}

.hero-grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
}

.hero-eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text);
  font-weight: 400;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hero-eyebrow::before {
  content: '';
  display: inline-block;
  width: 40px;
  height: 1px;
  background: var(--accent2);
}

h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(5rem, 12vw, 11rem);
  line-height: 0.9;
  letter-spacing: 0.02em;
  margin-bottom: 1.5rem;
}

h1 .line2 {
  display: block;
  color: var(--text);
  -webkit-text-stroke: 0px;
}

h1 .outline {
  -webkit-text-stroke: 1px rgba(255,255,255,0.12);
  color: transparent;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 500px;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.hero-stats {
  display: flex;
  gap: 3rem;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.5rem;
  color: var(--text);
  letter-spacing: 0.05em;
}

.stat-label {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  right: 3rem;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  writing-mode: vertical-rl;
}

/* Compact hero — less vertical space, faster to content */
.hero-compact {
  min-height: auto;
  padding: 5.5rem 3rem 3rem;
}

.hero-compact .hero-content { max-width: 100%; }
.hero-compact h1 { font-size: clamp(3.5rem, 8vw, 6rem); margin-bottom: 1rem; }
.hero-compact .hero-sub { margin-bottom: 1.5rem; }
.hero-compact .hero-stats { gap: 2.5rem; }
.hero-compact .stat-num { font-size: 2rem; }

/* Homepage hero animations */
.hero-content > * {
  animation: fadeInUp 0.8s ease both;
}
.hero-eyebrow { animation-delay: 0.1s; }
.hero h1     { animation-delay: 0.2s; }
.hero-sub    { animation-delay: 0.35s; }
.hero-stats  { animation-delay: 0.5s; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================
   SUBPAGE HERO
   ============================================ */
body.page-sub .hero {
  height: 80vh;
  display: flex;
  align-items: flex-end;
  padding: 0 3rem 4rem;
}

body.page-sub .hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.3) contrast(1.1);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8,8,8,0.99) 0%, rgba(8,8,8,0.2) 55%, transparent 100%);
}

body.page-sub .hero-content {
  max-width: 800px;
}

.breadcrumb {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}

.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb span { color: var(--accent2); }

.status-badge {
  display: inline-block;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.3rem 0.8rem;
  background: #e8c84a;
  color: #000;
  margin-bottom: 1rem;
  font-weight: 500;
}

body.page-sub .hero h1 {
  font-size: clamp(3rem, 7vw, 6.5rem);
}

body.page-sub .hero h1 em {
  display: block;
  color: var(--text);
  font-style: normal;
}

body.page-sub .hero-sub {
  font-size: 1rem;
  max-width: 550px;
}

/* ============================================
   SUBPAGE STATS BAR
   ============================================ */
.stats-bar {
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  padding: 2rem 3rem;
  display: flex;
  gap: 0;
}

.stat-block {
  flex: 1;
  padding: 0 2rem;
  border-right: 1px solid var(--border);
}

.stat-block:first-child { padding-left: 0; }
.stat-block:last-child { border-right: none; }

.stat-block .val {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.8rem;
  letter-spacing: 0.05em;
  color: var(--text);
  line-height: 1;
}

.stat-block .val.accent { color: var(--accent); }

.stat-block .lbl {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.3rem;
}

/* ============================================
   HOMEPAGE — BUILDS SECTION
   ============================================ */
.section-header {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2rem;
  padding-top: 4rem;
  flex-wrap: wrap;
}

.section-header h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3.5rem;
  letter-spacing: 0.05em;
  color: var(--text);
}

.section-header .count {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-controls {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-left: auto;
}

.search-input {
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  font-family: inherit;
  min-width: 200px;
  transition: border-color 0.2s;
}

.search-input::placeholder { color: var(--muted); }
.search-input:focus {
  outline: none;
  border-color: var(--accent2);
}

.filter-pills {
  display: flex;
  gap: 0.5rem;
}

.filter-pill {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 0.4rem 0.9rem;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

.filter-pill:hover {
  color: var(--text);
  border-color: var(--text);
}

.filter-pill.active {
  background: var(--accent2);
  border-color: var(--accent2);
  color: #fff;
}

.section-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.builds-section {
  padding: 0 3rem 8rem;
}

.cars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.car-card {
  background: var(--dark);
  text-decoration: none;
  color: inherit;
  display: block;
  position: relative;
  overflow: hidden;
  transition: background 0.3s;
  cursor: pointer;
}

.car-card:hover {
  background: var(--card-hover);
}

.car-card:hover .car-img-wrap img {
  transform: scale(1.05);
}

.car-card:hover .car-arrow {
  opacity: 1;
  transform: translateX(0);
}

.car-card.featured {
  grid-column: span 2;
}

.car-img-wrap {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: #0d0d0d;
}

.car-card.featured .car-img-wrap {
  height: 280px;
}

.car-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  filter: brightness(0.85) contrast(1.05);
}

.car-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 4rem;
  color: var(--border);
  background: linear-gradient(135deg, #0d0d0d, #161616);
}

.car-status-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.3rem 0.8rem;
  font-weight: 500;
}

.badge-complete { background: var(--accent); color: #000; }
.badge-ongoing  { background: var(--accent2); color: #fff; }
.badge-sold     { background: #333; color: var(--muted); }

.car-info {
  padding: 1.25rem;
  border-top: 1px solid var(--border);
}

.car-year {
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 0.3rem;
}

.car-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  letter-spacing: 0.05em;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.car-tagline {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.45;
  margin-bottom: 0.9rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.car-meta {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.meta-val {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
}

.meta-key {
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.car-arrow {
  position: absolute;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 36px;
  height: 36px;
  border: 1px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1rem;
  opacity: 0;
  transform: translateX(-8px);
  transition: all 0.3s;
}

/* ============================================
   HOMEPAGE — TIMELINE
   ============================================ */
.timeline-section {
  padding: 0 3rem 8rem;
}

.timeline {
  position: relative;
  padding-left: 3rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border);
}

.tl-item {
  position: relative;
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}

.tl-item:last-child { border-bottom: none; }

.tl-dot {
  position: absolute;
  left: -3rem;
  top: 0.3rem;
  width: 8px;
  height: 8px;
  background: var(--accent2);
  border-radius: 50%;
  transform: translateX(-3.5px);
}

.tl-year {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  color: var(--accent2);
  margin-bottom: 0.3rem;
}

.tl-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  letter-spacing: 0.03em;
  margin-bottom: 0.4rem;
}

.tl-desc {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ============================================
   SUBPAGE — CONTENT & SIDEBAR
   ============================================ */
.content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 3rem;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 4rem;
}

.sec-head {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: baseline;
  gap: 1rem;
  color: var(--text);
}

.sec-head .line {
  flex: 1;
  height: 1px;
  background: var(--border);
  margin-left: 0.5rem;
}

.section { margin-bottom: 4rem; }

p.body-text {
  font-size: 1rem;
  line-height: 1.8;
  color: #bbb;
  margin-bottom: 1.2rem;
}

/* Video */
.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  background: #000;
  margin-bottom: 1rem;
}

.video-container iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}

.video-caption {
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.gallery-item {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--panel);
  cursor: pointer;
  position: relative;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.8);
  transition: all 0.4s;
}

.gallery-item:hover img {
  transform: scale(1.08);
  filter: brightness(1);
}

.gallery-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--muted);
  text-transform: uppercase;
}

/* Finance table */
.finance-table {
  width: 100%;
  border-collapse: collapse;
}

.finance-table tr { border-bottom: 1px solid var(--border); }
.finance-table tr:last-child { border-bottom: none; }

.finance-table td {
  padding: 1rem 0;
  font-size: 0.95rem;
}

.finance-table td:first-child {
  color: var(--muted);
  font-size: 0.85rem;
}

.finance-table td:last-child {
  text-align: right;
  font-weight: 500;
}

.finance-table .total-row td {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.4rem;
  border-top: 2px solid var(--accent);
  padding-top: 1.5rem;
}

.finance-table .total-row td:last-child { color: var(--accent); }

.loss { color: #c0392b; }
.profit { color: #4caf50; }

/* Info cards (sidebar) */
.info-card {
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.info-card h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
  color: var(--accent2);
}

.spec-row {
  display: flex;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

.spec-row:last-child { border-bottom: none; }

.spec-key { color: var(--muted); }
.spec-val { font-weight: 500; text-align: right; }

.spec-row a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
}

.spec-row a:hover { color: var(--accent); }

.spec-row a.view-all {
  color: var(--accent2);
  font-weight: 500;
}

.spec-row a.view-all:hover { color: var(--accent); }

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.tag {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--border);
  color: var(--muted);
}

.yt-btn {
  display: block;
  text-align: center;
  padding: 1rem;
  background: var(--accent2);
  color: #fff;
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
  transition: opacity 0.2s;
}

.yt-btn:hover { opacity: 0.85; }

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.lightbox.active { display: flex; }

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  font-size: 2rem;
  color: var(--text);
  cursor: pointer;
  font-family: 'Bebas Neue', sans-serif;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
  padding: 3rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

footer p {
  font-size: 0.8rem;
  color: var(--muted);
}

.footer-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.2rem;
  color: var(--accent);
  letter-spacing: 0.1em;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .content { grid-template-columns: 1fr; }
  nav, .hero, .stats-bar, .content, footer {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .stats-bar { flex-wrap: wrap; gap: 1.5rem; }
  .stat-block { border-right: none; padding: 0; min-width: 40%; }
  .section-controls { width: 100%; margin-left: 0; margin-top: 0.5rem; }
  .search-input { flex: 1; min-width: 140px; }
}

@media (max-width: 600px) {
  .section-header { flex-direction: column; align-items: stretch; }
  .section-controls { flex-direction: column; align-items: stretch; }
  .filter-pills { justify-content: flex-start; }
}

@media (max-width: 768px) {
  nav { padding: 1rem 1.5rem; }
  .hero { padding: 0 1.5rem 4rem; }
  .builds-section, .timeline-section { padding: 0 1.5rem 5rem; }
  .car-card.featured { grid-column: span 1; }
  .cars-grid { grid-template-columns: 1fr; }
  footer { padding: 2rem 1.5rem; flex-direction: column; gap: 1rem; }
  .section-header { padding-top: 4rem; }
}
