/* ========================================
   Dr. Steven L. Brown DDS — Custom Styles
   Color Palette: Deep Navy (#0f1d3a) + Warm Gold (#d4a843)
   ======================================== */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   Geometric Background Shapes
   ======================================== */
.geo-circle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.geo-circle--1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(212, 168, 67, 0.12) 0%, transparent 70%);
  top: -100px;
  right: -150px;
  animation: float-slow 20s ease-in-out infinite;
}

.geo-circle--2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
  bottom: 10%;
  left: -100px;
  animation: float-slow 15s ease-in-out infinite reverse;
}

.geo-circle--3 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(15, 29, 58, 0.1) 0%, transparent 70%);
  top: -200px;
  left: -100px;
  animation: float-slow 18s ease-in-out infinite;
}

.geo-circle--4 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(15, 29, 58, 0.08) 0%, transparent 70%);
  bottom: -80px;
  right: -50px;
  animation: float-slow 12s ease-in-out infinite reverse;
}

.geo-circle--5 {
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(212, 168, 67, 0.06) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: float-slow 25s ease-in-out infinite;
}

.geo-triangle {
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
  opacity: 0.06;
}

.geo-triangle--1 {
  border-left: 80px solid transparent;
  border-right: 80px solid transparent;
  border-bottom: 140px solid #d4a843;
  top: 15%;
  right: 5%;
  transform: rotate(15deg);
  animation: spin-slow 30s linear infinite;
}

.geo-dots {
  position: absolute;
  pointer-events: none;
  opacity: 0.15;
}

.geo-dots--1 {
  top: 25%;
  left: 8%;
  background-image: radial-gradient(circle, #d4a843 1.5px, transparent 1.5px);
  background-size: 20px 20px;
  width: 80px;
  height: 80px;
  animation: float-slow 8s ease-in-out infinite;
}

.geo-line {
  position: absolute;
  pointer-events: none;
}

.geo-line--1 {
  bottom: 20%;
  right: 10%;
  width: 120px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(212, 168, 67, 0.4), transparent);
  transform: rotate(-30deg);
  animation: float-slow 10s ease-in-out infinite;
}

.geo-square {
  position: absolute;
  pointer-events: none;
  opacity: 0.05;
}

.geo-square--1 {
  width: 200px;
  height: 200px;
  border: 3px solid #d4a843;
  top: 10%;
  right: 5%;
  transform: rotate(45deg);
  animation: spin-slow 40s linear infinite;
}

@keyframes float-slow {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-30px) rotate(3deg); }
}

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ========================================
   Navbar
   ======================================== */
#navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

#navbar.scrolled {
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
}

/* ========================================
   Service Cards
   ======================================== */
.service-card {
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #0f1d3a, #d4a843);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover::before {
  transform: scaleX(1);
}

/* ========================================
   Scroll Reveal Animations
   Progressive enhancement: visible by default,
   animated only when JS runs and preference allows
   ======================================== */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }

  .reveal-delay-1 { transition-delay: 0.1s; }
  .reveal-delay-2 { transition-delay: 0.2s; }
  .reveal-delay-3 { transition-delay: 0.3s; }
  .reveal-delay-4 { transition-delay: 0.4s; }
  .reveal-delay-5 { transition-delay: 0.5s; }
  .reveal-delay-6 { transition-delay: 0.6s; }
}

/* Fallback for no-JS: ensure content is always visible */
@media not all and (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ========================================
   Mobile Menu
   ======================================== */
#mobile-menu {
  animation: slideDown 0.3s ease;
}

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

.mobile-link {
  display: block;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.mobile-link:last-child {
  border-bottom: none;
}

/* ========================================
   Form Styles
   ======================================== */
input:focus,
textarea:focus {
  outline: none;
}

/* ========================================
   Responsive Adjustments
   ======================================== */
@media (max-width: 640px) {
  .geo-circle--1 {
    width: 300px;
    height: 300px;
  }

  .geo-circle--2 {
    width: 200px;
    height: 200px;
  }

  .geo-triangle--1 {
    border-left: 40px solid transparent;
    border-right: 40px solid transparent;
    border-bottom: 70px solid #d4a843;
  }
}
