/* ============================================
   GRACIE DENTAL ASSOCIATES — STYLESHEET
   Palette: Terracotta + Sand | Editorial Serif
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  --color-terracotta-50:  #fef7f0;
  --color-terracotta-100: #fdedd8;
  --color-terracotta-200: #fad5b0;
  --color-terracotta-300: #f5b47e;
  --color-terracotta-400: #ee8a4a;
  --color-terracotta-500: #e06b2e;
  --color-terracotta-600: #c4511f;
  --color-terracotta-700: #92400e;
  --color-terracotta-800: #78350f;
  --color-terracotta-900: #451a03;

  --color-sand-50:  #fefce8;
  --color-sand-100: #fef9c3;
  --color-sand-200: #fef08a;
  --color-sand-300: #fde047;
  --color-sand-400: #facc15;
  --color-sand-500: #ca8a04;
  --color-sand-600: #a16207;
  --color-sand-700: #854d0e;
  --color-sand-800: #713f12;
  --color-sand-900: #422006;

  --color-stone-50:  #fafaf9;
  --color-stone-100: #f5f5f4;
  --color-stone-200: #e7e5e4;
  --color-stone-300: #d6d3d1;
  --color-stone-400: #a8a29e;
  --color-stone-500: #78716c;
  --color-stone-600: #57534e;
  --color-stone-700: #44403c;
  --color-stone-800: #292524;
  --color-stone-900: #1c1917;

  --color-white: #ffffff;
  --color-black: #0f0f0f;

  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --container-max: 1200px;
  --container-pad: clamp(1.25rem, 4vw, 3rem);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.10), 0 4px 12px rgba(0,0,0,0.06);
  --shadow-xl: 0 24px 60px rgba(0,0,0,0.12), 0 8px 20px rgba(0,0,0,0.08);
}

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

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

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-stone-800);
  background-color: var(--color-stone-50);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-stone-900);
  letter-spacing: -0.02em;
}

p { color: var(--color-stone-600); }

a { color: inherit; text-decoration: none; }

ul, ol { list-style: none; }

address { font-style: normal; }

.container {
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}

/* --- Eyebrow --- */
.section-eyebrow {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-terracotta-700);
  margin-bottom: 1rem;
}

/* --- Section Heading --- */
.section-heading {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  margin-bottom: 1.25rem;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
  padding: 0.8125rem 1.75rem;
  border-radius: var(--radius-xl);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.15s ease, box-shadow 0.25s ease;
  white-space: nowrap;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--color-terracotta-700);
  color: var(--color-white);
  border-color: var(--color-terracotta-700);
}
.btn-primary:hover {
  background: var(--color-terracotta-800);
  border-color: var(--color-terracotta-800);
  box-shadow: var(--shadow-md);
}

.btn-ghost {
  background: transparent;
  color: var(--color-stone-800);
  border-color: var(--color-stone-300);
}
.btn-ghost:hover {
  border-color: var(--color-terracotta-500);
  color: var(--color-terracotta-700);
}

.btn-light {
  background: var(--color-white);
  color: var(--color-terracotta-700);
  border-color: var(--color-white);
}
.btn-light:hover {
  background: var(--color-sand-50);
  box-shadow: var(--shadow-lg);
}

.btn-sm { padding: 0.5625rem 1.25rem; font-size: 0.8125rem; }
.btn-full { width: 100%; }

/* --- Header --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 250, 249, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-stone-200);
  transition: box-shadow 0.3s ease;
}

.site-header.scrolled { box-shadow: var(--shadow-sm); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--color-stone-900);
  letter-spacing: -0.01em;
}

.logo-icon { color: var(--color-terracotta-700); flex-shrink: 0; }

.logo-light { color: var(--color-white); }
.logo-light .logo-icon { color: var(--color-terracotta-300); }

/* --- Navigation --- */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-stone-700);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-list a {
  padding: 0.5rem 0.875rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-stone-600);
  border-radius: var(--radius-sm);
  transition: color 0.2s ease, background 0.2s ease;
}
.nav-list a:hover { color: var(--color-terracotta-700); background: var(--color-terracotta-50); }

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  background: var(--color-stone-900);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('https://images.pexels.com/photos/17515221/pexels-photo-17515221.jpeg?auto=compress&cs=tinysrgb&fit=crop&w=1920&h=1080');
  background-size: cover;
  background-position: center;
  opacity: 0.35;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(28, 25, 23, 0.92) 0%,
    rgba(69, 26, 3, 0.82) 50%,
    rgba(28, 25, 23, 0.88) 100%
  );
}

.hero-inner {
  position: relative;
  z-index: 2;
  padding-top: 72px;
  padding-bottom: 8rem;
  max-width: 720px;
}

.hero-eyebrow {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-terracotta-300);
  margin-bottom: 1.5rem;
}

.hero-headline {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  color: var(--color-white);
  line-height: 1.08;
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
}

.hero-headline em {
  font-style: italic;
  color: var(--color-terracotta-300);
}

.hero-sub {
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  line-height: 1.7;
  color: var(--color-stone-300);
  margin-bottom: 2.5rem;
  max-width: 560px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* --- Stat Cards --- */
.hero-stats {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-card {
  padding: 1.75rem 2rem;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.3s ease;
}
.stat-card:last-child { border-right: none; }
.stat-card:hover { background: rgba(255, 255, 255, 0.06); }

.stat-number {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 0.25rem;
  letter-spacing: -0.01em;
}

.stat-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-stone-400);
  letter-spacing: 0.02em;
}

/* --- Intro --- */
.intro {
  padding: clamp(5rem, 10vw, 8rem) 0;
  background: var(--color-stone-50);
}

.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.intro-eyebrow {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.intro-eyebrow .rule {
  flex: 0 0 48px;
  height: 2px;
  background: var(--color-terracotta-500);
  border-radius: 2px;
}

.intro-eyebrow span {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-terracotta-700);
}

.intro-body .section-heading { margin-bottom: 1.5rem; }

.intro-body p {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--color-stone-600);
  margin-bottom: 1.25rem;
}

/* --- Services --- */
.services {
  padding: clamp(5rem, 10vw, 8rem) 0;
  background: var(--color-white);
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto clamp(3rem, 6vw, 4.5rem);
}

.section-header .section-eyebrow { margin-bottom: 0.75rem; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.service-card {
  padding: 2.25rem;
  background: var(--color-stone-50);
  border: 1px solid var(--color-stone-200);
  border-radius: var(--radius-lg);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.service-card:hover {
  border-color: var(--color-terracotta-200);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.service-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-terracotta-100);
  border-radius: var(--radius-md);
  color: var(--color-terracotta-700);
  margin-bottom: 1.5rem;
  transition: background 0.3s ease;
}

.service-card:hover .service-icon { background: var(--color-terracotta-200); }

.service-title {
  font-size: 1.375rem;
  margin-bottom: 0.75rem;
  color: var(--color-stone-900);
}

.service-desc {
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--color-stone-500);
}

/* --- About --- */
.about {
  padding: clamp(5rem, 10vw, 8rem) 0;
  background: var(--color-stone-50);
  overflow: hidden;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.about-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.about-content .section-eyebrow { margin-bottom: 0.75rem; }
.about-content .section-heading { margin-bottom: 1.5rem; }

.about-content p {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--color-stone-600);
  margin-bottom: 1.25rem;
}

.about-content .btn { margin-top: 1rem; }

/* --- Patients --- */
.patients {
  padding: clamp(5rem, 10vw, 8rem) 0;
  background: var(--color-white);
}

.patients-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.patients-content .section-eyebrow { margin-bottom: 0.75rem; }
.patients-content .section-heading { margin-bottom: 1.25rem; }

.patients-content > p {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--color-stone-600);
  margin-bottom: 2rem;
}

.patients-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.patients-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  font-size: 1rem;
  color: var(--color-stone-700);
  line-height: 1.6;
}

.patients-list li svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--color-terracotta-600);
}

.patients-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.patients-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- CTA --- */
.cta {
  padding: clamp(5rem, 10vw, 8rem) 0;
  background: var(--color-terracotta-800);
  background-image: linear-gradient(
    135deg,
    var(--color-terracotta-900) 0%,
    var(--color-terracotta-700) 100%
  );
}

.cta-inner {
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}

.cta-eyebrow { color: var(--color-terracotta-300); }

.cta-heading {
  font-size: clamp(2rem, 4.5vw, 3rem);
  color: var(--color-white);
  margin-bottom: 1.25rem;
}

.cta-text {
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--color-terracotta-200);
  margin-bottom: 2.5rem;
}

.cta-text a {
  color: var(--color-terracotta-100);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}
.cta-text a:hover { color: var(--color-white); }

/* --- Contact --- */
.contact {
  padding: clamp(5rem, 10vw, 8rem) 0;
  background: var(--color-stone-50);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.contact-info .section-eyebrow { margin-bottom: 0.75rem; }
.contact-info .section-heading { margin-bottom: 1.25rem; }

.contact-info > p {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--color-stone-600);
  margin-bottom: 2.5rem;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-item svg {
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--color-terracotta-600);
}

.contact-item strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--color-stone-900);
  margin-bottom: 0.25rem;
}

.contact-item span,
.contact-item a {
  font-size: 0.9375rem;
  color: var(--color-stone-500);
  line-height: 1.6;
}

.contact-item a:hover { color: var(--color-terracotta-700); text-decoration: underline; }

/* --- Form --- */
.contact-form-wrap {
  background: var(--color-white);
  border: 1px solid var(--color-stone-200);
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 4vw, 2.5rem);
  box-shadow: var(--shadow-md);
}

.form-title {
  font-size: 1.5rem;
  margin-bottom: 1.75rem;
  color: var(--color-stone-900);
}

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

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

.form-group label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-stone-700);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.form-group input,
.form-group textarea {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  color: var(--color-stone-900);
  background: var(--color-stone-50);
  border: 1.5px solid var(--color-stone-200);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  line-height: 1.5;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
  width: 100%;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--color-stone-400);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--color-terracotta-500);
  box-shadow: 0 0 0 3px var(--color-terracotta-100);
}

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

.form-success {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-sm);
  color: #166534;
  font-size: 0.9375rem;
  font-weight: 500;
}

.form-success svg { color: #22c55e; flex-shrink: 0; }

/* --- Footer --- */
.site-footer {
  background: var(--color-stone-900);
  padding: clamp(3rem, 6vw, 5rem) 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  padding-bottom: clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand p {
  color: var(--color-stone-400);
  font-size: 0.9375rem;
  line-height: 1.7;
  margin-top: 1rem;
  max-width: 280px;
}

.footer-links strong,
.footer-contact strong {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-stone-400);
  margin-bottom: 1.25rem;
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  font-size: 0.9375rem;
  color: var(--color-stone-300);
  transition: color 0.2s ease;
}
.footer-links a:hover { color: var(--color-terracotta-300); }

.footer-contact address p {
  font-size: 0.9375rem;
  color: var(--color-stone-400);
  line-height: 1.7;
}

.footer-contact a {
  color: var(--color-terracotta-300);
  transition: color 0.2s ease;
}
.footer-contact a:hover { color: var(--color-white); }

.footer-bottom {
  padding-top: 2rem;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.8125rem;
  color: var(--color-stone-500);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .stat-card:nth-child(2) { border-right: none; }
  .stat-card:nth-child(3),
  .stat-card:nth-child(4) { border-top: 1px solid rgba(255,255,255,0.08); }
  .stat-card:nth-child(3) { border-left: 1px solid rgba(255,255,255,0.08); }
  .stat-card:nth-child(4) { border-left: 1px solid rgba(255,255,255,0.08); }

  .services-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .nav-list {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(250, 250, 249, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column;
    justify-content: flex-start;
    padding: 2rem;
    gap: 0.25rem;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .nav-list.open { transform: translateX(0); }

  .nav-list a {
    font-size: 1.125rem;
    padding: 0.875rem 1rem;
    width: 100%;
  }

  .nav-list .btn { margin-top: 1rem; align-self: stretch; text-align: center; }

  .hero { min-height: auto; padding-bottom: 10rem; }
  .hero-inner { padding-bottom: 4rem; }

  .hero-stats {
    position: relative;
    grid-template-columns: repeat(2, 1fr);
    margin-top: 3rem;
  }

  .stat-card { padding: 1.25rem 1.5rem; }

  .intro-grid { grid-template-columns: 1fr; }

  .about-grid { grid-template-columns: 1fr; }
  .about-image { order: -1; }

  .patients-layout { grid-template-columns: 1fr; }
  .patients-image { order: -1; }

  .contact-grid { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { text-align: left; }
}

@media (max-width: 480px) {
  .hero-stats { grid-template-columns: 1fr; }
  .stat-card { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .stat-card:last-child { border-bottom: none; }

  .services-grid { grid-template-columns: 1fr; }

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

  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
}

/* --- 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; }
  .service-card:hover { transform: none; }
}
