:root {
  --blue: #1f31c7;
  --blue-dark: #132391;
  --paper: #f7f6f1;
  --white: #fffef8;
  --ink: #171717;
  --yellow: #ffc928;
  --pink: #ffbdcf;
  --mint: #a7dbc5;
  --line: #b9b8b2;
  --display: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  --body: "Trebuchet MS", "Avenir Next", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.45;
}

body:has(dialog[open]) { overflow: hidden; }

button,
input,
select { font: inherit; }

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

button { color: inherit; }

a { color: inherit; }

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

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  background: var(--yellow);
  transform: translateY(-160%);
}

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

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

.hero {
  min-height: 850px;
  overflow: hidden;
  color: var(--white);
  background: var(--blue);
}

.site-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 28px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 42px 0;
}

.site-nav > a:not(.brand) {
  padding-top: 5px;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
}

.site-nav > p {
  justify-self: end;
  margin: 3px 0 0;
  text-align: right;
  line-height: 1.25;
}

.brand {
  width: max-content;
  color: inherit;
  font-family: var(--display);
  font-size: 28px;
  line-height: 1;
  letter-spacing: .01em;
  text-decoration: none;
  text-transform: uppercase;
}

.brand span {
  color: var(--yellow);
  font-size: 13px;
  vertical-align: top;
}

.masthead {
  width: calc(100% + 16px);
  margin: 48px 0 0 -8px;
  color: var(--white);
  font-family: var(--display);
  font-size: clamp(185px, 25.2vw, 365px);
  font-weight: 900;
  line-height: .72;
  letter-spacing: -.035em;
  text-align: center;
  white-space: nowrap;
}

.hero-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(340px, .82fr);
  gap: 6.5vw;
  align-items: end;
  max-width: 1260px;
  margin: 52px auto 0;
  padding: 0 42px 65px;
}

.hero-image-wrap {
  position: relative;
  transform: rotate(-1.3deg);
}

.hero-image-wrap img {
  width: 100%;
  height: 350px;
  object-fit: cover;
  filter: saturate(.93) contrast(1.04);
}

.hero-sticker {
  position: absolute;
  right: -24px;
  bottom: -22px;
  display: grid;
  width: 104px;
  height: 104px;
  place-items: center;
  color: var(--ink);
  background: var(--yellow);
  border-radius: 50%;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  transform: rotate(7deg);
}

.hero-copy { padding-bottom: 10px; }

.edition {
  max-width: 33ch;
  margin: 0 0 24px;
  padding-bottom: 13px;
  border-bottom: 1px solid rgba(255,255,255,.55);
  font-size: 14px;
}

.hero-copy h1 {
  max-width: 20ch;
  margin: 0 0 30px;
  font-size: clamp(29px, 2.6vw, 40px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -.035em;
}

.text-link {
  display: inline-block;
  padding: 11px 0 7px;
  border-bottom: 4px solid var(--yellow);
  font-weight: 700;
  text-decoration: none;
}

.browse {
  max-width: 1440px;
  margin: 0 auto;
  padding: 95px 42px 120px;
}

.browse-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 52px;
}

.browse-heading h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(56px, 7vw, 102px);
  font-weight: 900;
  line-height: .92;
  letter-spacing: -.025em;
  text-transform: uppercase;
}

#result-count { margin: 15px 0 0; }

.saved-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 11px 15px;
  border: 2px solid var(--ink);
  background: transparent;
  font-weight: 700;
  cursor: pointer;
}

.saved-toggle svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.saved-toggle[aria-pressed="true"] {
  color: var(--white);
  background: var(--blue);
  border-color: var(--blue);
}

.saved-toggle[aria-pressed="true"] svg { fill: var(--pink); }

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

.filters {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 28px;
  margin-bottom: 64px;
  padding: 24px 0;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--line);
}

.filters label > span:first-child {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
}

.input-shell,
.select-shell {
  position: relative;
  display: block;
}

.input-shell svg,
.select-shell svg {
  position: absolute;
  top: 50%;
  width: 22px;
  pointer-events: none;
  transform: translateY(-50%);
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.7;
}

.input-shell svg { left: 2px; }
.select-shell svg { right: 2px; }

.filters input,
.filters select {
  width: 100%;
  height: 48px;
  border: 0;
  border-bottom: 2px solid var(--ink);
  border-radius: 0;
  color: var(--ink);
  background: transparent;
}

.filters input {
  padding: 0 8px 0 36px;
  font-size: 18px;
}

.filters input::placeholder { color: #64645f; opacity: 1; }

.filters select {
  appearance: none;
  padding: 0 38px 0 2px;
  font-size: 18px;
  cursor: pointer;
}

.workshop-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 70px 28px;
}

.workshop-card {
  grid-column: span 4;
  min-width: 0;
}

.workshop-card:nth-child(3n + 2) { margin-top: 72px; }

.card-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  margin-bottom: 22px;
  background: #deddd5;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s cubic-bezier(.2,.8,.2,1);
}

.workshop-card:nth-child(3n + 2) .card-image { aspect-ratio: 1 / 1.08; }
.workshop-card:nth-child(3n) .card-image { aspect-ratio: 1 / .86; }

.category-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 9px 5px;
  color: var(--ink);
  background: var(--yellow);
  font-size: 13px;
  font-weight: 700;
}

.saved-pin {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  background: var(--white);
  border-radius: 50%;
}

.saved-pin svg { width: 19px; fill: var(--blue); }

.card-date {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin: 0 0 9px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 700;
}

.card-title {
  margin: 0 0 12px;
  font-size: clamp(24px, 2vw, 31px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.035em;
}

.open-item {
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.open-item::after {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin: 0 0 4px 10px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}

.open-item:hover { color: var(--blue); text-decoration: underline; text-underline-offset: 4px; }
.workshop-card:has(.open-item:hover) .card-image img { transform: scale(1.035); }

.card-description {
  max-width: 42ch;
  min-height: 4.5em;
  margin: 0 0 18px;
  color: #484845;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-weight: 700;
}

.empty-state {
  margin-top: 10px;
  padding: 80px 30px;
  border: 2px solid var(--ink);
  background: var(--pink);
  text-align: center;
}

.empty-state[hidden] { display: none; }
.empty-state > span { font-family: var(--display); font-size: 70px; line-height: .6; }
.empty-state h3 { margin: 25px 0 8px; font-size: 28px; }
.empty-state p { margin: 0 auto 25px; }
.empty-state button { padding: 12px 18px; border: 2px solid var(--ink); background: var(--white); font-weight: 700; cursor: pointer; }

.visit {
  display: grid;
  grid-template-columns: .65fr 1.25fr 1fr;
  gap: 7vw;
  align-items: center;
  padding: 80px max(42px, calc((100vw - 1356px) / 2 + 42px));
  color: var(--ink);
  background: var(--yellow);
}

.visit-mark {
  font-family: var(--display);
  font-size: clamp(180px, 21vw, 330px);
  line-height: .7;
}

.visit h2 {
  margin: 0 0 24px;
  font-size: clamp(38px, 4vw, 66px);
  line-height: .95;
  letter-spacing: -.04em;
}

.visit p { max-width: 45ch; margin: 0; font-size: 18px; }

.visit dl { margin: 0; }
.visit dl div { padding: 16px 0; border-top: 1px solid var(--ink); }
.visit dl div:last-child { border-bottom: 1px solid var(--ink); }
.visit dt { margin-bottom: 5px; font-size: 13px; font-weight: 700; }
.visit dd { margin: 0; }

footer {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: end;
  gap: 20px;
  min-height: 210px;
  padding: 55px 42px 38px;
  color: var(--white);
  background: var(--ink);
}

footer p { margin: 0; }
.footer-brand { font-size: 44px; }
.photo-note { justify-self: end; color: #aaa; font-size: 12px; }

.detail-dialog {
  width: min(980px, calc(100% - 48px));
  max-width: none;
  max-height: calc(100% - 48px);
  margin: auto;
  padding: 0;
  overflow: visible;
  border: 0;
  color: var(--ink);
  background: var(--white);
}

.detail-dialog::backdrop { background: rgba(13, 14, 28, .78); }

.detail-panel {
  position: relative;
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  max-height: calc(100vh - 48px);
  overflow: auto;
}

.icon-close {
  position: absolute;
  z-index: 2;
  top: 14px;
  right: 14px;
  display: grid;
  width: 45px;
  height: 45px;
  padding: 0;
  place-items: center;
  border: 0;
  background: var(--yellow);
  cursor: pointer;
}

.icon-close svg { width: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.detail-image-wrap { position: relative; min-height: 650px; background: #deddd5; }
.detail-image-wrap img { width: 100%; height: 100%; object-fit: cover; }

.detail-category {
  position: absolute;
  left: 20px;
  bottom: 20px;
  padding: 7px 11px;
  background: var(--pink);
  font-size: 14px;
  font-weight: 700;
}

.detail-content { padding: 70px 54px 42px; }
.detail-date { margin: 0 0 15px; color: var(--blue); font-weight: 700; }

.detail-content h2 {
  max-width: 10ch;
  margin: 0 0 24px;
  font-size: clamp(46px, 5vw, 70px);
  line-height: .9;
  letter-spacing: -.055em;
}

.detail-body { max-width: 42ch; margin: 0 0 34px; font-size: 18px; line-height: 1.55; }

.detail-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0 0 35px;
  border-top: 1px solid var(--line);
}

.detail-facts div { padding: 13px 8px 12px 0; border-bottom: 1px solid var(--line); }
.detail-facts dt { margin-bottom: 4px; color: #62625e; font-size: 12px; }
.detail-facts dd { margin: 0; font-weight: 700; }

.detail-actions { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.detail-price { margin: 0; font-size: 27px; font-weight: 700; }

.save-button {
  min-width: 175px;
  padding: 14px 18px;
  border: 2px solid var(--blue);
  color: var(--white);
  background: var(--blue);
  font-weight: 700;
  cursor: pointer;
}

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

.back-button {
  margin-top: 30px;
  padding: 4px 0;
  border: 0;
  border-bottom: 1px solid;
  background: transparent;
  cursor: pointer;
}

@media (max-width: 850px) {
  .hero { min-height: auto; }
  .site-nav { grid-template-columns: 1fr 1fr; padding: 20px 20px 0; }
  .site-nav > p { display: none; }
  .site-nav > a:not(.brand) { justify-self: end; }
  .masthead { margin-top: 45px; font-size: 25vw; }
  .hero-intro { grid-template-columns: 1fr; gap: 48px; margin-top: 42px; padding: 0 20px 60px; }
  .hero-image-wrap { width: calc(100% - 14px); }
  .hero-copy { max-width: 580px; }
  .browse { padding: 70px 20px 90px; }
  .workshop-card { grid-column: span 6; }
  .workshop-card:nth-child(3n + 2) { margin-top: 0; }
  .workshop-card:nth-child(even) { margin-top: 60px; }
  .visit { grid-template-columns: .55fr 1.45fr; padding: 65px 20px; }
  .visit dl { grid-column: 2; }
  .detail-dialog { width: calc(100% - 30px); max-height: calc(100% - 30px); }
  .detail-panel { max-height: calc(100vh - 30px); }
  .detail-content { padding: 60px 32px 35px; }
}

@media (max-width: 560px) {
  .site-nav { font-size: 13px; }
  .masthead { width: calc(100% + 6px); margin-left: -3px; margin-top: 50px; font-size: 25.5vw; }
  .hero-intro { margin-top: 40px; gap: 42px; }
  .hero-image-wrap img { height: 255px; }
  .hero-sticker { right: -11px; bottom: -25px; width: 86px; height: 86px; font-size: 13px; }
  .edition { margin-bottom: 18px; }
  .hero-copy h1 { font-size: 29px; }
  .browse { padding-top: 62px; }
  .browse-heading { display: block; margin-bottom: 35px; }
  .browse-heading h2 { max-width: 7ch; font-size: 61px; }
  .saved-toggle { margin-top: 25px; }
  .filters { grid-template-columns: 1fr; gap: 24px; margin-bottom: 48px; }
  .workshop-grid { display: block; }
  .workshop-card { margin: 0 0 58px !important; }
  .workshop-card:nth-last-child(1) { margin-bottom: 0 !important; }
  .workshop-card:nth-child(n) .card-image { aspect-ratio: 1 / .83; }
  .card-description { min-height: 0; }
  .visit { grid-template-columns: 1fr; gap: 35px; }
  .visit-mark { display: none; }
  .visit dl { grid-column: auto; }
  footer { grid-template-columns: 1fr; gap: 25px; min-height: 240px; }
  .photo-note { justify-self: start; }
  .detail-dialog { width: 100%; height: 100%; max-height: 100%; }
  .detail-panel { display: block; max-height: 100vh; }
  .detail-image-wrap { min-height: 290px; height: 38vh; }
  .detail-content { padding: 35px 20px 45px; }
  .detail-content h2 { font-size: 50px; }
  .detail-body { font-size: 17px; }
  .detail-actions { align-items: stretch; flex-direction: column; }
  .detail-price { margin-bottom: -6px; }
  .save-button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
