/* ============================================================
   kerrvilletexas.com — design system
   "River & Limestone" — light, photography-led community guide.
   Palette: limestone cream, cypress green, river teal, late-sun gold.
   Type: Fraunces (display) + Inter (text).
   No build step. This file styles every page.
   ============================================================ */

:root {
  --paper: #faf7f0;
  --paper-deep: #f1ebdd;
  --ink: #22302a;
  --ink-soft: #51605a;
  --river: #2f6d5e;
  --river-deep: #1d4a40;
  --river-tint: #e3efeb;
  --gold: #c08a3e;
  --gold-soft: #e9d9bd;
  --clay: #a65a33;
  --line: #ddd5c4;
  --white: #fffdf8;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(34, 48, 42, 0.10);
  --shadow-lift: 0 18px 44px rgba(34, 48, 42, 0.16);
  --font-display: "Fraunces", Georgia, serif;
  --font-text: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --wrap: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-text);
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--river-deep); text-decoration: none; }
a:hover { color: var(--clay); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--ink);
}
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 46em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }
.section { padding: 72px 0; }
.section--tint { background: var(--paper-deep); }
.section--river { background: var(--river-deep); color: var(--paper); }
.section--river h2, .section--river h3 { color: var(--white); }
.section--river p { color: #cfe0da; }

.kicker {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(250, 247, 240, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 26px;
  min-height: 66px;
}
.brand {
  font-family: var(--font-display);
  font-weight: 700; font-size: 1.22rem;
  color: var(--ink); letter-spacing: 0.01em;
  white-space: nowrap;
}
.brand .tld { color: var(--river); font-weight: 600; }
.brand-glyph { color: var(--gold); margin-right: 2px; }
.site-nav { display: flex; gap: 20px; margin-left: auto; align-items: center; }
.site-nav a {
  font-size: 0.93rem; font-weight: 600; color: var(--ink-soft);
  padding: 6px 2px;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--river-deep); }
.nav-cta {
  background: var(--river); color: var(--white) !important;
  padding: 9px 16px !important; border-radius: 999px;
  box-shadow: var(--shadow);
}
.nav-cta:hover { background: var(--river-deep); }
.nav-toggle {
  display: none; margin-left: auto;
  background: none; border: 1px solid var(--line); border-radius: 8px;
  font-size: 1.3rem; line-height: 1; padding: 6px 11px; color: var(--ink);
  cursor: pointer;
}

/* ---------- hero ---------- */
.hero {
  position: relative; color: var(--white);
  min-height: 78vh; display: flex; align-items: flex-end;
  background-size: cover; background-position: center;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,32,27,0.18) 0%, rgba(20,32,27,0.72) 100%);
}
.hero .wrap { position: relative; z-index: 2; padding-bottom: 64px; padding-top: 120px; }
.hero h1 { color: var(--white); max-width: 13em; text-shadow: 0 2px 18px rgba(0,0,0,0.35); }
.hero p { color: #e9e4d6; font-size: 1.18rem; max-width: 38em; }
.hero--page { min-height: 44vh; }

.btn {
  display: inline-block; font-weight: 700; font-size: 0.98rem;
  padding: 13px 24px; border-radius: 999px; border: 0; cursor: pointer;
  font-family: var(--font-text); transition: transform 0.15s ease, background 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn--gold { background: var(--gold); color: #241a08; }
.btn--gold:hover { background: #d29c4c; color: #241a08; }
.btn--river { background: var(--river); color: var(--white); }
.btn--river:hover { background: var(--river-deep); color: var(--white); }
.btn--ghost {
  background: transparent; color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.7);
}
.btn--ghost:hover { background: rgba(255,255,255,0.14); color: var(--white); }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 20px; }

/* ---------- river conditions strip / cards ---------- */
.river-strip {
  background: var(--river-deep); color: var(--paper);
  padding: 14px 0; font-size: 0.95rem;
}
.river-strip .wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.river-strip a { color: var(--gold-soft); font-weight: 600; white-space: nowrap; }
.river-strip-label {
  font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  font-size: 0.72rem; color: var(--gold-soft);
  display: flex; align-items: center; gap: 8px;
}
.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #6fd3a7;
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
.river-strip-readings { display: flex; gap: 22px; flex-wrap: wrap; }
.river-reading strong { color: var(--white); }

.gauge-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px; margin-top: 30px;
}
.gauge-card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow);
  color: var(--ink);
}
.gauge-card h3 { margin-bottom: 2px; }
.gauge-place { color: var(--ink-soft); font-size: 0.88rem; margin-bottom: 16px; }
.gauge-stat { display: flex; justify-content: space-between; align-items: baseline;
  padding: 9px 0; border-top: 1px dashed var(--line); }
.gauge-stat .val { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; }
.gauge-stat .unit { font-size: 0.8rem; color: var(--ink-soft); margin-left: 4px; }
.trend { font-size: 0.8rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.trend--rising { background: #fbe3d6; color: #8c3d1c; }
.trend--falling { background: var(--river-tint); color: var(--river-deep); }
.trend--steady { background: var(--paper-deep); color: var(--ink-soft); }
.gauge-updated { font-size: 0.78rem; color: var(--ink-soft); margin-top: 14px; }
.gauge-error {
  background: var(--paper-deep); border-radius: var(--radius);
  padding: 22px; color: var(--ink-soft);
}

/* ---------- cards & grids ---------- */
.card-grid { display: grid; gap: 24px; margin-top: 34px; }
.card-grid--3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card-grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.card-img { height: 190px; background-size: cover; background-position: center; }
.card-body { padding: 22px 24px 26px; flex: 1; display: flex; flex-direction: column; }
.card-body p { color: var(--ink-soft); font-size: 0.95rem; flex: 1; }
.card-link { font-weight: 700; font-size: 0.92rem; color: var(--river); }
.card-link::after { content: " →"; }

.path-card { text-align: left; padding: 34px 30px; }
.path-card h3 { font-size: 1.45rem; }

/* ---------- town map ---------- */
.town-map-wrap {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px; margin-top: 34px; overflow-x: auto;
}
.town-map { width: 100%; height: auto; display: block; min-width: 620px; }
.map-town { cursor: pointer; }
.map-town circle {
  fill: var(--river); stroke: var(--white); stroke-width: 2.5;
  transition: r 0.15s ease, fill 0.15s ease;
}
.map-town:hover circle, .map-town:focus circle { fill: var(--clay); r: 11; }
.map-town text {
  font-family: var(--font-text); font-size: 13px; font-weight: 700;
  fill: var(--ink); pointer-events: none;
}
.map-town .town-sub { font-size: 10px; font-weight: 500; fill: var(--ink-soft); }
.map-river { fill: none; stroke: #7fb3a6; stroke-width: 5; stroke-linecap: round; opacity: 0.85; }
.map-road { fill: none; stroke: var(--line); stroke-width: 2.5; stroke-dasharray: 1 7; stroke-linecap: round; }
.map-label { font-family: var(--font-text); font-size: 10px; fill: #9aa8a2; letter-spacing: 0.08em; }
.map-tip {
  position: absolute; pointer-events: none; z-index: 20;
  background: var(--ink); color: var(--paper); font-size: 0.83rem;
  padding: 8px 13px; border-radius: 8px; max-width: 240px;
  opacity: 0; transition: opacity 0.15s; transform: translate(-50%, -130%);
}
.map-tip.show { opacity: 1; }

/* ---------- events ---------- */
.event-filters { display: flex; gap: 10px; flex-wrap: wrap; margin: 26px 0 8px; }
.chip {
  border: 1.5px solid var(--line); background: var(--white);
  border-radius: 999px; padding: 7px 16px; font-size: 0.86rem; font-weight: 600;
  color: var(--ink-soft); cursor: pointer; font-family: var(--font-text);
}
.chip.active { background: var(--river); border-color: var(--river); color: var(--white); }
.event-list { display: grid; gap: 16px; margin-top: 24px; }
.event-row {
  display: grid; grid-template-columns: 92px 1fr auto;
  gap: 20px; align-items: center;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 22px; box-shadow: var(--shadow);
}
.event-date {
  text-align: center; font-family: var(--font-display);
  background: var(--river-tint); border-radius: 10px; padding: 10px 6px;
}
.event-date .mo { display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--river-deep); font-family: var(--font-text); }
.event-date .day { display: block; font-size: 1.5rem; font-weight: 700; line-height: 1.1; }
.event-row h3 { margin-bottom: 2px; font-size: 1.08rem; }
.event-row p { margin: 0; color: var(--ink-soft); font-size: 0.9rem; }
.event-town {
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--gold); white-space: nowrap;
}
.event-row.hidden { display: none; }

/* ---------- quiz ---------- */
.quiz-shell {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-lift);
  padding: 40px; max-width: 720px; margin: 36px auto 0;
}
.quiz-progress { height: 6px; background: var(--paper-deep); border-radius: 999px; margin-bottom: 28px; overflow: hidden; }
.quiz-progress span { display: block; height: 100%; background: var(--gold); border-radius: 999px; transition: width 0.3s ease; }
.quiz-q h3 { font-size: 1.35rem; }
.quiz-opts { display: grid; gap: 12px; margin-top: 20px; }
.quiz-opt {
  text-align: left; background: var(--paper); border: 1.5px solid var(--line);
  border-radius: 12px; padding: 15px 18px; font-size: 0.98rem; font-weight: 600;
  color: var(--ink); cursor: pointer; font-family: var(--font-text);
  transition: border-color 0.15s, background 0.15s;
}
.quiz-opt:hover { border-color: var(--river); background: var(--river-tint); }
.quiz-result { text-align: center; }
.quiz-result .kicker { margin-top: 6px; }
.quiz-town-name { font-size: 2.2rem; margin-bottom: 6px; }
.quiz-runnerup { color: var(--ink-soft); font-size: 0.95rem; }
.quiz-restart { background: none; border: none; color: var(--ink-soft); font-size: 0.85rem;
  text-decoration: underline; cursor: pointer; margin-top: 18px; font-family: var(--font-text); }

/* ---------- forms ---------- */
.form-card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 34px;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
label { font-size: 0.82rem; font-weight: 700; display: block; margin-bottom: 6px; color: var(--ink); }
input, select, textarea {
  width: 100%; font-family: var(--font-text); font-size: 0.95rem;
  padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px;
  background: var(--paper); color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--river); border-color: var(--river); }
.form-note { font-size: 0.8rem; color: var(--ink-soft); margin-top: 12px; }
.form-success {
  background: var(--river-tint); border: 1px solid var(--river);
  color: var(--river-deep); border-radius: 10px; padding: 18px 20px; font-weight: 600;
}

/* ---------- town pages ---------- */
.facts-bar {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; margin: -46px auto 0;
  position: relative; z-index: 5; box-shadow: var(--shadow-lift);
  max-width: 980px;
}
.fact { background: var(--white); padding: 18px 20px; }
.fact .label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--ink-soft); }
.fact .value { font-family: var(--font-display); font-size: 1.12rem; font-weight: 600; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; margin-top: 34px; }
.split-img { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lift); }
.split-img img { width: 100%; height: 100%; object-fit: cover; }

.link-list { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.link-list li {
  background: var(--white); border: 1px solid var(--line); border-radius: 10px;
  padding: 13px 18px; font-size: 0.94rem;
}
.link-list li span { color: var(--ink-soft); font-size: 0.86rem; display: block; }
.check-list { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 10px; }
.check-list li { padding-left: 30px; position: relative; }
.check-list li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--gold); font-weight: 800;
}

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(120deg, var(--river-deep), var(--river)); color: var(--paper); }
.cta-band .wrap { display: flex; align-items: center; justify-content: space-between;
  gap: 28px; flex-wrap: wrap; padding-top: 52px; padding-bottom: 52px; }
.cta-band h2 { color: var(--white); margin-bottom: 6px; }
.cta-band p { color: #cfe0da; margin: 0; }

/* ---------- tables ---------- */
.table-scroll { overflow-x: auto; margin-top: 26px; }
table.data { width: 100%; border-collapse: collapse; background: var(--white);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); font-size: 0.93rem; }
table.data th { background: var(--river-deep); color: var(--paper); text-align: left;
  padding: 12px 16px; font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; }
table.data td { padding: 12px 16px; border-top: 1px solid var(--line); }

/* ---------- listing cards ---------- */
.listing-status {
  display: inline-block; font-size: 0.72rem; font-weight: 800;
  letter-spacing: 0.1em; text-transform: uppercase; border-radius: 999px;
  padding: 4px 12px; margin-bottom: 10px;
}
.listing-status--active { background: var(--river-tint); color: var(--river-deep); }
.listing-status--uc { background: var(--gold-soft); color: #7a5518; }

/* ---------- footer ---------- */
.site-footer { background: #18241f; color: #a8b8b1; font-size: 0.9rem; }
.site-footer .wrap { padding: 56px 22px 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 40px; }
.site-footer h4 { color: var(--paper); font-size: 0.98rem; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { color: #a8b8b1; }
.site-footer a:hover { color: var(--gold-soft); }
.footer-brand { font-family: var(--font-display); font-size: 1.25rem; color: var(--paper); margin-bottom: 12px; }
.footer-legal { border-top: 1px solid #2c3b34; margin-top: 44px; padding-top: 22px;
  font-size: 0.78rem; color: #7d8d86; display: flex; gap: 18px; flex-wrap: wrap; }

/* ---------- reveals ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .site-nav {
    display: none; position: absolute; top: 66px; left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: flex-start; padding: 18px 22px; gap: 14px;
  }
  .site-nav.open { display: flex; }
  .nav-toggle { display: block; }
  .split { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .event-row { grid-template-columns: 70px 1fr; }
  .event-town { grid-column: 2; }
  .form-grid { grid-template-columns: 1fr; }
  .hero { min-height: 64vh; }
  .quiz-shell { padding: 26px 20px; }
}
