/* ============================================================
   mobile.css — Mobile-First Responsive Design System
   Ashwa Riders / E-Formula Ashwariders
   Applies touch-optimized layout, mobile composition,
   responsive typography clamp(), and drawer drawer styling.
   ============================================================ */

/* ─── Mobile Touch Base ───────────────────────────────────────── */
a, button, input, select, textarea {
  touch-action: manipulation;
}

/* ─── Mobile Navbar Header Controls ──────────────────────────── */
.mobile-nav-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--paper, #E8ECEB);
  font-size: 1.5rem;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1001;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.mobile-nav-toggle:hover,
.mobile-nav-toggle:focus {
  background: rgba(255, 255, 255, 0.08);
}

/* ─── Mobile Drawer Component ───────────────────────────────── */
.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(12, 11, 15, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-nav-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 85vw;
  max-width: 360px;
  background: rgba(0, 0, 0, 0.98);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.6);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1.25rem;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}

.mobile-nav-drawer.is-open {
  transform: translateX(0);
}

.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 1.5rem;
}

.mobile-nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: var(--logo-orange, #ff751f);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mobile-nav-brand img {
  height: 32px;
  width: auto;
}

.mobile-nav-close {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--paper, #E8ECEB);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.2s ease;
}

.mobile-nav-close:hover {
  background: var(--logo-orange, #ff751f);
  color: #fff;
  border-color: var(--logo-orange, #ff751f);
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  min-height: 48px;
  border-radius: 8px;
  color: rgba(232, 236, 235, 0.85);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link:focus,
.mobile-nav-link.active {
  color: #ffffff;
  background: rgba(255, 117, 31, 0.12);
  border-color: rgba(255, 117, 31, 0.3);
  padding-left: 1.25rem;
}

.mobile-nav-link.active::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--logo-orange, #ff751f);
  box-shadow: 0 0 8px var(--logo-orange, #ff751f);
}

.mobile-nav-footer {
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mobile-nav-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 1.25rem;
  background: var(--logo-orange, #ff751f);
  color: #ffffff;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(255, 117, 31, 0.3);
  transition: transform 0.2s ease;
}

.mobile-nav-cta:active {
  transform: scale(0.98);
}

/* ─── Breakpoint Adaptations ────────────────────────────────── */
@media (max-width: 900px) {
  .mobile-nav-toggle {
    display: flex !important;
  }

  /* Hide inline desktop navigation menus when mobile hamburger is active */
  header nav ul,
  header .nav-links,
  .main-nav .nav-menu {
    display: none !important;
  }
}

/* ─── Mobile Hero Slider Composition ──────────────────────── */
@media (max-width: 768px) {
  .hero-slider,
  .hero-section,
  .about-hero,
  .car-hero {
    min-height: clamp(500px, 80svh, 750px) !important;
    max-height: 85svh !important;
    padding-top: 5rem !important;
    padding-bottom: 3rem !important;
  }

  .hero-slide img,
  .hero-bg img {
    object-fit: cover !important;
    object-position: center 35% !important;
  }

  .hero-content {
    max-width: 100% !important;
    padding: 0 1.25rem !important;
    text-align: left !important;
  }

  .hero-title,
  .hero-headline {
    font-size: clamp(1.9rem, 7.5vw, 3.2rem) !important;
    line-height: 1.15 !important;
    letter-spacing: -0.02em !important;
    margin-bottom: 0.75rem !important;
  }

  .hero-subtitle,
  .hero-desc {
    font-size: clamp(0.9rem, 3.8vw, 1.1rem) !important;
    line-height: 1.5 !important;
    margin-bottom: 1.5rem !important;
  }

  .hero-ctas,
  .hero-buttons {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 0.75rem !important;
  }

  .hero-ctas .btn,
  .hero-buttons .btn {
    width: 100% !important;
    min-height: 48px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }

  /* Slider Indicators & Touch Controls */
  .slider-controls,
  .hero-dots {
    bottom: 1.25rem !important;
  }

  .slider-dot,
  .hero-dot {
    width: 10px !important;
    height: 10px !important;
    min-width: 10px !important;
    min-height: 10px !important;
  }

  .slider-dot.active,
  .hero-dot.active {
    width: 24px !important;
    border-radius: 12px !important;
  }
}

/* ─── Section Rhythm & Mobile Spacing ───────────────────────── */
@media (max-width: 768px) {
  section {
    padding-top: 3.5rem !important;
    padding-bottom: 3.5rem !important;
  }

  .container,
  .section-inner {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
  }

  /* Specs & Car Cards Mobile Grid */
  .specs-grid,
  .car-specs-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
  }

  /* Team Cards Mobile Grid */
  .team-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.85rem !important;
  }

  /* Build Story Mobile Timeline */
  .build-story-timeline,
  .timeline {
    padding-left: 1rem !important;
    border-left: 2px solid var(--logo-orange, #ff751f) !important;
  }

  /* News Cards Mobile Stack */
  .news-grid,
  .updates-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }
}

@media (max-width: 414px) {
  .specs-grid,
  .car-specs-grid {
    grid-template-columns: 1fr !important;
  }

  .team-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* ─── Content Visibility (Excludes 3D Build Story .g2g-card) ─── */
.reveal,
.reveal-scale,
.reveal-left,
.reveal-right,
.team-card,
.news-card,
.achievement-card,
.gallery-item,
.sponsor-card,
.value-card {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}

/* ─── Mobile Car Frame Sequence & Track Calibration ────────── */
@media (max-width: 768px) {
  .car-scroll-track,
  .g2g-outer {
    height: 220vh !important;
  }

  .car-sticky-viewport,
  .g2g-scene {
    height: 100dvh !important;
    height: 100vh !important;
  }
}





/* ============================================================
   MOBILE FIX PATCH
   IMPORTANT: Mobile-only overrides. Desktop styles are untouched.
   ============================================================ */

@media (max-width: 768px) {
  html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
  }

  *, *::before, *::after {
    min-width: 0;
  }

  img, svg, video, canvas, iframe {
    max-width: 100%;
  }

  /* Navbar / logo */
  .navbar {
    padding: 12px 0 !important;
  }

  .navbar .container {
    padding-left: 16px !important;
    padding-right: 16px !important;
    gap: 10px;
  }

  .nav-logo {
    min-width: 0;
    max-width: calc(100% - 56px);
    gap: 8px;
    font-size: clamp(.95rem, 4vw, 1.25rem) !important;
  }

  .logo-mark {
    height: 38px !important;
    max-width: 44px;
  }

  .nav-logo-wrapper {
    min-width: 0;
    overflow: hidden;
  }

  .nav-logo span,
  .nav-subtitle {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-nav-toggle {
    flex: 0 0 44px;
    display: flex !important;
  }

  /* Shared containers / sections */
  .container,
  .section-inner {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .section-padding,
  section {
    padding-top: 56px !important;
    padding-bottom: 56px !important;
  }

  .section-title {
    font-size: clamp(1.65rem, 8vw, 2.45rem) !important;
    line-height: 1.08 !important;
    overflow-wrap: anywhere;
  }

  .section-subtitle,
  .lead,
  .lede {
    max-width: 100% !important;
    font-size: .92rem !important;
    line-height: 1.65 !important;
    overflow-wrap: anywhere;
  }

  /* Shared buttons */
  .btn {
    max-width: 100%;
    min-height: 46px;
    white-space: normal !important;
    text-align: center;
  }

  /* All common grids: never force desktop columns on a phone */
  .value-grid,
  .value-grid-6,
  .dept-grid,
  .dept-grid-detailed,
  .team-grid,
  .achievement-grid,
  .gallery-grid,
  .contact-grid,
  .tiers-grid,
  .workshop-grid,
  .broadcast-grid,
  .vm-new,
  .chip-grid {
    width: 100% !important;
    grid-template-columns: 1fr !important;
  }

  /* Two-column layouts become a clean vertical flow */
  .split-block,
  .car-showcase,
  .form-grid-2,
  .car-actions,
  .stage-btn-row {
    grid-template-columns: 1fr !important;
    flex-direction: column !important;
  }

  .split-image,
  .split-copy {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Home hero */
  .hero {
    min-height: 100svh !important;
    height: auto !important;
    max-height: none !important;
    align-items: center !important;
  }

  .hero-video,
  .hero-video video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
  }

  .hero-content {
    width: 100% !important;
    padding: 112px 16px 64px !important;
  }

  .hero h1 {
    max-width: 100% !important;
    font-size: clamp(2.05rem, 11vw, 3.4rem) !important;
    line-height: .98 !important;
    letter-spacing: -.045em !important;
    overflow-wrap: anywhere;
  }

  .hero h2.tagline {
    font-size: clamp(.95rem, 4.4vw, 1.25rem) !important;
    line-height: 1.4 !important;
    margin: 16px 0 24px !important;
  }

  .hero-actions {
    width: 100% !important;
    margin-bottom: 38px !important;
    gap: 10px !important;
  }

  .hero-actions .btn {
    width: 100% !important;
    justify-content: center !important;
  }

  .hero-stats {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 18px 12px !important;
  }

  .hero-stats .stat-item {
    min-width: 0 !important;
    padding-right: 10px !important;
  }

  .hero-stats .stat-item:not(:last-child)::after {
    display: none !important;
  }

  .hero-stats .stat-number {
    font-size: clamp(1.25rem, 6vw, 1.8rem) !important;
  }

  .scroll-indicator {
    display: none !important;
  }

  /* About page */
  .about-hero,
  .team-hero,
  .sponsor-hero,
  .achievements-hero,
  .contact-hero,
  .gallery-hero {
    min-height: 70svh !important;
    height: auto !important;
    max-height: none !important;
  }

  .about-hero .hero-content,
  .team-hero .hero-content,
  .sponsor-hero .hero-content,
  .achievements-hero .hero-content,
  .contact-hero .hero-content,
  .gallery-hero .hero-content {
    padding: 110px 16px 56px !important;
  }

  .org-chart {
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  /* Team cards */
  .team-grid {
    gap: 14px !important;
  }

  .team-card,
  .team-card .card-body,
  .team-card .bio {
    min-width: 0 !important;
  }

  .team-card .card-image img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 4 / 3;
    object-fit: cover !important;
  }

  /* Car page: keep the existing scroll/3D experience usable */
  .car-scroll-track {
    height: 190vh !important;
    min-height: 1100px !important;
  }

  .car-sticky-viewport {
    height: 100svh !important;
    min-height: 620px !important;
  }

  .stage-panel {
    width: 100% !important;
    max-width: 100% !important;
    padding: 100px 16px 24px !important;
    z-index: 5 !important;
  }

  .stage-title {
    font-size: clamp(1.8rem, 9vw, 3rem) !important;
    line-height: 1 !important;
    overflow-wrap: anywhere;
  }

  .stage-desc {
    max-width: 100% !important;
    font-size: .9rem !important;
    line-height: 1.55 !important;
  }

  .stage-stats {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .canvas-side {
    width: 100% !important;
    height: 42svh !important;
    min-height: 240px !important;
    max-height: 430px !important;
    position: relative !important;
    overflow: hidden !important;
  }

  .canvas-side canvas,
  .studio-grid canvas {
    width: 100% !important;
    max-width: 100% !important;
  }

  .timeline-bottom {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .timeline-bottom,
  .build-timeline {
    max-width: 100% !important;
  }

  .sys-tabs {
    display: flex !important;
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .sys-tabs::-webkit-scrollbar {
    display: none;
  }

  .sys-tab {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
  }

  .sys-panel {
    width: 100% !important;
  }

  .spec-list {
    width: 100% !important;
  }

  .spec-row {
    gap: 14px !important;
    align-items: flex-start !important;
  }

  .spec-row .spec-label,
  .spec-row .spec-value {
    overflow-wrap: anywhere;
  }

  .gallery-masonry {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .g-item {
    width: 100% !important;
    min-height: 220px !important;
  }

  /* Sponsors */
  .sponsor-scroll-section {
    overflow: hidden !important;
  }

  .sponsor-scroll-wrapper,
  .sponsor-track {
    max-width: 100% !important;
  }

  .sponsor-track {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .tier-card {
    width: 100% !important;
    min-width: 0 !important;
  }

  .form-shell {
    grid-template-columns: 1fr !important;
    width: 100% !important;
  }

  .form-panel,
  .form-info {
    width: 100% !important;
    min-width: 0 !important;
  }

  .form-row,
  .form-group {
    min-width: 0 !important;
  }

  input,
  select,
  textarea {
    max-width: 100% !important;
    width: 100% !important;
    font-size: 16px !important;
  }

  /* Achievements */
  .achievement-grid {
    gap: 14px !important;
  }

  .achievement-card,
  .achievement-card .card-media {
    width: 100% !important;
    min-width: 0 !important;
  }

  .achievement-card .card-media img {
    width: 100% !important;
    height: auto !important;
    object-fit: cover !important;
  }

  .toolbar-row {
    width: 100% !important;
    align-items: stretch !important;
  }

  .filter-bar {
    max-width: 100% !important;
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .filter-bar::-webkit-scrollbar {
    display: none;
  }

  .filter-btn {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
  }

  /* Gallery */
  .gallery-grid {
    gap: 10px !important;
  }

  .gallery-item {
    width: 100% !important;
    min-width: 0 !important;
  }

  .gallery-item img,
  .gallery-item video {
    width: 100% !important;
    height: auto !important;
    max-height: 70svh !important;
    object-fit: cover !important;
  }

  .hero-bg-video,
  .hero-bg-video video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
  }

  /* Contact */
  .contact-grid {
    gap: 24px !important;
  }

  .console,
  .pitlane-wrap,
  .pitlane-map,
  .pitlane-data {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .pitlane-map {
    min-height: 300px !important;
  }

  .waveform {
    max-width: 100% !important;
    overflow: hidden !important;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }

  .footer {
    overflow: hidden !important;
  }

  /* Prevent long CMS text/URLs from breaking the page */
  p, h1, h2, h3, h4, h5, h6, a, span, li, td, th, label {
    overflow-wrap: anywhere;
  }

  /* Lightbox / modal fits inside the phone */
  .modal-box,
  .lightbox-content {
    width: calc(100% - 24px) !important;
    max-width: calc(100% - 24px) !important;
    max-height: calc(100svh - 24px) !important;
    overflow-y: auto !important;
  }

  .lightbox-media {
    max-width: 100% !important;
    max-height: 70svh !important;
  }
}

@media (max-width: 480px) {
  .hero-content,
  .about-hero .hero-content,
  .team-hero .hero-content,
  .sponsor-hero .hero-content,
  .achievements-hero .hero-content,
  .contact-hero .hero-content,
  .gallery-hero .hero-content {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  .container,
  .section-inner,
  .navbar .container {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  .hero h1 {
    font-size: clamp(1.9rem, 10.5vw, 2.8rem) !important;
  }

  .hero-stats {
    grid-template-columns: 1fr 1fr !important;
  }

  .stage-stats {
    grid-template-columns: 1fr 1fr !important;
  }

  .stage-panel {
    padding-top: 92px !important;
  }

  .canvas-side {
    height: 36svh !important;
    min-height: 210px !important;
  }

  .car-scroll-track {
    min-height: 1000px !important;
  }

  .spec-row {
    flex-direction: column !important;
    gap: 4px !important;
  }

  .spec-row .spec-value {
    text-align: left !important;
  }

  .section-title {
    font-size: clamp(1.55rem, 8vw, 2.15rem) !important;
  }
}


/* ============================================================
   MOBILE V2 — FINAL PHONE COMPOSITION
   Keeps desktop/laptop styling untouched.
   Frontend-only; backend/CMS/auth files are not modified.
   ============================================================ */

@media (max-width: 768px) {
  :root {
    --mobile-gutter: 16px;
  }

  html {
    width: 100%;
    max-width: 100%;
    overflow-x: clip !important;
    scroll-behavior: smooth;
  }

  body {
    width: 100%;
    max-width: 100%;
    overflow-x: clip !important;
    font-size: 15px !important;
    line-height: 1.6 !important;
  }

  *, *::before, *::after {
    box-sizing: border-box !important;
    min-width: 0;
  }

  img, video, canvas, svg, iframe {
    max-width: 100%;
  }

  p, li, a, span, label, td, th {
    overflow-wrap: break-word !important;
    word-break: normal !important;
  }

  h1, h2, h3, h4, h5, h6 {
    max-width: 100% !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
  }

  .container,
  .section-inner {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: var(--mobile-gutter) !important;
    padding-right: var(--mobile-gutter) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  section,
  .section-padding {
    width: 100% !important;
    max-width: 100% !important;
    padding-top: 52px !important;
    padding-bottom: 52px !important;
  }

  .section-header {
    margin-bottom: 28px !important;
  }

  .section-header-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }

  .section-title {
    font-size: clamp(1.65rem, 7.5vw, 2.35rem) !important;
    line-height: 1.08 !important;
    letter-spacing: -0.035em !important;
    margin-bottom: 10px !important;
  }

  .section-subtitle {
    max-width: 100% !important;
    font-size: .92rem !important;
    line-height: 1.6 !important;
  }

  .btn {
    min-height: 46px !important;
    max-width: 100% !important;
    padding: 12px 18px !important;
    font-size: .72rem !important;
    line-height: 1.2 !important;
    white-space: normal !important;
    justify-content: center !important;
  }

  /* ---------- NAVBAR ---------- */
  .navbar {
    height: 68px !important;
    min-height: 68px !important;
    padding: 8px 0 !important;
    background: rgba(0,0,0,.72) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    border-bottom: 1px solid rgba(255,255,255,.10) !important;
  }

  .navbar.scrolled {
    height: 62px !important;
    min-height: 62px !important;
    padding: 6px 0 !important;
    background: rgba(0,0,0,.94) !important;
  }

  .navbar .container {
    height: 100% !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
    gap: 10px !important;
  }

  .nav-logo {
    min-width: 0 !important;
    max-width: calc(100% - 54px) !important;
    gap: 8px !important;
    font-size: .98rem !important;
    line-height: 1.05 !important;
    letter-spacing: .01em !important;
  }

  .logo-mark {
    width: auto !important;
    height: 34px !important;
    max-width: 40px !important;
    flex: 0 0 auto !important;
  }

  .nav-logo-wrapper {
    min-width: 0 !important;
    overflow: hidden !important;
  }

  .nav-logo > .nav-logo-wrapper > span:first-child {
    display: block !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .nav-subtitle {
    display: none !important;
  }

  .nav-links {
    display: none !important;
  }

  .mobile-nav-toggle,
  .mobile-toggle.mobile-nav-toggle {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    flex: 0 0 42px !important;
    margin-left: auto !important;
    border: 1px solid rgba(255,255,255,.16) !important;
    border-radius: 8px !important;
    background: rgba(255,255,255,.05) !important;
    color: #fff !important;
    font-size: 1.05rem !important;
  }

  .mobile-nav-drawer {
    width: min(88vw, 360px) !important;
    padding: 18px 14px !important;
  }

  .mobile-nav-link {
    min-height: 50px !important;
    padding: 12px 14px !important;
    font-size: .98rem !important;
  }

  /* ---------- HOME HERO ---------- */
  .hero {
    width: 100% !important;
    min-height: 100svh !important;
    height: 100svh !important;
    max-height: none !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    isolation: isolate;
  }

  .hero-video {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 100% !important;
    min-height: 100% !important;
    max-width: none !important;
    object-fit: cover !important;
    object-position: center center !important;
    opacity: .55 !important;
  }

  .hero-video-overlay {
    position: absolute !important;
    inset: 0 !important;
    background:
      linear-gradient(180deg, rgba(0,0,0,.62) 0%, rgba(0,0,0,.30) 42%, rgba(0,0,0,.82) 100%) !important;
    z-index: 1 !important;
  }

  .hero-content {
    position: relative !important;
    z-index: 5 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 94px 14px 48px !important;
  }

  .hero-badge {
    max-width: 100% !important;
    margin-bottom: 20px !important;
    padding: 6px 10px 6px 7px !important;
    font-size: .58rem !important;
    letter-spacing: .06em !important;
    white-space: normal !important;
  }

  .hero h1 {
    max-width: 100% !important;
    font-size: clamp(2.2rem, 13vw, 3.5rem) !important;
    line-height: .94 !important;
    letter-spacing: -.055em !important;
    margin-bottom: 0 !important;
  }

  .hero h1 .line {
    display: block !important;
    overflow: visible !important;
  }

  .hero h1 .word {
    display: inline-block !important;
  }

  .hero h2.tagline {
    max-width: 100% !important;
    font-size: clamp(.9rem, 4vw, 1.15rem) !important;
    line-height: 1.4 !important;
    margin: 16px 0 22px !important;
    letter-spacing: .015em !important;
  }

  .hero h2.tagline span {
    display: block !important;
  }

  .hero-actions {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 9px !important;
    margin-bottom: 30px !important;
  }

  .hero-actions .btn {
    width: 100% !important;
  }

  .hero-stats {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px 12px !important;
    padding-top: 18px !important;
  }

  .hero-stats .stat-item {
    min-width: 0 !important;
    padding: 0 !important;
  }

  .hero-stats .stat-item::after {
    display: none !important;
  }

  .hero-stats .stat-number {
    font-size: clamp(1.15rem, 5.5vw, 1.6rem) !important;
  }

  .hero-stats .stat-label {
    font-size: .56rem !important;
    line-height: 1.35 !important;
  }

  .scroll-indicator {
    display: none !important;
  }

  /* ---------- HOME: GARAGE TO GRID / PURPOSE-BUILT STORY ---------- */
  /* The original experience is 550vh. The old mobile override shortened it
     to 220vh, which can leave the sticky scene blank after the JS timeline
     still expects the full scroll range. Keep enough scroll space on phones. */
  .g2g-outer,
  #buildTimelineSection {
    height: 520vh !important;
    min-height: 520vh !important;
    overflow: visible !important;
    background: #f0f0f0 !important;
  }

  .g2g-scene {
    position: sticky !important;
    top: 0 !important;
    width: 100% !important;
    height: 100svh !important;
    min-height: 620px !important;
    max-height: none !important;
    overflow: hidden !important;
  }

  .g2g-section-label {
    top: 18px !important;
    left: 14px !important;
    right: 70px !important;
    font-size: .52rem !important;
    letter-spacing: .10em !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .g2g-dots {
    display: none !important;
  }

  .g2g-car-wrap {
    inset: 0 !important;
    align-items: center !important;
    justify-content: center !important;
    transform: none !important;
  }

  .g2g-car-img {
    width: min(92vw, 390px) !important;
    max-width: 92vw !important;
    height: auto !important;
    object-fit: contain !important;
  }

  .g2g-stage {
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
  }

  .g2g-card {
    width: calc(100% - 28px) !important;
    max-width: 390px !important;
    left: 14px !important;
    right: 14px !important;
    top: auto !important;
    bottom: 78px !important;
    margin: 0 auto !important;
    padding: 18px 17px 16px !important;
    border-radius: 12px !important;
    max-height: min(48svh, 390px) !important;
    overflow: auto !important;
  }

  .g2g-card-title {
    font-size: clamp(1.25rem, 6.5vw, 1.75rem) !important;
    line-height: 1.08 !important;
    margin-bottom: 8px !important;
  }

  .g2g-card-desc {
    font-size: .78rem !important;
    line-height: 1.5 !important;
    margin-bottom: 13px !important;
  }

  .g2g-card-eyebrow {
    font-size: .54rem !important;
    margin-bottom: 8px !important;
  }

  .g2g-card-stats {
    gap: 8px !important;
    padding-top: 10px !important;
  }

  .g2g-card-stat {
    min-width: 0 !important;
    padding-right: 8px !important;
  }

  .g2g-card-stat:not(:last-child) {
    margin-right: 8px !important;
  }

  .g2g-card-stat-val {
    font-size: .95rem !important;
  }

  .g2g-card-stat-lbl {
    font-size: .48rem !important;
  }

  .g2g-card-cta {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .g2g-card-cta .btn {
    width: 100% !important;
  }

  .g2g-counter {
    bottom: 22px !important;
    gap: 9px !important;
  }

  .g2g-counter-bar {
    width: 80px !important;
  }

  .g2g-scroll-hint {
    display: none !important;
  }

  /* ---------- COMMON PAGE HEROES ---------- */
  .about-hero,
  .team-hero,
  .sponsor-hero,
  .achievements-hero,
  .contact-hero,
  .gallery-hero,
  .car-hero {
    width: 100% !important;
    min-height: 56svh !important;
    height: auto !important;
    max-height: none !important;
  }

  .about-hero .hero-content,
  .team-hero .hero-content,
  .sponsor-hero .hero-content,
  .achievements-hero .hero-content,
  .contact-hero .hero-content,
  .gallery-hero .hero-content {
    padding: 96px 14px 44px !important;
  }

  /* ---------- GRIDS / CARDS ---------- */
  .value-grid,
  .value-grid-6,
  .dept-grid,
  .dept-grid-detailed,
  .team-grid,
  .achievement-grid,
  .gallery-grid,
  .contact-grid,
  .tiers-grid,
  .workshop-grid,
  .broadcast-grid,
  .vm-new,
  .chip-grid {
    width: 100% !important;
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .team-card,
  .achievement-card,
  .tier-card,
  .gallery-item,
  .dept-card,
  .value-card,
  .workshop-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .team-card .card-body,
  .achievement-card .card-body {
    padding: 16px !important;
  }

  .team-card .card-image img,
  .achievement-card .card-media img {
    width: 100% !important;
    height: auto !important;
    max-height: 360px !important;
    aspect-ratio: 4 / 3 !important;
    object-fit: cover !important;
  }

  /* ---------- TWO-COLUMN CONTENT ---------- */
  .split-block,
  .car-showcase,
  .form-grid-2,
  .car-actions,
  .stage-btn-row,
  .contact-grid {
    grid-template-columns: 1fr !important;
    flex-direction: column !important;
  }

  .split-image,
  .split-copy,
  .form-panel,
  .form-info,
  .console,
  .pitlane-wrap,
  .pitlane-map,
  .pitlane-data {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  /* ---------- CAR PAGE ---------- */
  .car-scroll-track {
    height: 360vh !important;
    min-height: 2400px !important;
  }

  .car-sticky-viewport {
    height: 100svh !important;
    min-height: 620px !important;
    max-height: none !important;
  }

  .stage-panel {
    width: 100% !important;
    max-width: 100% !important;
    padding: 92px 14px 18px !important;
  }

  .stage-title {
    font-size: clamp(1.65rem, 8vw, 2.6rem) !important;
    line-height: 1.02 !important;
  }

  .stage-desc {
    max-width: 100% !important;
    font-size: .86rem !important;
    line-height: 1.55 !important;
  }

  .stage-stats {
    grid-template-columns: repeat(2, minmax(0,1fr)) !important;
    gap: 9px !important;
  }

  .canvas-side {
    width: 100% !important;
    height: 38svh !important;
    min-height: 220px !important;
    max-height: 360px !important;
    overflow: hidden !important;
  }

  .canvas-side canvas,
  .studio-grid canvas {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
  }

  .timeline-bottom,
  .build-timeline,
  .sys-tabs,
  .filter-bar,
  .sponsor-track {
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
  }

  .timeline-bottom::-webkit-scrollbar,
  .build-timeline::-webkit-scrollbar,
  .sys-tabs::-webkit-scrollbar,
  .filter-bar::-webkit-scrollbar,
  .sponsor-track::-webkit-scrollbar {
    display: none !important;
  }

  .sys-tabs,
  .filter-bar {
    display: flex !important;
    flex-wrap: nowrap !important;
  }

  .sys-tab,
  .filter-btn {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
  }

  .spec-list,
  .spec-row {
    width: 100% !important;
    min-width: 0 !important;
  }

  .spec-row {
    gap: 10px !important;
  }

  .spec-row .spec-label,
  .spec-row .spec-value {
    overflow-wrap: break-word !important;
  }

  .gallery-masonry {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .g-item {
    width: 100% !important;
    min-height: 200px !important;
  }

  /* ---------- SPONSORS / FORMS ---------- */
  .sponsor-scroll-section,
  .sponsor-scroll-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .tier-card {
    padding: 18px !important;
  }

  .form-shell {
    width: 100% !important;
    max-width: 100% !important;
    grid-template-columns: 1fr !important;
  }

  input, select, textarea {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    font-size: 16px !important;
  }

  /* ---------- GALLERY / MEDIA ---------- */
  .gallery-grid {
    gap: 12px !important;
  }

  .gallery-item img,
  .gallery-item video {
    width: 100% !important;
    height: auto !important;
    max-height: 72svh !important;
    object-fit: cover !important;
  }

  .hero-bg-video,
  .hero-bg-video video {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover !important;
    object-position: center center !important;
  }

  .lightbox-content,
  .modal-box {
    width: calc(100% - 20px) !important;
    max-width: calc(100% - 20px) !important;
    max-height: calc(100svh - 20px) !important;
    overflow-y: auto !important;
  }

  .lightbox-media {
    max-width: 100% !important;
    max-height: 72svh !important;
  }

  /* ---------- FOOTER / MISC ---------- */
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 26px !important;
  }

  .footer-bottom {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    text-align: center !important;
  }

  .org-chart {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .toolbar-row {
    width: 100% !important;
    align-items: stretch !important;
  }
}

@media (max-width: 480px) {
  :root {
    --mobile-gutter: 14px;
  }

  body {
    font-size: 14.5px !important;
  }

  section,
  .section-padding {
    padding-top: 44px !important;
    padding-bottom: 44px !important;
  }

  .hero {
    min-height: 100svh !important;
    height: 100svh !important;
  }

  .hero-content {
    padding-top: 88px !important;
    padding-bottom: 36px !important;
  }

  .hero h1 {
    font-size: clamp(2rem, 14vw, 3rem) !important;
  }

  .hero-stats {
    gap: 12px 8px !important;
  }

  .g2g-outer,
  #buildTimelineSection {
    height: 520vh !important;
    min-height: 520vh !important;
  }

  .g2g-scene {
    min-height: 580px !important;
  }

  .g2g-car-img {
    width: 88vw !important;
    max-width: 360px !important;
  }

  .g2g-card {
    bottom: 68px !important;
    width: calc(100% - 20px) !important;
    left: 10px !important;
    right: 10px !important;
    padding: 15px 14px !important;
    max-height: 44svh !important;
  }

  .g2g-card-title {
    font-size: clamp(1.15rem, 6.8vw, 1.55rem) !important;
  }

  .g2g-card-desc {
    font-size: .74rem !important;
  }

  .g2g-counter {
    bottom: 16px !important;
  }

  .g2g-counter-bar {
    width: 64px !important;
  }

  .mobile-nav-drawer {
    width: 90vw !important;
  }

  .mobile-nav-brand {
    font-size: .88rem !important;
  }

}

/* ============================================================
   AUTHORITATIVE NAVBAR LOADING SKELETON
   Prevents content flash / layout shifts before CMS hydration
   ============================================================ */
.nav-links[data-cms-nav="pending"] {
  display: flex !important;
  align-items: center;
  gap: 18px;
}
.nav-skeleton-item {
  display: flex;
  align-items: center;
  list-style: none;
}
.nav-skeleton-pill {
  display: inline-block;
  height: 16px;
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.10) 50%, rgba(255, 255, 255, 0.04) 75%);
  background-size: 200% 100%;
  animation: navShimmer 1.4s infinite;
}
.nav-skeleton-pill.nav-skeleton-cta {
  height: 32px;
  border-radius: 100px;
  background: rgba(242, 89, 18, 0.12);
}
@keyframes navShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@media (max-width: 900px) {
  .nav-links[data-cms-nav="pending"] {
    display: none !important;
  }
}

/* ============================================================
   UNIVERSAL CMS CONTENT SKELETON & ZERO-FLASH LOADING SYSTEM
   Ensures single-source-of-truth loading without stale flash
   ============================================================ */
.cms-skeleton-line {
  display: inline-block;
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.10) 50%, rgba(255, 255, 255, 0.04) 75%);
  background-size: 200% 100%;
  animation: navShimmer 1.4s infinite;
  max-width: 100%;
}
.cms-skeleton-title {
  display: block;
  height: 38px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 25%, rgba(255, 255, 255, 0.12) 50%, rgba(255, 255, 255, 0.05) 75%);
  background-size: 200% 100%;
  animation: navShimmer 1.4s infinite;
  margin-bottom: 12px;
}
.cms-skeleton-badge {
  display: inline-block;
  height: 22px;
  width: 120px;
  border-radius: 20px;
  background: rgba(242, 89, 18, 0.12);
  margin-bottom: 12px;
}
.cms-skeleton-card {
  min-height: 220px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  position: relative;
  overflow: hidden;
}
.cms-skeleton-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 25%, rgba(255, 255, 255, 0.04) 50%, transparent 75%);
  background-size: 200% 100%;
  animation: navShimmer 1.6s infinite;
}
[data-cms-pending="true"] {
  opacity: 0.94;
  transition: opacity 0.25s ease;
}
[data-cms-pending="false"] {
  opacity: 1;
}

