/* Sayler Dental — site styles
   Palette pulled from the studio photos: white seamless, navy scrubs, black team scrubs. */

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("../fonts/schibsted-grotesk-var.woff2") format("woff2"),
       url("../fonts/schibsted-grotesk-var.woff") format("woff");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #ffffff;
  --frost: #f3f5f8;      /* matches the photo seamless floor */
  --line: #dfe4ea;
  --navy: #1f2d44;       /* Dr. Ben & Dr. Dan's scrubs */
  --navy-deep: #16213a;
  --ink: #1d232b;
  --slate: #586474;
  --spruce: #2d6a5a;     /* small accents only */
  --sky: #e3ebf3;

  --font: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.5rem;
  --step-3: clamp(1.75rem, 1.4rem + 1.4vw, 2.25rem);
  --step-4: clamp(2.25rem, 1.6rem + 2.8vw, 3.5rem);
  --step-5: clamp(2.6rem, 1.6rem + 4.4vw, 4.75rem);

  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --radius: 6px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  font-feature-settings: "ss01";
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--spruce); }

:focus-visible { outline: 3px solid var(--spruce); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 {
  color: var(--navy);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: var(--step-5); font-weight: 750; letter-spacing: -0.035em; }
h2 { font-size: var(--step-4); font-weight: 700; letter-spacing: -0.03em; }
h3 { font-size: var(--step-1); font-weight: 650; letter-spacing: -0.01em; line-height: 1.25; }
p { margin: 0 0 1em; max-width: 62ch; text-wrap: pretty; }  /* pretty: no single word left alone on the last line */

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem;
  background: var(--navy); color: #fff; padding: 0.6rem 1rem; z-index: 100; border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  min-height: 5.25rem;
}
.brand { display: inline-flex; flex: none; text-decoration: none; }
.brand img { height: 3.5rem; width: auto; }

.nav-list { display: flex; align-items: center; gap: 0.25rem; list-style: none; margin: 0; padding: 0; }
.nav-list a {
  display: block; padding: 0.5rem 0.75rem; text-decoration: none; color: var(--ink);
  font-weight: 500; font-size: 0.975rem; border-radius: var(--radius); white-space: nowrap;
}
.nav-list a:hover { color: var(--navy); background: var(--frost); }
.nav-list a[aria-current="page"] { color: var(--navy); box-shadow: inset 0 -2px 0 var(--navy); border-radius: 0; }

.header-call { white-space: nowrap; }
.header-call .label-short { display: none; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.nav-toggle { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 3rem; padding: 0.7rem 1.35rem;
  font: inherit; font-weight: 600; font-size: 1rem; line-height: 1.2;
  border-radius: var(--radius); border: 1.5px solid var(--navy);
  text-decoration: none; cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-deep); color: #fff; }
.btn-quiet { background: transparent; color: var(--navy); }
.btn-quiet:hover { background: var(--navy); color: #fff; }
.btn-sm { min-height: 2.5rem; padding: 0.45rem 1rem; font-size: 0.95rem; }
.btn svg { width: 1.05em; height: 1.05em; flex: none; }

/* ---------- Home hero ---------- */
.hero { padding-top: clamp(2.5rem, 6vw, 5rem); }
.hero-copy { display: grid; gap: 1.5rem 3.5rem; grid-template-columns: 1.45fr 1fr; align-items: end; }
.hero h1 { margin: 0; font-size: clamp(3.25rem, 1.6rem + 5.6vw, 6.5rem); letter-spacing: -0.045em; line-height: 0.95; }
.hero-kicker { margin: 0.75rem 0 0; font-size: var(--step-3); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; color: var(--navy); }
.nowrap { white-space: nowrap; }
.hero-lede { font-size: var(--step-1); line-height: 1.5; color: var(--ink); margin: 0 0 1.5rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.status {
  display: inline-flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem;
  font-size: var(--step--1); font-weight: 600; color: var(--spruce);
}
.status::before { content: ""; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--spruce); }

/* The team stands on the page. The band behind the photo repeats the studio floor tone
   (#f6f8fc) so the photo has no visible edges on wide screens. */
.hero-figure {
  margin: clamp(1.5rem, 4vw, 3rem) 0 0;
  background: linear-gradient(to bottom, #fff 0%, #fff 72%, #f6f8fc 88%, #f6f8fc 100%);
}
.hero-figure img { width: 100%; max-width: 92rem; margin-inline: auto; }
.hero-row2 { display: none; }

/* ---------- Practical strip ---------- */
.facts { border-block: 1px solid var(--line); }
.facts-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.fact { padding: 1.75rem 1.5rem 1.75rem 0; }
.fact + .fact { padding-left: 1.5rem; border-left: 1px solid var(--line); }
.fact h2 { font-size: var(--step-0); font-weight: 650; letter-spacing: 0; margin-bottom: 0.4rem; color: var(--slate); }
.fact p, .fact address { margin: 0; font-style: normal; font-size: var(--step-1); line-height: 1.4; color: var(--navy); font-weight: 500; }
.fact a { text-decoration: none; }
.fact a:hover { text-decoration: underline; }
/* Address: pin icon, underlined street and a "Google Maps" cue so it reads as a link */
.map-link { display: inline-grid; grid-template-columns: auto 1fr; column-gap: 0.45rem; align-items: baseline; color: var(--navy); }
.map-link .pin { width: 1.05em; height: 1.05em; color: var(--spruce); align-self: center; grid-row: 1; }
.map-link .map-street { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--spruce) 55%, transparent); text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
.map-link small, .map-link .map-cta { grid-column: 2; }
.map-link .map-cta { display: block; margin-top: 0.4rem; font-size: var(--step--1); font-weight: 600; color: var(--spruce); }
.fact a.map-link:hover { text-decoration: none; }
.map-link:hover .map-street { text-decoration-color: var(--spruce); }
.map-link:hover .map-cta { text-decoration: underline; }
.contact-lines .map-link { display: inline; color: inherit; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--spruce) 55%, transparent); text-underline-offset: 0.2em; }
.fact small { display: block; font-size: var(--step--1); color: var(--slate); font-weight: 400; margin-top: 0.25rem; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(4rem, 9vw, 7rem); }
.section-frost { background: var(--frost); }
/* Our story (Our team page): heading left, readable column of text right */
.story-grid { display: grid; grid-template-columns: minmax(10rem, 1fr) 2.4fr; gap: 1rem clamp(2rem, 5vw, 5rem); align-items: start; }
.story-grid + .story-grid { margin-top: clamp(2.5rem, 5vw, 4rem); }
.story-text { max-width: 40rem; }
.story-text p { font-size: 1.0625rem; line-height: 1.7; margin: 0 0 1.1em; }
.story-text p:last-child { margin-bottom: 0; }
.story-text .story-lede { font-size: var(--step-1); line-height: 1.5; color: var(--navy); font-weight: 500; }
@media (max-width: 860px) { .story-grid { grid-template-columns: 1fr; } }
.section-head { max-width: 72ch; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head p { color: var(--slate); font-size: var(--step-1); line-height: 1.5; text-wrap: balance; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.split-media img { margin-inline: auto; max-height: 40rem; width: auto; }
.split-copy p { font-size: 1.125rem; }
.text-link { font-weight: 600; display: inline-block; padding-block: 0.2rem; }  /* padding: 24px+ touch target */

/* Studio shots on white: feather the edges so the seamless melts into the page */
.soft-edges {
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 8%, #000 92%, transparent 100%),
                      linear-gradient(to bottom, transparent 0, #000 6%, #000 94%, transparent 100%);
  -webkit-mask-composite: source-in;
          mask-image: linear-gradient(to right, transparent 0, #000 8%, #000 92%, transparent 100%),
                      linear-gradient(to bottom, transparent 0, #000 6%, #000 94%, transparent 100%);
          mask-composite: intersect;
}
.photo-card { background: var(--paper); border-radius: var(--radius); padding: 1.25rem 1.25rem 0; }

/* ---------- Services ---------- */
.service-list {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 clamp(2rem, 5vw, 4rem);
  list-style: none; margin: 0; padding: 0;
}
.service-list li { padding: 1.5rem 0; border-top: 1px solid var(--line); }
.service-list h3 { margin-bottom: 0.35rem; }
.service-list p { margin: 0; color: var(--slate); }

/* ---------- Steps (a true sequence) ---------- */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.steps li { counter-increment: step; padding-top: 1.25rem; border-top: 2px solid var(--navy); }
.steps li::before {
  content: counter(step); display: block; font-size: var(--step-3); font-weight: 750;
  color: var(--navy); line-height: 1; margin-bottom: 0.75rem;
}
.steps p { color: var(--slate); margin: 0; }

/* ---------- Visit / contact ---------- */
.visit { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); }
.hours { width: 100%; border-collapse: collapse; font-size: 1.0625rem; }
.hours th, .hours td { text-align: left; padding: 0.7rem 0; border-bottom: 1px solid var(--line); font-weight: 400; }
.hours th { color: var(--ink); font-weight: 500; }
.hours td { color: var(--slate); text-align: right; }
.contact-lines { list-style: none; padding: 0; margin: 0 0 2rem; font-size: var(--step-1); }
.contact-lines li { margin-bottom: 0.6rem; }
.contact-lines span { display: block; font-size: var(--step--1); color: var(--slate); }
address { font-style: normal; }
.office-photo { margin: 0 0 1.5rem; }
.office-photo img, .photo-placeholder { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.photo-placeholder { display: grid; place-content: center; justify-items: center; gap: 0.6rem; background: var(--frost); border: 1px dashed var(--line); color: var(--slate); font-size: 0.95rem; }
.photo-placeholder svg { width: 2.75rem; height: 2.75rem; }
.office-photo figcaption { margin-top: 0.6rem; color: var(--slate); font-size: 0.95rem; }
.contact-lines .note { display: block; margin-top: 0.35rem; font-size: 0.9rem; max-width: 30rem; }
.map-frame { border: 0; width: 100%; aspect-ratio: 4 / 3; border-radius: var(--radius); background: var(--frost); }

/* ---------- Page header (inner pages) ---------- */
.page-head { padding-block: clamp(3rem, 7vw, 5.5rem) clamp(2rem, 4vw, 3rem); }
.page-head h1 { font-size: var(--step-4); overflow-wrap: break-word; hyphens: auto; }
.page-head p { font-size: var(--step-1); color: var(--slate); line-height: 1.5; max-width: 72ch; text-wrap: balance; }

/* ---------- Team ---------- */
.doctor { display: grid; grid-template-columns: minmax(14rem, 22rem) 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.doctor > :last-child > :last-child { margin-bottom: 0; }
.doctor + .doctor { margin-top: clamp(4rem, 8vw, 6rem); }
.doctor img { border-radius: var(--radius); background: var(--frost); width: 100%; }
.doctor h2 { font-size: var(--step-3); margin-bottom: 0.25rem; }
.doctor .role { color: var(--slate); margin-bottom: 1.5rem; }

.team-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2.5rem 1.5rem; }
.team-grid img { border-radius: var(--radius); margin-bottom: 0.85rem; background: var(--frost); }
.team-grid h3 { margin: 0; font-size: 1.0625rem; }
.team-grid p { margin: 0; color: var(--slate); font-size: 0.95rem; }

.band { background: #1b1b1b; color: #fff; }
.band-inner { display: grid; grid-template-columns: 1.3fr 1fr; align-items: center; }
.band img { width: 100%; height: 100%; object-fit: cover; }
.band-copy { padding: clamp(2rem, 5vw, 4rem); }
.band-copy h2 { color: #fff; font-size: var(--step-3); }
.band-copy p { color: #c9ced6; }

.candid img { border-radius: var(--radius); }

/* ---------- Prose (services, new patients) ---------- */
.prose h2 { font-size: var(--step-3); margin-top: 2.5em; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.2rem; max-width: 62ch; }
.prose li { margin-bottom: 0.4rem; }
.prose h3 { font-size: var(--step-1); margin-top: 1.75em; }
.notice { overflow-wrap: anywhere; }
.notice > * { max-width: 72ch; }
.notice-contact { margin-bottom: 2.5rem; }
.taglines { margin: 1.5rem 0 0; display: grid; gap: 1.25rem; }
.taglines dt { font-weight: 600; }
.taglines dt span { font-weight: 400; color: var(--slate); }
.taglines dd { margin: 0.2rem 0 0; }
.notice-contact p { margin-bottom: 0.5rem; }
.aside-card { background: var(--frost); border-radius: var(--radius); padding: 1.75rem; }
.notice-callout { margin-top: 1.5rem; max-width: 72ch; padding: 1rem 1.25rem; background: var(--frost); border-left: 4px solid var(--spruce); border-radius: var(--radius); }
.page-head .notice-callout p { margin: 0; max-width: none; text-wrap: pretty; font-size: var(--step-0); }
.page-head .notice-callout p + p { margin-top: 0.4rem; }
.notice-callout strong { color: var(--navy); }
.aside-card h2, .aside-card h3 { font-size: var(--step-1); margin-top: 0; }
.aside-card p:last-child { margin-bottom: 0; }
.with-aside { display: grid; grid-template-columns: 1fr 20rem; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.with-aside > aside { position: sticky; top: 6rem; display: grid; gap: 1.5rem; }

.service-detail { display: grid; grid-template-columns: 15rem 1fr; gap: 1rem 3rem; padding-block: 2.25rem; border-top: 1px solid var(--line); }
.service-detail h2 { font-size: var(--step-2); margin: 0; }
.service-detail p:last-child, .service-detail ul:last-child { margin-bottom: 0; }

/* ---------- CTA strip ---------- */
.cta { background: var(--navy); color: #fff; }
.cta-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.5rem 3rem; padding-block: clamp(3rem, 6vw, 4.5rem); }
.cta h2 { color: #fff; font-size: var(--step-3); margin: 0; max-width: 22ch; }
.cta .btn-primary { background: #fff; color: var(--navy); border-color: #fff; }
.cta .btn-primary:hover { background: var(--sky); }
.cta .btn-quiet { color: #fff; border-color: rgba(255,255,255,0.6); }
.cta .btn-quiet:hover { background: rgba(255,255,255,0.1); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--frost); padding-block: 3.5rem 2rem; font-size: 0.975rem; color: var(--slate); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; }
.site-footer h2 { font-size: 1rem; letter-spacing: 0; color: var(--ink); margin-bottom: 0.75rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.4rem; }
.site-footer a { color: var(--slate); text-decoration: none; display: inline-block; padding-block: 0.2rem; }  /* 24px+ touch target */
.footer-tag { margin: -0.25rem 0 0.6rem; color: var(--slate); }
.site-footer a:hover { color: var(--navy); text-decoration: underline; }
.footer-legal { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; font-size: 0.875rem; }

/* ---------- 404 ---------- */
.notfound { padding-block: clamp(5rem, 12vw, 9rem); }

/* ---------- Utilities ---------- */
.section-flush { padding-top: 0; }
.section-divided { border-top: 1px solid var(--line); }
.h-sub { font-size: var(--step-2); margin-top: 2.5rem; }
.note { margin-top: 1rem; color: var(--slate); font-size: 0.95rem; }
.mt-md { margin-top: 2rem; }
.mt-lg { margin-top: 2.5rem; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-copy, .split, .visit, .with-aside, .band-inner { grid-template-columns: 1fr; }
  .with-aside > aside { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .split-media { order: -1; }
  .split-media img { max-height: 30rem; }
}

/* Below 960px the five links no longer fit on one line beside the logo and call button,
   so the header switches to the Menu button instead of letting labels wrap. */
@media (max-width: 960px) {
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: none; border: 1.5px solid var(--line); border-radius: var(--radius);
    font: inherit; font-weight: 600; color: var(--navy); padding: 0.5rem 0.85rem; cursor: pointer;
  }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 0.5rem var(--gutter) 1.25rem; display: none;
  }
  .site-nav.is-open { display: block; }
  .nav-list { flex-direction: column; align-items: stretch; }
  .nav-list a { padding: 0.85rem 0.25rem; font-size: 1.125rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav-list a[aria-current="page"] { box-shadow: none; font-weight: 700; }
  .header-call .label-long { display: none; }
  .header-call .label-short { display: inline; }
  .header-inner { gap: 0.75rem; }
  .brand { margin-right: auto; }
  .header-call { order: 2; }
  .nav-toggle { order: 3; }
}

@media (max-width: 860px) { .team-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) {
  .team-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem 1rem; }
  /* Phones: the lineup is shown as two rows (team-row1 + team-row2), same scale, centred, on white. */
  .hero-figure { background: #fff; }
  .hero-figure img { width: 96%; }
  .hero-figure .hero-row2 { display: block; }
  /* 78.1% = 96% x (1390 / 1709): row 2 people at the same scale as row 1, centred */
  .hero-figure .hero-row2 img { display: block; width: 78.1%; margin: 0.25rem auto 0; }
  .facts-grid, .steps, .service-list { grid-template-columns: 1fr; }
  .fact, .fact + .fact { padding: 1.25rem 0; border-left: 0; }
  .fact + .fact { border-top: 1px solid var(--line); }
  .doctor { grid-template-columns: minmax(0, 1fr); }
  .doctor img { max-width: 20rem; }
  .service-detail { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }

}

@media (max-width: 480px) {
  .brand img { height: 2.25rem; }
  .header-call .label-short { display: none; }
  .header-call { padding-inline: 0.8rem; }
  .header-inner { gap: 0.5rem; }
  .hero-actions .btn { flex: 1 1 100%; }
}

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

@media print {
  .site-header, .cta, .site-footer, .nav-toggle { display: none; }
}

@media (min-width: 961px) and (max-width: 1120px) {
  .brand img { height: 2.75rem; }
  .nav-list a { padding-inline: 0.5rem; }
}

@media (max-width: 400px) {
  .brand img { height: 2rem; }
}
/* Smallest phones (and 400% zoom): keep logo, Call and Menu on one row without sideways scrolling */
@media (max-width: 360px) {
  .brand img { height: 1.75rem; }
  .nav-toggle { padding-inline: 0.6rem; }
  .header-call { padding-inline: 0.7rem; }
}
