/* MichianaRealty.com — "county almanac" design system
   Palette: paper #fbfbf9 / ink #1c2733 / lake blue #2a78d6 (chart + accent)
   Type: Fraunces (display, figures) + Public Sans (body)
   Signature: double ledger rules under section heads; tabular figures. */

@font-face { font-family: Fraunces; src: url('/fonts/Fraunces.ttf') format('truetype'); font-weight: 500 650; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url('/fonts/PublicSans.ttf') format('truetype'); font-weight: 400 700; font-display: swap; }

:root {
  color-scheme: light;
  --paper: #fbfbf9;
  --panel: #f2f2ee;
  --ink: #1c2733;
  --ink-2: #51565c;
  --ink-3: #7b8087;
  --rule: #d8d8d2;
  --accent: #2a78d6;      /* lake blue — links, chart line */
  --accent-ink: #1d5eae;
  --up: #008300;
  --down: #c93b3a;
  --chart-line: #2a78d6;
  --chart-grid: #e3e3dd;
  --chart-text: #7b8087;
  --max: 76rem;
  --prose: 44rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #191a19;
    --panel: #222423;
    --ink: #f0efe9;
    --ink-2: #c3c2b7;
    --ink-3: #94938a;
    --rule: #3a3c3a;
    --accent: #3987e5;
    --accent-ink: #6ca6ee;
    --up: #4fac4f;
    --down: #e66767;
    --chart-line: #3987e5;
    --chart-grid: #333532;
    --chart-text: #94938a;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.65 "Public Sans", system-ui, sans-serif;
}
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }

a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- header / footer ---------- */
.site-header {
  border-bottom: 1px solid var(--rule);
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
}
.site-header .wrap {
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem;
  align-items: center; justify-content: space-between;
  padding-top: 1.1rem; padding-bottom: 1rem;
}
.brand {
  font-family: Fraunces, Georgia, serif;
  font-weight: 650; font-size: 1.45rem; letter-spacing: -.01em;
  color: var(--ink); text-decoration: none;
}
.brand span { color: var(--accent); }
.brand-tag {
  display: block; margin-top: .15rem;
  font: 600 .64rem/1 "Public Sans", sans-serif;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3);
}
.site-header nav { display: flex; gap: 1.25rem; }
.site-header nav a { color: var(--ink-2); text-decoration: none; font-size: .95rem; }
.site-header nav a:hover { color: var(--accent-ink); text-decoration: underline; }
.hdr-ctas { display: flex; gap: .55rem; align-items: center; }
.btn-nav { font-size: .85rem; padding: .42rem .85rem; border-radius: 6px; }
.btn-nav-alt {
  background: transparent; color: var(--accent-ink);
  border: 1.5px solid var(--accent);
}
.btn-nav-alt:hover { background: var(--accent); color: #fff; }

.site-footer { margin-top: 4rem; border-top: 1px solid var(--rule); background: var(--panel); }
.site-footer .wrap { padding-top: 2rem; padding-bottom: 2rem; }
.foot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 1.5rem; }
.foot-h { font: 600 .8rem/1 "Public Sans", sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 .6rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: .3rem 0; font-size: .92rem; }
.site-footer a { color: var(--ink-2); }
.foot-towns { columns: 2; }
.disclaimer { font-size: .8rem; color: var(--ink-3); margin-top: 1.75rem; max-width: 60rem; }
.disclaimer a { color: var(--ink-3); }
.copy { font-size: .8rem; color: var(--ink-3); }

/* ---------- headings: the ledger rule ---------- */
h1 {
  font-family: Fraunces, Georgia, serif;
  font-weight: 650; font-size: clamp(1.9rem, 4.5vw, 2.7rem);
  line-height: 1.15; letter-spacing: -.015em; margin: 1.6rem 0 .8rem;
}
h2 {
  font-family: Fraunces, Georgia, serif;
  font-weight: 600; font-size: 1.45rem; letter-spacing: -.01em;
  margin: 2.4rem 0 .9rem; padding-bottom: .45rem;
  border-bottom: 3px double var(--rule);
}
h3 { font: 600 1.05rem/1.4 "Public Sans", sans-serif; margin: 1.6rem 0 .4rem; }
p, ul, ol { max-width: var(--prose); }
main > article, main > section { margin-top: .5rem; }

.crumbs { font-size: .85rem; color: var(--ink-3); margin-top: 1.2rem; }
.crumbs a { color: var(--ink-3); }

/* ---------- hero (full-bleed lakeshore) ---------- */
.hero { position: relative; min-height: 21rem; overflow: hidden; background: #12335c; border-bottom: 1px solid var(--rule); }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8, 25, 50, .93) 0%, rgba(8, 25, 50, .76) 47%, rgba(8, 25, 50, .18) 100%); }
.hero-photo { position: absolute; inset: 0; display: block; width: 100vw; max-width: none; height: 100%; object-fit: cover; object-position: center; }
.hero-inner {
  position: relative; z-index: 1; padding-top: 3rem; padding-bottom: 3.5rem; color: #fff;
}
.eyebrow {
  font: 600 .78rem/1 "Public Sans", sans-serif; letter-spacing: .14em;
  text-transform: uppercase; color: #bcd6f5; margin: 0 0 1rem;
}
.hero-inner h1 {
  color: #fff; margin: 0 0 1rem;
  font-size: clamp(2.1rem, 5.5vw, 3.4rem); text-wrap: balance;
}
.hero-sub { font-size: 1.12rem; line-height: 1.6; color: #dce9fa; max-width: 40rem; margin: 0 0 1.8rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero-stats { margin-top: -2.6rem; position: relative; z-index: 1; }
.hero-stats .stat {
  background: var(--paper); box-shadow: 0 8px 28px rgba(12, 33, 56, .14);
}
.btn {
  display: inline-block; background: var(--accent); color: #fff;
  padding: .65rem 1.25rem; border-radius: 6px; text-decoration: none; font-weight: 600;
}
.btn:hover { background: var(--accent-ink); color: #fff; }
.hero .btn { background: #fff; color: #16406f; }
.hero .btn:hover { background: #e8f0fb; color: #0e2a4d; }
.btn-ghost { background: transparent !important; color: #fff !important; border: 1.5px solid rgba(255,255,255,.65); }
.btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,.1) !important; }
.lede { font-size: 1.15rem; color: var(--ink-2); max-width: 46rem; }
.cta { margin: 1.6rem 0; }

/* ---------- editorial imagery / proof points ---------- */
.feature-photo { max-width: 44rem; margin: 1.8rem 0; }
.feature-photo img { display: block; width: 100%; height: auto; border: 1px solid var(--rule); border-radius: 8px; }
.feature-photo figcaption { margin-top: .45rem; font-size: .78rem; color: var(--ink-3); }
.editorial-standards { margin-top: 3.5rem; }
.standards-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.standard { background: var(--panel); border: 1px solid var(--rule); border-radius: 8px; padding: 1.1rem; }
.standard h3 { margin: .7rem 0 .25rem; }
.standard p { margin: 0; color: var(--ink-2); font-size: .9rem; }
.standard-icon { display: block; width: 48px; height: 48px; background-image: url('/img-editorial-icons.webp'); background-repeat: no-repeat; background-size: 300% 100%; }
.icon-map { background-position: left center; }
.icon-trend { background-position: center center; }
.icon-source { background-position: right center; }
.site-authenticity-top { display: flex; justify-content: center; background: var(--paper); border-bottom: 1px solid var(--rule); }
.site-authenticity-top img { display: block; width: 432px; max-width: 100%; height: auto; }
@media (prefers-reduced-motion: no-preference) {
  .site-authenticity-top img { animation: authenticity-nudge 1.2s ease-in-out .45s 2; }
  @keyframes authenticity-nudge { 0%, 100% { transform: translateY(0); } 45% { transform: translateY(-5px); } }
}

/* ---------- Go Direct dashboard ---------- */
.dash-btns { display: flex; flex-wrap: wrap; gap: 1rem; margin: 2rem 0; }
.btn-big {
  font-size: 1.08rem; padding: .95rem 1.6rem; border-radius: 8px;
  flex: 1 1 16rem; text-align: center;
}
.btn-alt { background: var(--ink); }
.btn-alt:hover { background: #33414f; }
.calc {
  background: var(--panel); border: 1px solid var(--rule); border-radius: 10px;
  padding: 1.2rem 1.4rem; margin: 2rem 0; max-width: 34rem;
}
.calc h2 { border: 0; margin: 0 0 .8rem; padding: 0; font-size: 1.25rem; }
.calc label { display: block; font-size: .82rem; color: var(--ink-2); margin: .7rem 0 .2rem; }
.calc input, .calc select {
  font: inherit; font-variant-numeric: tabular-nums; color: var(--ink);
  background: var(--paper); border: 1px solid var(--rule); border-radius: 6px;
  padding: .45rem .6rem; width: 100%; max-width: 14rem;
}
.calc-out { font-size: 1.05rem; margin-top: 1rem; }
.calc-out strong {
  font-family: Fraunces, Georgia, serif; font-size: 1.7rem; color: var(--up);
  font-variant-numeric: tabular-nums;
}

/* ---------- town cards ---------- */
.card-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(14.5rem, 1fr));
  gap: 1rem; margin: 1.4rem 0;
}
.tcard {
  display: block; background: var(--panel); border: 1px solid var(--rule);
  border-radius: 10px; padding: 1rem 1.1rem .8rem; text-decoration: none;
  color: var(--ink);
}
a.tcard:hover { border-color: var(--accent); box-shadow: 0 4px 16px rgba(42, 120, 214, .12); }
.tcard-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.tcard-name { font-weight: 600; font-size: .95rem; }
a.tcard .tcard-name { color: var(--accent-ink); }
.chip {
  font: 600 .74rem/1 "Public Sans", sans-serif; padding: .28em .55em;
  border-radius: 99px; white-space: nowrap;
}
.chip.up { background: color-mix(in srgb, var(--up) 12%, transparent); }
.chip.down { background: color-mix(in srgb, var(--down) 12%, transparent); }
.tcard-v {
  font-family: Fraunces, Georgia, serif; font-weight: 650; font-size: 1.65rem;
  margin-top: .45rem; font-variant-numeric: tabular-nums;
}
.tcard-l { font-size: .78rem; color: var(--ink-3); margin-bottom: .5rem; }
.tcard .spark { width: 100%; }

/* ---------- stat tiles ---------- */
.stat-row { display: flex; flex-wrap: wrap; gap: .9rem; margin: 1.4rem 0; }
.stat {
  flex: 1 1 11rem; min-width: 10rem;
  background: var(--panel); border: 1px solid var(--rule); border-radius: 6px;
  padding: .9rem 1rem;
}
.stat-v {
  font-family: Fraunces, Georgia, serif; font-weight: 650;
  font-size: 1.9rem; line-height: 1.1; font-variant-numeric: tabular-nums;
}
.stat-l { font-size: .82rem; color: var(--ink-2); margin-top: .25rem; }
.stat-d { font-size: .82rem; font-weight: 600; margin-top: .3rem; }
.up { color: var(--up); }
.down { color: var(--down); }
.stat-src { font-size: .78rem; color: var(--ink-3); max-width: none; }

/* ---------- charts ---------- */
.chart-fig { margin: 1.4rem 0; }
.chart { width: 100%; max-width: 42rem; height: auto; display: block; }
.cline { stroke: var(--chart-line); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.cdot { fill: var(--chart-line); }
.cg { stroke: var(--chart-grid); stroke-width: 1; }
.ct { fill: var(--chart-text); font: 400 11px "Public Sans", sans-serif; }
.cl { font-weight: 600; fill: var(--ink-2); }
.cv { fill: var(--chart-line); font-weight: 600; font-size: 12px; }
.spark { width: 7rem; height: 2rem; display: block; }
.spark .cline { stroke-width: 1.5; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; margin: 1.2rem 0; }
table.cmp { border-collapse: collapse; width: 100%; font-size: .95rem; }
.cmp caption { text-align: left; }
.cmp th, .cmp td { text-align: left; padding: .55rem .8rem .55rem 0; border-bottom: 1px solid var(--rule); }
.cmp thead th {
  font: 600 .75rem/1.2 "Public Sans", sans-serif; letter-spacing: .07em;
  text-transform: uppercase; color: var(--ink-3);
}
.cmp td { font-variant-numeric: tabular-nums; }
.cmp tr.self th { font-weight: 700; }
.cmp tbody th a, .cmp tbody th { font-weight: 600; }

/* ---------- misc ---------- */
.also { background: var(--panel); border: 1px solid var(--rule); border-radius: 6px; padding: 1rem 1.25rem; margin: 2.5rem 0 0; }
.also h2 { border: 0; margin: 0 0 .5rem; font-size: 1.1rem; padding: 0; }
.also ul { margin: 0; padding-left: 1.1rem; }
.report-list { list-style: none; padding: 0; }
.report-list li { padding: .55rem 0; border-bottom: 1px solid var(--rule); }
.pager { display: flex; flex-wrap: wrap; gap: 1.5rem; margin: 2.5rem 0 0; font-size: .92rem; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}
blockquote { border-left: 3px solid var(--accent); margin: 1.2rem 0; padding: .2rem 0 .2rem 1rem; color: var(--ink-2); }

@media (prefers-reduced-motion: no-preference) {
  a, .btn { transition: color .12s ease, background-color .12s ease; }
}
@media (max-width: 40rem) {
  .stat-v { font-size: 1.55rem; }
  .foot-towns { columns: 2; }
  .standards-grid { grid-template-columns: 1fr; }
  .hero::after { background: rgba(8, 25, 50, .78); }
}
