:root {
  color-scheme: light;
  --paper: #f7f2e8;
  --paper-strong: #fffaf0;
  --ink: #15211d;
  --muted: #5f6c64;
  --line: rgba(31, 51, 45, 0.16);
  --bay: #0d7380;
  --bay-deep: #073846;
  --poppy: #e25330;
  --gold: #eeb54f;
  --sage: #6f9165;
  --mint: #4ec9b6;
  --shadow: 0 18px 42px rgba(22, 37, 32, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
  padding-bottom: 68px;
}

body::selection {
  background: rgba(226, 83, 48, 0.22);
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 20;
  transform: translateY(-160%);
  border-radius: 8px;
  background: var(--paper-strong);
  color: var(--ink);
  padding: 0.7rem 0.9rem;
  box-shadow: var(--shadow);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1rem;
  color: #fffaf0;
  pointer-events: none;
}

.brand,
.top-link {
  pointer-events: auto;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(7, 56, 70, 0.66);
  color: #fffaf0;
  text-decoration: none;
  backdrop-filter: blur(12px);
}

.brand {
  padding: 0.62rem 0.82rem;
  font-weight: 800;
}

.top-link {
  padding: 0.55rem 0.78rem;
  font-size: 0.9rem;
}

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  isolation: isolate;
  background: var(--bay-deep);
}

.hero__image,
.hero__shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__image {
  object-fit: cover;
  object-position: 50% 40%;
  z-index: -2;
}

.hero__shade {
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(5, 24, 32, 0.28), rgba(5, 24, 32, 0.5) 42%, rgba(5, 24, 32, 0.82)),
    linear-gradient(90deg, rgba(5, 24, 32, 0.74), rgba(5, 24, 32, 0.12));
}

.hero__content {
  display: grid;
  align-content: end;
  min-height: 620px;
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 6.4rem 0 2.8rem;
  color: #fffaf0;
}

.kicker,
.section-kicker {
  margin: 0 0 0.7rem;
  color: var(--poppy);
  font-size: 0.84rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.hero .kicker {
  color: #ffd081;
  text-shadow: 0 1px 18px rgba(7, 56, 70, 0.7);
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: 2.65rem;
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: 1.78rem;
  line-height: 1.04;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.16;
}

.hero__lede {
  max-width: 660px;
  margin: 1.1rem 0 0;
  color: rgba(255, 250, 240, 0.9);
  font-size: 1.05rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.45rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.72rem 1rem;
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button--primary {
  background: var(--gold);
  color: #201509;
}

.button--light {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 250, 240, 0.14);
  color: #fffaf0;
  backdrop-filter: blur(10px);
}

.button--outline {
  border-color: var(--line);
  background: rgba(255, 250, 240, 0.78);
  color: var(--ink);
}

.button--small {
  min-height: 38px;
  padding: 0.52rem 0.75rem;
  font-size: 0.9rem;
}

.button--dark {
  background: var(--bay-deep);
  color: #fffaf0;
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 1.65rem 0 0;
  max-width: 620px;
}

.hero__stats div {
  min-width: 0;
  border: 1px solid rgba(255, 250, 240, 0.22);
  border-radius: 8px;
  padding: 0.82rem;
  background: rgba(5, 24, 32, 0.46);
  backdrop-filter: blur(10px);
}

.hero__stats dt {
  color: rgba(255, 250, 240, 0.72);
  font-size: 0.78rem;
}

.hero__stats dd {
  margin: 0.2rem 0 0;
  color: #fffaf0;
  font-size: 1.18rem;
  font-weight: 900;
}

.control-band {
  position: sticky;
  top: 0;
  z-index: 9;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 242, 232, 0.92);
  backdrop-filter: blur(14px);
}

.inner {
  width: min(1120px, calc(100% - 1.1rem));
  margin: 0 auto;
}

.controls {
  display: grid;
  gap: 0.65rem;
  padding: 0.8rem 0;
}

.search {
  display: grid;
  gap: 0.35rem;
}

.search span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.search input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-strong);
  color: var(--ink);
  padding: 0.72rem 0.8rem;
  outline: none;
}

.search input:focus {
  border-color: rgba(13, 115, 128, 0.58);
  box-shadow: 0 0 0 3px rgba(78, 201, 182, 0.2);
}

.chip-row,
.scope-tabs,
.card-actions,
.source-actions {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.1rem;
  scrollbar-width: none;
}

.chip-row::-webkit-scrollbar,
.scope-tabs::-webkit-scrollbar,
.card-actions::-webkit-scrollbar,
.source-actions::-webkit-scrollbar {
  display: none;
}

.chip,
.scope-tab,
.icon-button {
  flex: 0 0 auto;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-strong);
  color: var(--ink);
  padding: 0.52rem 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.chip.is-active,
.scope-tab.is-active {
  border-color: transparent;
  background: var(--bay-deep);
  color: #fffaf0;
}

.section {
  padding: 3.5rem 0;
  scroll-margin-top: 128px;
}

.section--events {
  background: #fff8ec;
}

.section--map {
  background: #e7f0ec;
}

.section--itineraries {
  background: #f3eadc;
}

.section--sources {
  background: var(--bay-deep);
  color: #fffaf0;
}

.section-heading {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 1.05rem;
}

.section-note {
  max-width: 740px;
  margin: 0;
  color: var(--muted);
}

.section--sources .section-note,
.section--sources .tip p,
.section--sources .source-card p {
  color: rgba(255, 250, 240, 0.78);
}

.scope-tabs {
  margin-bottom: 1rem;
}

.event-layout,
.map-layout {
  display: grid;
  gap: 1rem;
}

.timeline {
  position: relative;
  display: grid;
  gap: 0.75rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0.72rem;
  top: 0.4rem;
  bottom: 0.4rem;
  width: 2px;
  border-radius: 999px;
  background: rgba(226, 83, 48, 0.22);
}

.timeline-item {
  position: relative;
  display: grid;
  gap: 0.32rem;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-strong);
  color: var(--ink);
  padding: 0.9rem 0.9rem 0.9rem 2.45rem;
  text-align: left;
  box-shadow: 0 8px 20px rgba(22, 37, 32, 0.06);
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 0.45rem;
  top: 1.05rem;
  width: 0.58rem;
  height: 0.58rem;
  border: 3px solid var(--paper-strong);
  border-radius: 999px;
  background: var(--poppy);
  box-shadow: 0 0 0 2px rgba(226, 83, 48, 0.32);
}

.timeline-item.is-active {
  border-color: rgba(226, 83, 48, 0.58);
  box-shadow: 0 12px 26px rgba(226, 83, 48, 0.13);
}

.timeline-date {
  color: var(--poppy);
  font-size: 0.82rem;
  font-weight: 900;
}

.timeline-meta,
.meta-row,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
  align-items: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid rgba(31, 51, 45, 0.12);
  border-radius: 999px;
  background: rgba(13, 115, 128, 0.08);
  color: #23413c;
  padding: 0.24rem 0.5rem;
  font-size: 0.78rem;
  font-weight: 800;
}

.pill--warm {
  background: rgba(238, 181, 79, 0.22);
  color: #65410b;
}

.detail-panel,
.map-detail,
.place-card,
.itinerary-card,
.source-card,
.tip {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-strong);
  box-shadow: 0 10px 28px rgba(22, 37, 32, 0.08);
}

.detail-panel,
.map-detail {
  padding: 1rem;
}

.detail-panel {
  align-self: start;
  position: sticky;
  top: 128px;
}

.detail-panel p,
.place-card p,
.itinerary-card p,
.map-detail p {
  margin: 0;
  color: var(--muted);
}

.detail-panel h3,
.map-detail h3 {
  margin-bottom: 0.45rem;
}

.detail-stack {
  display: grid;
  gap: 0.85rem;
}

.detail-line {
  display: grid;
  gap: 0.18rem;
}

.detail-line strong {
  color: var(--ink);
  font-size: 0.82rem;
}

.scene-band {
  padding: 2.6rem 0;
  background: var(--bay-deep);
}

.scene-grid {
  display: grid;
  gap: 1rem;
}

.scene-panel {
  overflow: hidden;
  border-radius: 8px;
  background: #fffaf0;
  box-shadow: var(--shadow);
}

.scene-panel img {
  width: 100%;
  aspect-ratio: 5 / 3;
  object-fit: cover;
}

.scene-panel div {
  padding: 1rem;
}

.scene-panel p:last-child {
  margin: 0.55rem 0 0;
  color: var(--muted);
}

.map-layout {
  align-items: start;
}

.bay-map {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(31, 51, 45, 0.16);
  border-radius: 8px;
  background: var(--bay);
  box-shadow: var(--shadow);
}

.bay-map img {
  width: 100%;
  aspect-ratio: 1000 / 860;
  object-fit: cover;
}

.map-markers {
  position: absolute;
  inset: 0;
}

.map-pin {
  position: absolute;
  left: var(--x);
  top: var(--y);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  transform: translate(-50%, -50%);
  border: 2px solid #fffaf0;
  border-radius: 999px;
  background: var(--poppy);
  color: #fffaf0;
  font-size: 0.75rem;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(5, 24, 32, 0.28);
}

.map-pin[data-kind="place"] {
  background: var(--bay-deep);
}

.map-pin[data-kind="mixed"] {
  background: var(--gold);
  color: #211808;
}

.map-pin.is-active {
  outline: 4px solid rgba(78, 201, 182, 0.48);
}

.map-detail {
  display: grid;
  gap: 0.8rem;
}

.map-group {
  display: grid;
  gap: 0.6rem;
}

.map-group button {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.78);
  color: var(--ink);
  padding: 0.72rem;
  text-align: left;
}

.place-grid,
.itinerary-grid,
.tip-list,
.source-list {
  display: grid;
  gap: 0.85rem;
}

.place-card,
.itinerary-card,
.source-card,
.tip {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
}

.place-card__top,
.itinerary-card__top {
  display: grid;
  gap: 0.5rem;
}

.favorite-button {
  min-width: 64px;
  height: 40px;
  justify-self: start;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.8);
  color: var(--muted);
  padding: 0 0.7rem;
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1;
}

.favorite-button.is-saved {
  border-color: rgba(238, 181, 79, 0.75);
  background: rgba(238, 181, 79, 0.26);
  color: #80520a;
}

.hours-box {
  border-left: 4px solid var(--mint);
  padding-left: 0.72rem;
  color: var(--ink);
}

.hours-box strong {
  display: block;
  margin-bottom: 0.18rem;
  font-size: 0.82rem;
}

details {
  border-top: 1px solid var(--line);
  padding-top: 0.75rem;
}

summary {
  color: var(--bay-deep);
  cursor: pointer;
  font-weight: 900;
}

.stop-list {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stop-list li {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  color: var(--muted);
}

.stop-list span {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 999px;
  background: var(--bay-deep);
  color: #fffaf0;
  font-size: 0.78rem;
  font-weight: 900;
}

.source-list {
  margin-top: 1rem;
}

.section--sources .source-card,
.section--sources .tip {
  border-color: rgba(255, 250, 240, 0.18);
  background: rgba(255, 250, 240, 0.08);
  box-shadow: none;
}

.section--sources a {
  color: #fff0bd;
}

.empty-state {
  border: 1px dashed rgba(31, 51, 45, 0.28);
  border-radius: 8px;
  padding: 1rem;
  color: var(--muted);
  background: rgba(255, 250, 240, 0.56);
}

.mobile-nav {
  position: fixed;
  left: 0.7rem;
  right: 0.7rem;
  bottom: 0.65rem;
  z-index: 12;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.35rem;
  border: 1px solid rgba(255, 250, 240, 0.16);
  border-radius: 999px;
  background: rgba(7, 56, 70, 0.9);
  padding: 0.35rem;
  box-shadow: 0 16px 44px rgba(5, 24, 32, 0.32);
  backdrop-filter: blur(16px);
}

.mobile-nav a {
  display: grid;
  min-height: 40px;
  place-items: center;
  border-radius: 999px;
  color: #fffaf0;
  font-size: 0.82rem;
  font-weight: 900;
  text-decoration: none;
}

.mobile-nav a:focus,
.mobile-nav a:hover {
  background: rgba(255, 250, 240, 0.12);
}

@media (min-width: 720px) {
  body {
    padding-bottom: 0;
  }

  .site-top {
    padding: 1rem 1.6rem;
  }

  .hero,
  .hero__content {
    min-height: 680px;
  }

  .hero__content {
    padding-bottom: 4rem;
  }

  h1 {
    font-size: 4rem;
  }

  h2 {
    font-size: 2.25rem;
  }

  .controls {
    grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
    align-items: end;
  }

  .event-layout,
  .map-layout {
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  }

  .scene-grid,
  .itinerary-grid,
  .tip-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .place-grid,
  .source-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .place-card__top,
  .itinerary-card__top {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .mobile-nav {
    display: none;
  }
}

@media (min-width: 1040px) {
  .place-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .source-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 380px) {
  .hero__stats {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 2.28rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
