/* ---- Design tokens ---- */
:root {
  --green: #2f5d4f;
  --green-dark: #24483d;
  --cream: #fbfaf7;
  --ink: #1c2b26;
  --rule: #e3e0d8;
  --ridge-back: #dfe7e0;
  --ridge-mid: #a8c0b2;

  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --maxw: 1080px;
  --pad: 24px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.14; margin: 0; }

a { color: var(--green); }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--pad);
}

/* Visible focus for keyboard users, everywhere. */
:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}

/* ---- Header ---- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px var(--pad);
  border-bottom: 1px solid var(--rule);
  max-width: var(--maxw);
  margin: 0 auto;
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--serif);
  font-size: 21px;
  color: var(--ink);
  text-decoration: none;
}
.wordmark svg { color: var(--green); flex: none; }
.header-tel {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .03em;
  color: var(--green);
  text-decoration: none;
  white-space: nowrap;
}

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--rule);
  margin-top: 72px;
  padding: 32px var(--pad) 40px;
  font-size: 14px;
  color: color-mix(in srgb, var(--ink) 65%, transparent);
  text-align: center;
}
.site-footer p { margin: 4px 0; }

/* ---- Hero ---- */
.hero-inner { padding-top: 64px; text-align: center; }

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--green);
  margin: 0 0 18px;
}
.hero h1 {
  font-size: clamp(32px, 6vw, 52px);
  max-width: 17ch;
  margin: 0 auto 20px;
}
.hero-lede {
  max-width: 52ch;
  margin: 0 auto 30px;
  color: color-mix(in srgb, var(--ink) 78%, transparent);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 0; }

.btn-primary, .btn-secondary {
  display: inline-block;
  padding: 15px 32px;
  border-radius: 2px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .03em;
  text-decoration: none;
}
.btn-primary { background: var(--green); color: var(--cream); border: 1px solid var(--green); }
.btn-primary:hover { background: var(--green-dark); border-color: var(--green-dark); }
.btn-secondary { background: transparent; color: var(--green); border: 1px solid #c9c4b6; }
.btn-secondary:hover { border-color: var(--green); }

/* Ridgeline: fills the space a hero photo would occupy. */
.ridge { display: block; width: 100%; height: 150px; margin-top: 44px; }

.icon-band { background: var(--green); color: var(--cream); margin-top: -1px; }
.icon-band-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px 44px;
  list-style: none;
  margin: 0;
  padding-block: 22px 24px;
}
.icon-band-list li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

@media (max-width: 640px) {
  .hero-inner { padding-top: 40px; }
  .ridge { height: 88px; margin-top: 32px; }
  .icon-band-list { gap: 16px 28px; }
  .hero-actions .btn-primary, .hero-actions .btn-secondary { flex: 1 1 auto; text-align: center; }
}

/* ---- Section headings ---- */
.section-heading {
  font-size: clamp(24px, 3.4vw, 32px);
  text-align: center;
  margin: 0 0 32px;
}

/* ---- Reviews ---- */
.reviews { padding-top: 64px; }

.quote { margin: 0 0 28px; text-align: center; }
.quote blockquote {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(19px, 2.6vw, 25px);
  line-height: 1.45;
  margin: 0 auto 14px;
  max-width: 46ch;
}
.quote blockquote::before { content: "\201C"; }
.quote blockquote::after { content: "\201D"; }
.quote figcaption {
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  /* 65%, not the 55% a plain "muted caption" might suggest — 55% fails
     WCAG AA contrast (3.48:1) against the cream background; 65% matches
     the footer's already-verified mix (4.66:1). */
  color: color-mix(in srgb, var(--ink) 65%, transparent);
}

/* Carousel mode is opt-in: without JS the quotes above simply stack. */
.js-carousel .carousel-viewport {
  display: grid;
  min-height: 220px;
  align-items: center;
}
.js-carousel .quote {
  grid-area: 1 / 1;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity .45s ease;
}
.js-carousel .quote[data-active] { opacity: 1; visibility: visible; }

/* :not([hidden]) matters: a bare .carousel-controls{display:flex} rule has
   the same specificity as the UA stylesheet's [hidden]{display:none} and,
   being an author rule, would win the cascade — showing dead controls
   with JS disabled even though the "hidden" attribute is still set. */
.carousel-controls:not([hidden]) {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 26px;
}
.carousel-prev, .carousel-next {
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--green);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 16px;
  cursor: pointer;
}
.carousel-prev:hover, .carousel-next:hover { border-color: var(--green); }

.carousel-dots { display: flex; gap: 8px; }
.carousel-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--green);
  background: transparent;
  cursor: pointer;
}
.carousel-dots button[aria-selected="true"] { background: var(--green); }

@media (prefers-reduced-motion: reduce) {
  .js-carousel .quote { transition: none; }
}

/* ---- Twenty-year case ---- */
.case { padding-top: 72px; }
.case-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
}
.case-list h3 { font-size: 20px; margin-bottom: 8px; color: var(--green); }
.case-list p { margin: 0; color: color-mix(in srgb, var(--ink) 78%, transparent); }

/* ---- Lineup ---- */
.lineup { padding-top: 72px; }
.lineup-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 28px;
}
.lineup-grid li { border-top: 1px solid var(--rule); padding-top: 16px; }
.lineup-grid svg { color: var(--green); display: block; margin-bottom: 10px; }
.lineup-grid h3 { font-size: 18px; margin-bottom: 6px; }
.lineup-grid p {
  margin: 0;
  font-size: 15px;
  color: color-mix(in srgb, var(--ink) 70%, transparent);
}
.lineup-cta { text-align: center; margin-top: 40px; font-size: 17px; }

/* Photo drop-in: fixed ratio means adding an image shifts nothing. */
.photo-slot {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 3px;
  margin-top: 40px;
}

/* ---- Visit ---- */
.visit { padding-top: 72px; }
.visit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 34px;
}
.visit-grid h3 {
  font-size: 12px;
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 10px;
}
.visit-grid p { margin: 0 0 12px; }
.visit-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---- Mobile call bar ---- */
.call-bar { display: none; }

@media (max-width: 640px) {
  .call-bar {
    display: grid;
    grid-template-columns: 2fr 1fr;
    position: fixed;
    inset: auto 0 0 0;
    z-index: 10;
    background: var(--green);
    /* Would clear the iOS home indicator if the viewport meta tag set
       viewport-fit=cover; it doesn't, so this currently resolves to 0. */
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  .call-bar a {
    padding: 15px 8px;
    text-align: center;
    color: var(--cream);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: .03em;
  }
  .call-bar a + a { border-left: 1px solid color-mix(in srgb, var(--cream) 30%, transparent); }

  /* Stop the fixed bar covering the end of the page. */
  .site-footer { padding-bottom: 96px; }

  /* The header phone number is redundant once the call bar is present. */
  .header-tel { display: none; }
}
