/* =========================================================
   Lone Star Tick Tracker — styles.css
   ========================================================= */

:root {
  --bg: #0e1410;
  --bg-2: #131b16;
  --bg-3: #1a2520;
  --surface: #ffffff;
  --surface-alt: #f6f3ec;
  --ink: #14110d;
  --ink-soft: #4b4639;
  --muted: #7a7466;
  --line: #e6e0d2;

  --brand: #b8341c;          /* deep tick-red */
  --brand-2: #e85a2c;        /* warm accent */
  --gold: #e0a83a;           /* "lone star" gold */
  --leaf: #4a6b3a;           /* habitat green */

  --sighting: #f5c518;       /* yellow */
  --confirmed: #ef7c1a;      /* orange */
  --bite: #c8221b;           /* red */

  --shadow-sm: 0 2px 6px rgba(20, 17, 13, 0.08);
  --shadow-md: 0 10px 30px rgba(20, 17, 13, 0.12);
  --shadow-lg: 0 30px 60px rgba(20, 17, 13, 0.25);

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;

  --maxw: 1200px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ink);
  background: var(--surface);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.2rem, 4.5vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; }
h4 { font-size: 1rem; font-weight: 700; }

p { margin: 0 0 1em; color: var(--ink-soft); }
.muted { color: var(--muted); font-size: 0.93rem; }

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

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

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--brand);
  margin: 0 0 0.6em;
}

/* =========================================================
   HEADER / NAV
   ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(14, 20, 16, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  background: var(--gold);
  color: #1a1206;
  border-radius: 8px;
  font-size: 1.05rem;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(224, 168, 58, 0.4);
}
.brand-text { letter-spacing: 0.01em; }

.nav-links {
  display: flex;
  gap: 22px;
  align-items: center;
}
.nav-links a {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease;
}
.nav-links a:hover { color: #fff; }
.cta-link {
  background: var(--brand);
  color: #fff !important;
  padding: 8px 14px;
  border-radius: 8px;
}
.cta-link:hover { background: var(--brand-2); text-decoration: none; }

@media (max-width: 820px) {
  .nav-links a:not(.cta-link) { display: none; }
}

/* =========================================================
   HERO
   ========================================================= */

.hero {
  position: relative;
  background: linear-gradient(160deg, #0e1410 0%, #1a2520 60%, #2b1810 100%);
  color: #f4eede;
  overflow: hidden;
  padding: 80px 0 110px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(224, 168, 58, 0.15), transparent 40%),
    radial-gradient(circle at 85% 70%, rgba(184, 52, 28, 0.20), transparent 45%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 60px;
  align-items: center;
}
.hero-copy h1 { color: #fff; }
.hero-copy .eyebrow { color: var(--gold); }
.lede {
  font-size: 1.12rem;
  color: rgba(244, 238, 222, 0.85);
  max-width: 56ch;
}
.hero-cta {
  display: flex;
  gap: 14px;
  margin: 26px 0 32px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.97rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 6px 16px rgba(184, 52, 28, 0.35);
}
.btn-primary:hover { background: var(--brand-2); }
.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}
.btn-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, 0.06); }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 480px;
  margin-top: 6px;
}
.hero-stats div {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hero-stats strong {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.7rem;
  color: var(--gold);
}
.hero-stats span {
  font-size: 0.78rem;
  color: rgba(244, 238, 222, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.hero-art { display: flex; justify-content: center; }
.tick-photo {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: #2a1a10;
  max-width: 460px;
  border: 6px solid rgba(224, 168, 58, 0.25);
  transform: rotate(-1.5deg);
  transition: transform 0.4s ease;
}
.tick-photo:hover { transform: rotate(0deg) scale(1.02); }
.tick-photo img {
  width: 100%;
  height: 460px;
  object-fit: cover;
}
.tick-photo figcaption {
  background: rgba(20, 17, 13, 0.92);
  color: #f4eede;
  padding: 12px 18px;
  font-size: 0.88rem;
  font-style: italic;
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding: 50px 0 70px; }
  .tick-photo img { height: 360px; }
}

/* =========================================================
   SECTIONS
   ========================================================= */

.info-section { padding: 90px 0; }
.info-section.alt-bg { background: var(--surface-alt); }

.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { font-size: 1.05rem; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.two-col.reverse > :first-child { order: 2; }
@media (max-width: 900px) {
  .two-col { grid-template-columns: 1fr; gap: 36px; }
  .two-col.reverse > :first-child { order: 0; }
  .info-section { padding: 60px 0; }
}

/* =========================================================
   MAP
   ========================================================= */

.map-section {
  padding: 80px 0;
  background: linear-gradient(180deg, #fff 0%, #f9f6ee 100%);
}
.map-wrap {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--line);
}
#leaflet-map {
  height: 560px;
  width: 100%;
  border-radius: var(--radius);
  background: #dfe9e2;
  z-index: 0;
}

.map-legend {
  background: var(--surface-alt);
  border-radius: var(--radius);
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
}
.map-legend h3 {
  font-family: 'Inter', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 14px;
}
.legend { list-style: none; padding: 0; margin: 0 0 18px; }
.legend li + li { margin-top: 8px; }
.legend label {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.1s ease;
}
.legend label:hover { border-color: var(--brand); transform: translateX(2px); }
.legend input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--brand);
  cursor: pointer;
}
.dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1.5px rgba(0,0,0,0.15);
}
.dot-sighting  { background: var(--sighting); }
.dot-confirmed { background: var(--confirmed); }
.dot-bite      { background: var(--bite); }

.legend-label { display: flex; flex-direction: column; line-height: 1.2; }
.legend-label strong { font-size: 0.92rem; color: var(--ink); }
.legend-label em { font-size: 0.77rem; color: var(--muted); font-style: normal; }
.count {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--ink-soft);
  background: var(--surface-alt);
  padding: 2px 9px;
  border-radius: 999px;
  min-width: 32px;
  text-align: center;
}

.legend-note {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  font-size: 0.82rem;
  color: var(--muted);
}
.legend-note p { margin: 0; font-size: 0.82rem; }

@media (max-width: 900px) {
  .map-wrap { grid-template-columns: 1fr; }
  #leaflet-map { height: 420px; }
}

/* Custom Leaflet popup */
.leaflet-popup-content-wrapper {
  border-radius: 12px !important;
  box-shadow: var(--shadow-md) !important;
}
.leaflet-popup-content {
  margin: 14px 16px !important;
  font-family: 'Inter', sans-serif !important;
}
.popup-title {
  font-weight: 700;
  font-size: 0.98rem;
  margin-bottom: 4px;
  color: var(--ink);
}
.popup-type {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
  margin-bottom: 6px;
}
.popup-type.sighting  { background: rgba(245, 197, 24, 0.18); color: #8a6a00; }
.popup-type.confirmed { background: rgba(239, 124, 26, 0.18); color: #a04a00; }
.popup-type.bite      { background: rgba(200, 34, 27, 0.18); color: #8e1612; }
.popup-meta { font-size: 0.83rem; color: var(--muted); margin-top: 4px; }
.popup-desc { font-size: 0.88rem; color: var(--ink-soft); margin-top: 6px; }

/* =========================================================
   FEATURE LISTS
   ========================================================= */

.feature-list {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
}
.feature-list li {
  position: relative;
  padding: 12px 0 12px 30px;
  border-bottom: 1px solid var(--line);
  font-size: 0.97rem;
  color: var(--ink-soft);
}
.feature-list li:last-child { border-bottom: 0; }
.feature-list li::before {
  content: "★";
  position: absolute;
  left: 0;
  top: 12px;
  color: var(--gold);
  font-size: 0.95rem;
}
.feature-list li strong { color: var(--ink); }

/* =========================================================
   IDENTIFICATION GRID
   ========================================================= */

.id-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.id-grid figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.id-grid figure:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.id-grid img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: #efeadd;
}
.id-grid figure.stages {
  grid-column: 1 / -1;
}
.id-grid figure.stages img {
  height: auto;
  max-height: 240px;
  object-fit: contain;
  padding: 14px;
  background: #fff;
}
.id-grid figcaption {
  padding: 10px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink);
  background: var(--surface-alt);
}

/* =========================================================
   HABITAT
   ========================================================= */

.card-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.card-image img {
  width: 100%;
  height: 460px;
  object-fit: cover;
}
.range-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 24px;
}
.range-grid > div {
  background: var(--surface-alt);
  border-left: 3px solid var(--leaf);
  border-radius: 0 10px 10px 0;
  padding: 14px 16px;
}
.range-grid h4 { margin-bottom: 4px; color: var(--leaf); }
.range-grid p { font-size: 0.9rem; margin: 0; }

@media (max-width: 600px) {
  .range-grid { grid-template-columns: 1fr; }
  .card-image img { height: 320px; }
}

/* =========================================================
   BITES
   ========================================================= */

.bite-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 10px;
}
.bite-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 22px 22px;
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.15s ease;
}
.bite-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand);
}
.bite-card.highlight {
  background: linear-gradient(135deg, #fff 0%, #fff5e6 100%);
  border-color: var(--gold);
}
.card-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  background: var(--brand);
  color: #fff;
  border-radius: 50%;
  font-weight: 700;
  font-family: 'Playfair Display', serif;
  margin-bottom: 12px;
  font-size: 1rem;
}
.bite-card.highlight .card-num { background: var(--gold); color: #1a1206; }
.bite-card h3 { margin-bottom: 8px; }
.bite-card p { font-size: 0.92rem; margin: 0; }

.callout {
  margin-top: 36px;
  padding: 18px 22px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  font-size: 0.97rem;
  color: var(--ink-soft);
}
.callout.warn strong { color: var(--brand); }

@media (max-width: 900px) { .bite-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .bite-grid { grid-template-columns: 1fr; } }

/* =========================================================
   ALPHA-GAL
   ========================================================= */

.alphagal-visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.ag-stat {
  background: linear-gradient(150deg, #2b1810 0%, #1a2520 100%);
  color: #f4eede;
  border-radius: var(--radius);
  padding: 28px 22px;
  text-align: center;
  border: 1px solid rgba(224, 168, 58, 0.25);
  box-shadow: var(--shadow-md);
}
.ag-stat strong {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  color: var(--gold);
  margin-bottom: 4px;
  line-height: 1;
}
.ag-stat span {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(244, 238, 222, 0.75);
}

@media (max-width: 600px) { .alphagal-visual { grid-template-columns: 1fr 1fr; } }

/* =========================================================
   PREVENTION
   ========================================================= */

.prev-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.prev-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.prev-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.prev-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--surface-alt);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 12px;
}
.prev-card h3 { font-size: 1rem; margin-bottom: 6px; }
.prev-card p { font-size: 0.88rem; margin: 0; }

@media (max-width: 1000px) { .prev-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px)  { .prev-grid { grid-template-columns: 1fr; } }

/* =========================================================
   REPORT
   ========================================================= */

.report-section { padding: 80px 0; background: var(--surface); }
.report-card {
  background: linear-gradient(135deg, #b8341c 0%, #e85a2c 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 44px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  box-shadow: 0 30px 60px rgba(184, 52, 28, 0.25);
}
.report-card h2 { color: #fff; margin-bottom: 6px; }
.report-card p { color: rgba(255, 255, 255, 0.92); margin: 0; max-width: 56ch; }
.report-card .btn-primary {
  background: #fff;
  color: var(--brand);
  white-space: nowrap;
}
.report-card .btn-primary:hover { background: var(--gold); color: #1a1206; }

@media (max-width: 760px) {
  .report-card { flex-direction: column; align-items: flex-start; padding: 32px 26px; }
}

/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
  background: #0e1410;
  color: rgba(244, 238, 222, 0.78);
  padding: 56px 0 22px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 28px;
}
.site-footer h4 { color: #fff; margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer ul li + li { margin-top: 8px; }
.site-footer a { color: var(--gold); }
.site-footer .brand { margin-bottom: 12px; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 18px;
  font-size: 0.82rem;
  color: rgba(244, 238, 222, 0.5);
}

@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}

/* =========================================================
   ACCESSIBILITY
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
