/* ============================================================
   S TWO DRIVING SCHOOL — supporting styles
   Tailwind handles layout & spacing; this file holds the
   road-motif textures, glow effects and motion the brand needs.
   ============================================================ */

html { scroll-behavior: smooth; }

::selection { background: #E31B23; color: #fff; }

/* --- Lane-marking divider: the recurring road motif between sections --- */
.lane-divider {
  height: 3px;
  background: repeating-linear-gradient(
    90deg,
    #E31B23 0 28px,
    transparent 28px 52px
  );
  opacity: 0.9;
}

.lane-divider--light {
  background: repeating-linear-gradient(
    90deg,
    rgba(255,255,255,0.5) 0 22px,
    transparent 22px 42px
  );
}

/* --- Subtle asphalt texture used behind dark sections --- */
.asphalt {
  background-color: #0B0B0B;
  background-image:
    radial-gradient(circle at 15% 20%, rgba(227,27,35,0.10) 0%, transparent 45%),
    radial-gradient(circle at 85% 75%, rgba(227,27,35,0.08) 0%, transparent 45%),
    repeating-linear-gradient(115deg, rgba(255,255,255,0.02) 0 2px, transparent 2px 90px);
}

/* --- Diagonal road running through the hero --- */
.road-diagonal {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, transparent 55%, rgba(21,21,21,0.9) 56%, rgba(11,11,11,1) 100%);
  pointer-events: none;
}

.road-lane-strip {
  position: absolute;
  width: 200%;
  height: 10px;
  background: repeating-linear-gradient(90deg, #F5F5F5 0 44px, transparent 44px 88px);
  opacity: 0.16;
  transform: rotate(-6deg);
}

/* --- Red glow, used sparingly on primary CTAs & active nav state --- */
.glow-red {
  box-shadow: 0 0 0 rgba(227,27,35,0);
  transition: box-shadow .35s ease, transform .35s ease;
}
.glow-red:hover {
  box-shadow: 0 12px 30px -8px rgba(227,27,35,0.55);
  transform: translateY(-2px);
}

/* --- Floating UI cards in the hero --- */
@keyframes floatY {
  0%, 100% { transform: translateY(0px); }
  50%      { transform: translateY(-10px); }
}
.float-card { animation: floatY 5s ease-in-out infinite; }
.float-card--slow { animation-duration: 7s; }

/* --- Particle dots drifting in the hero --- */
@keyframes drift {
  0%   { transform: translate(0,0); opacity: .0; }
  10%  { opacity: .6; }
  90%  { opacity: .3; }
  100% { transform: translate(var(--dx,20px), -140px); opacity: 0; }
}
.particle {
  position: absolute;
  width: 4px; height: 4px;
  border-radius: 999px;
  background: #E31B23;
  animation: drift linear infinite;
}

/* --- One orchestrated hero entrance (not scattered per-section fades) --- */
@keyframes riseIn {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-rise { animation: riseIn .8s cubic-bezier(.2,.7,.2,1) both; }
.hero-rise-1 { animation-delay: .05s; }
.hero-rise-2 { animation-delay: .18s; }
.hero-rise-3 { animation-delay: .32s; }
.hero-rise-4 { animation-delay: .46s; }
.hero-rise-5 { animation-delay: .6s; }

@media (prefers-reduced-motion: reduce) {
  .float-card, .particle, .hero-rise { animation: none !important; }
  html { scroll-behavior: auto; }
}

/* --- Navbar blur-on-scroll state --- */
#navbar.is-scrolled {
  background-color: rgba(11,11,11,0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 6px 24px -12px rgba(0,0,0,0.6);
}

/* --- Service card corner cut, distinct from the rounded photo cards --- */
.corner-cut {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 22px), calc(100% - 22px) 100%, 0 100%);
}

/* --- Gallery lightbox --- */
#lightbox { transition: opacity .25s ease; }
#lightbox.hidden-lightbox { opacity: 0; pointer-events: none; }
#lightbox img { transition: transform .25s ease; }

/* --- Testimonial carousel track --- */
.testimonial-track {
  transition: transform .5s cubic-bezier(.4,0,.2,1);
}

/* --- Speedometer-style stat glyph --- */
.stat-tick {
  width: 6px; height: 6px; border-radius: 999px; background: #E31B23;
}

/* Mobile floating CTA safe-area */
.mobile-cta-bar {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
