/* ============================================
   FAMILY DENTISTRY – Dr. Thomas Morton
   Custom Styles
   ============================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

img, svg {
  display: block;
  max-width: 100%;
}

/* --- Gold Accent (tooth icon) --- */
.gold-accent {
  color: #D4A84B;
  line-height: 0;
}

/* --- Navigation --- */
.site-header {
  background: transparent;
  transition: background-color 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

.site-header.scrolled {
  background: rgba(7, 15, 32, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(212, 168, 75, 0.1);
}

.nav-link {
  color: rgba(240, 243, 250, 0.8);
  position: relative;
  padding-bottom: 2px;
  transition: color 0.3s ease;
}

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

.nav-link:hover {
  color: #D4A84B;
}

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

/* --- CTA Buttons --- */
.cta-btn {
  background: linear-gradient(135deg, #D4A84B 0%, #B8862E 100%);
  color: #0C1C3F;
  border: none;
  padding: 0.875rem 2rem;
  border-radius: 0;
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  box-shadow: 0 4px 20px rgba(212, 168, 75, 0.25);
}

.cta-btn:hover {
  background: linear-gradient(135deg, #EFC64A 0%, #D4A84B 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(212, 168, 75, 0.35);
  color: #0C1C3F;
}

.cta-outline {
  background: transparent;
  color: #F0F3FA;
  border: 1px solid rgba(240, 243, 250, 0.4);
  padding: 0.875rem 2rem;
  border-radius: 0;
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.cta-outline:hover {
  background: rgba(240, 243, 250, 0.1);
  border-color: #F0F3FA;
  color: #F0F3FA;
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
}

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-img {
  will-change: transform;
  transition: transform 8s ease;
}

.hero-bg.loaded .hero-img {
  transform: scale(1.03);
}

.hero-overlay {
  background: linear-gradient(
    180deg,
    rgba(7, 15, 32, 0.70) 0%,
    rgba(12, 28, 63, 0.78) 40%,
    rgba(12, 28, 63, 0.85) 70%,
    rgba(7, 15, 32, 0.92) 100%
  );
}

.hero-content {
  padding-top: 5rem;
  padding-bottom: 4rem;
}

.hero-eyebrow {
  opacity: 0;
  animation: fadeDown 0.8s ease forwards 0.3s;
}

.hero-headline {
  opacity: 0;
  animation: fadeUp 1s ease forwards 0.5s;
}

.hero-subtitle {
  opacity: 0;
  animation: fadeUp 1s ease forwards 0.8s;
}

.hero-ctas {
  opacity: 0;
  animation: fadeUp 1s ease forwards 1.1s;
}

.hero-cta-arrow {
  transition: transform 0.3s ease;
}

.cta-btn:hover .hero-cta-arrow {
  transform: translateX(4px);
}

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

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

/* Scroll Indicator */
.scroll-indicator {
  opacity: 0;
  animation: fadeIn 1s ease forwards 1.8s;
}

.scroll-line {
  overflow: hidden;
}

.scroll-line-fill {
  animation: scrollDown 1.8s ease-in-out infinite;
}

@keyframes scrollDown {
  0%   { top: -50%; }
  100% { top: 150%; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* --- Sections --- */
.section {
  position: relative;
}

.section-eyebrow {
  font-family: 'Inter', system-ui, sans-serif;
}

.section-heading {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  color: #F0F3FA;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

/* --- About --- */
.about-image-wrapper {
  position: relative;
  overflow: hidden;
}

.about-img {
  transition: transform 0.6s ease;
}

.about-image-wrapper:hover .about-img {
  transform: scale(1.02);
}

/* --- Services --- */
.service-card {
  background: rgba(12, 28, 63, 0.5);
  border: 1px solid rgba(212, 168, 75, 0.12);
  padding: 2rem;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #D4A84B, transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.service-card:hover {
  border-color: rgba(212, 168, 75, 0.3);
  background: rgba(12, 28, 63, 0.7);
  transform: translateY(-4px);
}

.service-card:hover::before {
  opacity: 1;
}

.service-title {
  font-family: 'Playfair Display', Georgia, serif;
}

/* --- Patient Experience --- */
.experience-step {
  position: relative;
}

.experience-step::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 60%;
  background: linear-gradient(180deg, transparent, rgba(212, 168, 75, 0.2), transparent);
}

.experience-step:last-child::after {
  display: none;
}

/* --- Contact --- */
.contact-info-item {
  transition: transform 0.3s ease;
}

.contact-info-item:hover {
  transform: translateX(4px);
}

.form-label {
  font-family: 'Inter', system-ui, sans-serif;
}

.form-input {
  font-family: 'Inter', system-ui, sans-serif;
}

.form-input::placeholder {
  color: rgba(141, 155, 174, 0.6);
}

.form-input:focus {
  border-color: #D4A84B;
  box-shadow: 0 0 0 3px rgba(212, 168, 75, 0.1);
}

.form-success {
  animation: fadeIn 0.5s ease;
}

/* --- Location Strip --- */
.location-img {
  will-change: transform;
}

/* --- Footer --- */
.footer {
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #D4A84B, transparent);
}

.footer-brand-name {
  font-family: 'Playfair Display', Georgia, serif;
}

.footer-heading {
  font-family: 'Inter', system-ui, sans-serif;
}

.footer-link {
  text-decoration: none;
}

/* --- Back to Top --- */
.back-to-top {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:not(.visible) {
  transform: translateY(10px);
}

/* --- Mobile Menu --- */
.mobile-menu {
  transition: opacity 0.4s ease;
}

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

.mobile-menu-link {
  text-decoration: none;
}

.hamburger-line {
  transition: all 0.3s ease;
}

#mobile-menu-btn[aria-expanded="true"] .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

#mobile-menu-btn[aria-expanded="true"] .hamburger-line:nth-child(2) {
  opacity: 0;
}

#mobile-menu-btn[aria-expanded="true"] .hamburger-line:nth-child(3) {
  width: 24px;
  margin-left: 0;
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Scroll Reveal --- */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Reduced motion */
@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; }
  .reveal { opacity: 1; transform: none; }
  .reveal.revealed { opacity: 1; transform: none; }
}

/* --- Responsive --- */
@media (max-width: 639px) {
  .hero-content {
    padding-top: 4rem;
    padding-bottom: 3rem;
  }

  .experience-step::after {
    display: none;
  }
}

@media (min-width: 640px) and (max-width: 1023px) {
  .experience-step:nth-child(2)::after {
    display: none;
  }
}
