/* =========================================================
   FL Benefits Guide — Design System
   ========================================================= */

:root {
  /* Color */
  --navy: #16324F;
  --navy-dark: #0E2138;
  --sand: #F6F1E7;
  --sand-deep: #EDE5D3;
  --teal: #3B7A57;
  --teal-light: #E8F0EA;
  --clay: #C1561B;
  --clay-light: #FBEADD;
  --ink: #1A1A1A;
  --ink-soft: #4A4A48;
  --line: #DDD4C0;
  --white: #FFFFFF;

  /* Type */
  --font-display: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Scale */
  --step--1: clamp(0.83rem, 0.8rem + 0.1vw, 0.9rem);
  --step-0: clamp(1rem, 0.95rem + 0.2vw, 1.05rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.4vw, 1.3rem);
  --step-2: clamp(1.5rem, 1.3rem + 0.8vw, 1.75rem);
  --step-3: clamp(1.9rem, 1.6rem + 1.2vw, 2.4rem);
  --step-4: clamp(2.4rem, 1.9rem + 2vw, 3.4rem);

  --radius: 6px;
  --container: 1140px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-0);
  color: var(--ink);
  background: var(--sand);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy-dark);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 600;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }

p { margin: 0 0 1em; max-width: 68ch; }
a { color: var(--teal); text-decoration: underline; text-decoration-color: rgba(59,122,87,0.35); text-decoration-thickness: 1.5px; }
a:hover { text-decoration-color: currentColor; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--clay);
  outline-offset: 2px;
}

img { max-width: 100%; display: block; }
ul, ol { padding-left: 1.3em; }
li { margin-bottom: 0.4em; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--navy-dark);
  color: var(--sand);
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 3px solid var(--clay);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.8rem;
  padding-bottom: 0.8rem;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  white-space: nowrap;
}
.brand .mark {
  width: 34px; height: 34px;
  border-radius: 7px;
  background: var(--clay);
  display: grid;
  place-items: center;
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.95rem;
  flex-shrink: 0;
}
.main-nav { display: flex; gap: 1.4rem; align-items: center; flex-wrap: wrap; }
.main-nav a {
  color: var(--sand);
  text-decoration: none;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.01em;
  opacity: 0.88;
}
.main-nav a:hover { opacity: 1; text-decoration: underline; }
.nav-toggle { display: none; }

@media (max-width: 760px) {
  .main-nav { display: none; }
}

/* ---------- County search ---------- */
.county-finder {
  background: var(--navy);
  padding: 2.2rem 0 2.6rem;
  color: var(--sand);
}
.county-finder h1, .county-finder h2 { color: var(--white); }
.finder-box {
  background: var(--white);
  border-radius: var(--radius);
  padding: 0.4rem;
  display: flex;
  gap: 0.4rem;
  max-width: 560px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}
.finder-box input {
  flex: 1;
  border: none;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  font-family: var(--font-body);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
}
.finder-box input:focus { outline: none; }
.finder-box button {
  background: var(--clay);
  color: var(--white);
  border: none;
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius);
  font-weight: 700;
  cursor: pointer;
  font-size: var(--step--1);
}
.finder-box button:hover { background: #A8480F; }
.finder-results {
  background: var(--white);
  border-radius: var(--radius);
  margin-top: 0.5rem;
  max-width: 560px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  display: none;
}
.finder-results.is-open { display: block; }
.finder-results a {
  display: block;
  padding: 0.7rem 1rem;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  font-size: var(--step--1);
}
.finder-results a:last-child { border-bottom: none; }
.finder-results a:hover { background: var(--sand); }

/* ---------- Hero (home) ---------- */
.hero {
  padding: 3.5rem 0 3rem;
}
.hero .eyebrow {
  display: inline-block;
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.8rem;
}
.hero p.lede {
  font-size: var(--step-1);
  color: var(--ink-soft);
  max-width: 56ch;
}

/* ---------- Program grid ---------- */
.program-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem;
  margin: 2rem 0;
}
@media (max-width: 900px) { .program-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .program-grid { grid-template-columns: 1fr; } }

.program-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.program-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(22,50,79,0.12);
}
.program-card .tag {
  width: 42px; height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  background: var(--teal-light);
}
.program-card h3 { font-size: var(--step-1); margin-bottom: 0.2rem; }
.program-card p { font-size: var(--step--1); color: var(--ink-soft); margin: 0; }

/* ---------- County fact strip (signature element) ---------- */
.fact-strip {
  background: var(--navy-dark);
  color: var(--sand);
  padding: 1.4rem 0;
  border-top: 3px solid var(--clay);
  border-bottom: 3px solid var(--clay);
}
.fact-strip .container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem 2.2rem;
}
.fact-strip .fact {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 120px;
}
.fact-strip .fact .label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: rgba(246,241,231,0.6);
  font-weight: 700;
}
.fact-strip .fact .value {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
}

/* ---------- County header ---------- */
.county-hero {
  padding: 2.2rem 0 1.4rem;
}
.county-hero .breadcrumb {
  font-size: var(--step--1);
  color: var(--ink-soft);
  margin-bottom: 0.6rem;
}
.county-hero .breadcrumb a { color: var(--ink-soft); }
.county-hero h1 { margin-bottom: 0.3rem; }
.county-hero .subtitle {
  font-size: var(--step-1);
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-style: italic;
}

/* ---------- Sections ---------- */
.section { padding: 2.6rem 0; }
.section.alt { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { margin-bottom: 1.4rem; }
.section-head .kicker {
  font-size: var(--step--1);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--clay);
}

/* ---------- Program panel (used on county pages) ---------- */
.program-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 5px solid var(--teal);
  border-radius: var(--radius);
  padding: 1.6rem 1.8rem;
  margin-bottom: 1.4rem;
}
.program-panel.snap { border-left-color: var(--teal); }
.program-panel.medicaid { border-left-color: var(--navy); }
.program-panel.housing { border-left-color: var(--clay); }
.program-panel.cash { border-left-color: #8C5E2A; }
.program-panel h3 { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.6rem; }
.program-panel .meta-line {
  font-size: var(--step--1);
  color: var(--ink-soft);
  border-top: 1px dashed var(--line);
  margin-top: 0.8rem;
  padding-top: 0.8rem;
}

/* ---------- Info cards (contact / office) ---------- */
.info-card {
  background: var(--sand-deep);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  font-size: var(--step--1);
}
.info-card strong { color: var(--navy-dark); }
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 700px) { .info-grid { grid-template-columns: 1fr; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: var(--step--1);
  text-decoration: none;
  border: 2px solid transparent;
}
.btn-primary { background: var(--clay); color: var(--white); }
.btn-primary:hover { background: #A8480F; }
.btn-outline { background: transparent; border-color: var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--white); }

/* ---------- Steps list ---------- */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 2.6rem;
  margin-bottom: 1.1rem;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: -0.1rem;
  width: 1.9rem; height: 1.9rem;
  background: var(--navy);
  color: var(--white);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
}

/* ---------- County link list (state hub page) ---------- */
.county-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem 1.2rem;
}
@media (max-width: 900px) { .county-list { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 620px) { .county-list { grid-template-columns: repeat(2, 1fr); } }
.county-list a {
  display: block;
  padding: 0.5rem 0;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  font-size: var(--step--1);
}
.county-list a:hover { color: var(--teal); }

.region-block { margin-bottom: 2rem; }
.region-block h3 {
  font-size: var(--step-1);
  border-bottom: 2px solid var(--clay);
  padding-bottom: 0.4rem;
  margin-bottom: 0.8rem;
}

/* ---------- Disclaimer banner ---------- */
.disclaimer-note {
  background: var(--clay-light);
  border: 1px solid var(--clay);
  border-radius: var(--radius);
  padding: 1rem 1.3rem;
  font-size: var(--step--1);
  color: #7A3A12;
}
.disclaimer-note strong { color: var(--clay); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-dark);
  color: rgba(246,241,231,0.75);
  padding: 2.6rem 0 1.6rem;
  margin-top: 2rem;
  font-size: var(--step--1);
}
.site-footer h4 { color: var(--white); font-size: var(--step-0); }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 1.6rem;
  margin-bottom: 1.6rem;
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid a { color: rgba(246,241,231,0.75); display: block; margin-bottom: 0.4rem; text-decoration: none; }
.footer-grid a:hover { color: var(--white); text-decoration: underline; }
.footer-bottom {
  border-top: 1px solid rgba(246,241,231,0.15);
  padding-top: 1.2rem;
  font-size: 0.78rem;
  color: rgba(246,241,231,0.55);
}

/* ---------- Utility ---------- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
