:root {
  --bg: #f4efe6;
  --bg-2: #ebe3d6;
  --surface: #fbf8f2;
  --text: #2a241c;
  --muted: #6b6255;
  --accent: #b85a3a;
  --accent-2: #8f4329;
  --border: #d9cfbf;
  --focus: #2a241c;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(42, 36, 28, 0.08);
  --max: 1180px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1612;
    --bg-2: #221d17;
    --surface: #26201a;
    --text: #efe7da;
    --muted: #b3a896;
    --accent: #d97a56;
    --accent-2: #e8906e;
    --border: #3a3228;
    --focus: #efe7da;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.sans { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .container { padding: 0 16px; } }

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--text); color: var(--bg);
  padding: 8px 12px; z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-weight: 700; font-size: 1.25rem; color: var(--text); text-decoration: none; letter-spacing: 0.02em; }
.header-nav { display: flex; gap: 20px; font-family: system-ui, sans-serif; font-size: 0.95rem; }
.header-nav a { color: var(--muted); text-decoration: none; }
.header-nav a:hover { color: var(--text); }

.hero { padding: 48px 0 32px; }
.hero-inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 768px) { .hero-inner { grid-template-columns: 1fr; gap: 24px; } }
.hero-copy h1 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.1; margin: 0 0 16px; font-weight: 600; }
.hero-lede { color: var(--muted); font-family: system-ui, sans-serif; max-width: 52ch; margin: 0 0 24px; }
.hero-media img { width: 100%; height: 360px; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); display: block; }
@media (max-width: 768px) { .hero-media img { height: 220px; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 18px; border-radius: 999px; border: 1px solid transparent;
  font-family: system-ui, sans-serif; font-size: 0.95rem; font-weight: 600;
  cursor: pointer; text-decoration: none; transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-2); }
.btn-secondary { background: transparent; border-color: var(--border); color: var(--text); }
.btn-secondary:hover { background: var(--bg-2); }

.workshops { padding: 32px 0 64px; }
.section-head { margin-bottom: 24px; }
.section-head h2 { font-size: 1.6rem; margin: 0 0 6px; font-weight: 600; }
.section-lede { color: var(--muted); font-family: system-ui, sans-serif; margin: 0; }

.controls {
  display: grid; grid-template-columns: 1fr 220px auto; gap: 16px; align-items: end;
  padding: 20px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 28px;
}
@media (max-width: 768px) { .controls { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .toggle-label { font-family: system-ui, sans-serif; font-size: 0.85rem; color: var(--muted); font-weight: 600; }
.field input, .field select {
  padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-family: system-ui, sans-serif; font-size: 1rem;
}
.field input:focus, .field select:focus { outline: 2px solid var(--focus); outline-offset: 1px; }
.toggle-field { justify-content: flex-end; }
#saved-filter {
  padding: 10px 16px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-family: system-ui, sans-serif; font-weight: 600; cursor: pointer;
}
#saved-filter[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }

.grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow);
}
.card img { width: 100%; height: 180px; object-fit: cover; display: block; }
.card-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-meta { display: flex; justify-content: space-between; align-items: center; font-family: system-ui, sans-serif; font-size: 0.85rem; color: var(--muted); }
.cat { background: var(--bg-2); padding: 3px 9px; border-radius: 999px; font-size: 0.78rem; }
.card h3 { margin: 0; font-size: 1.15rem; font-weight: 600; }
.card p { margin: 0; color: var(--muted); font-family: system-ui, sans-serif; font-size: 0.92rem; }
.card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 8px; }
.price { font-weight: 700; font-family: system-ui, sans-serif; }
.open-item { background: var(--accent); color: #fff; border: none; padding: 8px 14px; border-radius: 999px; cursor: pointer; font-family: system-ui, sans-serif; font-weight: 600; font-size: 0.85rem; }
.open-item:focus { outline: 2px solid var(--focus); outline-offset: 2px; }

.empty-state { text-align: center; padding: 48px 20px; color: var(--muted); font-family: system-ui, sans-serif; }
.empty-state p { margin: 0 0 16px; }

.about { padding: 48px 0; background: var(--bg-2); }
.about-inner h2 { font-size: 1.6rem; margin: 0 0 10px; }
.about-inner p { max-width: 60ch; color: var(--muted); font-family: system-ui, sans-serif; }

.site-footer { border-top: 1px solid var(--border); padding: 24px 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-family: system-ui, sans-serif; font-size: 0.9rem; }

/* Dialog */
.detail-dialog {
  border: none; padding: 0; background: transparent; max-width: 100%; width: 100%; height: 100%;
}
.detail-dialog::backdrop { background: rgba(20, 16, 12, 0.55); }
.detail {
  max-width: 720px; margin: 6vh auto; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow);
  font-family: system-ui, sans-serif; color: var(--text);
  max-height: 88vh; overflow: auto;
}
.detail[hidden] { display: none; }
.detail h2 { margin: 0 0 6px; font-family: "Iowan Old Style", Palatino, Georgia, serif; font-size: 1.6rem; }
.detail .detail-cat { color: var(--muted); font-size: 0.9rem; margin-bottom: 12px; }
.detail img { width: 100%; height: 260px; object-fit: cover; border-radius: 10px; margin-bottom: 16px; }
.detail .body { margin: 12px 0 16px; line-height: 1.6; }
.detail .facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 16px; margin: 16px 0; font-size: 0.95rem; }
.detail .facts dt { color: var(--muted); font-size: 0.85rem; }
.detail .facts dd { margin: 0 0 8px; font-weight: 600; }
.detail-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.save-item {
  background: var(--accent); color: #fff; border: none; padding: 10px 16px; border-radius: 999px; cursor: pointer; font-weight: 600;
}
.save-item[aria-pressed="true"] { background: var(--bg-2); color: var(--text); border: 1px solid var(--border); }
.close-detail { background: transparent; border: 1px solid var(--border); color: var(--text); padding: 10px 16px; border-radius: 999px; cursor: pointer; font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn:hover { transform: none; }
}

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