/* ==========================================================================
   Forma — in-person creative workshops
   Design: warm editorial "paper & clay". Amatic SC (display) + Cabin (body).
   ========================================================================== */

/* ---------- Fonts (all local, no runtime CDN) ---------- */
@font-face {
  font-family: 'Amatic SC';
  src: url('/artifacts/forma-frontend--v1--s2--glm-5.3--ui-ux-pro-max--2026-09-17T08-25-58-837Z/assets/amatic-sc-400.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Amatic SC';
  src: url('/artifacts/forma-frontend--v1--s2--glm-5.3--ui-ux-pro-max--2026-09-17T08-25-58-837Z/assets/amatic-sc-700.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Cabin';
  src: url('/artifacts/forma-frontend--v1--s2--glm-5.3--ui-ux-pro-max--2026-09-17T08-25-58-837Z/assets/cabin-400.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Cabin';
  src: url('/artifacts/forma-frontend--v1--s2--glm-5.3--ui-ux-pro-max--2026-09-17T08-25-58-837Z/assets/cabin-600.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Cabin';
  src: url('/artifacts/forma-frontend--v1--s2--glm-5.3--ui-ux-pro-max--2026-09-17T08-25-58-837Z/assets/cabin-700.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --paper: #FAF6F0;
  --card: #FFFFFF;
  --ink: #1C1917;
  --muted: #57534E;
  --line: #E7DFD4;
  --line-strong: #D9CEC0;
  --accent: #9A3412;          /* clay — text-safe on paper */
  --accent-vivid: #C2410C;    /* clay — fills with white text */
  --accent-soft: #F6E7DB;
  --shadow-sm: 0 1px 2px rgba(28, 25, 23, .07);
  --shadow-lg: 0 2px 4px rgba(28, 25, 23, .06), 0 18px 44px rgba(28, 25, 23, .12);
  --radius: 18px;
  --radius-lg: 24px;
  --font-display: 'Amatic SC', 'Segoe Script', cursive;
  --font-body: 'Cabin', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;          /* 16px base */
  line-height: 1.55;
}

h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 700; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

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

.wrap {
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: clamp(18px, 4vw, 34px);
}

.ic {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  vertical-align: -0.18em;
}

/* Visible, comfortable keyboard focus everywhere */
:focus-visible {
  outline: 3px solid var(--accent-vivid);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 12px 18px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  border-radius: 10px;
  text-decoration: none;
  transform: translateY(-300%);
}
.skip-link:focus-visible { transform: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 246, 240, .88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-block: 12px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: .02em;
  text-decoration: none;
}
.wordmark-mark { width: 24px; height: 24px; align-self: center; color: var(--accent-vivid); }
.header-note {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Buttons & chips ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 22px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .22s ease, color .22s ease, box-shadow .22s ease, transform .22s ease;
}
.btn-primary {
  background: var(--ink);
  color: var(--paper);
  box-shadow: var(--shadow-sm);
}
.btn-secondary {
  background: var(--card);
  color: var(--ink);
}
.btn-lg { padding: 14px 28px; font-size: 1.05rem; }
@media (prefers-reduced-motion: no-preference) {
  .btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
  .btn-secondary:hover { background: var(--ink); color: var(--paper); }
  .btn-primary:hover { background: #332B26; }
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 48px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 2px solid var(--line-strong);
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .22s ease, border-color .22s ease, color .22s ease;
}
.chip-count {
  min-width: 26px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: .85rem;
  font-weight: 700;
  text-align: center;
}
.chip[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.chip[aria-pressed="true"] .ic-heart { fill: currentColor; }
.chip[aria-pressed="true"] .chip-count { background: rgba(255, 255, 255, .22); color: #fff; }

/* ---------- Icons-only buttons (save hearts, close) ---------- */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 999px;
  border: 2px solid var(--line-strong);
  background: rgba(255, 255, 255, .94);
  color: var(--ink);
  cursor: pointer;
  transition: background-color .22s ease, border-color .22s ease, color .22s ease, transform .22s ease;
}
.icon-btn .ic { width: 22px; height: 22px; }
.icon-btn[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.icon-btn[aria-pressed="true"] .ic-heart { fill: currentColor; }
@media (prefers-reduced-motion: no-preference) {
  .icon-btn:hover { transform: scale(1.06); }
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  align-items: center;
  gap: clamp(32px, 6vw, 72px);
  padding-block: clamp(44px, 8vh, 96px) clamp(40px, 7vh, 80px);
}
.eyebrow {
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
}
.hero h1 {
  margin-top: 12px;
  font-size: clamp(3.4rem, 7.5vw, 6rem);
  line-height: .98;
  letter-spacing: .01em;
  max-width: 12ch;
}
.hl { position: relative; display: inline-block; white-space: nowrap; }
.squiggle {
  position: absolute;
  left: 2%;
  bottom: -.08em;
  width: 96%;
  height: .14em;
  color: var(--accent-vivid);
}
.lede {
  margin-top: 20px;
  max-width: 46ch;
  font-size: 1.12rem;
  color: var(--muted);
}
.hero .btn { margin-top: 30px; }

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin-top: 26px;
  color: var(--muted);
  font-size: .95rem;
  font-weight: 600;
}
.hero-facts li { display: inline-flex; align-items: center; gap: 8px; }
.hero-facts .ic { color: var(--accent-vivid); }

.hero-figure {
  position: relative;
  margin: 0;
  justify-self: center;
  width: min(100%, 430px);
}
.arch {
  position: absolute;
  inset: 14px -14px -14px 14px;
  border-radius: 330px 330px 26px 26px;
  background: var(--accent-soft);
}
.frame {
  position: relative;
  border: 2px solid var(--ink);
  border-radius: 330px 330px 22px 22px;
  padding: 10px;
  background: var(--card);
  box-shadow: var(--shadow-lg);
}
.frame img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 320px 320px 14px 14px;
}
.hero-figure figcaption {
  margin-top: 14px;
  text-align: center;
  font-size: .8rem;
  color: var(--muted);
  letter-spacing: .04em;
}

/* ---------- Workshop section ---------- */
.workshops { padding-block: clamp(40px, 7vh, 76px) clamp(64px, 10vh, 110px); }

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 24px;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--ink);
  margin-bottom: 26px;
}
.section-head h2 {
  font-size: clamp(2.6rem, 5vw, 3.6rem);
  line-height: 1;
}
.section-head .eyebrow { margin-bottom: 4px; }
.result-count {
  font-size: .95rem;
  font-weight: 700;
  color: var(--muted);
  padding-bottom: 6px;
}

/* ---------- Toolbar ---------- */
.toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) minmax(170px, .8fr) minmax(170px, .8fr);
  gap: 16px 20px;
  margin-bottom: 30px;
}
.field .label-label, .field label {
  display: block;
  margin-bottom: 7px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
}
.control { position: relative; }
.control .ic {
  position: absolute;
  top: 50%;
  left: 15px;
  transform: translateY(-50%);
  width: 19px;
  height: 19px;
  color: var(--muted);
  pointer-events: none;
}
.control-search input { padding-left: 44px; }

input[type="search"], select {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 2px solid var(--line-strong);
  border-radius: 14px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-weight: 500;
  cursor: pointer;               /* select */
  appearance: none;
  -webkit-appearance: none;
}
input[type="search"] { cursor: text; }
select {
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231C1917' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 17px;
}
input[type="search"]::placeholder { color: #6E655B; opacity: 1; }

/* ---------- Grid & cards ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 26px;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .25s ease, transform .25s ease;
}
@media (prefers-reduced-motion: no-preference) {
  .card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
}

.card-media {
  position: relative;
  margin: 0;
}
.card-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.tag {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  background: var(--accent-soft);
  color: var(--accent);
}
.card-media .tag {
  position: absolute;
  top: 12px;
  left: 12px;
  box-shadow: 0 1px 3px rgba(28, 25, 23, .18);
  backdrop-filter: blur(2px);
}
.tag-ceramics { background: #F3E1D3; color: #7C2D12; }
.tag-painting { background: #DFE7F0; color: #293E60; }
.tag-floristry { background: #E4EDD8; color: #33511D; }
.tag-baking { background: #F2E7CE; color: #6B4A0E; }

.card-media .icon-btn {
  position: absolute;
  top: 10px;
  right: 10px;
}

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 12px;
  padding: 20px 20px 22px;
}
.card-title {
  font-size: 2rem;
  line-height: 1;
  letter-spacing: .015em;
}
.card-desc {
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.5;
}
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 18px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--muted);
}
.meta li { display: inline-flex; align-items: center; gap: 7px; }
.meta .ic { width: 16px; height: 16px; color: var(--accent-vivid); }

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 6px;
}
.price { font-size: 1.35rem; font-weight: 700; }
.price small {
  font-size: .78rem;
  font-weight: 600;
  color: var(--muted);
  margin-left: 3px;
}
.card-foot .btn { min-height: 44px; padding: 8px 18px; font-size: .95rem; }

/* ---------- Empty state ---------- */
.empty-state {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
  padding: clamp(40px, 8vh, 72px) 24px;
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, .65);
}
.empty-state[hidden] { display: none; }
.empty-art { width: 56px; height: 56px; color: var(--line-strong); stroke: var(--accent-vivid); }
.empty-state h3 { font-size: 2rem; }
.empty-state p { color: var(--muted); max-width: 40ch; }
.empty-state .btn { margin-top: 8px; }

/* ---------- Detail dialog ---------- */
.detail-dialog {
  width: min(980px, 94vw);
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--ink);
  overflow: visible;            /* scrolling happens inside .sheet */
}
.detail-dialog::backdrop {
  background: rgba(28, 25, 23, .55);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.sheet {
  max-height: min(88dvh, 900px);
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  container-type: inline-size;
}
@container (max-width: 700px) {
  .sheet-grid { grid-template-columns: 1fr; }
  .detail-meta { grid-template-columns: 1fr; }
  .sheet-media img { max-height: 34dvh; min-height: 200px; }
}
.sheet-head {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 12px 22px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.sheet-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 0;
}
.sheet-media { margin: 0; min-width: 0; }
.sheet-media img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  max-height: 76dvh;
  object-fit: cover;
}
.sheet-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding: clamp(22px, 4vw, 40px);
}
.sheet-title {
  font-size: clamp(2.6rem, 5vw, 3.8rem);
  line-height: 1;
  letter-spacing: .01em;
}
.detail-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 22px;
  width: 100%;
  margin: 0;
}
.detail-meta > div {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  padding: 8px 12px;
  background: var(--paper);
  border-radius: 12px;
}
.detail-meta .ic { width: 19px; height: 19px; color: var(--accent-vivid); }
.detail-meta dt {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--muted);
}
.detail-meta dd {
  margin: 0;
  font-size: .93rem;
  font-weight: 700;
}
.detail-body {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--ink);
}
.detail-note {
  font-size: .85rem;
  color: var(--muted);
}
.btn-save { width: 100%; }
.btn-save .ic-heart { fill: none; transition: fill .2s ease; }
.btn-save[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
}
.btn-save[aria-pressed="true"] .ic-heart { fill: currentColor; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 2px solid var(--ink);
  background: var(--accent-soft);
}
.footer-inner {
  display: grid;
  gap: 10px;
  padding-block: 34px 44px;
}
.footer-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2rem;
  line-height: 1;
}
.footer-note {
  max-width: 72ch;
  font-size: .85rem;
  color: #4A3F35;
}
.footer-note a { color: var(--accent); font-weight: 700; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 920px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 36px;
  }
  .hero h1 { max-width: none; font-size: clamp(3rem, 11vw, 4.6rem); }
  .hl { white-space: normal; }
  .hero-figure { width: min(100%, 380px); margin-inline: auto; }
  .toolbar { grid-template-columns: 1fr 1fr; }
  .field-search { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .header-note { display: none; }
  .toolbar { grid-template-columns: 1fr; }
  .sheet-grid { grid-template-columns: 1fr; }
  .sheet-media img {
    max-height: 34dvh;
    min-height: 200px;
  }
  .sheet { max-height: 92dvh; border-radius: 18px; }
  .detail-meta { grid-template-columns: 1fr; }
  .card-foot { flex-wrap: wrap; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
