/* ============================================================================
   GRIDRUNGP LANDING PAGE
   Modern one-page landing experience for mobile app launch
   Extends styles.css (existing GridRun design system)
   ============================================================================ */

/* Override body styles for landing page only */
body.landing-page {
  background: linear-gradient(180deg, #050609 0%, #0a0b0f 50%, #060608 100%);
  overflow-x: hidden;
}

/* ============================================================================
   HERO SECTION
   ============================================================================ */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  overflow: hidden;
}

/* Animated background gradient */
.hero-bg {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 20% 30%, rgba(255, 30, 0, 0.08), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255, 75, 43, 0.05), transparent 50%),
    radial-gradient(ellipse at 50% 100%, rgba(24,26,33,0.6), transparent 60%);
  z-index: 0;
  animation: hero-bg-pulse 12s ease-in-out infinite;
}

@keyframes hero-bg-pulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 700px;
  animation: hero-fade-in 1.2s ease-out;
}

@keyframes hero-fade-in {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-logo-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.hero-logo {
  width: 120px;
  height: auto;
  filter: drop-shadow(0 8px 24px rgba(255, 30, 0, 0.4));
  animation: hero-logo-float 6s ease-in-out infinite;
}

@keyframes hero-logo-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.hero-title {
  margin: 0;
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 50%, #e0e0e0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.hero-title .gp-red {
  background: #E10600;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.coming-badge {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-alt));
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(255, 30, 0, 0.4);
  animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 16px rgba(255, 30, 0, 0.4); }
  50% { transform: scale(1.05); box-shadow: 0 6px 24px rgba(255, 30, 0, 0.6); }
}

.hero-tagline {
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 3rem;
  font-weight: 400;
}

/* App Store Buttons */
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 3rem;
}

.app-button {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.5rem;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: var(--elev-2);
  min-width: 200px;
}

.app-button:hover {
  background: var(--surface-alt);
  border-color: rgba(255,255,255,0.15);
  transform: translateY(-3px);
  box-shadow: var(--elev-3);
}

.app-button-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.app-button--google .app-button-icon {
  color: #34A853;
}

.app-button--apple .app-button-icon {
  color: #ffffff;
}

.app-button > div {
  text-align: left;
  line-height: 1.3;
}

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

.app-button-store {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

/* Scroll hint */
.hero-scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  animation: scroll-bounce 2s ease-in-out infinite;
}

@keyframes scroll-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(10px); }
}

/* ============================================================================
   FEATURE STRIP
   ============================================================================ */

.features {
  padding: 5rem 1.5rem;
  background: linear-gradient(180deg, transparent, rgba(16,18,23,0.5), transparent);
}

.features-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.03)), var(--surface-2);
  border: var(--card-border);
  border-radius: var(--card-radius);
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: var(--elev-2);
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--elev-3);
  border-color: rgba(255,255,255,0.12);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
  filter: grayscale(0.2);
}

.feature-card h3 {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.95rem;
}

/* ============================================================================
   TRACK ANIMATION SECTION
   ============================================================================ */

.track-section {
  padding: 6rem 1.5rem;
  background: var(--surface-1);
  position: relative;
  overflow: hidden;
}

.track-container {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.track-headline {
  margin: 0 0 3rem;
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.2;
  background: linear-gradient(135deg, #ffffff, #9ca3af);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  border: none;
  padding: 0;
}

.track-canvas {
  position: relative;
  background: 
    linear-gradient(180deg, rgba(5,6,9,0.75), rgba(5,6,9,0.8)),
    url('assets/images/las vegas night.jpg');
  background-size: 100% auto;
  background-position: center center;
  background-repeat: no-repeat;
  border: var(--card-border);
  border-radius: var(--card-radius);
  padding: 3rem 2rem;
  box-shadow: var(--elev-3);
  margin-bottom: 2rem;
  overflow: hidden;
}

.track-canvas::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(255,30,0,0.08), transparent 60%);
  pointer-events: none;
}

#trackSVG {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  max-width: 600px;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
}

/* Car dot styling */
.team-dot-track {
  filter: drop-shadow(0 0 4px rgba(0,0,0,0.8));
  cursor: pointer;
  transition: filter 0.2s ease;
}

.team-dot-track:hover {
  filter: drop-shadow(0 0 8px rgba(255,255,255,0.6));
}

.team-dot-track circle {
  transition: r 0.2s ease;
}

.team-dot-track:hover circle {
  r: 12;
}

.team-label {
  font-size: 10px;
  font-weight: 700;
  fill: #ffffff;
  text-anchor: middle;
  pointer-events: none;
  text-shadow: 0 0 3px rgba(0,0,0,0.9);
}

.track-caption {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-style: italic;
}

/* ============================================================================
   COMING 2026 SECTION
   ============================================================================ */

.coming-section {
  padding: 5rem 1.5rem;
  background: 
    radial-gradient(circle at center, rgba(255, 30, 0, 0.05), transparent 70%),
    var(--bg);
}

.coming-container {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.coming-content {
  background: linear-gradient(180deg, rgba(255,255,255,0.015), rgba(0,0,0,0.02)), var(--surface-2);
  border: var(--card-border-strong);
  border-radius: var(--card-radius);
  padding: 4rem 2rem;
  box-shadow: var(--elev-3);
}

.coming-headline {
  margin: 0 0 1.5rem;
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text);
  border: none;
  padding: 0;
}

.coming-subtext {
  margin: 0;
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: var(--muted);
  line-height: 1.7;
}

/* ============================================================================
   EARLY ACCESS / EMAIL CAPTURE
   ============================================================================ */

.early-access-section {
  padding: 5rem 1.5rem 6rem;
  background: var(--surface-1);
}

.early-access-container {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.early-access-headline {
  margin: 0 0 0.75rem;
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text);
  border: none;
  padding: 0;
}

.early-access-subtext {
  margin: 0 0 2.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.early-access-form {
  width: 100%;
}

.form-group {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 1rem;
}

.email-input {
  flex: 1;
  min-width: 250px;
  padding: 0.9rem 1.25rem;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s ease;
  box-shadow: var(--elev-1);
}

.email-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 30, 0, 0.15);
}

.email-input::placeholder {
  color: var(--muted);
  opacity: 0.6;
}

.submit-button {
  padding: 0.9rem 2rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-alt));
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(255, 30, 0, 0.3);
  min-width: 180px;
}

.submit-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 30, 0, 0.5);
}

.submit-button:active {
  transform: translateY(0);
}

.form-message {
  min-height: 24px;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.form-message.success {
  color: #4ade80;
}

.form-message.error {
  color: #f87171;
}

.form-message.info {
  color: #60a5fa;
}

/* Platform Selection */
.platform-selection {
  margin-top: 30px;
  text-align: center;
}

.platform-prompt {
  font-size: 18px;
  color: var(--text);
  margin-bottom: 20px;
  font-weight: 600;
}

.platform-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.platform-button {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 28px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  background: var(--surface-3);
  border: 2px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 160px;
  box-shadow: var(--elev-1);
}

.platform-button:hover {
  background: rgba(255, 30, 0, 0.1);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(255, 30, 0, 0.2);
}

.platform-button:active {
  transform: translateY(0);
}

.platform-icon {
  width: 24px;
  height: 24px;
}

/* ============================================================================
   FOOTER
   ============================================================================ */

.landing-footer {
  padding: 3rem 1.5rem 2rem;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  text-align: center;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.footer-logo img {
  width: 48px;
  height: auto;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ============================================================================
   SCROLL FADE-IN ANIMATION
   Sections fade in as they approach viewport and fade out as they leave
   ============================================================================ */

.fade-in-section {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.9s ease-out, transform 0.9s ease-out;
}

.fade-in-section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Progressive fade based on scroll position */
.fade-in-section.fading-out {
  opacity: 0.5;
  transform: translateY(-15px);
  transition: opacity 0.6s ease-in, transform 0.6s ease-in;
}

/* Respect user preferences for reduced motion */
@media (prefers-reduced-motion: reduce) {
  .fade-in-section,
  .hero-content,
  .hero-logo,
  .hero-bg,
  .coming-badge,
  .hero-scroll-hint,
  .car-dot {
    animation: none !important;
    transition: none !important;
  }
  
  .fade-in-section {
    opacity: 1;
    transform: none;
  }
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 640px) {
  .hero {
    min-height: 90vh;
    padding: 1.5rem 1rem;
  }
  
  .hero-logo {
    width: 90px;
  }
  
  .hero-cta {
    flex-direction: column;
    width: 100%;
  }
  
  .app-button {
    width: 100%;
    justify-content: center;
  }
  
  .features {
    padding: 3rem 1rem;
  }
  
  .track-section {
    padding: 4rem 1rem;
  }
  
  .track-canvas {
    padding: 2rem 1rem;
  }
  
  .coming-content {
    padding: 3rem 1.5rem;
  }
  
  .form-group {
    flex-direction: column;
  }
  
  .email-input {
    min-width: 100%;
  }
  
  .submit-button {
    width: 100%;
  }
  
  .platform-buttons {
    flex-direction: column;
    align-items: stretch;
  }
  
  .platform-button {
    width: 100%;
    justify-content: center;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .features-container {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
}
