:root {
  --bg: #0e0d0b;
  --surface: #1a1815;
  --surface-2: #24211d;
  --line: #2f2b26;
  --text: #f4efe6;
  --muted: #a69d90;
  --accent: #6fc2aa;
  --accent-ink: #07211a;
  --season: #f2b45a;
  --radius: 18px;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.1; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.8rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.35rem; }
.muted { color: var(--muted); }
.eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.72rem; font-weight: 600; color: var(--accent); margin: 0 0 8px; }
.lede { font-size: clamp(1rem, 1.6vw, 1.2rem); color: #e2dacd; max-width: 46ch; }
main:focus { outline: none; }

/* Images fade in once decoded */
.img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity 0.6s ease, transform 1.2s ease; background: var(--surface-2); }
.img.loaded { opacity: 1; }
.ph { opacity: 1; background: linear-gradient(135deg, var(--surface), var(--surface-2)); }

/* Nav */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--gutter);
  transition: background 0.3s, padding 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.solid { background: rgba(14, 13, 11, 0.86); backdrop-filter: blur(14px); padding-block: 12px; border-color: var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 600; font-size: 1.3rem; letter-spacing: -0.01em; }
.brand b { font-weight: 700; color: var(--accent); }
.brand img { width: 40px; height: 40px; border-radius: 50%; box-shadow: 0 2px 12px rgba(0,0,0,0.35); transition: transform 0.3s; }
.brand:hover img { transform: rotate(-8deg); }
.nav-links { display: flex; gap: 6px; }
.nav-links a { padding: 8px 14px; border-radius: 999px; font-weight: 500; font-size: 0.95rem; display: flex; align-items: center; gap: 6px; }
.nav-links a:hover { background: rgba(255, 255, 255, 0.08); }
.nav-links a.active { background: rgba(255, 255, 255, 0.12); }
.badge:not(:empty) { background: var(--accent); color: var(--accent-ink); font-size: 0.72rem; font-weight: 700; border-radius: 999px; padding: 1px 7px; }

/* Hero */
.hero { position: relative; height: 100svh; min-height: 620px; display: flex; align-items: flex-end; overflow: hidden; }
.hero-slides, .hero-slide { position: absolute; inset: 0; }
.hero-slide { opacity: 0; transition: opacity 1.6s ease; }
.hero-slide.active { opacity: 1; }
.hero-slide.active .img { animation: kenburns 9s ease-out forwards; }
@keyframes kenburns { from { transform: scale(1.12); } to { transform: scale(1); } }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14,13,11,0.55) 0%, rgba(14,13,11,0.05) 35%, rgba(14,13,11,0.7) 75%, var(--bg) 100%); }
.hero-content { position: relative; padding: 0 var(--gutter) clamp(48px, 10vh, 110px); max-width: 900px; }
.hero-content .eyebrow { display: inline-block; padding: 6px 12px; border-radius: 999px; background: rgba(14,13,11,0.55); backdrop-filter: blur(8px); }
.hero-content h1 { margin-bottom: 18px; text-shadow: 0 2px 30px rgba(0,0,0,0.35); }
.hero-credit { position: absolute; right: var(--gutter); bottom: 16px; margin: 0; font-size: 0.72rem; color: rgba(255,255,255,0.6); max-width: 50%; text-align: right; }

.search {
  display: flex; align-items: center; gap: 12px; margin-top: 28px; max-width: 520px;
  background: rgba(255,255,255,0.12); backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.22); border-radius: 999px; padding: 6px 8px 6px 20px;
}
.search:focus-within { border-color: var(--accent); background: rgba(255,255,255,0.16); }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font: inherit; padding: 12px 0; font-size: 1rem; }
.search input::placeholder { color: rgba(255,255,255,0.65); }
.stats { display: flex; gap: 24px; margin-top: 24px; color: #d8cfc1; font-size: 0.92rem; flex-wrap: wrap; }
.stats b { color: var(--text); font-family: var(--serif); font-size: 1.3rem; margin-right: 4px; }

/* Sections */
.section { padding: clamp(48px, 8vw, 96px) var(--gutter) 0; max-width: 1440px; margin: 0 auto; }
.section-head { display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: flex-end; justify-content: space-between; margin-bottom: 28px; }
.section-head p { margin: 0; }
.page-top { padding-top: 120px; min-height: 70vh; }

/* State grid */
.state-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); grid-auto-rows: 340px; gap: 16px; }
.state-card { position: relative; border-radius: var(--radius); overflow: hidden; isolation: isolate; }
.state-card.wide { grid-column: span 2; }
.state-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.82)); z-index: 0; }
.state-card .img { position: absolute; inset: 0; }
.state-card:hover .img { transform: scale(1.06); }
.state-info { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px; z-index: 1; }
.state-info h3 { font-size: 1.7rem; }
.state-info p { margin: 6px 0 0; color: #ddd3c5; font-size: 0.93rem; }
.count { display: inline-block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; background: rgba(255,255,255,0.16); backdrop-filter: blur(8px); border-radius: 999px; padding: 4px 10px; margin-bottom: 10px; }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 8px 16px; font-size: 0.88rem; font-weight: 500; transition: 0.2s; }
.chip:hover { border-color: var(--muted); }
.chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chip-season.on { background: var(--season); border-color: var(--season); color: #2a1a04; }

/* Place cards */
.place-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.card { position: relative; background: var(--surface); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); transition: transform 0.3s, border-color 0.3s; }
.card:hover { transform: translateY(-4px); border-color: #4a443b; }
.card-media { display: block; aspect-ratio: 4 / 3; overflow: hidden; position: relative; }
.card:hover .card-media .img { transform: scale(1.05); }
.card-body { display: block; padding: 16px 18px 20px; }
.card-body h3 { margin-bottom: 8px; }
.card-meta { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--muted); font-size: 0.88rem; }
.save-btn { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(14,13,11,0.55); backdrop-filter: blur(8px); transition: transform 0.2s; }
.save-btn:hover { transform: scale(1.1); }
.save-btn svg, .btn svg { fill: none; stroke: #fff; stroke-width: 2; }
.save-btn.on svg, .btn.on svg { fill: #ff5a6e; stroke: #ff5a6e; }

.pill { display: inline-block; font-size: 0.75rem; font-weight: 600; border-radius: 999px; padding: 4px 11px; background: rgba(255,255,255,0.14); backdrop-filter: blur(8px); }
.pill-season { background: var(--season); color: #2a1a04; }
.card-media .pill { position: absolute; left: 12px; top: 12px; }
.muted-pill { color: var(--muted); }

/* Page heroes */
.page-hero { position: relative; height: 62vh; min-height: 440px; display: flex; align-items: flex-end; overflow: hidden; }
.page-hero.tall { height: 82vh; min-height: 560px; }
.page-hero > .img { position: absolute; inset: 0; }
.page-hero-content { position: relative; padding: 0 var(--gutter) 48px; width: 100%; max-width: 1440px; margin: 0 auto; }
.page-hero-content h1 { margin-bottom: 14px; }
.back { display: inline-block; margin-bottom: 18px; font-size: 0.9rem; color: #e2dacd; }
.back:hover { color: var(--accent); }
.tags { display: flex; gap: 8px; flex-wrap: wrap; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.28); background: rgba(14,13,11,0.35); backdrop-filter: blur(10px); font-weight: 600; font-size: 0.92rem; transition: 0.2s; }
.btn:hover { background: rgba(255,255,255,0.14); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-primary:hover { background: #8ad3be; }
.btn-primary svg { stroke: var(--accent-ink); }

/* Place info */
.place-info { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; align-content: start; }
.info { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.info p:last-child { margin-bottom: 0; }
.info-big { font-family: var(--serif); font-size: 1.3rem; margin: 0 0 12px; line-height: 1.3; }
.shotlist { background: linear-gradient(160deg, #142a24, var(--surface)); border: 1px solid #23423a; border-radius: var(--radius); padding: 26px; }
.shotlist p { margin: 6px 0 18px; }
.shotlist ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.shotlist label { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; padding: 12px 14px; background: rgba(0,0,0,0.22); border-radius: 12px; }
.shotlist input { appearance: none; flex: none; width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--accent); margin: 1px 0 0; cursor: pointer; display: grid; place-items: center; }
.shotlist input:checked { background: var(--accent); }
.shotlist input:checked::after { content: ""; width: 6px; height: 11px; border: solid var(--accent-ink); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translate(-1px, -1px); }
.shotlist input:checked + span { color: var(--muted); text-decoration: line-through; }
.shotlist input:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* How to get there */
.text-link { color: var(--accent); font-weight: 600; }
.text-link:hover { text-decoration: underline; }
.reach-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.reach { display: flex; gap: 16px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.reach p:last-child { margin: 0; }
.reach-icon { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(111, 194, 170, 0.14); color: var(--accent); }

/* Masonry gallery */
.masonry { columns: 3 300px; column-gap: 14px; }
.tile { position: relative; display: block; width: 100%; padding: 0; border: 0; background: var(--surface); margin: 0 0 14px; border-radius: 14px; overflow: hidden; break-inside: avoid; cursor: zoom-in; }
.tile .img { height: auto; }
.tile:hover .img { transform: scale(1.03); }
.tile-count { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 5px; font-size: 0.8rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: rgba(14,13,11,0.7); backdrop-filter: blur(8px); }

.next-place { padding-bottom: 0; }
.next-link { display: flex; flex-direction: column; padding: 36px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); transition: 0.25s; }
.next-link:hover { border-color: var(--accent); }
.next-name { font-family: var(--serif); font-size: clamp(1.6rem, 4vw, 2.6rem); }

.empty { text-align: center; color: var(--muted); padding: 60px 0; grid-column: 1 / -1; }
.empty .btn { margin-top: 12px; }

/* Lightbox + comments */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(6,6,5,0.97); display: grid; grid-template-columns: minmax(0, 1fr) 380px; }
.lb-stage { position: relative; display: flex; align-items: center; justify-content: center; padding: 24px 76px; min-height: 0; }
.lb-figure { margin: 0; max-width: 100%; display: flex; flex-direction: column; align-items: center; gap: 14px; }
#lb-img { max-width: 100%; max-height: 80vh; object-fit: contain; border-radius: 6px; opacity: 0; transition: opacity 0.35s; }
#lb-img.loaded { opacity: 1; }
#lb-cap { display: flex; flex-direction: column; gap: 4px; text-align: center; font-size: 0.85rem; max-width: 760px; }
#lb-cap a { color: var(--accent); }
.lb-btn { position: absolute; z-index: 2; border: 0; background: rgba(255,255,255,0.1); width: 52px; height: 52px; border-radius: 50%; font-size: 2rem; line-height: 1; display: grid; place-items: center; }
.lb-btn:hover { background: rgba(255,255,255,0.2); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 14px; }
.lb-next { right: 14px; }

.lb-panel { display: flex; flex-direction: column; min-height: 0; background: var(--surface); border-left: 1px solid var(--line); padding: 26px 20px 20px; }
.lb-panel h3 { font-size: 1.25rem; padding-right: 60px; }
.comments { flex: 1; min-height: 0; overflow-y: auto; list-style: none; margin: 16px 0; padding: 0 4px 0 0; display: grid; align-content: start; gap: 12px; }
.comments li { background: var(--surface-2); border-radius: 14px; padding: 12px 14px; }
.comments li p { margin: 6px 0 0; font-size: 0.93rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.comments .no-comments { background: none; color: var(--muted); text-align: center; padding: 24px 8px; font-size: 0.92rem; }
.c-head { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; }
.c-head time { margin-left: auto; color: var(--muted); font-size: 0.78rem; }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 0.8rem; }
.comment-form { display: grid; gap: 10px; border-top: 1px solid var(--line); padding-top: 16px; }
.comment-form input, .comment-form textarea { width: 100%; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; resize: vertical; }
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--accent); }
.comment-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
.form-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.form-msg { font-size: 0.85rem; color: var(--muted); }
.comment-form button:disabled { opacity: 0.6; cursor: wait; }

.footer { margin-top: 110px; padding: 40px var(--gutter); border-top: 1px solid var(--line); color: var(--muted); font-size: 0.85rem; text-align: center; }
.footer a { color: var(--text); text-decoration: underline; }

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

@media (max-width: 900px) {
  .place-info { grid-template-columns: 1fr; }
  .lightbox { grid-template-columns: 1fr; grid-template-rows: auto auto; overflow-y: auto; }
  .lb-stage { min-height: 62svh; padding: 64px 12px 16px; }
  #lb-img { max-height: 58svh; }
  .lb-close { position: fixed; }
  .lb-panel { min-height: auto; border-left: 0; border-top: 1px solid var(--line); }
  .lb-panel h3 { order: -2; padding-right: 0; }
  .comments { flex: none; overflow: visible; }
  .comment-form { order: -1; border-top: 0; padding-top: 0; margin-top: 14px; }
}
@media (max-width: 640px) {
  .state-card.wide { grid-column: auto; }
  .state-grid { grid-auto-rows: 280px; }
  .masonry { columns: 2; column-gap: 8px; }
  .tile { margin-bottom: 8px; border-radius: 10px; }
  .lb-prev, .lb-next { display: none; }
  .brand { font-size: 1.1rem; }
  .brand img { width: 34px; height: 34px; }
  .hero-credit { display: none; }
  .nav-links a { padding: 8px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
