:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --text: #1a2638;
  --muted: #64748b;
  --primary: #3f6fa5;
  --primary-dark: #2f5784;
  --line: #d6dee8;
  --radius: 16px;
  --shadow: 0 14px 38px rgba(20, 36, 61, 0.1);
  --header-offset: 88px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-snap-type: y proximity;
  scroll-padding-top: var(--header-offset);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Manrope", sans-serif;
  line-height: 1.6;
}

h1,
h2 {
  font-family: "Outfit", sans-serif;
  line-height: 1.2;
  margin: 0 0 0.8rem;
}

p {
  margin: 0 0 1rem;
}

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

.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(247, 249, 252, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.nav-wrap {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand img {
  width: 162px;
  max-width: 30.6vw;
  display: block;
}

nav {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

nav a {
  font-weight: 600;
  color: var(--muted);
}

nav a:hover {
  color: var(--primary);
}

.hero {
  padding: 4.2rem 0 2.8rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #f7f9fc 0%, #edf3fb 100%);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.65rem;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
}

.hero p {
  max-width: 62ch;
  color: var(--muted);
}

.services-section {
  padding: 2.2rem 0 1.5rem;
}

.services-grid-heading {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
  margin: 0 0 1.25rem;
  letter-spacing: 0.02em;
}

.services-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-content: flex-start;
  gap: 1.25rem;
}

.service-card {
  flex: 1 1 280px;
  max-width: 380px;
  min-width: 0;
}

/* Center the 7th card when it sits alone on the last row */
.service-card--link:last-child {
  flex-basis: 100%;
  max-width: 380px;
  margin-left: auto;
  margin-right: auto;
}

.service-card--link {
  position: relative;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  overflow: hidden;
  min-height: 200px;
  transition:
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.28s ease;
}

.service-card--link:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 44px rgba(20, 36, 61, 0.14);
}

.service-card--link:focus-visible {
  outline: 3px solid rgba(63, 111, 165, 0.45);
  outline-offset: 2px;
}

.service-card__icon {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 48px;
  height: 48px;
  z-index: 1;
  object-fit: contain;
  pointer-events: none;
}

.service-card--preventive {
  background: #e9f1fb;
}

.service-card--cosmetic {
  background: #edf2f8;
}

.service-card--restorative {
  background: #e8eef6;
}

.service-card--implants {
  background: #e9eef5;
}

.service-card--pediatrics {
  background: #eaf0f9;
}

.service-card--orthodontics {
  background: #e8f0f8;
}

.service-card--emergency {
  background: #e9f1fb;
}

.service-card__preview-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-self: stretch;
  min-height: 100%;
  padding: 1.1rem 3.75rem 1.25rem 1.15rem;
}

.service-card--link .service-title {
  display: block;
  font-family: "Outfit", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 0.4rem;
}

.service-teaser {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.45;
}

/* Shorter cards on large screens only — width & typography stay the same */
@media (min-width: 900px) {
  .service-card--link {
    min-height: 100px;
  }
}

.services-details {
  position: relative;
}

.service-detail {
  scroll-margin-top: var(--header-offset);
  scroll-snap-align: start;
  scroll-snap-stop: normal;
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  min-height: 100svh;
  padding: 2rem 0;
  overflow: hidden;
}

.service-detail__bg {
  position: absolute;
  inset: -8% -5%;
  z-index: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  will-change: transform;
  transform: translate3d(0, 0, 0) scale(1.06);
  pointer-events: none;
}

.service-detail--preventive .service-detail__bg {
  background-image: linear-gradient(145deg, #3f6fa5 0%, #2f5784 42%, #6e93c0 100%);
}

.service-detail--cosmetic .service-detail__bg {
  background-image: linear-gradient(145deg, #5e7fa7 0%, #48678d 45%, #9eb6d4 100%);
}

.service-detail--restorative .service-detail__bg {
  background-image: linear-gradient(145deg, #45668f 0%, #2f5784 50%, #8aa6cc 100%);
}

.service-detail--implants .service-detail__bg {
  background-image: linear-gradient(145deg, #516c92 0%, #3b5b82 48%, #a3b8d4 100%);
}

.service-detail--pediatrics .service-detail__bg {
  background-image: linear-gradient(145deg, #5878a2 0%, #3f6fa5 42%, #b8cfe8 100%);
}

.service-detail--orthodontics .service-detail__bg {
  background-image: linear-gradient(145deg, #4f709b 0%, #3f6fa5 50%, #9eb8d6 100%);
}

.service-detail--emergency .service-detail__bg {
  background-image: linear-gradient(145deg, #3a567b 0%, #243a52 55%, #5c7a9e 100%);
}

.service-detail__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 90% 70% at 50% 20%, rgba(255, 255, 255, 0.14), transparent 55%);
  mix-blend-mode: soft-light;
}

.service-detail-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 44rem;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(12px);
}

.service-detail-inner h2 {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  color: var(--text);
}

.service-detail-inner p {
  color: var(--muted);
}

.service-detail-inner ul {
  margin: 0.75rem 0 0;
  padding-left: 1.15rem;
}

.service-detail-inner li {
  margin: 0.45rem 0;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
    scroll-snap-type: none;
  }

  .service-detail__bg {
    transform: none;
    will-change: auto;
  }

  .service-card--link {
    transition: none;
  }

  .service-card--link:hover {
    transform: none;
  }
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1rem 0;
  color: var(--muted);
  text-align: center;
}
