/* ==========================================================================
   Town of Alder Hollow, NC — sample town website (fictional)
   Template by ModernWeb — Chicha Technology, LLC

   Palette (contrast measured with the WCAG relative-luminance formula)
     Ink    #1E2420 on Paper #FBF7EF   14.8:1
     Muted  #4A524C on Paper #FBF7EF    7.6:1   on Sand #F1E9D6  6.7:1
     White  on Pine  #1C3B2F           12.2:1
     Brass  #E9C46A  on Pine #1C3B2F    7.3:1   on Deep #14291F  9.2:1
     White  on Brick #9A3B26            6.9:1
     Brick  #9A3B26  on Paper #FBF7EF   6.5:1   on Sand #F1E9D6  5.7:1
     Focus  #0055CC  on Paper #FBF7EF   6.2:1   on Sand #F1E9D6  5.5:1

   Fonts: Newsreader (headings) and Public Sans (text), SIL OFL, self-hosted.
   ========================================================================== */

@font-face {
  font-family: "Newsreader";
  src: url("/templates/town-nc/fonts/newsreader-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("/templates/town-nc/fonts/newsreader-latin-wght-italic.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("/templates/town-nc/fonts/public-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #FBF7EF;
  --sand: #F1E9D6;
  --line: #D8CDB3;
  --ink: #1E2420;
  --muted: #4A524C;
  --pine: #1C3B2F;
  --deep: #14291F;
  --pine-2: #2B5A45;
  --brick: #9A3B26;
  --brick-dark: #7A2C1A;
  --brass: #E9C46A;
  --focus: #0055CC;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --shadow: 0 1px 2px rgba(30, 36, 32, .08), 0 8px 24px rgba(30, 36, 32, .08);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 1rem; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 .6em; color: var(--pine); letter-spacing: -.01em; }
h1 { font-size: clamp(2.5rem, 5.4vw, 4.1rem); font-weight: 600; letter-spacing: -.02em; line-height: 1.05; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
a { color: var(--brick); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; color: var(--brick-dark); }
address { font-style: normal; margin-bottom: 1em; }
a[href^="tel:"] { white-space: nowrap; }
ul, ol { padding: 0; margin: 0; }

.container { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Focus */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 3px; }
.section-dark :focus-visible, .site-footer :focus-visible, .btn-primary:focus-visible { outline-color: var(--brass); }
.btn-primary:focus-visible { outline-color: var(--focus); box-shadow: 0 0 0 3px #fff; }
main:focus { outline: none; }

/* Skip link */
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 10000;
  background: var(--pine); color: #fff; padding: .85rem 1.25rem; font-weight: 700;
  border-radius: 0 0 8px 8px; text-decoration: none; transition: top .15s;
}
.skip-link:focus { top: 0; outline: 3px solid var(--brass); outline-offset: 2px; }

/* Alert bar */
.alert-bar { background: var(--brass); color: var(--ink); }
.alert-inner { display: flex; align-items: center; gap: .85rem; padding: .7rem 0; }
.alert-inner svg { flex: none; }
.alert-text { margin: 0; font-size: .95rem; line-height: 1.45; flex: 1; }
.alert-text a { color: var(--ink); font-weight: 600; }
.alert-text a:hover { color: var(--ink); }
.alert-dismiss {
  flex: none; width: 44px; height: 44px; display: grid; place-items: center;
  background: transparent; border: 2px solid transparent; border-radius: 8px; color: var(--ink); cursor: pointer;
}
.alert-dismiss:hover { background: rgba(30, 36, 32, .12); }
.alert-bar[hidden] { display: none; }

/* Utility row */
.utility { background: var(--pine); color: #fff; font-size: .9rem; }
.utility :focus-visible { outline-color: var(--brass); }
.utility-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 44px; }
.utility p { margin: 0; }
.utility a { color: #fff; text-underline-offset: .2em; }
.utility a:hover { color: var(--brass); }
.utility-hours a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 .25rem; }
.utility-es { font-weight: 600; display: inline-flex; align-items: center; min-height: 44px; padding: 0 .25rem; }

/* Header */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 1rem 0; }
.brand { display: inline-flex; align-items: center; gap: .9rem; text-decoration: none; color: var(--pine); }
.brand:hover { color: var(--pine); }
.seal { flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-small { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.brand-name { font-family: var(--serif); font-size: 2rem; font-weight: 600; letter-spacing: -.02em; margin: .1rem 0; }

.primary-nav ul { list-style: none; display: flex; gap: .25rem; flex-wrap: wrap; justify-content: flex-end; }
.primary-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 .85rem; border-radius: 8px;
  text-decoration: none; color: var(--ink); font-weight: 600; font-size: .98rem;
}
.primary-nav a:hover { background: var(--sand); color: var(--pine); box-shadow: inset 0 -3px 0 var(--brick); }

.nav-toggle {
  display: none; align-items: center; gap: .5rem; min-height: 48px; padding: 0 1rem;
  background: var(--paper); color: var(--pine); border: 2px solid var(--pine); border-radius: 8px;
  font: 700 1rem var(--sans); cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: .7rem 1.5rem;
  border-radius: 8px; font: 700 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer; border: 2px solid transparent;
  transition: background .15s, color .15s, transform .15s;
}
.btn-primary { background: var(--brick); color: #fff; }
.btn-primary:hover { background: var(--brick-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--pine); border-color: var(--pine); }
.btn-ghost:hover { background: var(--pine); color: #fff; }

/* Hero */
.hero {
  position: relative;
  padding: 3.5rem 0 7rem;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='400' viewBox='0 0 600 400' fill='none' stroke='%23D8CDB3' stroke-width='1'%3E%3Cpath d='M-20 300C80 240 140 330 240 280S400 200 480 250 620 300 640 260'/%3E%3Cpath d='M-20 330C80 270 140 360 240 310S400 230 480 280 620 330 640 290'/%3E%3Cpath d='M-20 360C80 300 140 390 240 340S400 260 480 310 620 360 640 320'/%3E%3Cpath d='M-20 270C80 210 140 300 240 250S400 170 480 220 620 270 640 230'/%3E%3Cpath d='M-20 240C80 180 140 270 240 220S400 140 480 190 620 240 640 200'/%3E%3C/svg%3E") center bottom / 900px auto repeat-x,
    linear-gradient(180deg, var(--sand) 0%, var(--paper) 100%);
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; }
.eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--brick); margin: 0 0 .9rem; }
.eyebrow-light { color: var(--brass); }
.hero h1 { margin-bottom: .5em; max-width: 17ch; }
.lede { font-size: 1.25rem; line-height: 1.55; color: var(--muted); max-width: 34rem; margin-bottom: 1.75rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-bottom: 2.25rem; }
.hero-facts { display: flex; gap: 2.25rem; margin: 0; padding-top: 1.25rem; border-top: 1px solid var(--line); flex-wrap: wrap; }
.hero-facts div { display: flex; flex-direction: column-reverse; }
.hero-facts dt { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.hero-facts dd { margin: 0; font-family: var(--serif); font-size: 1.9rem; font-weight: 600; color: var(--pine); line-height: 1.1; }

.hero-art {
  position: relative; aspect-ratio: 520 / 620; max-height: 560px; width: 100%; justify-self: end; max-width: 470px;
  border-radius: 235px 235px 14px 14px; overflow: hidden; box-shadow: var(--shadow); border: 6px solid var(--paper);
  outline: 1px solid var(--line);
}
.hero-art svg { display: block; width: 100%; height: 100%; }

/* Quick tiles */
.quick { position: relative; z-index: 2; margin-top: -4.75rem; }
.tiles { list-style: none; display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; }
.tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: .25rem; height: 100%; min-height: 44px;
  padding: 1.15rem 1.1rem 1.1rem; background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--brick);
  border-radius: 10px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.tile svg { color: var(--pine); margin-bottom: .45rem; }
.tile-label { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; line-height: 1.15; color: var(--pine); }
.tile-hint { font-size: .86rem; line-height: 1.35; color: var(--muted); }
.tile:hover { transform: translateY(-3px); border-top-color: var(--pine); color: var(--ink); }
.tile:hover .tile-label { text-decoration: underline; text-underline-offset: .15em; }

/* Sections */
.section { padding: 5rem 0; }
.section-alt { background: var(--sand); }
.section-intro { font-size: 1.15rem; color: var(--muted); max-width: 44rem; }
.section-dark .section-intro { color: #C9D8CF; }
.two-col-top { align-items: start; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.75rem; margin-top: 2rem; }
.section > .container > h2 { margin-bottom: 1.5rem; }
.section > .container > .eyebrow + h2 { margin-top: 0; }

/* Meeting */
.meeting-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 2rem; align-items: start; }
.agenda-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 2rem; box-shadow: var(--shadow); }
.agenda-head { display: flex; gap: 1.5rem; align-items: flex-start; padding-bottom: 1.25rem; border-bottom: 1px solid var(--line); margin-bottom: 1.25rem; }
.agenda-date {
  flex: none; margin: 0; width: 92px; text-align: center; background: var(--pine); color: #fff; border-radius: 10px;
  padding: .6rem .4rem .7rem; display: flex; flex-direction: column; line-height: 1;
}
.agenda-month { font-size: .85rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; color: var(--brass); }
.agenda-day { font-family: var(--serif); font-size: 3rem; font-weight: 600; margin: .15rem 0; }
.agenda-year { font-size: .8rem; letter-spacing: .12em; }
.agenda-head h3 { margin-bottom: .35rem; }
.agenda-when { margin: 0 0 .5rem; font-weight: 600; }
.agenda-note { margin: 0; font-size: .9rem; color: var(--muted); }
.agenda-sub { margin-bottom: .5rem; }
.agenda-list { list-style: none; counter-reset: item; }
.agenda-list li { counter-increment: item; display: grid; grid-template-columns: 3.5rem 1fr; gap: .75rem; padding: .6rem 0; border-top: 1px solid var(--line); }
.agenda-list li:first-child { border-top: 0; }
.agenda-time { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--brick); }
.meeting-side h3 { font-size: 1.25rem; }
.meeting-list { list-style: none; margin-bottom: 1.75rem; }
.meeting-list li { padding: .75rem 0; border-top: 1px solid var(--line); }
.meeting-list strong { display: block; }
.meeting-list li:last-child { border-bottom: 1px solid var(--line); }


/* Services */
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.service { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 1.75rem; border-left: 5px solid var(--pine-2); }
.service h3 { margin-bottom: .6rem; }
.service p:last-child { margin-bottom: 0; }

/* Panels / forms */
.panel { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 2rem; box-shadow: var(--shadow); }
.check-list { list-style: none; margin: 0 0 1.5rem; }
.check-list li { position: relative; padding: .4rem 0 .4rem 1.9rem; }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: .75rem; width: 1.15rem; height: .6rem;
  border-left: 3px solid var(--pine-2); border-bottom: 3px solid var(--pine-2); transform: rotate(-45deg) scale(.9);
}
.form { display: grid; gap: 1rem; }
.field label { display: block; font-weight: 700; margin-bottom: .35rem; }
.optional { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: .7rem .85rem; font: inherit; color: var(--ink);
  background: #fff; border: 2px solid #6B7A70; border-radius: 8px;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-color: var(--focus); }
.billing-note { padding: .9rem 1.1rem; background: var(--sand); border-radius: 8px; font-size: .96rem; }
.form-status { min-height: 1.5em; margin: .9rem 0 0; font-weight: 600; color: var(--pine); }
.form-status:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.form-note { margin: 0; padding: .7rem .9rem; background: var(--sand); border-left: 4px solid var(--pine-2); border-radius: 6px; font-size: .95rem; line-height: 1.5; color: var(--ink); }
.req { color: var(--brick); }
.field-error { margin: .4rem 0 0; font-size: .95rem; font-weight: 700; line-height: 1.4; color: var(--brick-dark); }
.field-error::before { content: "Error: "; }
.field input[aria-invalid="true"], .field select[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--brick-dark); border-width: 3px; background: #FFF6F2; }
.form .form-status { margin: 0; }

/* Open government */
.section-dark { background: var(--pine); color: #fff; }
.section-dark h2 { color: #fff; }
.law-card { background: var(--deep); border: 1px solid #2E5444; border-radius: 14px; padding: 2rem; }
.law-card h3 { color: var(--brass); margin-bottom: .25rem; }
.law-cite { color: #C9D8CF; font-size: .95rem; margin-bottom: 1.1rem; font-weight: 600; }
.plain-list { list-style: none; }
.plain-list li { position: relative; padding: .5rem 0 .5rem 1.4rem; }
.plain-list li::before { content: ""; position: absolute; left: 0; top: 1.05rem; width: .5rem; height: .5rem; border-radius: 50%; background: var(--brass); }
.law-card .plain-list li { color: #fff; }
.section-dark a { color: var(--brass); }
.section-dark a:hover { color: #fff; }
.legal-note { margin: 1.75rem 0 0; font-size: .92rem; color: #C9D8CF; max-width: 48rem; }

/* News */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.news-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 1.75rem; display: flex; flex-direction: column; }
.news-card h3 { font-size: 1.3rem; }
.news-card p:not(.chip) { color: var(--muted); }
.chip { align-self: flex-start; margin: 0 0 .9rem; padding: .2rem .7rem; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: var(--sand); color: var(--pine); border-radius: 999px; }
.more { margin-top: auto; display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }

/* Spanish */
.es-wrap { display: grid; grid-template-columns: .8fr 1.2fr; gap: 3rem; align-items: start; }
.es-note { margin: 0; color: var(--muted); font-style: italic; font-family: var(--serif); font-size: 1.05rem; }
.es-list li::before { background: var(--brick); }
.es-list { margin-bottom: 0; }

/* Accessibility panel */
.a11y-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 3rem; align-items: start; }
.a11y-caution { padding: 1rem 1.25rem; background: var(--sand); border-left: 4px solid var(--brick); border-radius: 0 8px 8px 0; font-size: .95rem; color: var(--ink); }
.a11y-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.a11y-list li { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--pine-2); border-radius: 10px; padding: 1.35rem 1.4rem; }
.a11y-list h3 { font-size: 1.2rem; margin-bottom: .4rem; }
.a11y-list p { margin: 0; font-size: .98rem; color: var(--muted); }
.ratio { display: inline-block; padding: 0 .4rem; border-radius: 4px; background: var(--sand); color: var(--pine); font-weight: 700; white-space: nowrap; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.contact-card { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 1.75rem; }
.contact-card h3 { margin-bottom: .6rem; }
.contact-list { list-style: none; }
.contact-list li { display: flex; flex-direction: column; padding: .55rem 0; border-top: 1px solid var(--line); }
.contact-list li:first-child { border-top: 0; padding-top: 0; }
.contact-list span { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.contact-list a { display: inline-flex; align-items: center; min-height: 32px; overflow-wrap: anywhere; }
.contact-emergency { background: var(--pine); border-color: var(--pine); color: #fff; }
.contact-emergency h3 { color: var(--brass); }
.contact-emergency a { color: var(--brass); }
.contact-emergency a:hover { color: #fff; }
.contact-emergency :focus-visible { outline-color: var(--brass); }
.big-911 { font-family: var(--serif); font-size: 4.5rem; font-weight: 600; line-height: 1; margin: 0 0 .5rem; letter-spacing: -.02em; }

/* Footer */
.site-footer { background: var(--deep); color: #E2EBE5; padding: 3rem 0; }
.footer-inner { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.footer-name { font-family: var(--serif); font-size: 1.6rem; font-weight: 600; color: #fff; margin-bottom: .4rem; }
.footer-brand p { margin: 0 0 .3rem; }
.footer-nav ul { list-style: none; display: flex; flex-direction: column; gap: .1rem; }
.footer-nav a { display: inline-flex; align-items: center; min-height: 44px; color: #fff; }
.footer-nav a:hover { color: var(--brass); }

/* Responsive */
@media (max-width: 1100px) {
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .hero-grid { gap: 2rem; }
}
@media (max-width: 900px) {
  .hero { padding: 2.5rem 0 6rem; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero h1 { max-width: none; }
  .hero-art { justify-self: stretch; max-width: none; aspect-ratio: auto; height: 260px; border-radius: 130px 130px 14px 14px; }
  .meeting-grid, .two-col, .es-wrap, .a11y-grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .service-grid, .news-grid, .contact-grid { grid-template-columns: 1fr; }
  .section { padding: 3.5rem 0; }
  .js .nav-toggle { display: inline-flex; }
  .js .primary-nav { display: none; flex-basis: 100%; }
  .js .primary-nav.open { display: block; }
  .header-inner { flex-wrap: wrap; }
  .primary-nav ul { flex-direction: column; justify-content: flex-start; margin-top: .5rem; }
  .primary-nav a { width: 100%; }
}
@media (max-width: 600px) {
  .container { width: calc(100% - 2rem); }
  .utility-hours { font-size: .82rem; display: flex; flex-direction: column; align-items: flex-start; }
  .utility-sep { display: none; }
  .brand-name { font-size: 1.6rem; }
  .seal { width: 46px; height: 46px; }
  .tiles { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
  .tile { padding: .95rem .9rem; }
  .tile-label { font-size: 1.05rem; }
  .a11y-list { grid-template-columns: 1fr; }
  .agenda-card, .panel, .law-card { padding: 1.35rem; }
  .agenda-head { flex-direction: column; gap: 1rem; }
  .agenda-list li { grid-template-columns: 3rem 1fr; }
  .hero-actions .btn { width: 100%; }
  .hero-facts { gap: 1.5rem; }
  .big-911 { font-size: 3.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .tile:hover { transform: none; }
}
@media print {
  .alert-bar, .utility, .nav-toggle, .skip-link { display: none; }
}
.utility-es { white-space: nowrap; }

/* 320 px: long words (such as email addresses) wrap instead of widening the card */
.two-col > * { min-width: 0; }
.plain-list li, .check-list li, .panel { overflow-wrap: anywhere; }
