@font-face {
  font-family: "DM Sans";
  src: url("assets/dm-sans.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "DM Serif Display";
  src: url("assets/dm-serif.ttf") format("truetype");
  font-display: swap;
}

:root {
  --paper: #f3efe5;
  --paper-light: #faf8f1;
  --ink: #18251f;
  --muted: #617067;
  --line: #bac3b8;
  --green: #1f5946;
  --acid: #d9f36d;
  --coral: #ef765f;
  --yellow: #efc84f;
  --blue: #8db9c6;
  --purple: #9788b3;
  --orange: #e59c52;
  --radius: 4px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "DM Sans", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

button,
input,
select {
  font: inherit;
}

button,
a,
select,
input {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

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

.site-header {
  height: 82px;
  padding: 0 4.5vw;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid var(--ink);
}

.brand {
  width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 25px;
  line-height: 1;
  text-decoration: none;
}

.brand svg {
  width: 36px;
  height: 36px;
  fill: none;
  stroke: currentColor;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.brand svg circle {
  fill: currentColor;
}

.header-date {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.header-date span {
  color: var(--coral);
  padding: 0 7px;
}

.saved-nav {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 8px 7px 13px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}

.saved-nav:hover,
.saved-nav[aria-pressed="true"] {
  color: var(--paper-light);
  background: var(--ink);
}

.saved-nav svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.saved-nav[aria-pressed="true"] svg {
  fill: var(--coral);
  stroke: var(--coral);
}

.saved-count {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: var(--acid);
  border-radius: 50%;
  font-size: 12px;
}

.hero {
  min-height: 530px;
  display: grid;
  grid-template-columns: minmax(480px, 0.9fr) minmax(500px, 1.1fr);
  border-bottom: 1px solid var(--ink);
  overflow: hidden;
}

.hero-copy {
  padding: 76px 7vw 64px 7vw;
  position: relative;
  z-index: 2;
}

.eyebrow {
  margin: 0 0 17px;
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  text-wrap: pretty;
}

h1 {
  margin: 0;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: clamp(72px, 7.2vw, 108px);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.84;
}

h1 em {
  color: var(--coral);
  font-weight: 400;
}

.intro {
  max-width: 520px;
  margin: 34px 0 28px;
  color: #45534b;
  font-size: 18px;
  line-height: 1.55;
}

.jump-link {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  padding-bottom: 4px;
  border-bottom: 1px solid currentColor;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.jump-link span {
  font-size: 17px;
}

.weekend-map {
  position: relative;
  min-height: 530px;
  background-color: var(--yellow);
  background-image: linear-gradient(rgba(24, 37, 31, 0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(24, 37, 31, 0.07) 1px, transparent 1px);
  background-size: 38px 38px;
  border-left: 1px solid var(--ink);
  overflow: hidden;
}

.weekend-map::before,
.weekend-map::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(24, 37, 31, 0.24);
  border-radius: 50%;
}

.weekend-map::before {
  width: 280px;
  height: 280px;
  top: 58px;
  left: 80px;
}

.weekend-map::after {
  width: 430px;
  height: 430px;
  top: -166px;
  right: -105px;
}

.weekend-map svg {
  position: absolute;
  inset: 60px 0 20px;
  width: 100%;
  height: calc(100% - 80px);
  overflow: visible;
}

.river-line {
  fill: none;
  stroke: var(--blue);
  stroke-width: 38;
  opacity: 0.9;
}

.route-line {
  fill: none;
  stroke: var(--ink);
  stroke-linecap: round;
  stroke-width: 2;
}

.route-line.dashed {
  stroke-dasharray: 6 11;
}

.weekend-map circle {
  fill: var(--coral);
  stroke: var(--paper-light);
  stroke-width: 4;
}

.map-label {
  position: absolute;
  z-index: 2;
  padding: 4px 8px;
  background: var(--paper-light);
  border: 1px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.map-label.north { top: 11%; left: 10%; transform: rotate(-4deg); }
.map-label.west { bottom: 18%; left: 7%; transform: rotate(3deg); }
.map-label.old { top: 45%; left: 35%; transform: rotate(-2deg); }
.map-label.east { bottom: 14%; right: 20%; transform: rotate(3deg); }
.map-label.river { top: 23%; right: 9%; transform: rotate(-5deg); }

.map-stamp {
  position: absolute;
  z-index: 3;
  right: 8%;
  bottom: 10%;
  width: 120px;
  height: 120px;
  display: grid;
  place-content: center;
  color: var(--paper-light);
  background: var(--green);
  border-radius: 50%;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 18px;
  line-height: 1.12;
  text-align: center;
  transform: rotate(7deg);
}

.discover {
  max-width: 1320px;
  margin: 0 auto;
  padding: 86px 54px 110px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
}

.section-heading h2 {
  margin: 0;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: clamp(43px, 4vw, 60px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1;
}

.result-count {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.controls {
  margin: 48px 0 58px;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
}

.controls label {
  display: grid;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.input-wrap,
.select-wrap {
  height: 58px;
  display: flex;
  align-items: center;
  position: relative;
  border-bottom: 2px solid var(--ink);
  background: rgba(255, 255, 255, 0.35);
}

.input-wrap svg {
  width: 23px;
  margin-left: 19px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.7;
}

.input-wrap input,
.select-wrap select {
  width: 100%;
  height: 100%;
  padding: 0 18px;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 16px;
  text-transform: none;
}

.input-wrap:focus-within,
.select-wrap:focus-within {
  background: var(--paper-light);
  box-shadow: 0 0 0 3px var(--coral);
}

.input-wrap input:focus-visible,
.select-wrap select:focus-visible {
  outline: 0;
}

.input-wrap input::placeholder {
  color: #7a847e;
}

.select-wrap select {
  appearance: none;
  padding-right: 50px;
  cursor: pointer;
}

.select-wrap svg {
  position: absolute;
  right: 19px;
  width: 20px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.8;
  pointer-events: none;
}

.event-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 54px;
}

.day-group {
  min-width: 0;
}

.day-heading {
  padding: 0 0 15px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 3px solid var(--ink);
}

.day-heading h3 {
  margin: 0;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 28px;
  font-weight: 400;
}

.day-heading span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.event-card {
  --category: var(--coral);
  display: grid;
  grid-template-columns: 74px 1fr 34px;
  gap: 18px;
  min-height: 185px;
  padding: 25px 0;
  position: relative;
  border-bottom: 1px solid var(--line);
}

.event-card::after {
  content: "";
  width: 0;
  height: 3px;
  position: absolute;
  left: 0;
  bottom: -1px;
  background: var(--category);
  transition: width 250ms ease;
}

.event-card:has(.open-item:hover)::after,
.event-card:has(.open-item:focus-visible)::after {
  width: 100%;
}

.event-time {
  margin: 3px 0 0;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.event-time small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.category-line {
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.category-dot {
  width: 8px;
  height: 8px;
  display: inline-block;
  background: var(--category);
  border-radius: 50%;
}

.event-card h4 {
  margin: 0;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.08;
}

.event-meta {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.event-meta strong {
  color: var(--ink);
  font-weight: 700;
}

.open-item {
  width: 34px;
  height: 34px;
  align-self: center;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  font-size: 21px;
  line-height: 1;
  transition: background 150ms ease, color 150ms ease, transform 150ms ease;
}

.open-item:hover {
  color: var(--paper-light);
  background: var(--ink);
  transform: translateX(3px);
}

.saved-marker {
  display: none;
  color: var(--coral);
  font-size: 13px;
  line-height: 1;
}

.event-card.is-saved .saved-marker {
  display: inline;
}

.empty-state {
  max-width: 560px;
  margin: 20px auto 0;
  padding: 52px 30px;
  text-align: center;
  border: 1px dashed var(--muted);
}

.empty-state[hidden] {
  display: none;
}

.empty-sun {
  color: var(--coral);
  font-size: 40px;
}

.empty-state h3 {
  margin: 8px 0;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 32px;
  font-weight: 400;
}

.empty-state p {
  margin: 0 auto 24px;
  color: var(--muted);
}

.empty-state button {
  padding: 11px 18px;
  border: 1px solid var(--ink);
  color: var(--paper-light);
  background: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

footer {
  min-height: 150px;
  padding: 38px 4.5vw;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 50px;
  color: var(--paper-light);
  background: var(--ink);
}

footer p {
  margin: 0;
  color: #bfc8c0;
  font-size: 12px;
}

.footer-brand {
  color: var(--paper-light);
}

dialog {
  width: min(590px, 100%);
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: var(--paper-light);
  box-shadow: -12px 0 35px rgba(11, 25, 18, 0.2);
  overflow-y: auto;
}

dialog::backdrop {
  background: rgba(14, 27, 21, 0.62);
  backdrop-filter: blur(2px);
}

dialog[open] {
  animation: panel-in 260ms ease-out;
}

@keyframes panel-in {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.detail-shell {
  min-height: 100%;
}

.detail-topbar {
  height: 70px;
  padding: 0 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--ink);
}

.detail-index {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.close-detail {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.close-detail span {
  font-size: 27px;
  font-weight: 400;
  line-height: 1;
}

.detail-accent {
  height: 12px;
  background: var(--category, var(--coral));
}

.detail-content {
  padding: 48px 50px 46px;
}

.detail-kicker {
  margin: 0 0 18px;
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.detail-content h2 {
  max-width: 480px;
  margin: 0;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: clamp(44px, 5vw, 61px);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 0.98;
}

.detail-summary {
  margin: 25px 0 35px;
  color: #425047;
  font-size: 17px;
  line-height: 1.55;
}

.fact-grid {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.fact-grid div {
  min-height: 92px;
  padding: 18px 15px 15px 0;
}

.fact-grid div:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.fact-grid div:nth-child(even) {
  padding-left: 22px;
}

.fact-grid div:nth-child(-n + 2) {
  border-bottom: 1px solid var(--line);
}

.fact-grid dt,
.good-to-know > p {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.fact-grid dd {
  margin: 0;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 17px;
  line-height: 1.25;
}

.good-to-know {
  margin: 31px 0;
}

.detail-body p {
  margin: 0 0 12px;
  color: #425047;
  line-height: 1.55;
}

.detail-body p:first-child {
  display: none;
}

.save-button {
  width: 100%;
  min-height: 56px;
  padding: 13px 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  border: 1px solid var(--ink);
  color: var(--paper-light);
  background: var(--ink);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: background 150ms ease, color 150ms ease;
}

.save-button svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.save-button[aria-pressed="true"] {
  color: var(--ink);
  background: var(--acid);
}

.save-button[aria-pressed="true"] svg {
  fill: var(--coral);
  stroke: var(--coral);
}

.toast {
  position: fixed;
  z-index: 20;
  right: 24px;
  bottom: 24px;
  padding: 12px 17px;
  color: var(--paper-light);
  background: var(--green);
  box-shadow: 4px 4px 0 var(--acid);
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 150ms ease, transform 150ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 860px) {
  .site-header {
    height: 70px;
    padding: 0 20px;
    grid-template-columns: 1fr auto;
  }

  .header-date {
    display: none;
  }

  .saved-nav span:nth-child(2) {
    display: none;
  }

  .hero {
    min-height: 0;
    display: block;
  }

  .hero-copy {
    padding: 60px 28px 54px;
  }

  h1 {
    font-size: clamp(62px, 19vw, 88px);
  }

  .intro {
    font-size: 16px;
  }

  .weekend-map {
    min-height: 350px;
    border-top: 1px solid var(--ink);
    border-left: 0;
  }

  .discover {
    padding: 65px 24px 80px;
  }

  .section-heading {
    display: block;
  }

  .result-count {
    margin-top: 18px;
  }

  .controls {
    margin: 36px 0 48px;
    grid-template-columns: 1fr;
  }

  .event-list {
    grid-template-columns: 1fr;
    gap: 52px;
  }

  footer {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 40px 24px;
  }
}

@media (max-width: 520px) {
  .brand {
    font-size: 22px;
  }

  .brand svg {
    width: 31px;
    height: 31px;
  }

  .saved-nav {
    padding: 6px 7px 6px 9px;
  }

  .hero-copy {
    padding: 48px 24px 46px;
  }

  .hero-copy .eyebrow {
    margin-bottom: 20px;
  }

  h1 {
    font-size: 65px;
  }

  .intro {
    margin-top: 28px;
  }

  .weekend-map {
    min-height: 280px;
  }

  .weekend-map svg {
    inset: 15px 0 10px;
    height: calc(100% - 25px);
  }

  .map-stamp {
    width: 92px;
    height: 92px;
    font-size: 14px;
  }

  .map-label {
    font-size: 8px;
  }

  .discover {
    padding: 58px 18px 76px;
  }

  .section-heading h2 {
    font-size: 42px;
  }

  .controls {
    margin-top: 34px;
  }

  .event-card {
    grid-template-columns: 57px 1fr 32px;
    gap: 11px;
    min-height: 171px;
    padding: 22px 0;
  }

  .event-card h4 {
    font-size: 22px;
  }

  .event-meta {
    line-height: 1.45;
  }

  .open-item {
    width: 32px;
    height: 32px;
  }

  dialog {
    width: 100%;
  }

  .detail-topbar {
    height: 62px;
    padding: 0 22px;
  }

  .detail-content {
    padding: 35px 24px 34px;
  }

  .detail-content h2 {
    font-size: 43px;
  }

  .detail-summary {
    font-size: 16px;
  }

  .fact-grid dd {
    font-size: 15px;
  }

  .fact-grid div:nth-child(even) {
    padding-left: 16px;
  }

  .toast {
    right: 18px;
    bottom: 18px;
    left: 18px;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
