/* ==========================================================================
   Forma — design system
   ========================================================================== */

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/artifacts/forma-frontend--v1--s2--deepseek-4.1-flash--vanilla--2026-09-17T03-13-47-011Z/assets/fonts/fraunces-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/artifacts/forma-frontend--v1--s2--deepseek-4.1-flash--vanilla--2026-09-17T03-13-47-011Z/assets/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #f4efe4;
  --paper-2: #ece4d4;
  --surface: #fffdf8;
  --ink: #221d18;
  --ink-soft: #4b4238;
  --muted: #776b5d;
  --line: #ded3c0;
  --line-strong: #cabda6;
  --accent: #bd5430;
  --accent-dark: #9c4223;
  --accent-soft: #f6e4da;
  --sage: #5d6b50;
  --sage-soft: #e5e9dc;
  --gold: #b07d2b;
  --gold-soft: #f4e8d2;
  --plum: #6c4a63;
  --plum-soft: #ecdfe9;

  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(34, 29, 24, 0.05), 0 10px 30px -18px rgba(34, 29, 24, 0.35);
  --shadow-lift: 0 2px 4px rgba(34, 29, 24, 0.06), 0 22px 44px -24px rgba(34, 29, 24, 0.45);
  --wrap: 1180px;
}

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

html {
  scroll-behavior: smooth;
}

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

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

a {
  color: inherit;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.015em;
  margin: 0;
  font-optical-sizing: auto;
}

button {
  font: inherit;
  color: inherit;
}

.wrap {
  width: min(100% - 3rem, var(--wrap));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3.5rem;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  text-decoration: none;
  transition: top 0.15s ease;
}

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

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(244, 239, 228, 0.85);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.85rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.wordmark .mark {
  color: var(--accent);
  display: inline-flex;
}

.header-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

/* ------------------------------------------------------------------ hero */

.hero {
  padding: 3.25rem 0 2.5rem;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.eyebrow {
  margin: 0 0 1rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  margin-bottom: 1.2rem;
}

.hero-lede {
  font-size: clamp(1.02rem, 1.6vw, 1.15rem);
  color: var(--ink-soft);
  max-width: 44ch;
  margin: 0 0 1.9rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  flex-wrap: wrap;
}

.hero-aside {
  font-size: 0.9rem;
  color: var(--muted);
}

.caption {
  margin-top: 2.25rem;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.01em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.75rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease,
    transform 0.16s ease, box-shadow 0.16s ease;
}

.btn-primary {
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  background: var(--accent);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--ink);
  background: var(--surface);
}

/* collage */

.collage {
  display: grid;
  grid-template-columns: 1.25fr 0.85fr;
  grid-template-rows: 1fr 1fr;
  gap: 0.85rem;
  aspect-ratio: 5 / 4.4;
  position: relative;
}

.collage figure {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--paper-2);
  box-shadow: var(--shadow);
}

.collage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.collage:hover img {
  transform: scale(1.04);
}

.collage .c1 {
  grid-row: span 2;
}

.collage .c1 img {
  object-position: center 40%;
}

/* ---------------------------------------------------------------- browse */

.browse {
  padding: 1.5rem 0 5rem;
  scroll-margin-top: 5rem;
}

.browse-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding-top: 1.75rem;
}

.browse-head h2 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
}

.results {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  white-space: nowrap;
}

.controls {
  margin: 1.5rem 0 2rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px auto;
  gap: 0.9rem;
  align-items: end;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field label {
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

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

.input-icon {
  position: absolute;
  left: 0.95rem;
  color: var(--muted);
  pointer-events: none;
}

input[type="search"],
select {
  width: 100%;
  height: 50px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  padding: 0 1rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input[type="search"] {
  padding-left: 2.7rem;
  appearance: none;
}

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

select {
  appearance: none;
  padding-right: 2.6rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23776b5d' stroke-width='2' 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 0.95rem center;
  background-size: 16px;
  cursor: pointer;
}

input[type="search"]:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  outline: none;
}

.saved-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  height: 50px;
  padding: 0 1.15rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

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

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

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

.saved-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 700;
}

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

/* ------------------------------------------------------------------ grid */

.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.6rem;
}

.grid > li[hidden] {
  display: none;
}

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

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
  border-color: var(--line-strong);
}

.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.6s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--surface);
  color: var(--ink);
}

.card-media .tag {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  box-shadow: 0 2px 10px rgba(34, 29, 24, 0.18);
}

.tag[data-cat="Baking"] {
  background: var(--gold-soft);
  color: #7a551a;
}
.tag[data-cat="Ceramics"] {
  background: var(--accent-soft);
  color: var(--accent-dark);
}
.tag[data-cat="Floristry"] {
  background: var(--sage-soft);
  color: #44513a;
}
.tag[data-cat="Painting"] {
  background: var(--plum-soft);
  color: #53364c;
}

.icon-save {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.9);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  color: var(--ink-soft);
  cursor: pointer;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 10px rgba(34, 29, 24, 0.18);
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.icon-save:hover {
  background: #fff;
  transform: scale(1.06);
}

.icon-save[aria-pressed="true"] {
  color: var(--accent);
}

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

.card-body {
  padding: 1.2rem 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  flex: 1;
}

.card-title {
  font-size: 1.42rem;
  line-height: 1.1;
}

.open-item {
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
}

.open-item:hover {
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
}

.card-desc {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.93rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-instructor {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
}

.card-meta {
  list-style: none;
  margin: auto 0 0;
  padding: 0.85rem 0 0;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.card-meta li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.card-meta .price {
  color: var(--ink);
  font-weight: 600;
}

.card-meta svg {
  color: var(--line-strong);
  flex: none;
}

/* ---------------------------------------------------------- empty state */

.empty-state {
  text-align: center;
  padding: 4rem 1.5rem;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.6);
  background: color-mix(in srgb, var(--surface) 60%, transparent);
}

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

.empty-mark {
  color: var(--line-strong);
  margin: 0 0 1rem;
}

.empty-state h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--muted);
  margin: 0 auto 1.5rem;
  max-width: 40ch;
}

/* ----------------------------------------------------------------- footer */

.site-footer {
  background: var(--ink);
  color: #e9e1d3;
  padding: 3rem 0;
  margin-top: 2rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-mark {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 0 0 0.25rem;
}

.footer-tag {
  margin: 0;
  color: #b7ab99;
  font-size: 0.92rem;
}

.footer-note {
  margin: 0;
  max-width: 46ch;
  font-size: 0.82rem;
  color: #a99d8b;
  line-height: 1.6;
}

.footer-note a {
  color: #e9e1d3;
  text-underline-offset: 3px;
}

/* ----------------------------------------------------------- detail view */

dialog#detail {
  padding: 0;
  border: none;
  background: transparent;
  color: var(--ink);
  width: min(1000px, 94vw);
  max-height: 92vh;
  overflow: visible;
}

dialog#detail::backdrop {
  background: rgba(26, 21, 16, 0.58);
  backdrop-filter: blur(3px);
}

.detail-shell {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  max-height: 92vh;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.6);
}

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

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

.detail-panel {
  padding: 1.75rem 2rem 2rem;
  overflow-y: auto;
  max-height: 92vh;
}

.detail-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.icon-btn {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.icon-btn:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.detail-title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 0.75rem;
}

.detail-summary {
  color: var(--ink-soft);
  font-size: 1.05rem;
  margin: 0 0 1.5rem;
}

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

.facts > div {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
}

.facts > div:nth-child(odd) {
  padding-right: 1rem;
}

.facts > div:nth-child(even) {
  padding-left: 1rem;
  border-left: 1px solid var(--line);
}

.facts dt {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.15rem;
}

.facts dd {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 500;
}

.detail-body-text {
  margin: 0 0 1.75rem;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.detail-actions {
  position: sticky;
  bottom: 0;
  padding-top: 1rem;
  background: var(--surface);
}

.save-item {
  width: 100%;
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow);
}

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

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

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

/* opening animation */
@media (prefers-reduced-motion: no-preference) {
  dialog#detail[open] {
    animation: dialog-in 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  }
  dialog#detail[open]::backdrop {
    animation: backdrop-in 0.22s ease both;
  }
  .card,
  .collage img {
    will-change: transform;
  }
}

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

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

/* ------------------------------------------------------------- responsive */

@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .collage {
    aspect-ratio: 16 / 10;
    max-width: 620px;
  }
  .controls {
    grid-template-columns: 1fr 1fr;
  }
  .field-search {
    grid-column: 1 / -1;
  }
  .saved-toggle {
    justify-content: center;
  }
}

@media (max-width: 620px) {
  .wrap {
    width: min(100% - 2rem, var(--wrap));
  }
  .header-note {
    display: none;
  }
  .hero {
    padding-top: 2.25rem;
  }
  .browse-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }
  .results {
    white-space: normal;
  }
  .controls {
    grid-template-columns: 1fr;
  }
  .field-search {
    grid-column: auto;
  }
  .grid {
    grid-template-columns: 1fr;
  }

  dialog#detail {
    width: 100vw;
    max-width: 100vw;
    max-height: 100vh;
    max-height: 100dvh;
    height: 100vh;
    height: 100dvh;
    margin: 0;
  }
  .detail-shell {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(180px, 32vh) 1fr;
    max-height: 100vh;
    max-height: 100dvh;
    height: 100vh;
    height: 100dvh;
    border-radius: 0;
  }
  .detail-media {
    min-height: 0;
  }
  .detail-panel {
    max-height: none;
    padding: 1.35rem 1.25rem 1.5rem;
  }
  .detail-bar {
    margin-bottom: 0.85rem;
  }
}

@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;
  }
}
