/* ============================================================
   Forma — creative workshops frontend
   Palette: warm paper, ink, clay/terracotta, olive
   Type: Fraunces (display) + Inter (UI/body)
   ============================================================ */

/* --- Fonts (local, subset) --- */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('/artifacts/forma-frontend--v1--s2--glm-5.2--vanilla--2026-09-17T02-50-12-518Z/assets/fraunces-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('/artifacts/forma-frontend--v1--s2--glm-5.2--vanilla--2026-09-17T02-50-12-518Z/assets/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: 100 900;
  font-display: swap;
  src: url('/artifacts/forma-frontend--v1--s2--glm-5.2--vanilla--2026-09-17T02-50-12-518Z/assets/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/artifacts/forma-frontend--v1--s2--glm-5.2--vanilla--2026-09-17T02-50-12-518Z/assets/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;
}

/* --- Design tokens --- */
:root {
  --paper: #f6efe3;
  --paper-2: #efe5d4;
  --paper-3: #e7dac4;
  --ink: #221c15;
  --ink-soft: #5b5247;
  --ink-faint: #8a7d6a;
  --clay: #b5562f;
  --clay-deep: #8f3f20;
  --olive: #5d6b4a;
  --line: #d8cab1;
  --line-soft: #e3d7c0;
  --card: #fbf7ee;
  --shadow: 0 1px 2px rgba(34,28,21,.04), 0 12px 30px -16px rgba(34,28,21,.18);
  --radius: 18px;
  --radius-sm: 12px;
  --maxw: 1240px;
  --serif: 'Fraunces', 'Georgia', 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ease: cubic-bezier(.2,.7,.2,1);
}

/* --- Reset-ish --- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--clay-deep); }
:focus-visible {
  outline: 2.5px solid var(--clay);
  outline-offset: 2px;
  border-radius: 6px;
}

/* paper grain overlay */
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  opacity: .5; mix-blend-mode: multiply;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(138,125,106,.05), transparent 60%),
    radial-gradient(circle at 80% 70%, rgba(181,86,47,.04), transparent 55%);
}

/* --- Skip link --- */
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--ink); color: var(--paper);
  padding: 10px 16px; border-radius: 10px; text-decoration: none;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }

/* --- Header --- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 16px clamp(16px, 4vw, 40px);
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { color: var(--clay); display: inline-flex; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name {
  font-family: var(--serif); font-weight: 700;
  font-size: 26px; letter-spacing: .01em; font-variation-settings: 'opsz' 24;
}
.brand-tag {
  font-size: 12px; color: var(--ink-faint); margin-top: 4px;
  letter-spacing: .02em;
}
.header-nav { display: flex; gap: 10px; align-items: center; }

.saved-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  padding: 10px 14px; border-radius: 999px;
  font-weight: 600; font-size: 14px;
  transition: background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), transform .08s var(--ease);
}
.saved-toggle:hover { border-color: var(--clay); color: var(--clay-deep); }
.saved-toggle:active { transform: translateY(1px); }
.saved-toggle[aria-pressed="true"] {
  background: var(--ink); color: var(--paper); border-color: var(--ink);
}
.saved-toggle[aria-pressed="true"] .icon-bookmark path { fill: var(--paper); }
.saved-count {
  display: inline-grid; place-items: center;
  min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; font-size: 12px; font-weight: 700;
  background: var(--paper-3); color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.saved-toggle[aria-pressed="true"] .saved-count {
  background: var(--clay); color: var(--paper);
}
.saved-count[data-zero="true"] { opacity: .55; }

/* --- Layout --- */
.main { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); position: relative; z-index: 2; }

/* --- Hero --- */
.hero {
  display: grid; grid-template-columns: 1.15fr .85fr;
  gap: clamp(20px, 4vw, 56px); align-items: center;
  padding: clamp(28px, 6vw, 72px) 0 clamp(24px, 4vw, 48px);
}
.eyebrow {
  font-family: var(--sans); text-transform: uppercase; letter-spacing: .22em;
  font-size: 12px; font-weight: 600; color: var(--clay);
  margin: 0 0 18px;
}
.hero-title {
  font-family: var(--serif); font-weight: 800;
  font-size: clamp(40px, 6.8vw, 86px); line-height: .98;
  letter-spacing: -.02em; margin: 0 0 22px;
  font-variation-settings: 'opsz' 120, 'SOFT' 40;
}
.hero-lede {
  font-size: clamp(16px, 1.4vw, 19px); color: var(--ink-soft);
  max-width: 46ch; margin: 0 0 28px;
}
.hero-stats { display: flex; gap: 28px; flex-wrap: wrap; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats b {
  font-family: var(--serif); font-weight: 700; font-size: 26px;
  color: var(--ink); font-variation-settings: 'opsz' 24;
}
.hero-stats span { font-size: 12px; color: var(--ink-faint); letter-spacing: .04em; }

.hero-media {
  position: relative; margin: 0; border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  border: 1px solid var(--line-soft);
  aspect-ratio: 4 / 5;
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-caption {
  position: absolute; left: 14px; bottom: 14px;
  background: color-mix(in srgb, var(--paper) 80%, transparent);
  backdrop-filter: blur(6px);
  padding: 6px 12px; border-radius: 999px;
  font-size: 12px; color: var(--ink-soft);
  font-style: italic;
}

/* --- Toolbar --- */
.browse { padding-bottom: 12px; }
.toolbar {
  display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap;
  padding: 22px 0 26px;
  border-top: 1px solid var(--line-soft);
  margin-top: 8px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label {
  font-size: 12px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-faint);
}
.search-field { flex: 1 1 280px; max-width: 420px; }
.filter-field { min-width: 200px; }
.search-input-wrap, .select-wrap {
  position: relative; display: flex; align-items: center;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 999px; padding: 0 14px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.search-input-wrap { gap: 8px; }
.icon-search { color: var(--ink-faint); flex: none; }
.search-input-wrap:focus-within, .select-wrap:focus-within {
  border-color: var(--clay); box-shadow: 0 0 0 3px rgba(181,86,47,.14);
}
#search {
  border: none; background: transparent; outline: none;
  padding: 12px 0; flex: 1; font-size: 15px; color: var(--ink);
  min-width: 0;
}
#search::placeholder { color: var(--ink-faint); }
select#filter {
  appearance: none; -webkit-appearance: none;
  border: none; background: transparent; outline: none;
  padding: 12px 28px 12px 4px; font-size: 15px; color: var(--ink);
  width: 100%; cursor: pointer;
}
.select-wrap .icon-chevron {
  position: absolute; right: 12px; pointer-events: none; color: var(--ink-faint);
}
.results-count {
  margin: 0 0 0 auto; align-self: center;
  font-size: 13px; color: var(--ink-faint); font-weight: 500;
}

/* --- Grid --- */
.grid {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2vw, 26px);
}

.card {
  display: flex; flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
  position: relative;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(34,28,21,.05), 0 22px 40px -20px rgba(34,28,21,.28); border-color: var(--line); }
.card:focus-within { border-color: var(--clay); }

.card-media {
  position: relative; aspect-ratio: 3 / 2; overflow: hidden;
  background: var(--paper-3);
}
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .card-media img { transform: scale(1.045); }
.chip {
  position: absolute; left: 12px; top: 12px;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(6px);
  color: var(--ink); font-size: 12px; font-weight: 600;
  letter-spacing: .02em; padding: 6px 11px; border-radius: 999px;
  border: 1px solid var(--line-soft);
}
.card-saved-badge {
  position: absolute; right: 12px; top: 12px;
  width: 34px; height: 34px; border-radius: 999px;
  display: grid; place-items: center;
  background: var(--clay); color: var(--paper);
  border: 2px solid var(--paper);
  opacity: 0; transform: scale(.6);
  transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.card[data-saved="true"] .card-saved-badge { opacity: 1; transform: scale(1); }
.card-saved-badge svg { width: 16px; height: 16px; }

.card-body { display: flex; flex-direction: column; gap: 8px; padding: 18px 18px 20px; flex: 1; }
.card-title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.open-item {
  border: none; background: none; padding: 0; text-align: left;
  font-family: var(--serif); font-weight: 700; font-size: 22px;
  line-height: 1.12; color: var(--ink); letter-spacing: -.01em;
  text-decoration: none; border-radius: 6px;
  font-variation-settings: 'opsz' 24;
}
.open-item:hover { color: var(--clay-deep); }
.card-date { font-size: 13px; color: var(--ink-soft); font-weight: 500; white-space: nowrap; }
.card-desc { font-size: 14.5px; color: var(--ink-soft); margin: 0; }
.card-meta {
  display: flex; flex-wrap: wrap; gap: 8px 16px;
  margin-top: auto; padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 13px; color: var(--ink-faint);
}
.card-meta span { display: inline-flex; align-items: center; gap: 6px; }
.meta-label { color: var(--ink-faint); }
.meta-value { color: var(--ink); font-weight: 600; }
.card-cta {
  margin-top: 12px; align-self: flex-start;
  font-size: 14px; font-weight: 600;
  color: var(--clay-deep); background: none; border: none;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 2px; border-radius: 6px;
}
.card-cta svg { transition: transform .2s var(--ease); }
.card:hover .card-cta svg { transform: translateX(3px); }

/* --- Empty state --- */
.empty-state { padding: 40px 0 80px; }
.empty-card {
  text-align: center; max-width: 460px; margin: 0 auto;
  padding: 40px 28px; border: 1px dashed var(--line);
  border-radius: var(--radius); background: var(--card);
}
.empty-mark { color: var(--clay); margin-bottom: 10px; }
.empty-title { font-family: var(--serif); font-weight: 700; font-size: 24px; margin: 0 0 6px; }
.empty-text { color: var(--ink-soft); margin: 0 0 18px; }

/* --- About --- */
.about {
  display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(24px,5vw,64px);
  align-items: center; padding: clamp(40px,7vw,84px) 0;
  border-top: 1px solid var(--line-soft);
}
.section-title {
  font-family: var(--serif); font-weight: 800; font-size: clamp(28px,3.4vw,40px);
  margin: 0 0 14px; letter-spacing: -.01em; font-variation-settings: 'opsz' 80;
}
.about-col p { font-size: 17px; color: var(--ink-soft); max-width: 42ch; }
.about-media { margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line-soft); }
.about-media img { width: 100%; aspect-ratio: 3/2; object-fit: cover; }

/* --- Footer --- */
.site-footer { border-top: 1px solid var(--line-soft); margin-top: 20px; background: var(--paper-2); position: relative; z-index: 2; }
.footer-inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 24px clamp(16px,4vw,40px);
  display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap;
}
.footer-brand { font-family: var(--serif); font-weight: 700; font-size: 18px; }
.footer-note { color: var(--ink-faint); font-size: 12.5px; }

/* ============================================================
   Detail dialog
   ============================================================ */
.detail {
  border: none; padding: 0; background: transparent; max-width: none; max-height: none;
  width: 100%; height: 100%; margin: 0; color: var(--ink);
  overflow: hidden;
}
.detail::backdrop { background: rgba(34,28,21,.55); backdrop-filter: blur(3px); }
.detail-inner {
  width: min(980px, 94vw); max-height: 92vh; margin: 4vh auto;
  background: var(--paper); border-radius: 22px; overflow: auto;
  border: 1px solid var(--line); box-shadow: 0 30px 80px -20px rgba(0,0,0,.45);
  animation: pop .28s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }

.detail-top {
  position: relative; aspect-ratio: 16/9; overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.detail-top img { width: 100%; height: 100%; object-fit: cover; }
.detail-top .chip {
  position: absolute; left: 18px; top: 18px;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  border: 1px solid var(--line-soft);
}
.close-detail {
  position: absolute; right: 16px; top: 16px;
  width: 42px; height: 42px; border-radius: 999px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line-soft); color: var(--ink);
  transition: background .2s var(--ease), color .2s var(--ease), transform .1s var(--ease);
}
.close-detail:hover { background: var(--ink); color: var(--paper); }
.close-detail:active { transform: scale(.95); }

.detail-body { padding: clamp(20px,3vw,34px) clamp(20px,4vw,48px) clamp(28px,4vw,44px); }
.detail-eyebrow {
  text-transform: uppercase; letter-spacing: .18em; font-size: 12px;
  font-weight: 600; color: var(--clay); margin: 0 0 10px;
}
.detail-title {
  font-family: var(--serif); font-weight: 800; font-size: clamp(30px,4vw,46px);
  line-height: 1.04; letter-spacing: -.02em; margin: 0 0 8px;
  font-variation-settings: 'opsz' 100;
}
.detail-sub { color: var(--ink-soft); font-size: 16px; margin: 0 0 22px; }
.detail-sub .dot { margin: 0 8px; color: var(--ink-faint); }

.detail-facts {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line-soft); border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 26px;
}
.fact { background: var(--card); padding: 14px 16px; }
.fact dt { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-faint); font-weight: 600; margin-bottom: 4px; }
.fact dd { margin: 0; font-weight: 700; font-size: 17px; font-family: var(--serif); font-variation-settings: 'opsz' 20; }

.detail-body-text {
  font-size: 17px; line-height: 1.6; color: var(--ink);
  max-width: 60ch; margin: 0 0 28px;
}
.detail-body-text::first-letter {
  font-family: var(--serif); font-weight: 800; font-size: 3.4em;
  float: left; line-height: .8; padding: 4px 10px 0 0; color: var(--clay);
  font-variation-settings: 'opsz' 144;
}

.detail-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.save-item {
  display: inline-flex; align-items: center; gap: 10px;
  border-radius: 999px; padding: 14px 22px; font-weight: 600; font-size: 15px;
  border: 1.5px solid var(--ink); background: var(--ink); color: var(--paper);
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .1s var(--ease);
}
.save-item:hover { background: var(--clay-deep); border-color: var(--clay-deep); }
.save-item:active { transform: translateY(1px); }
.save-item[aria-pressed="true"] { background: var(--clay); border-color: var(--clay); color: var(--paper); }
.save-item .icon-bookmark path { fill: currentColor; }
.save-item:not([aria-pressed="true"]) .icon-bookmark path { fill: none; }

.btn {
  border-radius: 999px; padding: 12px 20px; font-weight: 600; font-size: 14px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.btn:hover { border-color: var(--clay); color: var(--clay-deep); }
.btn-ghost { background: transparent; }

.detail-back {
  display: inline-flex; align-items: center; gap: 6px;
  border: none; background: none; color: var(--ink-soft); font-weight: 600; font-size: 14px;
  padding: 8px 0; margin-bottom: 4px;
}
.detail-back:hover { color: var(--clay-deep); }

/* detail shortlist hint */
.detail-hint { font-size: 13px; color: var(--ink-faint); margin-left: 4px; }

/* --- Responsive --- */
@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .hero { grid-template-columns: 1fr 0.8fr; gap: 32px; }
}
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; padding-top: 30px; }
  .hero-media { aspect-ratio: 4/3; order: -1; }
  .grid { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; }
  .about-media { order: -1; }
  .detail-facts { grid-template-columns: repeat(2, 1fr); }
  .detail-body-text::first-letter { font-size: 2.8em; }
  .toolbar { gap: 12px; }
  .results-count { width: 100%; margin: 4px 0 0; }
  .search-field { flex: 1 1 100%; max-width: none; }
  .filter-field { flex: 1 1 100%; min-width: 0; }
}
@media (max-width: 480px) {
  .brand-tag { display: none; }
  .detail-inner { margin: 0; max-height: 100vh; border-radius: 0; min-height: 100vh; }
  .detail-top { aspect-ratio: 3/2; }
  .detail-body { padding: 22px 18px 32px; }
  .detail-body-text::first-letter { font-size: 2.4em; }
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .detail-inner { animation: none; }
}

/* hide list when empty (empty-state shows instead) */
.grid[data-empty="true"] { display: none; }
