/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --sand: #c8a96e;
  --orange: #F07C1A;
  --gold: #C9941A;
  --dark: #111010;
  --dark2: #1c1b1a;
  --dark3: #252320;
  --light: #f5f0e8;
  --text: #e8e0d0;
  --muted: #9a8f7a;
  --font-display: 'Bebas Neue', sans-serif;
  --font-body: 'Inter', sans-serif;
  --radius: 8px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--dark);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

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

section { padding: 100px 0; }

.section-label {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 12px;
}
.section-label.light { color: var(--sand); }

h2 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  letter-spacing: 0.02em;
  line-height: 1;
  margin-bottom: 24px;
}
h2.light { color: #fff; }

.section-intro {
  max-width: 640px;
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 56px;
}
.section-intro.light { color: rgba(255,255,255,0.65); }

/* ===== NAVBAR ===== */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background 0.3s, box-shadow 0.3s;
}
#navbar.scrolled {
  background: rgba(17,16,16,0.96);
  box-shadow: 0 2px 24px rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 0.05em;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-figure {
  height: 32px;
  width: auto;
  filter: drop-shadow(0 0 6px rgba(0,209,102,0.5));
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--orange); }

#lang-toggle {
  background: transparent;
  border: 1px solid var(--muted);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  padding: 5px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
#lang-toggle:hover { border-color: var(--orange); color: var(--orange); }

.nav-burger {
  display: none;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
}

.nav-mobile {
  display: none;
  flex-direction: column;
  background: rgba(17,16,16,0.98);
  padding: 16px 24px 24px;
}
.nav-mobile a {
  padding: 10px 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nav-mobile.open { display: flex; }

/* ===== HERO ===== */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: url('images/hero-bg.jpg') center/cover no-repeat;
  padding: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10,8,6,0.85) 40%, rgba(10,8,6,0.4) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  padding-top: 80px;
  width: 100%;
}

.hero-layout {
  display: flex;
  align-items: center;
  gap: 48px;
}

.hero-text {
  flex: 1;
  min-width: 0;
}

.hero-mascot {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.hero-mascot img {
  height: clamp(220px, 30vw, 420px);
  width: auto;
  filter: drop-shadow(0 0 40px rgba(0,209,102,0.35));
  animation: float 4s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

.hero-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 20px;
}

.hero-content h1 {
  font-family: var(--font-display);
  font-size: clamp(4rem, 13vw, 10rem);
  line-height: 0.9;
  letter-spacing: 0.02em;
  color: #fff;
  margin-bottom: 28px;
}
.hero-content h1 span {
  color: var(--orange);
}

.hero-sub {
  max-width: 480px;
  color: rgba(255,255,255,0.7);
  font-size: 1.1rem;
  margin-bottom: 40px;
}

.btn-primary {
  display: inline-block;
  background: var(--orange);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 14px 32px;
  border-radius: var(--radius);
  transition: background 0.2s, transform 0.2s;
}
.btn-primary:hover { background: #d96d10; transform: translateY(-2px); }

.hero-scroll {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  animation: bounce 2s infinite;
  color: rgba(255,255,255,0.5);
  font-size: 1.4rem;
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ===== TEAM ===== */
#team { background: var(--dark2); }

.team-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  margin-bottom: 64px;
}

.team-card {
  background: var(--dark3);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.05);
  transition: transform 0.3s;
}
.team-card:hover { transform: translateY(-4px); }

.team-card-img {
  aspect-ratio: 1;
  overflow: hidden;
  background: #0d0c0b;
  display: flex;
  align-items: center;
  justify-content: center;
}
.team-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.team-card-info {
  padding: 20px 24px;
}
.team-card-info h3 {
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.team-role {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange);
}

.mascot-card-figure {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.car-banner {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.05);
}
.car-banner img { width: 100%; }
.car-banner-caption {
  background: var(--dark3);
  padding: 12px 20px;
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}

/* ===== RACE ===== */
#race {
  position: relative;
  overflow: hidden;
  background: var(--dark);
}

.race-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(17,16,16,0.92) 0%, rgba(17,16,16,0.7) 50%, rgba(17,16,16,0.92) 100%),
    url('images/gallery-1.jpg') center/cover no-repeat;
}

.race-inner {
  position: relative;
  z-index: 2;
  text-align: center;
}

.race-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}
.race-logo img {
  width: min(280px, 60vw);
  filter: drop-shadow(0 4px 24px rgba(201,148,26,0.4));
}

.race-inner .section-intro {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.race-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 2px;
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
}

.stat {
  background: rgba(28,27,26,0.8);
  padding: 36px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: background 0.2s;
}
.stat:hover { background: rgba(40,38,35,0.95); }

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  color: var(--gold);
  line-height: 1;
}
.stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
}

/* ===== GALLERY ===== */
#gallery { background: var(--dark2); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 260px;
  gap: 12px;
}

.gallery-item {
  overflow: hidden;
  border-radius: var(--radius);
  cursor: pointer;
  background: var(--dark3);
}
.gallery-item.large {
  grid-column: span 2;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, filter 0.3s;
  filter: brightness(0.9);
}
.gallery-item:hover img {
  transform: scale(1.05);
  filter: brightness(1.05);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.93);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.lightbox.hidden { display: none; }

.lightbox #lb-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
}
.lb-close, .lb-prev, .lb-next {
  position: absolute;
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  font-size: 1.4rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: rgba(240,124,26,0.7); }
.lb-close { top: 20px; right: 20px; }
.lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 20px; top: 50%; transform: translateY(-50%); }

/* ===== SPONSORS ===== */
#sponsors { background: var(--dark); }

.sponsor-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.sponsor-card {
  background: var(--dark3);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color 0.3s;
}
.sponsor-card:hover { border-color: rgba(240,124,26,0.3); }

.main-sponsor {
  border-color: rgba(240,124,26,0.25);
  background: linear-gradient(135deg, rgba(37,35,32,1) 0%, rgba(28,26,24,1) 100%);
}

.sponsor-badge {
  display: inline-block;
  background: var(--orange);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  width: fit-content;
}

.sponsor-name {
  font-family: var(--font-display);
  font-size: 2.8rem;
  letter-spacing: 0.08em;
  line-height: 1;
  color: #fff;
}
.sponsor-name span {
  display: block;
  color: var(--orange);
}

.sponsor-logo-wrap {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(255,255,255,0.08);
}
.sponsor-logo-wrap img { width: 100%; height: 100%; object-fit: cover; }

.sponsor-desc {
  color: var(--muted);
  font-size: 0.95rem;
}

/* ===== FOOTER ===== */
footer {
  background: #0a0908;
  padding: 40px 0;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.footer-team {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.08em;
  color: #fff;
}
.footer-sub {
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  section { padding: 72px 0; }

  .hero-mascot { display: none; }

  .nav-links, #lang-toggle { display: none; }
  .nav-burger { display: block; }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 200px;
  }
  .gallery-item.large { grid-column: span 2; }

  .race-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 240px;
  }
  .gallery-item.large { grid-column: span 1; }
  .lb-prev, .lb-next { display: none; }
}
