/* Hopewell Smile — site styles
   Palette and type match the original Squarespace theme. */

:root {
  --cream: #f6f3ec;      /* page background */
  --sand: #ede4d9;       /* alternate sections, footer */
  --taupe: #b6a48f;      /* accent */
  --brown: #574b3f;      /* dark accent */
  --ink: #36302a;        /* text, buttons */
  --white: #ffffff;
  --muted: #6f5f4e;      /* secondary text — meets AA on cream, sand and white */
  --focus: var(--brown); /* focus ring — overridden to white over the hero */

  --font-serif: "Alice", Georgia, "Times New Roman", serif;
  --font-sans: "Almarai", "Helvetica Neue", Arial, sans-serif;

  --radius: 10px;
  --container: 1200px;
  --gutter: clamp(1rem, 4vw, 3rem);
  --section-pad: clamp(3.5rem, 8vw, 6.5rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }
a[href^="tel:"] { white-space: nowrap; }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2.1rem, 4.5vw, 3.2rem); }
h2 { font-size: clamp(1.9rem, 3.8vw, 2.8rem); }
h3 { font-size: 1.45rem; }

p { margin: 0 0 1em; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-pad); }
.section--sand { background: var(--sand); }
.section__header { text-align: center; max-width: 46rem; margin: 0 auto 2.5rem; }

.eyebrow {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0 0 0.35rem;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0.5rem;
  z-index: 100;
  background: var(--ink);
  color: var(--white);
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
}
.skip-link:focus { left: 0.5rem; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.75rem 1.4rem;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.btn:hover { background: var(--brown); border-color: var(--brown); }
.btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.btn--outline { background: transparent; color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: var(--cream); }

.btn--small { min-height: 2.4rem; padding: 0.4rem 1rem; font-size: 0.95rem; }

/* Slim notice band (emergency line under the home hero) */
.notice { background: var(--sand); text-align: center; padding-block: 0.85rem; }
.notice p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.9rem;
  margin: 0;
  font-size: 1.1rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--cream);
  border-bottom: 1px solid rgba(54, 48, 42, 0.08);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 84px;
}

.site-header__logo img { width: 150px; }

.site-nav { display: flex; align-items: center; gap: 1.75rem; }

.site-nav__list {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__list a {
  text-decoration: none;
  font-size: 1.05rem;
  padding-block: 0.25rem;
  border-bottom: 1px solid transparent;
}
.site-nav__list a:hover,
.site-nav__list a[aria-current="page"] { border-bottom-color: currentColor; }
.site-nav__list a:focus-visible,
.site-header__logo:focus-visible,
.nav-toggle:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--ink);
}
.nav-toggle svg { display: block; }

/* Home page: the header floats over the hero video instead of sitting above
   it, so it is fixed rather than absolute — otherwise it scrolls away and the
   menu becomes unreachable. js/main.js adds .is-solid once the hero is past. */
.site-header--overlay {
  position: fixed;
  inset: 0 0 auto 0;
  background: transparent;
  border-bottom: 0;
  color: var(--white);
  --focus: var(--white); /* a dark ring would disappear against the video */
  transition: background-color 0.25s ease, color 0.25s ease;
}
.site-header--overlay .nav-toggle { color: var(--white); }

/* Past the hero the bar sits on the cream page and needs its own background */
.site-header--overlay.is-solid {
  background: var(--cream);
  color: var(--ink);
  border-bottom: 1px solid rgba(54, 48, 42, 0.08);
  --focus: var(--brown);
}
.site-header--overlay.is-solid .nav-toggle { color: var(--ink); }

/* Home page carries both logos stacked: the light one reads over the video,
   the dark one over cream. Only one is ever visible. */
.site-header__logo { position: relative; display: block; }
.site-header__logo picture { display: block; transition: opacity 0.25s ease; }
.site-header__logo--alt { position: absolute; inset: 0; opacity: 0; }
.site-header--overlay.is-solid .site-header__logo picture:not(.site-header__logo--alt) { opacity: 0; }
.site-header--overlay.is-solid .site-header__logo--alt { opacity: 1; }

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

  .site-nav {
    position: fixed;
    inset: 0;
    z-index: 60;
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    background: var(--cream);
    color: var(--ink);
    --focus: var(--brown);
    padding: 2rem;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.3s ease, visibility 0.3s;
  }
  .site-nav.is-open { transform: none; visibility: visible; }

  .site-nav__list { flex-direction: column; align-items: center; gap: 1.25rem; }
  .site-nav__list a { font-size: 1.6rem; }

  .nav-close {
    position: absolute;
    top: 1.25rem;
    right: var(--gutter);
    color: var(--ink) !important;
  }
}

@media (min-width: 901px) {
  .nav-close { display: none; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: min(92vh, 860px);
  padding-block: 9rem 5rem;
  color: var(--white);
  --focus: var(--white);
  background: var(--brown) center / cover no-repeat;
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(30, 25, 20, 0.35) 0%, rgba(30, 25, 20, 0.15) 40%, rgba(30, 25, 20, 0.55) 100%);
}

.hero .container { position: relative; z-index: 1; }

.hero h1 { max-width: 40rem; margin-bottom: 0.5em; }
.hero__lead { font-size: 1.2rem; max-width: 44rem; }
.hero .btn-row { justify-content: flex-start; }
.hero .btn { border-color: var(--ink); }

/* ---------- About (home) ---------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.split__text { text-align: center; font-size: 1.2rem; }
.split__media img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 4px;
}

@media (max-width: 800px) {
  .split { grid-template-columns: 1fr; }
}

/* ---------- Staff ---------- */

.staff-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 3vw, 2.5rem);
  align-items: start;
}

.staff-grid figure { margin: 0; text-align: center; }
.staff-grid img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 4px;
}
.staff-grid figcaption { margin-top: 0.6rem; font-size: 0.98rem; }

.staff-bio {
  max-width: 50rem;
  margin: 2.5rem auto 0;
}
.staff-bio--center { text-align: center; }

@media (max-width: 700px) {
  .staff-grid { grid-template-columns: 1fr; max-width: 360px; margin-inline: auto; }
}

/* ---------- Services ---------- */

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

.service-card {
  background: var(--sand);
  padding: 0.6rem 0.6rem 1.5rem;
  text-align: center;
  border-radius: 4px;
}
.service-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  margin-bottom: 1.1rem;
}
.service-card h2,
.service-card h3 { font-size: 1.35rem; padding-inline: 0.4rem; margin-bottom: 0.6em; }
.service-card p { font-size: 0.95rem; line-height: 1.45; padding-inline: 0.4rem; margin: 0; }

.section--sand .service-card { background: var(--cream); }

@media (max-width: 1100px) {
  .services-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .services-grid { grid-template-columns: 1fr; max-width: 420px; margin-inline: auto; }
}

/* ---------- Insurance ---------- */

.insurance-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.insurance-grid li {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1rem 1rem 1.1rem;
  text-align: center;
}
.insurance-grid img {
  width: 100%;
  max-width: 180px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  margin: 0 auto 0.6rem;
}
.insurance-grid span { font-size: 1rem; }

@media (max-width: 800px) {
  .insurance-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Visit / contact ---------- */

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

.visit__map {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 4px;
  background: var(--sand);
}

.visit__info { text-align: center; }
.visit__info h2 { font-size: 1.9rem; }
.visit__info .visit__title { font-size: clamp(2rem, 4vw, 2.6rem); }
.visit__info h3,
.visit__info .visit__label {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0;
  margin: 1.25rem 0 0.25rem;
}
.visit__info p, .visit__info address { margin: 0; font-style: normal; }

.hours { list-style: none; margin: 0; padding: 0; }
.hours li { padding-block: 0.15rem; }
.hours__closed { color: var(--muted); }

@media (max-width: 800px) {
  .visit { grid-template-columns: 1fr; }
  .visit__map { aspect-ratio: 4 / 3; }
}

/* ---------- Policy page ---------- */

.policy { max-width: 46rem; }
.policy h1 { margin-bottom: 0.3em; }
.policy__meta { color: var(--muted); margin-bottom: 2rem; }
.policy h2 { font-size: 1.6rem; margin-top: 2.25rem; }
.policy ul { padding-left: 1.25rem; margin: 0 0 1em; }
.policy li { margin-bottom: 0.7rem; }
.policy a { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--sand);
  padding-block: 3.5rem 2rem;
  border-top: 1px solid rgba(54, 48, 42, 0.08);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
}

.site-footer h2 { font-size: 1.9rem; margin-bottom: 0.75rem; }
.site-footer address { font-style: normal; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer__copy { margin-top: 2.5rem; font-size: 0.95rem; }

@media (max-width: 800px) {
  .site-footer__grid { grid-template-columns: 1fr; text-align: center; }
  .site-footer__copy { text-align: center; }
}

/* ---------- 404 ---------- */

.not-found { text-align: center; padding-block: 8rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }

  /* Show the still poster instead of the looping hero video */
  .hero__media { display: none; }
  .hero { background-image: url("../images/hero-poster.jpg"); }
}

/* ---------- Print ---------- */

@media print {
  .site-header, .skip-link, .btn-row, .hero__media, .visit__map { display: none !important; }
  .hero { min-height: 0; padding-block: 1rem; color: var(--ink); background: none; }
  .hero::after { display: none; }
  body { background: #fff; }
  .section { padding-block: 1.5rem; }
  .site-footer { background: none; }
}
