/* ------------------------------------------------------------------
   Forma — warm editorial craft-studio identity
   ------------------------------------------------------------------ */

@font-face {
  font-family: "Fraunces";
  src: url("assets/fonts/fraunces-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}

@font-face {
  font-family: "Fraunces";
  src: url("assets/fonts/fraunces-italic-latin.woff2") format("woff2");
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
}

@font-face {
  font-family: "Hanken Grotesk";
  src: url("assets/fonts/hanken-grotesk-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f2ecdf;
  --paper-soft: #f9f5ec;
  --card: #fcf8ef;
  --cream: #f5efe2;
  --ink: #1c2b23;
  --ink-soft: #34443a;
  --muted: #62695f;
  --line: rgba(28, 43, 35, 0.15);
  --line-strong: rgba(28, 43, 35, 0.32);
  --accent: #b64727;
  --accent-dark: #913419;
  --accent-warm: #e6a985;
  --focus: #1d6a50;
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background:
    radial-gradient(1000px 620px at 96% -8%, rgba(218, 158, 111, 0.2), transparent 64%),
    radial-gradient(760px 540px at -8% 22%, rgba(103, 130, 108, 0.09), transparent 62%),
    var(--paper);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.022;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

h1,
h2,
h3,
p,
figure,
dl,
dd,
figcaption {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: var(--accent);
  color: var(--cream);
}

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

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 200;
  padding: 12px 18px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--cream);
  font-size: 14px;
  font-weight: 650;
  transition: top 0.18s ease;
}

.skip-link:focus {
  top: 16px;
}

/* ------------------------------------------------------------------
   Header
   ------------------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(242, 236, 223, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 15px 40px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--serif);
  font-size: 29px;
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1;
}

.brand-mark {
  width: 21px;
  height: 21px;
  color: var(--accent);
  transition: transform 0.5s ease;
}

.brand:hover .brand-mark {
  transform: rotate(45deg);
}

.header-tag {
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  padding-left: 28px;
  border-left: 1px solid var(--line);
}

.header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.header-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 650;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.header-link:hover {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}

/* ------------------------------------------------------------------
   Shared type and buttons
   ------------------------------------------------------------------ */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow-rule {
  display: inline-block;
  width: 27px;
  height: 1px;
  flex: none;
  background: var(--accent);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 650;
  line-height: 1;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.button svg {
  width: 18px;
  height: 18px;
}

.button-primary {
  background: var(--ink);
  color: var(--cream);
}

.button-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
}

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

/* ------------------------------------------------------------------
   Hero
   ------------------------------------------------------------------ */

.hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(32px, 3.7vw, 50px) 40px clamp(28px, 3.2vw, 42px);
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(330px, 0.88fr);
  gap: clamp(38px, 5vw, 82px);
  align-items: center;
}

.hero-copy {
  min-width: 0;
}

.hero h1 {
  margin-top: 17px;
  font-family: var(--serif);
  font-size: clamp(52px, 6.3vw, 88px);
  font-weight: 500;
  line-height: 0.94;
  letter-spacing: -0.045em;
}

.hero h1 em {
  display: inline;
  font-weight: 400;
  font-style: italic;
  color: var(--accent);
  letter-spacing: -0.035em;
}

.hero-lede {
  max-width: 36rem;
  margin-top: 22px;
  font-size: clamp(15.5px, 1.3vw, 18px);
  line-height: 1.62;
  color: var(--ink-soft);
}

.hero-foot {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.hero-count {
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.hero-count strong {
  color: var(--ink);
  font-weight: 700;
}

.hero-figure {
  justify-self: end;
  width: 100%;
  max-width: 470px;
  min-width: 0;
}

.hero-image-wrap {
  position: relative;
  height: clamp(280px, 23vw, 330px);
  border-radius: 220px 220px 18px 18px;
  overflow: hidden;
  background: #d7d0c1;
  box-shadow: 0 30px 70px -38px rgba(28, 43, 35, 0.65);
}

.hero-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-image-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 62%, rgba(18, 30, 23, 0.38));
}

.hero-stamp {
  position: absolute;
  right: 17px;
  bottom: 17px;
  z-index: 1;
  width: 88px;
  height: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 1px solid rgba(28, 43, 35, 0.18);
  border-radius: 50%;
  background: var(--paper-soft);
  color: var(--ink);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  transform: rotate(-7deg);
  box-shadow: 0 8px 24px rgba(12, 22, 16, 0.22);
}

.hero-stamp svg {
  width: 19px;
  height: 19px;
  color: var(--accent);
}

.hero-figure figcaption {
  margin-top: 11px;
  text-align: right;
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--muted);
}

/* ------------------------------------------------------------------
   Browse section
   ------------------------------------------------------------------ */

.browse {
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(32px, 3.6vw, 44px) 40px 82px;
  border-top: 1px solid var(--line);
}

.browse-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(32px, 5vw, 72px);
}

.browse h2 {
  margin-top: 9px;
  font-family: var(--serif);
  font-size: clamp(35px, 4vw, 52px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.038em;
}

.browse-intro {
  max-width: 39ch;
  padding-bottom: 3px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--muted);
}

.toolbar {
  margin-top: 26px;
  padding: 13px;
  display: grid;
  grid-template-columns: minmax(230px, 1fr) 208px 186px auto;
  gap: 12px;
  align-items: end;
  position: sticky;
  top: 80px;
  z-index: 30;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(252, 248, 239, 0.88);
  box-shadow: 0 16px 40px -34px rgba(28, 43, 35, 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label,
.field-label {
  padding-left: 2px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  width: 17px;
  height: 17px;
  color: var(--muted);
  pointer-events: none;
}

input[type="search"] {
  width: 100%;
  height: 46px;
  padding: 0 44px 0 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper-soft);
  font-size: 15px;
  appearance: none;
  transition:
    border-color 0.18s ease,
    background 0.18s ease;
}

input[type="search"]:hover {
  border-color: var(--line-strong);
}

input[type="search"]:focus {
  border-color: var(--focus);
}

input[type="search"]::placeholder {
  color: #858b80;
}

input[type="search"]::-webkit-search-cancel-button {
  cursor: pointer;
}

.search-key {
  position: absolute;
  right: 11px;
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--paper);
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
  pointer-events: none;
}

.select-wrap {
  position: relative;
  display: flex;
}

select {
  width: 100%;
  height: 46px;
  padding: 0 38px 0 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper-soft);
  font-size: 14px;
  font-weight: 550;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.18s ease;
}

select:hover {
  border-color: var(--line-strong);
}

.select-chevron {
  position: absolute;
  right: 13px;
  top: 50%;
  width: 15px;
  height: 15px;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--ink-soft);
}

.saved-toggle {
  width: 100%;
  height: 46px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper-soft);
  font-size: 13.5px;
  font-weight: 650;
  text-align: left;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.saved-toggle:hover {
  border-color: var(--line-strong);
}

.saved-toggle-icon {
  width: 17px;
  height: 17px;
  flex: none;
}

.saved-count {
  margin-left: auto;
  min-width: 23px;
  height: 21px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(28, 43, 35, 0.09);
  font-size: 11.5px;
  font-weight: 700;
}

.saved-toggle.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
}

.saved-toggle.is-active .saved-count {
  background: rgba(245, 239, 226, 0.18);
}

.saved-toggle.is-active .saved-toggle-icon path {
  fill: currentColor;
}

.result-count {
  justify-self: end;
  min-width: 104px;
  padding-bottom: 15px;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.01em;
  text-align: right;
  white-space: nowrap;
  color: var(--muted);
}

.loading-note {
  margin-top: 34px;
  font-size: 14px;
  color: var(--muted);
}

/* ------------------------------------------------------------------
   Workshop cards
   ------------------------------------------------------------------ */

.grid {
  margin-top: 25px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.grid[hidden] {
  display: none;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  cursor: pointer;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: 0 26px 50px -36px rgba(28, 43, 35, 0.75);
}

.card:focus-within {
  border-color: var(--focus);
}

.card-media {
  position: relative;
  flex: none;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #d9d2c4;
}

.card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 68%, rgba(18, 30, 23, 0.16));
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.65s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.card:hover .card-media img {
  transform: scale(1.035);
}

.cat-tag {
  position: absolute;
  left: 13px;
  top: 13px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border: 1px solid rgba(28, 43, 35, 0.13);
  border-radius: 999px;
  background: rgba(250, 246, 237, 0.94);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.cat-dot {
  display: inline-block;
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cat, var(--accent));
}

.cat-baking {
  --cat: #9c5a1f;
}

.cat-ceramics {
  --cat: #3f6f71;
}

.cat-floristry {
  --cat: #6d7c33;
}

.cat-painting {
  --cat: #a44340;
}

.card-saved {
  position: absolute;
  right: 13px;
  top: 13px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(12, 22, 16, 0.2);
}

.card-saved svg {
  width: 11px;
  height: 11px;
}

.card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 19px 20px 18px;
}

.card-index {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.card-index span[aria-hidden] {
  color: var(--accent);
}

.card-title {
  margin-top: 7px;
  font-family: var(--serif);
  font-size: clamp(26px, 2.25vw, 31px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.card-desc {
  margin-top: 9px;
  display: -webkit-box;
  overflow: hidden;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-practical {
  margin-top: 15px;
  margin-bottom: 18px;
}

.card-when {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--ink-soft);
}

.card-when svg {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--accent);
}

.meta-dot {
  color: var(--muted);
}

.card-meta {
  margin-top: 3px;
  padding-left: 23px;
  font-size: 12px;
  color: var(--muted);
}

.card-foot {
  margin-top: auto;
  padding-top: 17px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
}

.card-price {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.card-price > span {
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.card-price small {
  margin-top: 3px;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.open-item {
  min-height: 42px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  font-size: 12.5px;
  font-weight: 650;
  white-space: nowrap;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.open-item svg {
  width: 15px;
  height: 15px;
  transition: transform 0.2s ease;
}

.open-item:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
}

.open-item:hover svg {
  transform: translateX(2px);
}

/* ------------------------------------------------------------------
   Empty state
   ------------------------------------------------------------------ */

.empty-state {
  margin-top: 27px;
  padding: 62px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  background: rgba(252, 248, 239, 0.5);
}

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

.empty-mark {
  width: 62px;
  height: 62px;
  margin-bottom: 17px;
  color: var(--accent);
}

.empty-state h3 {
  margin-top: 7px;
  font-family: var(--serif);
  font-size: 31px;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.empty-state p:not(.eyebrow) {
  max-width: 42ch;
  margin-top: 9px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

.empty-state .button {
  margin-top: 21px;
}

/* ------------------------------------------------------------------
   About band
   ------------------------------------------------------------------ */

.about {
  background: var(--ink);
  color: var(--cream);
}

.about-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 70px 40px;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: clamp(40px, 6vw, 100px);
}

.about .eyebrow {
  color: rgba(245, 239, 226, 0.6);
}

.about h2 {
  margin-top: 15px;
  font-family: var(--serif);
  font-size: clamp(35px, 4.1vw, 54px);
  font-weight: 450;
  line-height: 1.02;
  letter-spacing: -0.038em;
}

.about h2 em {
  font-weight: 400;
  font-style: italic;
  color: #e7ab85;
}

.about-body {
  max-width: 510px;
  align-self: end;
}

.about-body > p {
  max-width: 47ch;
  font-size: 16px;
  line-height: 1.65;
  color: rgba(245, 239, 226, 0.76);
}

.about-list {
  margin-top: 29px;
  border-top: 1px solid rgba(245, 239, 226, 0.18);
}

.about-list li {
  display: grid;
  grid-template-columns: 34px 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(245, 239, 226, 0.18);
}

.about-num {
  grid-row: 1 / 3;
  padding-top: 2px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #e7ab85;
}

.about-list strong {
  font-size: 14.5px;
  font-weight: 650;
  color: var(--cream);
}

.about-list li > span:last-child {
  margin-top: 2px;
  font-size: 13px;
  color: rgba(245, 239, 226, 0.6);
}

/* ------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------ */

.site-footer {
  background: var(--paper);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 34px 40px 38px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  border-top: 1px solid var(--line);
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 550;
  line-height: 1;
  letter-spacing: -0.03em;
}

.footer-brand svg {
  width: 19px;
  height: 19px;
  color: var(--accent);
}

.footer-brand-block > p {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--muted);
}

.footer-meta {
  display: grid;
  gap: 4px;
  text-align: center;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer-top {
  padding-bottom: 3px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--line-strong);
  font-size: 11.5px;
  font-weight: 650;
}

/* ------------------------------------------------------------------
   Detail dialog
   ------------------------------------------------------------------ */

html.modal-open,
html.modal-open body {
  overflow: hidden;
}

.detail-dialog {
  width: min(1080px, calc(100vw - 56px));
  max-width: none;
  height: min(780px, 88dvh);
  max-height: none;
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 22px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 40px 110px rgba(10, 20, 14, 0.44);
}

.detail-dialog::backdrop {
  background: rgba(15, 26, 20, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.detail-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  height: 100%;
}

.detail-media {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background: #d7d0c1;
}

.detail-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 58%, rgba(14, 24, 18, 0.52));
}

.detail-media-caption {
  position: absolute;
  left: 22px;
  bottom: 20px;
  z-index: 1;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--cream);
}

.detail-panel {
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--card);
}

.detail-bar {
  flex: none;
  padding: 15px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(252, 248, 239, 0.96);
}

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

.detail-index span {
  color: var(--accent);
}

.close-detail {
  min-height: 42px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  font-size: 12px;
  font-weight: 650;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.close-detail svg {
  width: 15px;
  height: 15px;
}

.close-detail:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
}

.detail-scroll {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 31px 40px 40px;
  scrollbar-width: thin;
}

.detail-eyebrow .cat-dot {
  width: 8px;
  height: 8px;
}

.detail-title {
  max-width: 13ch;
  margin-top: 11px;
  font-family: var(--serif);
  font-size: clamp(38px, 4.2vw, 54px);
  font-weight: 500;
  line-height: 0.99;
  letter-spacing: -0.04em;
}

.detail-body {
  max-width: 52ch;
  margin-top: 17px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.detail-facts {
  margin-top: 25px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--line);
}

.fact {
  padding: 12px 15px;
  background: var(--paper-soft);
}

.fact dt,
.fact-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.fact dd {
  margin-top: 4px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
}

.fact dd small {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--muted);
}

.detail-instructor {
  margin-top: 18px;
  padding: 13px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.teacher-monogram {
  width: 42px;
  height: 42px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--cream);
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.teacher-name {
  margin-top: 2px;
  font-size: 14.5px;
  font-weight: 650;
}

.detail-save {
  margin-top: 23px;
  padding: 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}

.detail-save-copy {
  max-width: 34ch;
}

.save-heading {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 550;
  letter-spacing: -0.02em;
}

.detail-save-copy p:last-child {
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

.save-item {
  min-height: 46px;
  padding: 0 17px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream);
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.save-item svg {
  width: 17px;
  height: 17px;
}

.save-item:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.save-item.is-saved {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}

.save-item.is-saved:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--cream);
}

.noscript-note {
  position: fixed;
  inset: auto 16px 16px;
  z-index: 300;
  padding: 16px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--cream);
  font-size: 14px;
}

/* ------------------------------------------------------------------
   Motion
   ------------------------------------------------------------------ */

@media (prefers-reduced-motion: no-preference) {
  .detail-dialog[open] {
    animation: dialog-in 0.24s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .detail-dialog[open]::backdrop {
    animation: backdrop-in 0.24s ease both;
  }

  @keyframes dialog-in {
    from {
      opacity: 0;
      transform: translateY(12px) scale(0.985);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }

  @keyframes backdrop-in {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }
}

/* ------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------ */

@media (max-width: 1120px) {
  .toolbar {
    grid-template-columns: minmax(220px, 1fr) 200px 184px;
  }

  .result-count {
    grid-column: 1 / -1;
    padding-bottom: 0;
    justify-self: start;
    text-align: left;
  }
}

@media (max-width: 980px) {
  .header-inner,
  .hero,
  .browse,
  .about-inner,
  .footer-inner {
    padding-left: 30px;
    padding-right: 30px;
  }

  .header-tag {
    display: none;
  }

  .hero {
    grid-template-columns: minmax(0, 1.06fr) minmax(290px, 0.94fr);
    gap: 38px;
  }

  .hero h1 {
    font-size: clamp(48px, 6.4vw, 66px);
  }

  .hero-image-wrap {
    height: 290px;
  }

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

  .browse-intro {
    max-width: 34ch;
  }
}

@media (max-width: 760px) {
  html {
    scroll-padding-top: 78px;
  }

  .header-inner,
  .hero,
  .browse,
  .about-inner,
  .footer-inner {
    padding-left: 20px;
    padding-right: 20px;
  }

  .header-inner {
    padding-top: 13px;
    padding-bottom: 13px;
  }

  .brand {
    font-size: 26px;
  }

  .season {
    display: none;
  }

  .header-right {
    gap: 0;
  }

  .header-link {
    min-height: 38px;
    padding: 0 13px;
    font-size: 12px;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 28px;
    padding-bottom: 27px;
    gap: 0;
  }

  .hero-figure {
    display: none;
  }

  .hero h1 {
    margin-top: 13px;
    font-size: clamp(40px, 11.8vw, 56px);
    line-height: 0.98;
  }

  .hero-lede {
    margin-top: 15px;
    max-width: 40ch;
    font-size: 14.5px;
    line-height: 1.55;
  }

  .hero-foot {
    margin-top: 20px;
    gap: 16px;
  }

  .button {
    min-height: 46px;
    padding: 0 19px;
    font-size: 13.5px;
  }

  .hero-count {
    font-size: 11.5px;
  }

  .browse {
    padding-top: 27px;
    padding-bottom: 58px;
  }

  .browse-heading {
    display: block;
  }

  .browse h2 {
    font-size: 37px;
  }

  .browse-intro {
    display: none;
  }

  .toolbar {
    position: static;
    margin-top: 19px;
    padding: 12px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .field-search {
    grid-column: 1 / -1;
  }

  .result-count {
    grid-column: 1 / -1;
    padding-bottom: 1px;
    min-width: 0;
  }

  .search-key {
    display: none;
  }

  .grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    margin-top: 20px;
  }

  .card-media {
    aspect-ratio: 16 / 10;
  }

  .card-title {
    font-size: 31px;
  }

  .card-desc {
    font-size: 14px;
    -webkit-line-clamp: 3;
  }

  .card-body {
    padding: 19px 19px 18px;
  }

  .empty-state {
    padding: 48px 20px;
  }

  .about-inner {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 50px;
    padding-bottom: 54px;
    gap: 26px;
  }

  .about h2 {
    font-size: 37px;
  }

  .about-body {
    max-width: none;
  }

  .footer-inner {
    padding-top: 28px;
    padding-bottom: 30px;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 22px;
  }

  .footer-meta {
    order: 3;
    width: 100%;
    text-align: left;
  }

  .footer-top {
    margin-left: auto;
  }

  .detail-dialog {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border-radius: 0;
  }

  .detail-shell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(168px, 25dvh) minmax(0, 1fr);
  }

  .detail-media {
    min-height: 0;
  }

  .detail-media img {
    position: absolute;
    inset: 0;
  }

  .detail-media-caption {
    left: 20px;
    bottom: 15px;
  }

  .detail-bar {
    padding: 12px 18px;
  }

  .detail-scroll {
    padding: 24px 20px 30px;
  }

  .detail-title {
    font-size: clamp(36px, 10.5vw, 45px);
    max-width: none;
  }

  .detail-body {
    font-size: 15.5px;
  }

  .detail-facts {
    grid-template-columns: 1fr 1fr;
  }

  .detail-save {
    align-items: flex-start;
  }

  .save-item {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 410px) {
  .hero h1 {
    font-size: clamp(37px, 10.8vw, 46px);
  }

  .hero-lede {
    font-size: 14px;
    line-height: 1.5;
  }

  .header-link {
    padding: 0 11px;
  }

  .field label,
  .field-label {
    font-size: 9.5px;
  }

  .saved-toggle {
    padding: 0 10px;
    font-size: 12.5px;
    gap: 6px;
  }

  .saved-count {
    min-width: 21px;
    padding: 0 6px;
  }

  .browse h2 {
    font-size: 34px;
  }

  .card-title {
    font-size: 29px;
  }

  .detail-scroll {
    padding-left: 18px;
    padding-right: 18px;
  }
}

@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;
    scroll-behavior: auto !important;
  }
}
