/* Theme root */
:root {
  --bg: #F1F4EE;
  --surface: #FBFCF9;
  --text: #1C2A20;
  --muted: #4E5E52;
  --accent: #2F6B45;
  --accentText: #F1F4EE;
  --plateBg: #1C2A20;
  --plateText: #F1F4EE;
  --line: #C9D3C4;
  --fontHeading: 'Avenir Next', Avenir, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --fontBody: 'Avenir Next', Avenir, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --cardRadius: 18px;
  --buttonRadius: 999px;
  --shadowSoft: 0 1px 2px rgb(28 42 32 / .06), 0 12px 32px rgb(28 42 32 / .08);
  --sectionGap: clamp(64px, 9vw, 128px);
  --sidePad: clamp(16px, 4vw, 40px);
}

/* Base */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background-color: var(--bg);
  background-image: radial-gradient(var(--accent) 2.4px, transparent 2.5px);
  background-size: 42px 42px;
  background-blend-mode: normal;
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--fontBody);
  font-weight: 400;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; height: auto; display: block; object-fit: cover; }
h1, h2, h3 {
  font-family: var(--fontHeading);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2.4rem, 4.6vw + 0.6rem, 4.6rem); line-height: 1.08; }
h2 { font-size: clamp(1.8rem, 2.6vw + 0.8rem, 3rem); line-height: 1.15; }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; max-width: 68ch; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--text); }
ul { padding-left: 1.2em; }
:focus-visible { outline: none; }

/* Layout */
.pageWrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--sidePad); }
.pageWrap.narrow { max-width: 760px; }
.sectionBlock { padding: calc(var(--sectionGap) / 2) 0; }
#hero { padding-bottom: 96px; }
#hero + .sectionBlock { padding-top: 96px; }
.sectionTitle { margin-bottom: 12px; }
.sectionLead { color: var(--muted); max-width: 62ch; margin-bottom: 40px; }
.accentText { color: var(--accent); font-weight: 700; }
.muted { color: var(--muted); }

/* Skip link */
.skipLink {
  position: absolute; left: 12px; top: -60px;
  background: var(--plateBg); color: var(--plateText);
  padding: 12px 20px; border-radius: var(--buttonRadius);
  font-weight: 600; text-decoration: none; z-index: 60;
  transition: top 0.2s ease;
}
.skipLink:focus { top: 12px; color: var(--plateText); }

/* Announcement bar */
.announceBar {
  margin: 0; padding: 10px var(--sidePad);
  background: var(--plateBg); color: var(--plateText);
  text-align: center; font-size: 0.9rem;
}

/* Header */
.topBar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 1200px; margin: 14px auto 0; padding: 8px var(--sidePad);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--cardRadius);
  box-shadow: var(--shadowSoft);
  min-height: 64px;
}
.brandMark {
  font-family: var(--fontHeading); font-weight: 700;
  color: var(--text); text-decoration: none;
  font-size: clamp(1rem, 0.9rem + 0.6vw, 1.25rem);
  text-align: center; flex: 1 1 auto; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brandMark:hover { color: var(--text); }
.menuToggle {
  display: inline-flex; align-items: center; gap: 8px;
  background: none; border: 2px solid var(--line);
  border-radius: var(--buttonRadius); color: var(--text);
  font: inherit; font-weight: 600; min-height: 48px;
  padding: 0 18px; cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.menuToggle:hover { background: var(--text); color: var(--plateText); border-color: var(--text); }
.menuToggle:focus-visible { outline: 4px solid var(--accent); outline-offset: 2px; }
.menuToggle:active { transform: scale(0.96); }
.menuIcon {
  width: 18px; height: 2px; background: currentColor;
  box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;
  border-radius: 2px;
}
.isMenuOpen .menuIcon {
  width: 20px; height: 20px; background: transparent;
  box-shadow: none; position: relative; flex: none;
}
.isMenuOpen .menuIcon::before,
.isMenuOpen .menuIcon::after {
  content: ""; position: absolute; left: 0; top: 9px;
  width: 20px; height: 2px; border-radius: 2px; background: currentColor;
}
.isMenuOpen .menuIcon::before { transform: rotate(45deg); }
.isMenuOpen .menuIcon::after { transform: rotate(-45deg); }
.menuToggleText { display: inline; }
@media (max-width: 479px) { .menuToggleText { display: none; } }

/* Menu overlay */
.menuOverlay {
  position: fixed; inset: 0; z-index: 40;
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  padding: 120px var(--sidePad) 40px;
  opacity: 0; visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.isMenuOpen .menuOverlay { opacity: 1; visibility: visible; }
.menuList { list-style: none; margin: 0; padding: 0; text-align: center; }
.menuList li { opacity: 0; transform: translateY(16px); }
.isMenuOpen .menuList li {
  opacity: 1; transform: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.isMenuOpen .menuList li:nth-child(1) { transition-delay: 0.05s; }
.isMenuOpen .menuList li:nth-child(2) { transition-delay: 0.12s; }
.isMenuOpen .menuList li:nth-child(3) { transition-delay: 0.19s; }
.isMenuOpen .menuList li:nth-child(4) { transition-delay: 0.26s; }
.isMenuOpen .menuList li:nth-child(5) { transition-delay: 0.33s; }
.menuList li + li { margin-top: 18px; }
.menuLink {
  font-family: var(--fontHeading); font-weight: 700;
  font-size: clamp(1.6rem, 4vw + 0.6rem, 2.6rem);
  color: var(--text); text-decoration: none;
  display: inline-block; padding: 6px 14px;
  border-radius: var(--cardRadius);
  transition: background-color 0.2s ease, color 0.2s ease;
}
.menuLink:hover { background: var(--text); color: var(--plateText); }
.menuLink:focus-visible { outline: 4px solid var(--accent); outline-offset: 3px; }
.menuLink[aria-current="page"] { color: var(--accent); }

/* Buttons */
.pillButton {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 26px;
  border-radius: var(--buttonRadius);
  border: 2px solid var(--text);
  background: transparent; color: var(--text);
  font: inherit; font-weight: 600; text-decoration: none;
  cursor: pointer; white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease, border-color 0.2s ease;
}
.pillButton:hover { background: var(--text); color: var(--plateText); }
.pillButton:focus-visible { outline: 4px solid var(--accent); outline-offset: 3px; }
.pillButton:active { transform: scale(0.95); }
.pillButtonSolid { background: var(--text); border-color: var(--text); color: var(--plateText); }
.pillButtonSolid:hover { background: var(--accent); border-color: var(--accent); color: var(--accentText); }

/* Hero */
.heroGrid {
  display: grid; gap: 40px; align-items: center;
  grid-template-columns: 1fr;
}
.heroHeading { margin-bottom: 20px; }
.heroLine { display: block; }
html.isReady .heroLine {
  animation: heroRise 0.6s ease both;
}
html.isReady .heroLine:nth-child(1) { animation-delay: 0s; }
html.isReady .heroLine:nth-child(2) { animation-delay: 0.15s; }
@keyframes heroRise {
  from { transform: translateY(8px); }
  to { transform: translateY(0); }
}
.heroLead { color: var(--muted); font-size: 1.1em; max-width: 56ch; margin-bottom: 24px; }
.heroCopy .pillButton { margin-bottom: 28px; }
.heroCollage {
  display: grid; gap: 16px;
  grid-template-columns: 7fr 5fr;
  align-items: start;
}
.collageMain {
  width: 100%; aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
}
.collageSide {
  width: 100%; aspect-ratio: 3 / 4;
  border: 1px solid var(--line);
  margin-top: 8%;
}
@media (max-width: 799px) {
  .heroGrid { grid-template-columns: 1fr; }
  .heroCopy { display: flex; flex-direction: column; }
  .heroCollage { max-width: 560px; margin: 28px 0 0; }
  .darkPlate { margin-top: 20px; }
}

/* Dark plate */
.darkPlate {
  background: var(--plateBg); color: var(--plateText);
  padding: 20px 24px; border-radius: var(--cardRadius);
  max-width: 52ch;
  margin-top: 24px;
}
.darkPlate p { margin: 0; color: var(--plateText); }
.darkPlate a { color: var(--plateText); }

/* Stats strip */
.statRow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  max-width: 900px;
  margin: 0 auto;
  align-items: stretch;
}
.statIntro { text-align: center; color: var(--muted); margin: 0 auto 32px; font-size: 1rem; max-width: 32ch; }
.statPlate {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--cardRadius);
  padding: 24px 28px;
  box-shadow: var(--shadowSoft);
}
.statValue {
  font-family: var(--fontHeading); font-weight: 700;
  font-size: clamp(2.6rem, 2rem + 3vw, 4rem);
  line-height: 1; color: var(--accent);
  margin: 0 0 8px;
}
.statLabel { margin: 0; color: var(--muted); font-size: 0.95em; }

/* Cards */
.cardRow {
  display: grid; gap: 24px;
  grid-template-columns: 1fr;
}
.infoCard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--cardRadius);
  box-shadow: var(--shadowSoft);
  min-width: 0;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.infoCard:hover { transform: translateY(-6px); box-shadow: 0 2px 4px rgb(28 42 32 / .08), 0 18px 42px rgb(28 42 32 / .12); }
.cardBody { padding: 24px 28px 28px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; min-width: 0; }
.cardBody p { max-width: 56ch; line-height: 1.6; }
.cardBody h3 { margin-bottom: 10px; }
.cardBody p { max-width: none; }
.cardBody .pillButton { margin-top: 8px; width: fit-content; }
.cardPhoto {
  width: 100%; aspect-ratio: 4 / 3;
  object-fit: cover; border-bottom: 1px solid var(--line);
  border-radius: var(--cardRadius) var(--cardRadius) 0 0;
  flex: none;
}
.featureCard { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); grid-column: auto; margin-bottom: 24px; }
.cardRow .infoCard:first-child { grid-column: span 2; }
.featureCard .cardPhoto {
  aspect-ratio: auto; height: 100%; min-height: 260px;
  border-bottom: none; border-right: 1px solid var(--line);
}
@media (max-width: 767px) {
  .featureCard { grid-template-columns: 1fr; }
  .featureCard .cardPhoto { aspect-ratio: 16 / 9; height: auto; min-height: 0; border-right: none; border-bottom: 1px solid var(--line); }
}
@media (min-width: 640px) { .cardRow { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .cardRow { grid-template-columns: repeat(3, 1fr); } }

/* Segmented control */
.segmentWrap {
  display: flex; flex-wrap: wrap; gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--buttonRadius);
  padding: 8px;
  width: 100%;
  margin: 0 0 28px;
  width: fit-content; max-width: 100%;
}
.segmentTab {
  border: none; background: transparent; color: var(--text);
  font: inherit; font-weight: 600;
  min-height: 44px; padding: 0 22px;
  border-radius: var(--buttonRadius);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.segmentTab:hover { background: var(--bg); }
.segmentTab:focus-visible { outline: 4px solid var(--accent); outline-offset: 2px; }
.segmentTab.isTabActive { background: var(--text); color: var(--plateText); }

/* FAQ */
.faqList { display: grid; gap: 14px; max-width: 760px; }
.faqList details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--cardRadius);
  padding: 18px 24px;
}
.faqList summary {
  cursor: pointer; font-weight: 600; font-family: var(--fontHeading);
  list-style-position: outside;
}
.faqList summary:focus-visible { outline: 4px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.faqList p { margin: 12px 0 0; color: var(--muted); }

/* City list */
.cityList {
  list-style: none; padding: 0; margin: 0 0 24px;
  display: grid; gap: 10px 20px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  max-width: 900px;
}
.cityList li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--cardRadius);
  padding: 10px 16px;
  font-weight: 600;
}

/* Form */
.queryWrap { max-width: 720px; }
.queryForm {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--cardRadius);
  box-shadow: var(--shadowSoft);
  padding: 28px clamp(20px, 3vw, 36px);
  display: grid; gap: 20px;
}
.formField { display: grid; gap: 6px; }
.formLabel { font-weight: 600; font-size: 0.95em; }
.formInput {
  font: inherit; color: var(--text);
  background: var(--bg);
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 12px 16px;
  min-height: 48px;
  transition: border-color 0.2s ease;
}
.formInput::placeholder { color: var(--muted); }
.formInput:focus { border-color: var(--accent); }
.formInput:focus-visible { outline: 4px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.formText { min-height: 130px; resize: vertical; }
.formField.isFieldError .formInput { border-color: #8C2F24; }
.formField.isFieldError .formLabel { color: #8C2F24; }
.formCheck { display: flex; gap: 12px; align-items: flex-start; }
.formCheck input[type="checkbox"] {
  width: 22px; height: 22px; margin: 4px 0 0;
  accent-color: var(--accent); flex: none;
}
.formCheck label { font-size: 0.95em; color: var(--muted); }
.formCheck label a { color: var(--accent); }
.formNote { margin: 0; font-size: 0.9rem; color: var(--muted); }
.formSubmit { justify-self: start; }
.queryForm.isSending .formSubmit { opacity: 0.6; pointer-events: none; }

/* Prose (policies, terms, text pages) */
.prose { max-width: 68ch; }
.prose h1 { font-size: clamp(2rem, 3vw + 1rem, 3.2rem); }
.prose h2 { font-size: clamp(1.4rem, 1.2vw + 1rem, 1.9rem); margin-top: 2em; }
.prose h3 { font-size: 1.25rem; margin-top: 1.6em; }
.prose p, .prose li { color: var(--text); }
.prose ul, .prose ol { margin: 0 0 1em; }
.prose table {
  border-collapse: collapse; width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--cardRadius);
  overflow: hidden;
  margin: 0 0 1.5em;
}
.prose th, .prose td {
  text-align: left; padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.prose th { font-family: var(--fontHeading); font-weight: 700; background: var(--bg); }
.prose tr:last-child td { border-bottom: none; }
.prose summary {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--cardRadius);
  padding: 16px 22px; margin-bottom: 12px;
  font-weight: 600; font-family: var(--fontHeading);
  cursor: pointer;
}
.pageHead { padding-top: 24px; }
.pageHead h1 { margin-bottom: 16px; }
.pageLead { color: var(--muted); font-size: 1.1em; max-width: 60ch; margin-bottom: 40px; }

/* Contact block */
.contactBlock {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--cardRadius);
  box-shadow: var(--shadowSoft);
  padding: 28px clamp(20px, 3vw, 36px);
  max-width: 720px;
}
.contactList { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.contactList li span { display: inline-block; min-width: 96px; font-weight: 600; color: var(--muted); }

/* Confirmation and 404 */
.confirmBox, .missingBox {
  background: var(--plateBg); color: var(--plateText);
  border-radius: var(--cardRadius);
  padding: 36px clamp(24px, 4vw, 48px);
  max-width: 760px;
}
.confirmBox h1, .missingBox h1 { color: var(--plateText); }
.confirmBox p, .missingBox p { color: var(--plateText); }
.confirmBox a, .missingBox a { color: var(--plateText); text-decoration: underline; }
.confirmLinks { list-style: none; padding: 0; display: grid; gap: 10px; }
.missingCode {
  font-family: var(--fontHeading); font-weight: 700;
  font-size: clamp(4rem, 10vw, 7rem); line-height: 1;
  color: var(--accent); margin: 0 0 16px;
}

/* Footer */
.siteFooter {
  background: var(--surface);
  border-top: 1px solid var(--line);
  margin-top: var(--sectionGap);
  padding: 48px 0 32px;
}
.footerGrid {
  max-width: 1200px; margin: 0 auto;
  padding: 0 var(--sidePad);
  display: grid; gap: 40px;
  grid-template-columns: 1fr;
}
.footerLinks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footerLinks a { color: var(--text); text-decoration: none; }
.footerLinks a:hover { color: var(--accent); text-decoration: underline; }
.footerTitle { font-size: 1.15rem; margin-bottom: 14px; }
.footerContacts ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footerContacts a { color: var(--text); }
.footerContacts li span { font-weight: 600; color: var(--muted); margin-right: 6px; }
.footerOwner address { font-style: normal; color: var(--muted); }
.footerOwner address p { margin: 0 0 10px; max-width: 40ch; }
.footerCopy {
  max-width: 1200px; margin: 32px auto 0;
  padding: 16px var(--sidePad) 0;
  border-top: 1px solid var(--line);
  color: var(--muted); font-size: 0.9rem;
}
@media (min-width: 768px) { .footerGrid { grid-template-columns: 2fr 1fr 1.4fr; } }

/* Reveal */
html.isReady .revealBox { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
html.isReady .revealBox.isShown { opacity: 1; transform: none; }
html.isReady .isShown .sectionTitle,
html.isReady .isShown h2.sectionTitle { opacity: 1; }

/* Utility */
.textNarrow { max-width: 760px; }

/* Breakpoints */
@media (max-width: 479px) {
  .statRow { grid-template-columns: 1fr; gap: 16px; }
  .statIntro { margin: 0 auto 24px; }
  .statValue { font-size: 3rem; }
  .statPlate { padding: 24px 20px; min-width: 0; }
  .darkPlate { max-width: none; }
  .pageWrap, .topBar { padding-left: clamp(20px, 6vw, 24px); padding-right: clamp(20px, 6vw, 24px); }
}
@media (min-width: 480px) {
  .statPlate { min-width: 240px; }
}
@media (min-width: 800px) {
  .heroGrid { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 48px; }
}
@media (min-width: 1024px) {
  .sectionBlock { padding: var(--sectionGap) 0; }
}
@media (min-width: 1280px) {
  .pageWrap { max-width: 1200px; }
  .heroCollage { gap: 20px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html.isReady .revealBox { opacity: 1; transform: none; }
  html.isReady .heroLine { animation: none; }
  .menuList li { opacity: 1; transform: none; }
}

@media (max-width: 799px) {
  .heroCollage { max-width: 100%; }
}
@media (min-width: 640px) and (max-width: 767px) {
  .cardRow .infoCard:first-child { grid-column: span 2; }
}

/* Card overflow fixes */
.cardBody p { overflow-wrap: break-word; }
.cardBody h3 { overflow-wrap: break-word; }
@media (max-width: 767px) {
  .featureCard .cardPhoto { border-radius: var(--cardRadius) var(--cardRadius) 0 0; }
}
@media (min-width: 768px) {
  .cardRow .featureCard { grid-column: span 2; }
  .featureCard .cardPhoto { border-radius: var(--cardRadius) 0 0 var(--cardRadius); }
}

/* Open menu layering */
.isMenuOpen .topBar { z-index: 60; }
.isMenuOpen .menuToggle { border-color: var(--text); }
@media (max-height: 620px) {
  .menuOverlay { padding: 100px var(--sidePad) 24px; align-items: flex-start; }
  .menuList li + li { margin-top: 12px; }
  .menuLink { font-size: clamp(1.4rem, 3vw + 0.6rem, 2rem); padding: 4px 12px; }
}
