/* =========================================
   Fern Street Dental — Stylesheet
   Palette: deep forest green, soft sage, warm white, clean slate
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600&family=Inter:wght@300;400;500;600&display=swap');

/* --- Reset & Custom Properties --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green-deep:   #1E3A2F;
  --green-mid:    #2D5A43;
  --green-soft:   #4A7C65;
  --sage:         #A8C5B0;
  --sage-light:   #D6EADd;
  --cream:        #F7F5F0;
  --warm-white:   #FDFCF9;
  --slate:        #3A3A3A;
  --slate-light:  #6B7280;
  --red-urgent:   #C0392B;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;

  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  1.75rem;
  --space-lg:  3rem;
  --space-xl:  5rem;

  --radius-sm: 4px;
  --radius-md: 10px;
  --radius-lg: 20px;

  --max-width: 1140px;
  --transition: 200ms ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--slate);
  background: var(--warm-white);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a  { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  color: var(--green-deep);
}

/* --- Utilities --- */
.container {
  width: min(var(--max-width), 100% - 2.5rem);
  margin-inline: auto;
}

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), transform var(--transition);
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--green-mid);
  color: #fff;
  border-color: var(--green-mid);
}
.btn-primary:hover { background: var(--green-deep); border-color: var(--green-deep); transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: var(--green-mid);
  border-color: var(--green-mid);
}
.btn-outline:hover { background: var(--green-mid); color: #fff; transform: translateY(-1px); }

.btn-white {
  background: #fff;
  color: var(--green-deep);
  border-color: #fff;
}
.btn-white:hover { background: var(--sage-light); border-color: var(--sage-light); }

.btn-urgent {
  background: var(--red-urgent);
  color: #fff;
  border-color: var(--red-urgent);
}
.btn-urgent:hover { background: #a93226; border-color: #a93226; transform: translateY(-1px); }

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-soft);
  margin-bottom: var(--space-sm);
}

.section-heading {
  font-size: clamp(1.75rem, 4vw, 2.6rem);
  margin-bottom: var(--space-sm);
}

.section-sub {
  font-size: 1.05rem;
  color: var(--slate-light);
  max-width: 56ch;
}

/* ==========================================
   NAVIGATION
   ========================================== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--warm-white);
  border-bottom: 1px solid var(--sage-light);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: var(--space-sm);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.nav-logo-mark {
  width: 36px;
  height: 36px;
  background: var(--green-deep);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-logo-mark svg { width: 20px; height: 20px; fill: var(--sage-light); }

.nav-logo-text {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--green-deep);
  line-height: 1.1;
}

.nav-logo-text span {
  display: block;
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-soft);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--slate);
  transition: color var(--transition);
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--green-mid); }

.nav-cta { margin-left: var(--space-sm); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--green-deep);
}

/* ==========================================
   HERO
   ========================================== */
.hero {
  background: var(--green-deep);
  color: #fff;
  padding: var(--space-xl) 0;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23A8C5B0' fill-opacity='0.06'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(168, 197, 176, 0.15);
  border: 1px solid rgba(168, 197, 176, 0.3);
  border-radius: 100px;
  padding: 0.35rem 1rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--sage);
  letter-spacing: 0.04em;
  margin-bottom: var(--space-md);
}

.hero-eyebrow::before {
  content: '';
  width: 8px; height: 8px;
  background: #4CAF50;
  border-radius: 50%;
  flex-shrink: 0;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  color: #fff;
  margin-bottom: var(--space-md);
  line-height: 1.15;
}

.hero-title em {
  font-style: normal;
  color: var(--sage);
}

.hero-body {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.75);
  max-width: 46ch;
  margin-bottom: var(--space-md);
}

.hero-actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-bottom: var(--space-lg);
}

.hero-trust {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: rgba(255,255,255,0.55);
  font-size: 0.82rem;
}

.hero-trust-divider { color: rgba(255,255,255,0.2); }

.hero-image-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  position: relative;
}

.hero-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==========================================
   EMERGENCY BANNER
   ========================================== */
.emergency-bar {
  background: #fef2f2;
  border-top: 3px solid var(--red-urgent);
  padding: 0.85rem 0;
}

.emergency-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.emergency-text {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--red-urgent);
}

.emergency-text svg { flex-shrink: 0; }

/* ==========================================
   SERVICES SECTION
   ========================================== */
.services {
  padding: var(--space-xl) 0;
  background: var(--cream);
}

.services-header {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.services-header .section-sub { margin-inline: auto; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background: var(--warm-white);
  border-radius: var(--radius-md);
  padding: 2rem;
  border: 1px solid var(--sage-light);
  transition: box-shadow var(--transition), transform var(--transition);
}

.service-card:hover {
  box-shadow: 0 8px 32px rgba(30, 58, 47, 0.1);
  transform: translateY(-3px);
}

.service-icon {
  width: 52px;
  height: 52px;
  background: var(--sage-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
}

.service-icon svg { width: 26px; height: 26px; stroke: var(--green-deep); fill: none; stroke-width: 1.8; }

.service-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.service-card p {
  font-size: 0.95rem;
  color: var(--slate-light);
  margin-bottom: var(--space-md);
}

.service-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--green-mid);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: gap var(--transition), color var(--transition);
}
.service-link:hover { gap: 0.6rem; color: var(--green-deep); }

/* ==========================================
   WHY US / FEATURES
   ========================================== */
.why-us {
  padding: var(--space-xl) 0;
}

.why-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
}

.why-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 3/4;
}

.why-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.why-content .section-sub { margin-bottom: var(--space-lg); }

.feature-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.feature-item {
  display: flex;
  gap: var(--space-sm);
  align-items: flex-start;
}

.feature-tick {
  width: 28px;
  height: 28px;
  background: var(--sage-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.feature-tick svg { width: 14px; height: 14px; stroke: var(--green-deep); fill: none; stroke-width: 2.5; }

.feature-item h4 {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--green-deep);
  margin-bottom: 0.15rem;
}

.feature-item p {
  font-size: 0.88rem;
  color: var(--slate-light);
}

/* ==========================================
   BOOKING SECTION
   ========================================== */
.booking-section {
  background: var(--green-deep);
  padding: var(--space-xl) 0;
  color: #fff;
}

.booking-section .section-label { color: var(--sage); }
.booking-section .section-heading { color: #fff; }
.booking-section .section-sub { color: rgba(255,255,255,0.7); }

.booking-inner {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: var(--space-lg);
  align-items: start;
}

.booking-info { padding-top: var(--space-sm); }
.booking-info .section-sub { margin-bottom: var(--space-md); }

.booking-contact-items {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.booking-contact-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.75);
}

.booking-contact-item svg { width: 18px; height: 18px; stroke: var(--sage); fill: none; stroke-width: 2; flex-shrink: 0; }
.booking-contact-item a { color: rgba(255,255,255,0.85); }
.booking-contact-item a:hover { color: #fff; }

/* Booking Form */
.booking-form-card {
  background: var(--warm-white);
  border-radius: var(--radius-md);
  padding: 2rem;
}

.booking-form-card h3 {
  font-size: 1.2rem;
  margin-bottom: var(--space-md);
  color: var(--green-deep);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--green-deep);
  letter-spacing: 0.03em;
}

.form-group input,
.form-group select,
.form-group textarea {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.65rem 0.85rem;
  border: 1.5px solid var(--sage-light);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--slate);
  transition: border-color var(--transition);
  width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--green-mid);
}

.form-group textarea { resize: vertical; min-height: 80px; }

.form-submit { width: 100%; margin-top: 0.5rem; }

.booking-msg {
  display: none;
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
}

.booking-msg.success {
  background: var(--sage-light);
  color: var(--green-deep);
}

.booking-msg.error {
  background: #fef2f2;
  color: var(--red-urgent);
}

/* ==========================================
   CONTACT SECTION
   ========================================== */
.contact-section {
  padding: var(--space-xl) 0;
  background: var(--cream);
}

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

.contact-details h2 { margin-bottom: var(--space-sm); }
.contact-details p { color: var(--slate-light); margin-bottom: var(--space-md); }

.info-block {
  margin-bottom: var(--space-md);
}

.info-block h4 {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green-soft);
  margin-bottom: 0.35rem;
}

.info-block p, .info-block address {
  font-style: normal;
  font-size: 0.95rem;
  color: var(--slate);
  line-height: 1.6;
}

.hours-table {
  width: 100%;
  font-size: 0.88rem;
  border-collapse: collapse;
  margin-top: 0.25rem;
}

.hours-table tr { border-bottom: 1px solid var(--sage-light); }
.hours-table tr:last-child { border-bottom: none; }
.hours-table td { padding: 0.35rem 0; }
.hours-table td:last-child { text-align: right; color: var(--slate-light); }

/* Contact form */
.contact-form-card {
  background: var(--warm-white);
  border-radius: var(--radius-md);
  padding: 2rem;
  border: 1px solid var(--sage-light);
}

.contact-form-card h3 {
  font-size: 1.2rem;
  margin-bottom: var(--space-md);
  color: var(--green-deep);
}

.contact-msg {
  display: none;
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
}

.contact-msg.success { background: var(--sage-light); color: var(--green-deep); }
.contact-msg.error   { background: #fef2f2; color: var(--red-urgent); }

/* ==========================================
   FOOTER
   ========================================== */
.site-footer {
  background: var(--green-deep);
  color: rgba(255,255,255,0.65);
  padding: var(--space-lg) 0 var(--space-md);
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.footer-brand .nav-logo-text {
  color: #fff;
  margin-bottom: var(--space-sm);
}

.footer-brand p {
  font-size: 0.88rem;
  line-height: 1.7;
  max-width: 34ch;
  margin-bottom: var(--space-md);
}

.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: var(--space-sm);
}

.footer-col ul { list-style: none; }

.footer-col ul li {
  margin-bottom: 0.4rem;
}

.footer-col ul li a {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.65);
  transition: color var(--transition);
}

.footer-col ul li a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  font-size: 0.8rem;
  flex-wrap: wrap;
}

.footer-bottom a {
  color: rgba(255,255,255,0.55);
  transition: color var(--transition);
}
.footer-bottom a:hover { color: #fff; }

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 900px) {
  .hero-inner,
  .why-inner,
  .booking-inner,
  .contact-inner,
  .footer-inner { grid-template-columns: 1fr; }

  .hero-image-wrap { aspect-ratio: 16/9; max-height: 340px; }
  .why-image { aspect-ratio: 16/9; max-height: 340px; }

  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: block; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 68px;
    left: 0; right: 0;
    background: var(--warm-white);
    padding: var(--space-sm) var(--space-md) var(--space-md);
    border-bottom: 1px solid var(--sage-light);
    gap: var(--space-sm);
    align-items: flex-start;
    z-index: 99;
  }

  .nav-cta.open { display: block; }

  .booking-inner { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 580px) {
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { text-align: center; }
  .emergency-inner { flex-direction: column; align-items: flex-start; }
}

/* ==========================================
   ACCESSIBILITY & MOTION
   ========================================== */
:focus-visible {
  outline: 3px solid var(--green-soft);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; animation-duration: 0ms !important; }
}
