/* ═══════════════════════════════════════════════════════════════
   Cars World Record — Hero Section Styles
   Design System: Outfit + Inter | Apple-light palette | Glassmorphism
   Skills applied: ui-ux-pro-max, ui-ux-designer
   ═══════════════════════════════════════════════════════════════ */

/* ─── Reset & Base ─────────────────────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #0F172A;
  background-color: #F5F5F7;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ─── Preloader ────────────────────────────────────────────── */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F5F5F7;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

#preloader.fade-out {
  opacity: 0;
  pointer-events: none;
}

.preloader-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preloader-ring {
  filter: drop-shadow(0 0 8px rgba(26, 26, 46, 0.08));
}

#preloader-progress {
  transition: stroke-dashoffset 0.15s ease-out;
}

.preloader-percent {
  position: absolute;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: #1A1A2E;
  letter-spacing: -0.02em;
}

/* ─── Hero Section ─────────────────────────────────────────── */
#hero {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: #F5F5F7;
}

#hero-canvas {
  display: block;
  width: 100vw;
  height: 100vh;
  min-width: 100%;
  min-height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  object-fit: cover;
}

/* ─── Hero Title ───────────────────────────────────────────── */
#hero-title {
  position: absolute;
  top: 6vh;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 10;
  pointer-events: none;

  /* Hidden by default — revealed via .visible class */
  opacity: 0;
  filter: blur(8px);
  transition:
    opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.8s cubic-bezier(0.4, 0, 0.2, 1),
    filter 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

#hero-title h1 {
  display: flex;
  flex-direction: column;
  gap: 0;
  line-height: 1;
}

.title-line {
  display: block;
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.title-cars {
  font-size: clamp(3.5rem, 10vw, 8rem);
  font-weight: 800;
  color: #0F172A;
}

.title-world {
  font-size: clamp(1.4rem, 3.5vw, 2.8rem);
  font-weight: 700;
  color: #475569;
  letter-spacing: 0.15em;
  margin-top: 0.15em;
}

.title-gold {
  color: #D4AF37;
  /* Metallic Gold */
  background: linear-gradient(135deg, #BF953F, #FCF6BA, #B38728, #FBF5B7, #AA771C);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: shine 4s linear infinite;
}

@keyframes shine {
  to {
    background-position: 200% center;
  }
}

.hero-tagline {
  margin-top: 1rem;
  font-family: 'Inter', sans-serif;
  font-size: clamp(0.85rem, 1.5vw, 1.1rem);
  font-weight: 400;
  color: #64748B;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Title visible state */
#hero-title.visible {
  opacity: 1;
  filter: blur(0);
  transform: translateX(-50%) translateY(0);
}

/* ─── Glassmorphism Search Panel ───────────────────────────── */
#search-panel {
  position: absolute;
  right: 5%;
  bottom: 12%;
  z-index: 20;
  width: clamp(300px, 26vw, 400px);

  /* Hidden by default */
  opacity: 0;
  transform: translateY(50px);
  filter: blur(6px);
  pointer-events: none;
  transition:
    opacity 0.9s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.9s cubic-bezier(0.4, 0, 0.2, 1),
    filter 0.9s cubic-bezier(0.4, 0, 0.2, 1);
}

#search-panel.visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
  pointer-events: auto;
}

.search-panel-inner {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 20px;
  padding: 2rem 1.75rem;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.06),
    0 1px 3px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.search-panel-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
  color: #0F172A;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

/* ─── Form Elements ────────────────────────────────────────── */
.search-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.form-group label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.form-group select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  padding: 0.7rem 2.2rem 0.7rem 0.9rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: #0F172A;
  background-color: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;

  /* Custom dropdown arrow */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px;
}

.form-group select:hover {
  border-color: rgba(0, 0, 0, 0.15);
}

.form-group select:focus {
  border-color: #1A1A2E;
  box-shadow: 0 0 0 3px rgba(26, 26, 46, 0.1);
}

/* ─── Search Button ────────────────────────────────────────── */
.search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.85rem 1.5rem;
  margin-top: 0.35rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: #FFFFFF;
  background: #1A1A2E;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition:
    background-color 0.25s ease,
    transform 0.2s ease,
    box-shadow 0.25s ease;
  outline: none;
}

.search-btn:hover {
  background: #2D2D4A;
  box-shadow: 0 6px 20px rgba(26, 26, 46, 0.25);
}

.search-btn:active {
  transform: scale(0.98);
}

.search-btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(26, 26, 46, 0.3);
}

/* ─── Scroll Indicator ─────────────────────────────────────── */
#scroll-indicator {
  position: absolute;
  bottom: 4vh;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  z-index: 10;
  opacity: 1;
  transition: opacity 0.5s ease;
}

#scroll-indicator.hidden {
  opacity: 0;
  pointer-events: none;
}

.scroll-text {
  font-size: 0.85rem;
  font-weight: 700;
  color: #000000;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.scroll-arrows {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin-top: -2px;
}

.scroll-chevron {
  color: #000000;
  animation: bounceChevron 2s ease-in-out infinite;
}

.chevron-1 {
  animation-delay: 0s;
}

.chevron-2 {
  margin-top: -12px;
  animation-delay: 0.15s;
}

@keyframes bounceChevron {

  0%,
  100% {
    opacity: 0.3;
    transform: translateY(0);
  }

  50% {
    opacity: 1;
    transform: translateY(6px);
  }
}

/* ─── Coming Soon Panel Content ──────────────────────────── */
.coming-soon-panel {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.coming-soon-badge {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  background: rgba(212, 175, 55, 0.15);
  color: #B38728;
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.coming-soon-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 2rem;
  color: #0F172A;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.coming-soon-sub {
  font-size: 0.95rem;
  color: #64748B;
  font-weight: 500;
  max-width: 260px;
  margin: 0 auto;
}


/* ─── Footer (Replaces Content Below) ──────────────────────── */
.site-footer {
  background: #0F172A;
  /* Dark theme footer */
  color: #F8FAFC;
  padding: 4rem 2rem;
  position: relative;
  z-index: 10;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 3rem;
}

.footer-logo {
  font-family: 'Outfit', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  color: #FFFFFF;
}

.footer-gold {
  color: #D4AF37;
}

.footer-coming-soon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer-badge {
  background: #D4AF37;
  color: #0F172A;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.4rem 1rem;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

.footer-tagline {
  font-size: 1.1rem;
  color: #94A3B8;
  max-width: 400px;
}

.footer-socials {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer-socials-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #64748B;
  font-weight: 600;
}

.social-icons {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.social-icon {
  color: #94A3B8;
  transition: color 0.3s ease, transform 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.9;
}

.social-icon:hover {
  color: #D4AF37;
  transform: translateY(-3px);
  opacity: 1;
}

.footer-copyright {
  margin-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  width: 100%;
}

.footer-copyright p {
  font-size: 0.85rem;
  color: #64748B;
}

/* Hide original content placeholder styles */
.content-placeholder {
  display: none;
}

/* ─── Responsive (Mobile) ──────────────────────────────────── */
@media (max-width: 768px) {
  #hero {
    height: 100vh;
    height: -webkit-fill-available;
    min-height: 100vh;
    min-height: -webkit-fill-available;
  }

  #hero-canvas {
    width: 100vw;
    height: 100vh;
    height: -webkit-fill-available;
    min-width: 100vw;
    min-height: 100vh;
    min-height: -webkit-fill-available;
  }

  #hero-title {
    top: 4vh;
  }

  #search-panel {
    right: 50%;
    bottom: 8%;
    transform: translateX(50%) translateY(50px);
    width: clamp(280px, 88vw, 380px);
  }

  #search-panel.visible {
    transform: translateX(50%) translateY(0);
  }

  .search-panel-inner {
    padding: 1.5rem 1.25rem;
    border-radius: 16px;
  }

  .search-panel-title {
    font-size: 1.15rem;
  }

  .form-group select {
    padding: 0.65rem 2rem 0.65rem 0.8rem;
    font-size: 0.85rem;
  }

  .search-btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .title-cars {
    font-size: 2.8rem;
  }

  .title-world {
    font-size: 1.1rem;
  }

  .hero-tagline {
    font-size: 0.75rem;
  }
}

/* ─── Accessibility: Reduced Motion ────────────────────────── */
@media (prefers-reduced-motion: reduce) {

  #hero-title,
  #search-panel,
  #preloader,
  .scroll-wheel {
    transition: none !important;
    animation: none !important;
  }

  #hero-title {
    opacity: 1;
    filter: none;
  }

  #search-panel {
    opacity: 1;
    transform: translateY(0);
    filter: none;
    pointer-events: auto;
  }
}