:root {
  --paper: #f4eee4;
  --paper-2: #ece2d2;
  --card: #fbf8f1;
  --ink: #211e1a;
  --ink-soft: #6a6154;
  --line: #d8cbb6;
  --line-strong: #b9a98e;
  --accent: #b4552d;
  --accent-deep: #8f3f1f;
  --accent-tint: #f0d9c9;
  --sage: #5f6b4e;
  --focus: #2f5fb3;
  --shadow-sm: 0 1px 2px rgba(33, 30, 26, 0.06), 0 2px 8px rgba(33, 30, 26, 0.05);
  --shadow-lg: 0 24px 60px rgba(33, 30, 26, 0.28);
  --radius: 14px;
  --radius-sm: 9px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Helvetica Neue", sans-serif;
  --maxw: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

[hidden] {
  display: none !important;
}

a {
  color: var(--accent-deep);
  text-underline-offset: 3px;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.12;
  text-wrap: balance;
  margin: 0;
  scroll-margin-top: 90px;
}

p {
  margin: 0;
}

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

button,
a,
select,
input[type="search"] {
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(180, 85, 45, 0.18);
}

.shell {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(18px, 4vw, 40px);
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  border-radius: 0 0 10px 10px;
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 0;
}

:where(a, button, input, select, [tabindex]):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(244, 238, 228, 0.88);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1;
  padding-bottom: 2px;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
}

.brand-tag {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 3px;
}

.header-note {
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}

/* Hero */
.hero {
  padding-block: clamp(36px, 6vw, 72px);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(1100px 380px at 88% -10%, var(--accent-tint), transparent 70%),
    var(--paper);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(26px, 5vw, 64px);
  align-items: center;
}

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: 16px;
}

.hero-title {
  font-size: clamp(38px, 5.6vw, 66px);
  letter-spacing: -0.015em;
}

.hero-lede {
  margin-top: 20px;
  max-width: 46ch;
  font-size: clamp(16px, 1.5vw, 18px);
  color: var(--ink-soft);
}

.hero-cta {
  display: inline-block;
  margin-top: 28px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 13px 24px;
  border-radius: 999px;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.hero-cta:hover {
  background: var(--accent-deep);
}

.hero-cta:active {
  transform: translateY(1px);
}

.hero-media {
  margin: 0;
}

.hero-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.hero-caption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--ink-soft);
  font-style: italic;
}

/* Section scaffolding */
.workshops {
  padding-block: clamp(40px, 6vw, 72px) clamp(56px, 8vw, 96px);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.section-head h2 {
  font-size: clamp(28px, 3.4vw, 40px);
}

.result-count {
  font-size: 14px;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

/* Controls */
.controls {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 30px;
}

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

.field label,
.field-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

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

.input-icon {
  position: absolute;
  left: 12px;
  width: 18px;
  height: 18px;
  fill: var(--ink-soft);
  pointer-events: none;
}

input[type="search"],
select {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  appearance: none;
}

input[type="search"] {
  padding-left: 38px;
}

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

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%236a6154' d='M5.5 7.5 10 12l4.5-4.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  padding-right: 38px;
  cursor: pointer;
}

input[type="search"]:hover,
select:hover {
  border-color: var(--ink-soft);
}

.toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 46px;
  padding: 0 18px;
  white-space: nowrap;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.toggle:hover {
  border-color: var(--ink);
}

.toggle-icon {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linejoin: round;
}

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

.toggle[aria-pressed="true"] .toggle-icon {
  fill: currentColor;
}

.field-saved .field-label {
  display: block;
}

/* Card grid */
.card-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 24px;
}

.card {
  display: flex;
  flex-direction: column;
  height: 100%;
  scroll-margin-top: 96px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(33, 30, 26, 0.13);
  border-color: var(--line-strong);
}

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

.card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--paper-2);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.chip {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(33, 30, 26, 0.82);
  border-radius: 999px;
  backdrop-filter: blur(3px);
}

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

.card-title {
  font-size: 23px;
  letter-spacing: -0.01em;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-size: 13.5px;
  color: var(--ink-soft);
}

.card-meta .dot {
  color: var(--line-strong);
}

.card-desc {
  font-size: 14.5px;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 6px;
}

.price {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.price small {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
  margin-left: 4px;
}

.open-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

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

.open-item .arrow {
  transition: transform 0.15s ease;
}

.open-item:hover .arrow {
  transform: translateX(3px);
}

.seats-note {
  font-size: 12.5px;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: clamp(40px, 7vw, 72px) 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--card);
}

.empty-title {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
}

.empty-body {
  margin: 10px auto 22px;
  max-width: 46ch;
  color: var(--ink-soft);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-deep);
}

/* Detail dialog */
dialog.detail {
  width: min(980px, calc(100vw - 32px));
  max-height: min(92vh, 900px);
  padding: 0;
  border: none;
  border-radius: 18px;
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  overscroll-behavior: contain;
}

dialog.detail::backdrop {
  background: rgba(28, 24, 19, 0.58);
  backdrop-filter: blur(3px);
}

.detail-scroll {
  max-height: inherit;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
}

.detail-media {
  position: relative;
  min-height: 100%;
  background: var(--paper-2);
}

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

.detail-main {
  padding: clamp(24px, 4vw, 40px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.detail-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.detail-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-cat {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.detail-title {
  font-size: clamp(28px, 3.6vw, 40px);
  letter-spacing: -0.015em;
}

.detail-summary {
  color: var(--ink-soft);
  font-size: 16px;
}

.close-detail {
  display: grid;
  place-items: center;
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

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

.close-detail svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
}

.detail-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.fact {
  background: var(--card);
  padding: 13px 15px;
}

.fact dt {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.fact dd {
  margin: 4px 0 0;
  font-size: 15.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.detail-body {
  font-size: 16px;
  color: #3c372f;
}

.detail-instructor {
  font-size: 14px;
  color: var(--ink-soft);
}

.detail-instructor strong {
  color: var(--ink);
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.save-item {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent-deep);
  transition: background-color 0.15s ease, color 0.15s ease;
}

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

.save-item .save-icon {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linejoin: round;
}

.save-item[aria-pressed="true"] {
  background: var(--accent);
  color: #fff;
}

.save-item[aria-pressed="true"] .save-icon {
  fill: currentColor;
}

.detail-saved-hint {
  font-size: 13.5px;
  color: var(--ink-soft);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--paper-2);
  padding-block: 30px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-brand {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
}

.footer-note {
  font-size: 13px;
  color: var(--ink-soft);
  max-width: 62ch;
}

/* Responsive */
@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-media {
    order: -1;
  }

  .controls {
    grid-template-columns: 1fr 1fr;
  }

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

  .field-saved {
    justify-self: end;
  }
}

@media (max-width: 640px) {
  .header-note {
    display: none;
  }

  .controls {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .field-saved {
    justify-self: stretch;
  }

  .toggle {
    width: 100%;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

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

  .detail-media img {
    min-height: 200px;
    max-height: 240px;
  }

  dialog.detail {
    width: 100vw;
    max-width: 100vw;
    max-height: 94vh;
    margin: auto auto 0;
    border-radius: 18px 18px 0 0;
  }

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

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}

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

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