:root {
  --ink: #0f2a2a;
  --ink-soft: #1b3d3d;
  --sand: #f5efe6;
  --mist: #edf6f2;
  --surface: #fffaf4;
  --coral: #e76d5b;
  --sun: #f4b468;
  --teal: #0c4b4a;
  --mint: #c8e7dd;
  --border: rgba(15, 42, 42, 0.12);
  --shadow: 0 30px 80px rgba(15, 42, 42, 0.14);
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Sora", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: linear-gradient(140deg, #f6eee4 0%, #eef6f2 45%, #fef1e6 100%);
  position: relative;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: -20% auto auto -20%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle at 30% 30%, rgba(244, 180, 104, 0.28), transparent 60%);
  z-index: 0;
  pointer-events: none;
}

body::after {
  inset: auto -25% -25% auto;
  width: 65vw;
  height: 65vw;
  background: radial-gradient(circle at 60% 60%, rgba(12, 75, 74, 0.22), transparent 60%);
}

.site-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 1rem;
  background: var(--coral);
  color: var(--surface);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  text-decoration: none;
  z-index: 5;
}

.skip-link:focus {
  left: 1rem;
}

.site-header {
  background: rgba(255, 250, 244, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 4;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.brand-text {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.primary-nav .menu {
  gap: 1rem;
}

.primary-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-actions .button {
  margin: 0;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--border);
}

.mobile-nav.is-open {
  display: block;
}

.main-content {
  flex: 1 0 auto;
  padding: 2.5rem 0 4rem;
}

.section {
  margin-bottom: 3.5rem;
}

.section-header {
  margin-bottom: 1.5rem;
}

.section-spacer {
  margin-top: 1.5rem;
}

.section-title {
  font-size: 2rem;
  margin: 0 0 0.75rem;
}

.section-description {
  color: var(--ink-soft);
  margin: 0;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.card-media {
  width: 100%;
  padding-top: 56%;
  border-radius: calc(var(--radius) - 6px);
  background: var(--mist);
  margin-bottom: 1rem;
}

.mapbox-map {
  width: 100%;
  height: 320px;
  border-radius: calc(var(--radius) - 6px);
  overflow: hidden;
  background: var(--mist);
  margin-bottom: 1rem;
}

.mapbox-map--empty {
  display: block;
}

.card-meta {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  background: var(--mint);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  font-size: 0.85rem;
}

.info-box {
  border-left: 4px solid var(--teal);
  background: var(--surface);
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

input,
select,
textarea {
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--mist);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

textarea {
  border-radius: 18px;
}

.button {
  border-radius: 999px;
  background: var(--coral);
  color: var(--surface);
}

.button.hollow {
  background: transparent;
  color: var(--ink);
  border-color: var(--teal);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  background: rgba(255, 250, 244, 0.9);
}

.footer-meta {
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.search-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 42, 42, 0.4);
  z-index: 10;
  padding: 2rem;
}

.search-modal.is-open {
  display: block;
}

.search-modal__panel {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 720px;
  margin: 4rem auto 0;
  box-shadow: var(--shadow);
}

@media (max-width: 768px) {
  .primary-nav {
    display: none;
  }

  .mobile-nav {
    display: block;
  }

  .site-header__inner {
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  .mapbox-map {
    height: 240px;
  }
}

/* Map container and legend */
.map-container {
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--mist);
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.map-legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.map-legend-marker {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
}

.map-legend-marker--lock {
  background: #2563eb;
}

.map-legend-marker--pub {
  background: #dc2626;
}

.map-legend-marker--place {
  background: #059669;
}

/* Card grid horizontal scroll variant */
.card-grid--scroll {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  gap: 1rem;
  padding-bottom: 0.5rem;
}

.card-grid--scroll > .card {
  flex: 0 0 280px;
  scroll-snap-align: start;
}

/* Section CTA */
.section-cta {
  margin-top: 1.5rem;
  text-align: center;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ink: #f5efe6;
    --ink-soft: #c8e7dd;
    --mist: #1b3d3d;
    --surface: #0f2a2a;
    --border: rgba(245, 239, 230, 0.18);
    --shadow: 0 30px 80px rgba(12, 75, 74, 0.45);
  }

  body {
    background: linear-gradient(140deg, #0f2a2a 0%, #0c4b4a 45%, #1b3d3d 100%);
  }

  body::before {
    background: radial-gradient(circle at 30% 30%, rgba(244, 180, 104, 0.2), transparent 65%);
  }

  body::after {
    background: radial-gradient(circle at 60% 60%, rgba(200, 231, 221, 0.16), transparent 65%);
  }

  .site-header {
    background: rgba(15, 42, 42, 0.88);
  }

  .site-footer {
    background: rgba(15, 42, 42, 0.92);
  }

  .button {
    color: var(--ink);
  }

  .button.hollow {
    border-color: var(--mint);
  }

  .tag {
    color: var(--teal);
  }

  .info-box {
    border-left-color: var(--sun);
  }
}
