/* Custom styles for Done Rite Auto Detailing */

/* Outfit and Archivo Black fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Archivo+Black&family=Inter:wght@400;500;600&display=swap');

:root {
  --color-brand-blue: #0f75bb;
  --color-brand-cyan: #00e5ff;
  --color-brand-dark: #0c0c0e;
  --color-brand-card: #141416;
  --color-brand-border: rgba(255, 255, 255, 0.08);
}

html {
  scroll-behavior: smooth;
  background-color: var(--color-brand-dark);
  color: #f7f7f7;
  font-family: 'Outfit', sans-serif;
  overflow-x: hidden;
}

/* Glassmorphism Card Layouts */
.glass-card {
  background: rgba(20, 20, 22, 0.65);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid var(--color-brand-border);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  border-color: rgba(15, 117, 187, 0.4);
  box-shadow: 0 12px 40px 0 rgba(15, 117, 187, 0.15);
  transform: translateY(-4px);
}

.glass-nav {
  background: rgba(12, 12, 14, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-brand-border);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-brand-dark);
}

::-webkit-scrollbar-thumb {
  background: #27272a;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-brand-blue);
}

/* Scroll-driven glow background circles */
.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}

/* Animations and Transitions for HTML dialog overlays */
dialog[open],
[popover]:popover-open {
  opacity: 1;
  transform: scale(1);

  @starting-style {
    opacity: 0;
    transform: scale(0.95);
  }
}

dialog,
[popover] {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.3s, transform 0.3s, display 0.3s allow-discrete, overlay 0.3s allow-discrete;
}

dialog::backdrop,
[popover]::backdrop {
  background-color: rgba(0, 0, 0, 0);
  transition: display 0.3s allow-discrete, overlay 0.3s allow-discrete, background-color 0.3s ease-out;
}

dialog[open]::backdrop,
[popover]:popover-open::backdrop {
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);

  @starting-style {
    background-color: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
  }
}

/* Intersection Observer Scroll-reveal styling */
.reveal-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-in.active {
  opacity: 1;
  transform: translateY(0);
}

.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }

/* Custom slider/carousel transitions */
.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.hero-slide.active {
  opacity: 1;
  z-index: 1;
}

/* Text linear gradient animations */
.text-gradient {
  background: linear-gradient(135deg, #ffffff 30%, var(--color-brand-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-cyan {
  background: linear-gradient(135deg, #00e5ff 0%, var(--color-brand-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Mobile Nav Drawer animation classes */
.drawer-transition {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Step tracker styling */
.step-indicator.active {
  background-color: var(--color-brand-blue);
  color: white;
  box-shadow: 0 0 12px var(--color-brand-blue);
}

.step-indicator.completed {
  background-color: #10b981;
  color: white;
}

/* Custom form validation alerts */
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--color-brand-blue) !important;
  box-shadow: 0 0 8px rgba(15, 117, 187, 0.3);
}

/* Review slide display and animation */
.review-slide {
  display: none;
  width: 100%;
}

.review-slide.active {
  display: flex;
  animation: reviewSlideIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes reviewSlideIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal-in {
    transform: none !important;
    transition-duration: 0.1s !important;
  }
  .hero-slide {
    transition: none !important;
  }
  dialog, [popover] {
    transform: none !important;
    transition-duration: 0.1s !important;
  }
}
