/* =========================================================
   Lennox Family Dental — style.css
   Design system: Rooted Modern (forest green + cream + sage)
   ========================================================= */

/* --- Design tokens --- */
:root {
  /* Palette */
  --forest: #1F3A2E;
  --forest-deep: #142822;
  --forest-soft: #2D5040;
  --cream: #F8F4ED;
  --cream-warm: #F1EADE;
  --sage: #89B898;
  --sage-deep: #6FA47F;
  --coral: #E8917A;
  --coral-soft: #FBE6DF;
  --ink: #1A1A1A;
  --ink-soft: #3D3D3D;
  --muted: #5D6B63;
  --line: #E4DFD3;
  --white: #FFFFFF;

  /* Semantic */
  --bg: var(--cream);
  --bg-card: var(--white);
  --bg-band: var(--forest);
  --text: var(--ink);
  --text-muted: var(--muted);
  --accent: var(--forest);
  --accent-hover: var(--forest-soft);
  --highlight: var(--sage);

  /* Type */
  --font-display: 'Fraunces', 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  /* Type scale (clamp-based, fluid) */
  --t-eyebrow: 0.8125rem;
  --t-body: 1rem;
  --t-lead: clamp(1.0625rem, 0.95rem + 0.5vw, 1.1875rem);
  --t-h6: 1.0625rem;
  --t-h5: 1.25rem;
  --t-h4: clamp(1.375rem, 1.2rem + 0.6vw, 1.625rem);
  --t-h3: clamp(1.625rem, 1.4rem + 0.9vw, 2.125rem);
  --t-h2: clamp(2rem, 1.6rem + 1.6vw, 2.75rem);
  --t-h1: clamp(2.5rem, 2rem + 2.4vw, 3.875rem);

  /* Layout */
  --container: 1180px;
  --container-narrow: 880px;
  --gutter: clamp(1rem, 1vw + 0.6rem, 1.75rem);
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  /* Shadow */
  --shadow-soft: 0 2px 8px rgba(31, 58, 46, 0.06);
  --shadow: 0 8px 28px rgba(31, 58, 46, 0.10);
  --shadow-lift: 0 18px 44px rgba(31, 58, 46, 0.14);

  /* Motion */
  --ease: cubic-bezier(.22,.61,.36,1);
  --t: 220ms;
}

/* --- Reset / base --- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; height: auto; }
a { color: var(--accent); text-decoration: none; transition: color var(--t) var(--ease); }
a:hover { color: var(--accent-hover); }
button { font: inherit; cursor: pointer; border: 0; background: none; }

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 500;
  font-variation-settings: 'opsz' 48, 'SOFT' 50;
  color: var(--forest);
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
  line-height: 1.15;
}
h1 { font-size: var(--t-h1); font-weight: 500; line-height: 1.05; }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); }
h4 { font-size: var(--t-h4); }
h5 { font-size: var(--t-h5); }
p { margin: 0 0 1em; }
.eyebrow {
  font-family: var(--font-body);
  font-size: var(--t-eyebrow);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage-deep);
  margin: 0 0 1em;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.eyebrow::before {
  content: '';
  width: 28px; height: 1px;
  background: var(--sage);
}
.lead { font-size: var(--t-lead); color: var(--ink-soft); line-height: 1.55; }

/* --- Layout primitives --- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.container--narrow { max-width: var(--container-narrow); }
.section { padding: clamp(3.5rem, 5vw + 2rem, 6.5rem) 0; }
.section--tight { padding: clamp(2.5rem, 3vw + 1.5rem, 4.5rem) 0; }
.section--alt { background: var(--cream-warm); }
.section--dark { background: var(--forest); color: var(--cream); }
.section--dark h1, .section--dark h2, .section--dark h3 { color: var(--cream); }
.grid { display: grid; gap: var(--gutter); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* --- Top bar --- */
.topbar {
  background: var(--forest-deep);
  color: var(--cream);
  font-size: 0.8125rem;
  padding: 0.5rem 0;
}
.topbar .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.topbar a { color: var(--cream); }
.topbar a:hover { color: var(--sage); }
.topbar__contacts { display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; }
.topbar__social { display: flex; gap: 0.75rem; align-items: center; }
.topbar__social svg { width: 16px; height: 16px; fill: currentColor; }
.lang-toggle {
  display: inline-flex; gap: 0.25rem; align-items: center;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em;
  padding: 0.25rem 0.625rem;
  border: 1px solid rgba(248, 244, 237, 0.25);
  border-radius: var(--radius-pill);
}
.lang-toggle a { padding: 0 0.3rem; }
.lang-toggle .active { color: var(--sage); }

/* --- Header / nav --- */
.header {
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 100;
}
.nav { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 0; gap: 2rem; }
.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.brand__mark {
  width: 48px; height: 48px;
  background: var(--forest);
  border-radius: var(--radius);
  display: grid; place-items: center;
  color: var(--sage);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.brand__name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.125rem;
  color: var(--forest);
  line-height: 1.1;
  letter-spacing: -0.005em;
}
.brand__tag {
  display: block;
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage-deep);
  margin-top: 2px;
}
.nav__menu { display: flex; align-items: center; gap: 1.75rem; list-style: none; padding: 0; margin: 0; }
.nav__menu a {
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.9375rem;
  padding: 0.4rem 0;
  position: relative;
}
.nav__menu a:hover, .nav__menu a.active { color: var(--forest); }
.nav__menu a.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--sage); border-radius: 2px;
}
.nav__cta { display: flex; align-items: center; gap: 0.75rem; }
.nav__toggle { display: none; padding: 0.5rem; }
.nav__toggle span { display: block; width: 22px; height: 2px; background: var(--forest); margin: 4px 0; transition: var(--t) var(--ease); }

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
  transition: all var(--t) var(--ease);
  text-decoration: none;
  white-space: nowrap;
}
.btn--primary {
  background: var(--forest);
  color: var(--cream);
}
.btn--primary:hover {
  background: var(--forest-soft);
  color: var(--cream);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.btn--accent {
  background: var(--sage);
  color: var(--forest-deep);
}
.btn--accent:hover {
  background: var(--sage-deep);
  color: var(--cream);
  transform: translateY(-1px);
}
.btn--ghost {
  background: transparent;
  color: var(--forest);
  border: 1.5px solid var(--forest);
}
.btn--ghost:hover {
  background: var(--forest);
  color: var(--cream);
}
.btn--lg { padding: 1rem 1.75rem; font-size: 1rem; }
.btn svg { width: 16px; height: 16px; fill: currentColor; }

/* --- Hero --- */
.hero {
  padding: clamp(3rem, 5vw + 1.5rem, 6rem) 0 clamp(3.5rem, 6vw + 1.5rem, 7rem);
  background:
    radial-gradient(ellipse at top right, rgba(212, 162, 76, 0.12), transparent 55%),
    linear-gradient(180deg, var(--cream) 0%, var(--cream-warm) 100%);
  position: relative;
  overflow: hidden;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
}
.hero__heritage {
  display: inline-flex;
  align-items: center; gap: 0.6rem;
  padding: 0.45rem 0.9rem 0.45rem 0.5rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--forest);
  box-shadow: var(--shadow-soft);
  margin-bottom: 1.5rem;
}
.hero__heritage-badge {
  display: inline-grid; place-items: center;
  width: 28px; height: 28px;
  background: var(--sage);
  color: var(--forest-deep);
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.625rem;
  letter-spacing: 0.05em;
}
.hero h1 { margin-bottom: 1.25rem; }
.hero h1 em {
  font-style: italic;
  color: var(--sage-deep);
  font-weight: 400;
}
.hero__lead { font-size: var(--t-lead); color: var(--ink-soft); margin-bottom: 2rem; max-width: 32em; }
.hero__cta { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 2.5rem; }
.hero__chips {
  display: flex; gap: 0.5rem; flex-wrap: wrap;
}
.hero__chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--forest);
}
.hero__chip svg { width: 14px; height: 14px; fill: var(--sage); }
.hero__visual {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/5;
  background: var(--white);
  box-shadow: var(--shadow-lift);
}
.hero__visual img { width: 100%; height: 100%; object-fit: cover; }
.hero__visual::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(31, 58, 46, 0.2));
}
.hero__floating {
  position: absolute; bottom: -22px; left: -22px;
  background: var(--white);
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 0.75rem;
  z-index: 2;
}
.hero__floating-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 500;
  color: var(--forest);
  line-height: 1;
}
.hero__floating-text { font-size: 0.75rem; line-height: 1.25; color: var(--ink-soft); }

/* --- Service tiles --- */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.service {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  border: 1px solid var(--line);
  transition: all var(--t) var(--ease);
  position: relative;
  overflow: hidden;
}
.service:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--sage);
}
.service__icon {
  width: 52px; height: 52px;
  background: var(--cream-warm);
  border-radius: var(--radius);
  display: grid; place-items: center;
  color: var(--forest);
  margin-bottom: 1rem;
}
.service__icon svg { width: 26px; height: 26px; fill: currentColor; }
.service h4 { margin-bottom: 0.5rem; font-size: 1.1875rem; }
.service p { color: var(--text-muted); font-size: 0.9375rem; margin: 0; line-height: 1.55; }

/* --- Doctors --- */
.doctors-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.doctor {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  border: 1px solid var(--line);
}
.doctor__photo {
  width: 110px; height: 110px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  background: var(--cream-warm);
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--forest);
  overflow: hidden;
}
.doctor__photo img { width: 100%; height: 100%; object-fit: cover; }
.doctor h5 { margin-bottom: 0.25rem; font-size: 1.0625rem; }
.doctor__role { font-size: 0.8125rem; color: var(--sage-deep); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }

/* --- Reviews --- */
.reviews-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.review {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  border: 1px solid var(--line);
  display: flex; flex-direction: column;
}
.review__stars {
  display: flex; gap: 2px; margin-bottom: 1rem;
  color: var(--sage);
}
.review__stars svg { width: 18px; height: 18px; fill: currentColor; }
.review__text { color: var(--ink-soft); font-size: 0.9375rem; line-height: 1.6; margin: 0 0 1.25rem; flex: 1; }
.review__author { font-weight: 600; color: var(--forest); font-size: 0.9375rem; }
.review__meta { font-size: 0.8125rem; color: var(--text-muted); }

/* --- CTA band --- */
.cta-band {
  background: var(--forest);
  color: var(--cream);
  padding: clamp(2.5rem, 4vw, 4rem) 0;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: '';
  position: absolute; right: -80px; top: -80px;
  width: 320px; height: 320px;
  background: var(--sage);
  border-radius: 50%;
  opacity: 0.08;
}
.cta-band__grid {
  display: grid; grid-template-columns: 1.4fr 1fr;
  gap: 2rem; align-items: center; position: relative;
}
.cta-band h2 { color: var(--cream); margin-bottom: 0.5rem; }
.cta-band p { color: rgba(248, 244, 237, 0.85); margin: 0; }
.cta-band__actions { display: flex; gap: 0.75rem; justify-content: flex-end; flex-wrap: wrap; }
.cta-band .btn--primary { background: var(--sage); color: var(--forest-deep); }
.cta-band .btn--primary:hover { background: var(--cream); }
.cta-band .btn--ghost { color: var(--cream); border-color: var(--cream); }
.cta-band .btn--ghost:hover { background: var(--cream); color: var(--forest); }

/* --- Footer --- */
.footer {
  background: var(--forest-deep);
  color: var(--cream);
  padding: 4rem 0 2rem;
}
.footer__grid {
  display: grid; grid-template-columns: 1.25fr 1fr 1fr 1.25fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}
.footer h5 {
  color: var(--sage);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}
.footer__brand .brand__mark { background: var(--sage); color: var(--forest-deep); }
.footer__brand .brand__name { color: var(--cream); }
.footer__brand .brand__tag { color: var(--sage); }
.footer__about { color: rgba(248, 244, 237, 0.7); font-size: 0.875rem; line-height: 1.6; margin: 1rem 0 1.25rem; }
.footer__social { display: flex; gap: 0.75rem; }
.footer__social a {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: rgba(248, 244, 237, 0.08);
  border-radius: 50%;
  color: var(--cream);
  transition: all var(--t) var(--ease);
}
.footer__social a:hover { background: var(--sage); color: var(--forest-deep); }
.footer__social svg { width: 16px; height: 16px; fill: currentColor; }
.footer__links { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.footer__links a { color: rgba(248, 244, 237, 0.75); font-size: 0.9375rem; }
.footer__links a:hover { color: var(--sage); }
.footer__contact { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.85rem; }
.footer__contact li { display: flex; gap: 0.75rem; align-items: flex-start; color: rgba(248, 244, 237, 0.85); font-size: 0.9375rem; }
.footer__contact svg { width: 18px; height: 18px; fill: var(--sage); flex-shrink: 0; margin-top: 2px; }
.footer__contact a { color: rgba(248, 244, 237, 0.85); }
.footer__contact a:hover { color: var(--sage); }
.footer__bar {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(248, 244, 237, 0.1);
  font-size: 0.8125rem;
  color: rgba(248, 244, 237, 0.55);
  flex-wrap: wrap; gap: 1rem;
}
.footer__bar a { color: rgba(248, 244, 237, 0.7); }
.footer__bar a:hover { color: var(--sage); }
.swg-mark {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.75rem; letter-spacing: 0.04em;
}
.swg-mark::before {
  content: ''; width: 12px; height: 12px;
  background: var(--sage);
  transform: rotate(45deg);
}

/* --- Page hero (interior pages) --- */
.page-hero {
  background:
    radial-gradient(ellipse at top right, rgba(212, 162, 76, 0.10), transparent 55%),
    linear-gradient(180deg, var(--cream-warm), var(--cream));
  padding: clamp(3rem, 5vw, 5rem) 0;
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.page-hero h1 { margin-bottom: 0.75rem; }
.page-hero p { color: var(--ink-soft); font-size: var(--t-lead); max-width: 36em; margin: 0 auto; }

/* --- Misc utilities --- */
.text-center { text-align: center; }
.section__head { text-align: center; max-width: 42em; margin: 0 auto 3rem; }
.section__head .eyebrow { justify-content: center; }
.section__head .eyebrow::before, .section__head .eyebrow::after { content: ''; width: 28px; height: 1px; background: var(--sage); }

/* --- Responsive --- */
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { aspect-ratio: 16/11; max-width: 100%; }
  .hero__floating { left: 1rem; bottom: 1rem; }
  .cta-band__grid { grid-template-columns: 1fr; text-align: center; }
  .cta-band__actions { justify-content: center; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .doctors-grid { grid-template-columns: repeat(2, 1fr); }
  .reviews-grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .nav__menu {
    position: fixed; top: 84px; right: -100%;
    flex-direction: column; align-items: flex-start;
    background: var(--cream); width: 80%; max-width: 320px;
    height: calc(100vh - 84px);
    padding: 2rem 1.5rem; gap: 1.25rem;
    border-left: 1px solid var(--line);
    box-shadow: var(--shadow-lift);
    transition: right var(--t) var(--ease);
  }
  .nav__menu.is-open { right: 0; }
  .nav__toggle { display: block; }
  .nav__toggle.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav__toggle.is-open span:nth-child(2) { opacity: 0; }
  .nav__toggle.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
}
@media (max-width: 600px) {
  .services-grid { grid-template-columns: 1fr; }
  .doctors-grid { grid-template-columns: 1fr 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .topbar__contacts { gap: 0.75rem; font-size: 0.75rem; }
}

/* --- Fade-in animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .fade-in { opacity: 1; transform: none; }
}

/* --- Skip link (a11y) --- */
.skip-link {
  position: absolute; left: -9999px;
  background: var(--forest); color: var(--cream);
  padding: 0.5rem 1rem; border-radius: var(--radius);
  z-index: 200;
}
.skip-link:focus { left: 1rem; top: 1rem; color: var(--cream); }

/* --- Focus rings --- */
:focus-visible {
  outline: 3px solid var(--sage);
  outline-offset: 2px;
  border-radius: 3px;
}
