/* =============================================
   DUBLIN ORTHODONTICS — Custom Styles
   ============================================= */

/* Base & Reset */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: #1a1410;
  color: #f5efe6;
  font-family: 'Inter', system-ui, sans-serif;
  overflow-x: hidden;
}

/* Selection */
::selection {
  background: #c4724e;
  color: #1a1410;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #1a1410;
}
::-webkit-scrollbar-thumb {
  background: #241e18;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #c4724e;
}

/* Section Label */
.section-label {
  position: relative;
  display: inline-block;
}
.section-label::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  background: #c4724e;
  vertical-align: middle;
  margin-right: 12px;
}

/* Hero Animations */
.hero-tagline {
  animation: heroFadeUp 0.8s ease forwards 0.2s;
}

.hero-word {
  animation: heroWordIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hero-word:nth-child(1) { animation-delay: 0.3s; }
.hero-word:nth-child(2) { animation-delay: 0.45s; }
.hero-word:nth-child(3) { animation-delay: 0.6s; }
.hero-word:nth-child(4) { animation-delay: 0.75s; }
.hero-word:nth-child(5) { animation-delay: 0.9s; }

.hero-subtitle {
  animation: heroFadeUp 0.8s ease forwards 1.05s;
}

.hero-cta {
  animation: heroFadeUp 0.8s ease forwards 1.2s;
}

.hero-stats {
  animation: heroFadeUp 0.8s ease forwards 1.4s;
}

.hero-image-wrapper {
  animation: heroImageIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.4s;
  opacity: 0;
  transform: translateY(30px);
}

.hero-float {
  animation: heroFloatIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards 1.2s;
  opacity: 0;
}

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

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

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

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

/* Service Cards */
.service-card {
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #c4724e, transparent);
  opacity: 0;
  transition: opacity 0.5s ease;
}
.service-card:hover::before {
  opacity: 1;
}

/* Process Steps */
.process-step {
  position: relative;
}
.process-step::after {
  content: '';
  position: absolute;
  top: 32px;
  right: -2rem;
  width: 1.5rem;
  height: 1px;
  background: linear-gradient(90deg, #c4724e, transparent);
  opacity: 0.3;
}
@media (min-width: 1024px) {
  .process-step:last-child::after {
    display: none;
  }
}

/* Navbar Scroll State */
#navbar.scrolled {
  background: rgba(26, 20, 16, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(212, 184, 150, 0.08);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Mobile Menu */
#mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

#mobile-menu.open .mobile-link {
  animation: mobileLinkIn 0.4s ease forwards;
}
#mobile-menu.open .mobile-link:nth-child(1) { animation-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(2) { animation-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(3) { animation-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(4) { animation-delay: 0.25s; }

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

/* Mobile Menu Button Active State */
#menu-btn.active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(2px, 2px);
}
#menu-btn.active .menu-line:nth-child(2) {
  opacity: 0;
}
#menu-btn.active .menu-line:nth-child(3) {
  transform: rotate(-45deg) translate(2px, -2px);
  width: 1.25rem;
}

/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Select styling */
select option {
  background: #241e18;
  color: #f5efe6;
}

/* Smooth focus visible */
:focus-visible {
  outline: 2px solid #c4724e;
  outline-offset: 2px;
}

/* Responsive adjustments */
@media (max-width: 767px) {
  .hero-stats {
    flex-direction: column;
    gap: 1rem;
  }

  .hero-float {
    position: relative;
    bottom: auto;
    left: auto;
    margin-top: 1rem;
  }

  .section-label::before {
    display: none;
  }
}

/* Print */
@media print {
  body {
    background: white;
    color: black;
  }
  nav, #contact-form, .hero-float {
    display: none;
  }
}
