/* ============================================
   Dr. Tiffany Truong Koch — Medical Website
   Custom Styles & Animations
   ============================================ */

/* Base */
html {
  scroll-behavior: smooth;
}

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

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

.circle-1 {
  width: 400px;
  height: 400px;
  border: 2px solid rgba(16, 185, 129, 0.08);
  top: 20%;
  right: -100px;
  animation: float 20s ease-in-out infinite;
}

.circle-2 {
  width: 200px;
  height: 200px;
  background: rgba(16, 185, 129, 0.05);
  bottom: 15%;
  left: 5%;
  animation: float 15s ease-in-out infinite reverse;
}

.square-1 {
  position: absolute;
  width: 120px;
  height: 120px;
  background: rgba(251, 191, 36, 0.06);
  top: 60%;
  right: 10%;
  transform: rotate(45deg);
  pointer-events: none;
  animation: float 18s ease-in-out infinite;
}

.triangle-1 {
  position: absolute;
  width: 0;
  height: 0;
  border-left: 60px solid transparent;
  border-right: 60px solid transparent;
  border-bottom: 104px solid rgba(16, 185, 129, 0.04);
  top: 40%;
  left: 3%;
  pointer-events: none;
  animation: float 22s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  25% { transform: translateY(-20px) rotate(2deg); }
  50% { transform: translateY(-10px) rotate(-1deg); }
  75% { transform: translateY(-25px) rotate(1deg); }
}

/* ============================================
   Scroll Reveal Animations
   Progressive enhancement: content is visible
   by default, JS adds animation class.
   ============================================ */
.scroll-reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

@media (prefers-reduced-motion: no-preference) {
  .scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
  
  .scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
  }
}

/* ============================================
   Navigation
   ============================================ */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #059669;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* ============================================
   Mobile Menu
   ============================================ */
.mobile-link {
  position: relative;
}

#mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

#mobile-menu.closing {
  opacity: 0;
  pointer-events: none;
}

/* ============================================
   Hero Section
   ============================================ */
#hero {
  position: relative;
}

#hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to top, #fdfbf7, transparent);
  pointer-events: none;
}

/* ============================================
   Button Hover Effects
   ============================================ */
a, button {
  -webkit-tap-highlight-color: transparent;
}

/* ============================================
   Form Styles
   ============================================ */
input:focus,
select:focus,
textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23047857' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

/* ============================================
   Back to Top
   ============================================ */
#back-to-top.visible {
  opacity: 1;
  translate: 0;
  pointer-events: all;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
  .geo-circle,
  .square-1,
  .triangle-1 {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}
