/*
 * Modern Minimal — Cedar County demo template.
 * Clean 2020s civic redesign: lots of whitespace, calm teal accent, slate text,
 * rounded cards, soft shadows. Hand-written vanilla CSS only, no frameworks.
 */

/* ---------- Design tokens ---------- */
:root {
  --bg:        #f7f9fb;   /* near-white page */
  --surface:   #ffffff;   /* cards / panels */
  --ink:       #1e293b;   /* slate text */
  --ink-soft:  #475569;   /* secondary text */
  --muted:     #64748b;   /* tertiary / captions */
  --line:      #e2e8f0;   /* hairline borders */
  --accent:    #0d9488;   /* calm teal */
  --accent-dk: #0f766e;
  --accent-sf: #ecfdf9;   /* tinted teal wash */
  --ring:      rgba(13, 148, 136, 0.28);

  --radius:    14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 6px 18px rgba(15, 23, 42, 0.07);
  --shadow-lg: 0 18px 48px rgba(15, 23, 42, 0.10);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --maxw: 1120px;
}

/* ---------- Reset-ish ---------- */
* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent-dk); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0 0 0.4em;
  color: var(--ink);
}

p { margin: 0 0 1em; color: var(--ink-soft); }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 10px 0;
  z-index: 10000;
}
.skip-link:focus { left: 0; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 249, 251, 0.85);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  /* leave room on the right so the fixed template switcher never overlaps */
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}
.brand:hover { text-decoration: none; }

.brand__mark {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dk));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.brand__name {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.brand__sub {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  /* keep clear of the top-right template switcher pill on wide screens */
  margin-right: 150px;
}

.nav__links a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 9999px;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 600;
}
.nav__links a:hover {
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}
.nav__links a[aria-current="page"] {
  background: var(--accent-sf);
  color: var(--accent-dk);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-weight: 600;
  font-size: 15px;
  padding: 12px 22px;
  border-radius: 9999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.04s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover { background: var(--accent-dk); color: #fff; }

.btn--ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.btn--ghost:hover { border-color: #cbd5e1; }

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 84px 0 64px;
}
.hero__eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-dk);
  background: var(--accent-sf);
  padding: 6px 14px;
  border-radius: 9999px;
  margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  max-width: 16ch;
  margin: 0 auto 0.4em;
}
.hero__lead {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 0 auto 2em;
}

/* "I want to…" search box (decorative) */
.iwant {
  max-width: 640px;
  margin: 0 auto 18px;
}
.iwant__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9999px;
  padding: 8px 8px 8px 18px;
  box-shadow: var(--shadow-md);
}
.iwant__bar:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--ring);
}
.iwant__icon { flex: 0 0 auto; color: var(--muted); display: flex; }
.iwant__input {
  flex: 1 1 auto;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  padding: 8px 4px;
  min-width: 0;
}
.iwant__input::placeholder { color: var(--muted); }
.iwant__btn { flex: 0 0 auto; }

.iwant__tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}
.iwant__tags a {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 6px 14px;
  border-radius: 9999px;
}
.iwant__tags a:hover {
  border-color: var(--accent);
  color: var(--accent-dk);
  text-decoration: none;
}

/* ---------- Generic section ---------- */
.section { padding: 64px 0; }
.section--tight { padding: 44px 0; }

.section-head { max-width: 60ch; margin: 0 0 34px; }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.1rem);
  font-weight: 800;
}
.section-head p { font-size: 1.05rem; margin: 0; }

/* ---------- Page header (interior pages) ---------- */
.page-header {
  padding: 56px 0 8px;
}
.breadcrumb {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 14px;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent-dk); }
.page-header h1 {
  font-size: clamp(2rem, 4.4vw, 2.9rem);
  font-weight: 800;
}
.page-header__lead {
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 60ch;
  margin: 0;
}

/* ---------- Grids ---------- */
.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
  display: flex;
  flex-direction: column;
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: #d6e3e1;
}
.card h3 { font-size: 1.12rem; font-weight: 700; }
.card p { font-size: 0.97rem; margin-bottom: 0; }

/* line-style icon chip */
.icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--accent-sf);
  color: var(--accent-dk);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.icon svg { width: 24px; height: 24px; display: block; }

.card__link {
  margin-top: 16px;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--accent-dk);
}
.card__phone {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--ink);
  font-size: 0.98rem;
}
.card__phone svg { width: 16px; height: 16px; color: var(--accent); }
.card__phone a { color: var(--ink); }
.card__phone a:hover { color: var(--accent-dk); }

/* service card variant: whole card is a link */
a.card { color: inherit; }
a.card:hover { text-decoration: none; }

/* ---------- News ---------- */
.news-list { display: grid; gap: 16px; }
.news-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 26px;
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 24px;
  align-items: start;
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}
.news-item:hover { box-shadow: var(--shadow-md); border-color: #d6e3e1; }
.news-item__date {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}
.news-item h3 { font-size: 1.14rem; font-weight: 700; margin-bottom: 0.35em; }
.news-item p { margin: 0; font-size: 0.97rem; }
.tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-dk);
  background: var(--accent-sf);
  padding: 3px 10px;
  border-radius: 9999px;
  margin-bottom: 10px;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 40px;
  align-items: start;
}
.info-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-sm);
}
.info-block { padding: 14px 0; border-bottom: 1px solid var(--line); }
.info-block:first-child { padding-top: 0; }
.info-block:last-child { border-bottom: 0; padding-bottom: 0; }
.info-block h3 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 4px;
}
.info-block p { margin: 0; color: var(--ink); }

.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-md);
}
.form-field { margin-bottom: 18px; }
.form-field label {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 7px;
}
.form-field input,
.form-field textarea {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
}
.form-field input:focus,
.form-field textarea:focus {
  outline: 0;
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 4px var(--ring);
}
.form-field textarea { resize: vertical; }
.form-note {
  font-size: 13px;
  color: var(--muted);
  margin: 14px 0 0;
}

/* ---------- CTA band ---------- */
.cta {
  margin: 0 0 72px;
}
.cta__inner {
  background: linear-gradient(135deg, var(--accent), var(--accent-dk));
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 48px 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-lg);
}
.cta__inner h2 { color: #fff; font-size: 1.7rem; margin-bottom: 0.25em; }
.cta__inner p { color: rgba(255, 255, 255, 0.9); margin: 0; max-width: 48ch; }
.cta .btn--ghost { background: #fff; border-color: #fff; color: var(--accent-dk); }
.cta .btn--ghost:hover { background: #f0fdfa; }

/* ---------- Footer ---------- */
.site-footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 56px 0 30px;
}
.site-footer h4 {
  color: #fff;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.site-footer p { color: #94a3b8; font-size: 0.95rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: #cbd5e1; font-size: 0.95rem; }
.site-footer a:hover { color: #fff; }
.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.footer-brand .brand__mark { box-shadow: none; }
.footer-brand strong { color: #fff; font-size: 1.05rem; }
.footer-bottom {
  padding-top: 24px;
  font-size: 0.85rem;
  color: #94a3b8;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; gap: 26px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav { flex-wrap: wrap; gap: 10px; }
  .nav__links {
    margin-right: 0;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }
  .nav__links a { white-space: nowrap; }
  .hero { padding: 60px 0 44px; }
  .news-item { grid-template-columns: 1fr; gap: 10px; }
  .cta__inner { padding: 34px 26px; }
}

@media (max-width: 520px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  /* keep first nav items clear of the small switcher pill */
  .site-header .nav { padding-top: 56px; }
}

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