/* Fonts and tokens.css are loaded via <link> in partials/head.php —
   do NOT @import them here (avoids render-blocking duplicate requests). */

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

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

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  /* Soft, on-brand ambient glows behind the page — airy depth for plain white
     sections without looking busy. Shows through transparent .section; the
     opaque .section--warm / .section--navy cover it. Tune the alpha values to
     taste (higher = more visible). */
  background-color: var(--paper);
  background-image:
    radial-gradient(900px 620px at 100% 0%,   rgba(127,179,213,0.16), transparent 62%),
    radial-gradient(820px 600px at 0% 26%,    rgba(59,110,165,0.09),  transparent 58%),
    radial-gradient(1000px 740px at 75% 102%, rgba(127,179,213,0.13), transparent 62%);
  background-attachment: fixed;
  background-repeat: no-repeat;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--brand-blue); }
a:hover { color: var(--brand-navy); }

/* ── Typography ──────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--brand-navy);
  line-height: 1.2;
}
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.125rem; }
p  { color: var(--ink-soft); max-width: 68ch; }

/* ── Layout helpers ──────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(3rem, 8vw, 5rem);
}

/* Cohesive on-brand section washes — cover both the .section--warm/--navy
   classes AND the inline `background:var(--paper-warm/--brand-navy)` heroes used
   on every page, so the whole site gets gentle depth instead of flat blocks. */
.section--warm,
section[style*="--paper-warm"] {
  background: linear-gradient(155deg, #FBF8F3 0%, #FAF7F2 32%, #E9F0F8 100%) !important;
}
.section--navy,
section[style*="--brand-navy"] {
  background: linear-gradient(160deg, #1E3A5F 0%, #16314F 100%) !important;
  color: #fff;
}
.section--navy h2, .section--navy h3 { color: #fff; }
.section--navy p { color: rgba(255,255,255,0.8); }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn-primary, .btn-secondary, .btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 0.75rem 1.5rem;
  white-space: nowrap;
  line-height: 1.15;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease), background var(--duration);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--brand-blue);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--brand-navy);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-secondary {
  background: transparent;
  color: var(--brand-blue);
  border: 2px solid var(--brand-blue);
}
.btn-secondary:hover {
  background: var(--brand-blue);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.5);
}
.btn-outline:hover {
  border-color: #fff;
  background: rgba(255,255,255,0.1);
}

/* ── Header ──────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  min-height: 72px;
  padding-block: 0.5rem;
}

.site-header__logo { flex-shrink: 0; }
.site-header__logo img { height: 44px; width: auto; }
.site-header__logo a { display: block; }

.site-nav { display: flex; align-items: center; gap: var(--sp-1); margin-left: auto; }

.site-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: color var(--duration), background var(--duration);
}
.site-nav a:hover, .site-nav a.active {
  color: var(--brand-blue);
  background: rgba(59,110,165,0.06);
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-left: var(--sp-3);
}

.site-header__phone {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  white-space: nowrap;
}
.site-header__phone:hover { color: var(--brand-blue); }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: var(--sp-2);
  cursor: pointer;
  color: var(--ink);
}

/* ── Footer ──────────────────────────────────────────────────── */
.site-footer {
  background: var(--brand-navy);
  color: rgba(255,255,255,0.85);
  padding-top: var(--sp-16);
  padding-bottom: var(--sp-8);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--sp-8);
  margin-bottom: var(--sp-10);
}

.site-footer__col-title {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-sky);
  margin-bottom: var(--sp-4);
}

.site-footer a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  transition: color var(--duration);
}
.site-footer a:hover { color: #fff; }

.site-footer__links { list-style: none; }
.site-footer__links li { margin-bottom: var(--sp-2); }
.site-footer__links a { font-size: 0.9375rem; }

.site-footer__logo { margin-bottom: var(--sp-4); }
.site-footer__logo img { height: 40px; opacity: 0.9; }
.site-footer__tagline { font-size: 0.875rem; color: rgba(255,255,255,0.6); }

.site-footer__social { display: flex; gap: var(--sp-3); margin-top: var(--sp-4); }
.site-footer__social a { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; background: rgba(255,255,255,0.08); border-radius: 50%; transition: background var(--duration); }
.site-footer__social a:hover { background: var(--brand-blue); }
.site-footer__social svg { width: 16px; height: 16px; fill: #fff; }

/* Footer credit row */
.footer-credit {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0 8px;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 24px;
  font-size: 0.75rem;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
}

.footer-credit__brand a {
  color: var(--ink-faint);
  text-decoration: none;
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.footer-credit__brand a:hover { color: var(--brand-sky); }
.footer-credit__brand svg { width: 10px; height: 10px; opacity: 0.6; transition: opacity 0.2s ease; }
.footer-credit__brand a:hover svg { opacity: 1; }

/* ── Hours table ─────────────────────────────────────────────── */
.hours-table { border-collapse: collapse; font-size: 0.9375rem; }
.hours-table td { padding: var(--sp-1) var(--sp-3) var(--sp-1) 0; }
.hours-table td:first-child { font-weight: 500; min-width: 110px; }
.hours-table tr.closed td { color: var(--ink-faint); }
/* Footer hours — compact so split-shift times fit the narrow footer column */
.site-footer .hours-table { font-size: 0.8125rem; }
.site-footer .hours-table td { padding-block: 1px; }
.site-footer .hours-table td:first-child { min-width: 76px; }

/* ── Cards ───────────────────────────────────────────────────── */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--duration) var(--ease), transform var(--duration) var(--ease);
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

/* ── Review card ─────────────────────────────────────────────── */
.review-card { display: flex; flex-direction: column; gap: var(--sp-3); }
.review-card .stars { color: var(--success); font-size: 1.1rem; letter-spacing: 1px; }
.review-card__text { font-style: italic; color: var(--ink-soft); flex: 1; }
.review-card__author { font-weight: 500; color: var(--ink); font-size: 0.875rem; }
.review-card__source { font-size: 0.75rem; color: var(--ink-faint); }

/* ── Grid helpers ────────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-6); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-6); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-5); }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--sp-6); }

/* ── NAP block ───────────────────────────────────────────────── */
.nap-block { font-style: normal; line-height: 1.8; }
.nap-block a { color: inherit; }

/* ── Sticky mobile CTA ───────────────────────────────────────── */
.sticky-mobile-cta {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 90;
  background: var(--brand-navy);
  padding: var(--sp-3) var(--sp-4);
  gap: var(--sp-3);
  box-shadow: 0 -2px 12px rgba(0,0,0,0.15);
}
.sticky-mobile-cta a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1rem;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.9375rem;
  text-decoration: none;
}
.sticky-mobile-cta svg { width: 17px; height: 17px; }
.sticky-mobile-cta__call { background: rgba(255,255,255,0.12); color: #fff; }
.sticky-mobile-cta__book { background: var(--brand-blue); color: #fff; }

/* ── Responsive ──────────────────────────────────────────────── */
/* Full horizontal nav only when there's room for all 8 links + phone + button;
   below this the hamburger takes over (prevents cramped two-line wrapping). */
@media (max-width: 1180px) {
  .site-nav { display: none; }
  .site-nav.open { display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--paper); border-bottom: 1px solid var(--line); padding: var(--sp-4); box-shadow: var(--shadow); }
  .nav-toggle { display: block; }
  /* With the nav collapsed, push actions + toggle to the right edge */
  .site-header__actions { margin-left: auto; }
}
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .site-header__phone { display: none; }
  .sticky-mobile-cta { display: flex; }
  body { padding-bottom: 72px; }
}

/* Keep the wordmark from crowding the Book Now button on small phones */
@media (max-width: 560px) {
  .site-header__inner { gap: var(--sp-3); }
  .site-header__logo .brand-logo { height: 34px; }
}

/* ── Content + sidebar layout (service & condition pages) ────────
   Replaces inline `grid-template-columns:1fr 280px` which did NOT
   collapse on mobile and caused horizontal overflow. */
.content-sidebar {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: clamp(2rem, 4vw, 3rem);
  align-items: start;
}
@media (max-width: 860px) {
  .content-sidebar { grid-template-columns: 1fr; }
  .content-sidebar > aside { position: static !important; top: auto !important; }
}

/* ── Skip link (accessibility / keyboard) ───────────────────────── */
.skip-link {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus {
  position: fixed;
  top: 0; left: 0;
  width: auto; height: auto;
  margin: 0; padding: 0.75rem 1.25rem;
  clip: auto; clip-path: none;
  overflow: visible;
  z-index: 1000;
  background: var(--brand-navy);
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 0 0 var(--radius) 0;
  outline: 3px solid var(--brand-sky);
}

/* ── Brand logo (inline SVG, theme-aware via currentColor) ───────── */
.brand-logo { display: block; height: 44px; width: auto; }
.brand-logo svg { height: 100%; width: auto; display: block; }
.site-header__logo .brand-logo { color: var(--brand-navy); }
.site-footer__logo .brand-logo { height: 40px; color: #fff; }

/* ── Homepage hero media ─────────────────────────────────────────
   Branded, intentional-looking frame whether or not a photo is set. */
.hero-media {
  border-radius: var(--radius-lg);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: linear-gradient(135deg, var(--brand-sky) 0%, var(--brand-blue) 100%);
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 60%; }
.hero-media__placeholder {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 0.5rem; color: #fff; text-align: center; padding: 1.5rem;
}
.hero-media__placeholder svg { width: 56px; height: 56px; opacity: 0.9; }
.hero-media__placeholder span { font-size: 0.875rem; opacity: 0.85; }

/* Slightly stronger small-print contrast (WCAG) */
.site-footer__tagline { color: rgba(255,255,255,0.72); }
