/* ── Fonts ─────────────────────────────────────────────── */

@font-face {
  font-family: "Fraunces";
  src: url("/artifacts/forma-frontend--v1--s3-alternative-direction--glm-5.3--frontend-design--2026-09-17T10-02-56-149Z/assets/Fraunces-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Karla";
  src: url("/artifacts/forma-frontend--v1--s3-alternative-direction--glm-5.3--frontend-design--2026-09-17T10-02-56-149Z/assets/Karla-Variable.ttf") format("truetype");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

/* ── Tokens ────────────────────────────────────────────── */

:root {
  --bisque: #efe0cd;      /* page base: unfired clay */
  --paper: #fbf5e8;       /* ticket paper */
  --ink: #33231a;
  --ink-soft: #6e5c4e;
  --clay: #b4532c;        /* Ceramics */
  --cobalt: #2e4c9e;      /* Painting */
  --sage: #67744a;        /* Floristry */
  --honey: #c1861f;       /* Baking */
  --rule: 2px solid var(--ink);
  --focus: #2e4c9e;
}

/* ── Base ──────────────────────────────────────────────── */

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bisque);
  color: var(--ink);
  font: 400 16px/1.55 "Karla", system-ui, sans-serif;
  font-optical-sizing: auto;
}

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

h1, h2, h3 {
  font-family: "Fraunces", Georgia, serif;
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 0, "WONK" 1, "opsz" 120;
  font-weight: 560;
  margin: 0;
}

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

/* ── Masthead ──────────────────────────────────────────── */

.masthead {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding: 18px 40px 14px;
  border-bottom: var(--rule);
}

.wordmark {
  font-family: "Fraunces", Georgia, serif;
  font-variation-settings: "SOFT" 0, "WONK" 1, "opsz" 60, "wght" 620;
  font-size: 30px;
  margin: 0;
  letter-spacing: -0.01em;
}

.tagline {
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
}

.saved-toggle {
  margin-left: auto;
  align-self: center;
}

.count {
  display: inline-block;
  min-width: 1.2em;
  padding: 0 0.35em;
  text-align: center;
  border: 2px solid currentColor;
  border-radius: 2px;
  font-size: 13px;
  line-height: 1.4;
}

/* ── Layout shells ─────────────────────────────────────── */

main { padding: 0 40px; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 56px;
  align-items: center;
  padding: 56px 0 60px;
}

.hero-copy h1 {
  font-size: clamp(46px, 6.2vw, 86px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  font-variation-settings: "SOFT" 0, "WONK" 1, "opsz" 144, "wght" 520;
  max-width: 8ch;
}

.intro {
  margin: 26px 0 0;
  max-width: 44ch;
  font-size: 17.5px;
  color: var(--ink-soft);
}

.hero-photo {
  width: 100%;
  height: auto;
  border: var(--rule);
  background: var(--paper);
}

/* ── Controls ──────────────────────────────────────────── */

.browse { padding-bottom: 80px; }

.browse-heading {
  font-size: 24px;
  font-variation-settings: "SOFT" 0, "WONK" 1, "opsz" 40, "wght" 600;
  border-bottom: var(--rule);
  padding-bottom: 10px;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  padding: 22px 0 18px;
}

.field { display: flex; flex-direction: column; gap: 6px; }

.field label { font-size: 14.5px; font-weight: 700; }

.field input,
.field select {
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: var(--rule);
  border-radius: 2px;
  padding: 10px 12px;
  min-width: 0;
}

#search { width: 280px; }
#category { width: 200px; }

.result-count {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--ink-soft);
}

/* ── Buttons ────────────────────────────────────────────── */

.btn {
  font: 700 15px "Karla", system-ui, sans-serif;
  color: var(--ink);
  background: transparent;
  border: var(--rule);
  border-radius: 2px;
  padding: 10px 16px;
  cursor: pointer;
}

.btn:hover { background: var(--ink); color: var(--bisque); }

.btn[aria-pressed="true"] {
  background: var(--ink);
  color: var(--bisque);
}

/* ── Ledger rows ───────────────────────────────────────── */

.ledger {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: var(--rule);
}

.row {
  display: grid;
  grid-template-columns: 128px 180px minmax(0, 1fr) 225px 90px;
  grid-template-areas: "date thumb body meta price";
  gap: 30px;
  align-items: center;
  padding: 30px 0;
  border-bottom: var(--rule);
}

.row .date { grid-area: date; }
.row .thumbwrap { grid-area: thumb; }
.row .body { grid-area: body; min-width: 0; }
.row .meta { grid-area: meta; }
.row .price { grid-area: price; }

.date { display: flex; flex-direction: column; line-height: 1; }

.date-day {
  font-family: "Fraunces", Georgia, serif;
  font-variation-settings: "SOFT" 0, "WONK" 1, "opsz" 144, "wght" 580;
  font-size: 68px;
  letter-spacing: -0.03em;
}

.date-month {
  margin-top: 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-soft);
}

.thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: var(--rule);
  background: var(--paper);
  box-shadow: 9px 9px 0 0 var(--cat, var(--ink-soft));
}

.cat {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-soft);
}

.swatch {
  width: 13px;
  height: 13px;
  background: var(--cat, var(--ink-soft));
  border: 2px solid var(--ink);
  flex: none;
}

.title {
  font-size: 27px;
  line-height: 1.12;
  letter-spacing: -0.01em;
  font-variation-settings: "SOFT" 0, "WONK" 1, "opsz" 48, "wght" 580;
}

.title-btn {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  text-align: left;
  cursor: pointer;
  border-bottom: 2px dotted currentColor;
}

.title-btn:hover { border-bottom-style: solid; }

.sum {
  margin: 10px 0 0;
  max-width: 52ch;
  font-size: 15px;
  color: var(--ink-soft);
}

.chip {
  display: inline-block;
  margin: 12px 0 0;
  padding: 2px 9px;
  font-size: 13px;
  font-weight: 700;
  background: var(--ink);
  color: var(--bisque);
  border-radius: 2px;
}

.meta { margin: 0; font-size: 15px; color: var(--ink-soft); }
.meta p { margin: 0 0 2px; }
.meta strong { color: var(--ink); font-weight: 700; }

.price {
  margin: 0;
  text-align: right;
  font-family: "Fraunces", Georgia, serif;
  font-variation-settings: "SOFT" 0, "WONK" 1, "opsz" 60, "wght" 620;
  font-size: 30px;
}

.price small {
  display: block;
  font: 400 13px "Karla", system-ui, sans-serif;
  color: var(--ink-soft);
}

/* ── Empty state ────────────────────────────────────────── */

.empty {
  border: var(--rule);
  border-style: dashed;
  padding: 48px 32px;
  text-align: center;
  margin-top: 26px;
}

.empty-title {
  margin: 0 0 6px;
  font-family: "Fraunces", Georgia, serif;
  font-variation-settings: "SOFT" 0, "WONK" 1, "opsz" 40, "wght" 600;
  font-size: 24px;
}

.empty p { margin: 0 0 6px; }
.empty .btn { margin-top: 18px; }

/* ── Detail: ticket sheet ──────────────────────────────── */

.backdrop {
  position: fixed;
  inset: 0;
  background: rgba(51, 35, 26, 0.45);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.backdrop[data-open="true"] { opacity: 1; }

.panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(560px, 100%);
  background: var(--paper);
  border-left: var(--rule);
  transform: translateX(102%);
  transition: transform 0.32s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.panel[data-open="true"] { transform: translateX(0); }

/* punched perforation down the ticket's left edge */
.panel::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 20px;
  width: 3px;
  background: radial-gradient(circle, var(--bisque) 2.1px, transparent 2.4px) 0 0 / 3px 26px repeat-y;
  pointer-events: none;
}

.panel-inner {
  height: 100%;
  overflow-y: auto;
  padding: 30px 34px 40px 48px;
  position: relative;
}

.close-btn {
  position: absolute;
  top: 24px;
  right: 26px;
}

.detail-date {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-soft);
}

.detail-date .d-num {
  font-family: "Fraunces", Georgia, serif;
  font-variation-settings: "SOFT" 0, "WONK" 1, "opsz" 144, "wght" 580;
  font-size: 44px;
  color: var(--ink);
  letter-spacing: -0.03em;
}

#detail-title { font-size: 38px; line-height: 1.06; max-width: 14ch; }

.detail-photo {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: var(--rule);
  margin: 22px 0;
}

.detail-body { font-size: 17px; line-height: 1.6; max-width: 48ch; margin: 0; }

.facts {
  margin: 26px 0;
  border-top: var(--rule);
}

.facts > div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 11px 0;
  border-bottom: 1.5px solid rgba(51, 35, 26, 0.25);
}

.facts dt { font-size: 14.5px; font-weight: 700; color: var(--ink-soft); margin: 0; }
.facts dd { margin: 0; font-size: 15.5px; font-weight: 700; text-align: right; }

.save-btn { width: 100%; padding: 15px 18px; font-size: 16.5px; }

/* ── Footer ────────────────────────────────────────────── */

.footer {
  border-top: var(--rule);
  padding: 22px 40px 40px;
  font-size: 13.5px;
  color: var(--ink-soft);
}

.footer p { margin: 0; }

/* ── Motion preferences ────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .panel, .backdrop { transition: none; }
}

/* ── Mobile ────────────────────────────────────────────── */

@media (max-width: 840px) {
  .masthead { padding: 16px 20px 12px; flex-wrap: wrap; gap: 8px 14px; }
  .tagline { flex-basis: 100%; order: 3; }
  .saved-toggle { margin-left: auto; }
  main { padding: 0 20px; }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
    padding: 36px 0 40px;
  }

  .hero-copy h1 { max-width: none; }

  .controls { gap: 14px; }
  #search, #category { width: 100%; }
  .field { width: 100%; }

  .row {
    grid-template-columns: minmax(70px, auto) minmax(0, 1fr);
    grid-template-areas:
      "date body"
      "thumb thumb"
      "meta meta"
      "price price";
    gap: 16px 20px;
    padding: 26px 0;
  }

  .date-day { font-size: 46px; }
  .thumb { box-shadow: none; }
  .meta { column-gap: 20px; }
  .price { text-align: left; font-size: 26px; }
  .price small { display: inline; margin-left: 6px; }

  .panel-inner { padding: 22px 22px 32px 42px; }
  #detail-title { font-size: 30px; }
  .close-btn { top: 18px; right: 18px; }
}
