/* ==========================================================================
   WildIndy — Discover Indiana Differently
   Design system: forest green + dark slate + orange accent, lots of white
   space, rounded cards, minimal motion.
   ========================================================================== */

:root {
  --forest: #2f6f4e;
  --forest-dark: #1d4b38;
  --slate: #263238;
  --slate-soft: #47545c;
  --white: #ffffff;
  --gray-light: #f4f6f2;
  --gray-mid: #e3e8e2;
  --orange: #ff8c42;
  --orange-dark: #e06b1f;

  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;

  --shadow-sm: 0 2px 8px rgba(38, 50, 56, 0.08);
  --shadow-md: 0 8px 24px rgba(38, 50, 56, 0.12);
  --shadow-lg: 0 16px 40px rgba(38, 50, 56, 0.18);

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4.5rem;

  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-head: Georgia, "Times New Roman", serif;

  --container: 1180px;
  --nav-height: 64px;

  color-scheme: light;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--slate);
  background: var(--white);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

button {
  font: inherit;
  cursor: pointer;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.2;
  margin: 0 0 var(--space-2);
  color: var(--slate);
}

p {
  margin: 0 0 var(--space-2);
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Skip link for keyboard users */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--forest);
  color: var(--white);
  padding: var(--space-1) var(--space-2);
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 1000;
}
.skip-link:focus {
  left: 0;
}

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  border-radius: 999px;
  padding: 0.9rem 1.75rem;
  font-weight: 700;
  font-size: 1rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  min-height: 48px;
}
.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--orange);
  color: var(--white);
  box-shadow: var(--shadow-md);
}
.btn-primary:hover {
  background: var(--orange-dark);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--white);
  color: var(--forest);
  border: 2px solid var(--forest);
}
.btn-secondary:hover {
  background: var(--forest);
  color: var(--white);
}

.btn-ghost {
  background: transparent;
  color: var(--forest);
  padding: 0.6rem 1rem;
}
.btn-ghost:hover {
  background: var(--gray-light);
}

.btn-block {
  width: 100%;
}

.btn-lg {
  font-size: 1.15rem;
  padding: 1.1rem 2.25rem;
}

/* ---------- Navigation ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--gray-mid);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.55rem;
  color: var(--forest-dark);
}
.nav-brand .dice {
  font-size: 1.9rem;
}

.nav-links {
  display: flex;
  gap: var(--space-1);
  align-items: center;
}

.nav-links a {
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  color: var(--slate-soft);
  font-size: 0.95rem;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  background: var(--gray-light);
  color: var(--forest-dark);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0.5rem;
  color: var(--slate);
  min-height: 44px;
  min-width: 44px;
}

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .nav-links {
    position: fixed;
    inset: var(--nav-height) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--white);
    padding: var(--space-2);
    box-shadow: var(--shadow-md);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-links a {
    padding: 0.9rem 1rem;
    font-size: 1.05rem;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: var(--white);
  overflow: hidden;
  background: var(--forest-dark);
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
}

.hero-overlay {
  position: relative;
  z-index: 1;
  padding: var(--space-6) var(--space-3) var(--space-5);
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.hero-logo {
  font-family: var(--font-head);
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 700;
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
  color: var(--white);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}
.hero-logo .wild {
  color: var(--orange);
}

.hero-tagline {
  font-size: clamp(1.05rem, 2.5vw, 1.35rem);
  opacity: 0.92;
  margin-bottom: var(--space-4);
}

.dice-btn {
  font-size: 1.3rem;
}
.dice-btn .dice-emoji {
  display: inline-block;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.dice-btn:hover .dice-emoji,
.dice-btn:focus-visible .dice-emoji {
  transform: rotate(20deg) scale(1.15);
}
.dice-btn.rolling .dice-emoji {
  animation: roll 0.6s ease;
}
@keyframes roll {
  0% { transform: rotate(0deg) scale(1); }
  30% { transform: rotate(180deg) scale(1.3); }
  60% { transform: rotate(320deg) scale(0.9); }
  100% { transform: rotate(360deg) scale(1); }
}

/* ---------- Random adventure result ---------- */
.result-card {
  margin-top: var(--space-4);
  background: var(--white);
  color: var(--slate);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  text-align: left;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.result-card.visible {
  opacity: 1;
  transform: translateY(0);
}
.result-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.result-body {
  padding: var(--space-3);
}
.result-category {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--forest);
  background: var(--gray-light);
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  margin-bottom: 0.6rem;
}
.result-title {
  font-size: 1.6rem;
  margin-bottom: 0.4rem;
}
.result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
  font-size: 0.9rem;
  color: var(--slate-soft);
  margin: var(--space-2) 0;
}
.result-meta span {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: var(--space-2);
}

/* ---------- Sections ---------- */
.section {
  padding: var(--space-6) 0;
}
.section-alt {
  background: var(--gray-light);
}
.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto var(--space-4);
}
.section-head h2 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
}
.section-head p {
  color: var(--slate-soft);
}
.section-foot {
  text-align: center;
  margin-top: var(--space-4);
}

/* ---------- Fade-in on scroll ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Card grid ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-3);
}

.adventure-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.adventure-card:hover,
.adventure-card:focus-within {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}
.adventure-card img {
  aspect-ratio: 3 / 2;
  object-fit: cover;
  width: 100%;
}
.adventure-card-body {
  padding: var(--space-2) var(--space-2) var(--space-3);
  display: flex;
  flex-direction: column;
  flex: 1;
}
.adventure-card .cat-tag {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--white);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.5rem;
}
.adventure-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}
.adventure-card p {
  font-size: 0.9rem;
  color: var(--slate-soft);
  margin-bottom: 0.75rem;
  flex: 1;
}
.adventure-card .card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--slate-soft);
  margin-top: auto;
}
.card-link-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
}
.adventure-card {
  position: relative;
}

/* ---------- Category chips ---------- */
.category-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}
.category-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: var(--white);
  border: 2px solid var(--gray-mid);
  color: var(--slate);
  font-weight: 600;
  font-size: 0.9rem;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.category-chip:hover {
  border-color: var(--forest);
}
.category-chip.active {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--white);
}

/* ---------- Filter bar ---------- */
.filter-bar {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: var(--space-3);
  margin-bottom: var(--space-4);
}
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: flex-end;
}
.filter-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--slate-soft);
}
.filter-field select,
.filter-field input[type="text"],
.filter-field input[type="search"] {
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--gray-mid);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  min-height: 44px;
  background: var(--white);
  color: var(--slate);
}
.search-field {
  flex: 1 1 220px;
}
.checkbox-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: var(--space-2);
}
.checkbox-field {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--slate-soft);
  font-weight: 600;
}
.checkbox-field input {
  width: 20px;
  height: 20px;
  accent-color: var(--forest);
}

.results-count {
  color: var(--slate-soft);
  font-size: 0.9rem;
  margin-bottom: var(--space-2);
}
.empty-state {
  text-align: center;
  padding: var(--space-5) var(--space-2);
  color: var(--slate-soft);
}

/* ---------- Detail page ---------- */
.detail-hero {
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  border-radius: var(--radius-lg);
}
.detail-header {
  margin: var(--space-3) 0 var(--space-2);
}
.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-2);
  background: var(--gray-light);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  margin: var(--space-3) 0;
}
.meta-item .label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--slate-soft);
  font-weight: 700;
  margin-bottom: 0.15rem;
}
.meta-item .value {
  font-weight: 600;
}
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: var(--space-2) 0;
}
.pill {
  background: var(--gray-light);
  color: var(--slate);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
}
.gallery-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--space-2);
  margin: var(--space-3) 0;
}
.gallery-row img {
  border-radius: var(--radius-sm);
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: var(--space-3) 0;
}
.breadcrumb {
  font-size: 0.85rem;
  color: var(--slate-soft);
  margin-bottom: var(--space-2);
}
.breadcrumb a {
  color: var(--forest);
  font-weight: 600;
}

/* ---------- Map page ---------- */
#map {
  height: 60vh;
  min-height: 420px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: var(--space-2);
}
.legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 2px solid transparent;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}
.legend-chip .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.legend-chip.off {
  opacity: 0.4;
}
.leaflet-popup-content h3 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
}
.leaflet-popup-content p {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
}

/* ---------- Bucket list ---------- */
.progress-wrap {
  background: var(--gray-mid);
  border-radius: 999px;
  height: 14px;
  overflow: hidden;
  margin: var(--space-2) 0 var(--space-1);
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--forest), var(--orange));
  border-radius: 999px;
  transition: width 0.4s ease;
  width: 0%;
}
.progress-label {
  font-weight: 700;
  color: var(--forest-dark);
}
.bucket-list-grid {
  display: grid;
  gap: 0.75rem;
}
.bucket-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 0.9rem var(--space-2);
  box-shadow: var(--shadow-sm);
}
.bucket-item.checked {
  opacity: 0.6;
}
.bucket-item.checked .bucket-title {
  text-decoration: line-through;
}
.bucket-item input[type="checkbox"] {
  width: 24px;
  height: 24px;
  accent-color: var(--forest);
  flex-shrink: 0;
}
.bucket-thumb {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}
.bucket-title {
  font-weight: 700;
}
.bucket-sub {
  font-size: 0.82rem;
  color: var(--slate-soft);
}
.bucket-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-2);
}

/* ---------- Trivia ---------- */
.trivia-card {
  max-width: 640px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-4);
}
.trivia-score {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  color: var(--forest-dark);
  margin-bottom: var(--space-2);
}
.trivia-question {
  font-size: 1.25rem;
  margin-bottom: var(--space-3);
}
.trivia-choices {
  display: grid;
  gap: 0.6rem;
}
.trivia-choice {
  text-align: left;
  background: var(--gray-light);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  font-weight: 600;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  min-height: 48px;
}
.trivia-choice:hover:not(:disabled) {
  border-color: var(--forest);
}
.trivia-choice.correct {
  background: #e3f3ea;
  border-color: var(--forest);
  color: var(--forest-dark);
}
.trivia-choice.incorrect {
  background: #fdeaea;
  border-color: #c0392b;
  color: #c0392b;
}
.trivia-choice:disabled {
  cursor: default;
}
.trivia-fact {
  margin-top: var(--space-3);
  padding: var(--space-2);
  background: var(--gray-light);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  color: var(--slate-soft);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.trivia-fact.visible {
  opacity: 1;
  transform: translateY(0);
}
.trivia-next {
  margin-top: var(--space-3);
  text-align: right;
}

/* ---------- Photo of the week / trivia teaser (home) ---------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  align-items: center;
}
@media (max-width: 760px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}
.photo-of-week img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.teaser-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-3);
}

/* ---------- About page ---------- */
.about-content {
  max-width: 720px;
  margin: 0 auto;
}
.about-content h2 {
  margin-top: var(--space-4);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--slate);
  color: rgba(255, 255, 255, 0.8);
  padding: var(--space-4) 0;
  margin-top: var(--space-5);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.site-footer a:hover {
  color: var(--white);
}
.footer-nav {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

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