/* Made by Ritzee: the one theme file. Colours, fonts and spacing from the design handoff. */
:root {
  --teal: #007778;
  --yellow: #DCA801;
  --ink: #282828;
  --white: #FFFFFF;

  --teal-12: color-mix(in srgb, var(--teal) 12%, var(--white));
  --teal-20: color-mix(in srgb, var(--teal) 20%, var(--white));   /* subtle / divider */
  --teal-58: color-mix(in srgb, var(--teal) 58%, var(--white));
  --teal-dark: color-mix(in srgb, var(--teal) 80%, var(--ink));
  --teal-darker: color-mix(in srgb, var(--teal) 55%, var(--ink));
  --cream: color-mix(in srgb, var(--yellow) 20%, var(--white));   /* surface */
  --cream-40: color-mix(in srgb, var(--yellow) 40%, var(--white));
  --yellow-hover: color-mix(in srgb, var(--yellow) 70%, var(--white));
  --yellow-press: color-mix(in srgb, var(--yellow) 85%, var(--ink));

  --text: var(--ink);
  --text-82: color-mix(in srgb, var(--ink) 82%, transparent);
  --text-70: color-mix(in srgb, var(--ink) 70%, transparent);
  --text-60: color-mix(in srgb, var(--ink) 60%, transparent);
  --divider: var(--teal-20);

  --font-heading: "DM Serif Display", Georgia, serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --space-1: 4.6px; --space-2: 9.2px; --space-3: 13.8px; --space-4: 18.4px; --space-6: 27.6px; --space-8: 36.8px;
  --gutter: clamp(20px, 5vw, 72px);
  --section-y: clamp(64px, 10vw, 96px);
  --radius-sm: 2px; --radius-md: 4px; --radius-lg: 7px;
  --shadow-sm: 0 1px 2px color-mix(in srgb, #2d2b2b 14%, transparent);
  --shadow-md: 0 3px 10px color-mix(in srgb, #2d2b2b 16%, transparent);
  --shadow-lg: 0 12px 32px color-mix(in srgb, #2d2b2b 22%, transparent);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--white); color: var(--text); font: 15px/1.6 var(--font-body); }
img { display: block; max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 400; line-height: 1.1; letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: var(--teal); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--teal) 25%, transparent); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── layout ───────────────────────────────────────── */
.wrap { max-width: 1200px; margin: 0 auto; padding-inline: var(--gutter); }
.section { padding: var(--section-y) max(var(--gutter), calc((100% - 1056px) / 2)); }
.section.cream { background: var(--cream); }
.kicker { display: block; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal); margin-bottom: 8px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 16px; margin-bottom: 40px; }
.section-head h2 { font-size: 36px; }
.lede { font-size: 16px; color: var(--text-82); max-width: 64ch; }
.page-head { padding-top: 64px; }
.page-head h1 { font-size: clamp(34px, 5vw, 44px); margin-bottom: 12px; }
.prose { font-size: 17px; line-height: 1.75; color: var(--text-82); max-width: 62ch; }
.prose + .prose { margin-top: 20px; }

.grid-3, .grid-4, .grid-6 { display: grid; gap: var(--space-6); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--space-3); }
.split-56, .split-65, .split-75 { display: grid; gap: clamp(24px, 5vw, 96px); align-items: center; }
.split-56 { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.split-65 { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); align-items: start; }
.split-75 { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start; }
@media (max-width: 1024px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .split-56, .split-65, .split-75 { grid-template-columns: 1fr; } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-4, .grid-3 { grid-template-columns: 1fr; } .grid-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ── nav ──────────────────────────────────────────── */
.nav { position: sticky; top: 0; z-index: 20; height: 88px; display: flex; align-items: center; justify-content: space-between; padding-inline: var(--gutter); background: var(--white); border-bottom: 1px solid var(--divider); }
.nav.overlay { position: fixed; inset: 0 0 auto 0; height: auto; padding-block: 20px; background: transparent; border-bottom: 0; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--font-heading); font-size: 20px; }
.brand:hover { text-decoration: none; }
.brand .logo { width: 36px; height: 36px; border-radius: var(--radius-md); }
.nav.overlay .brand .logo { width: 64px; height: 64px; }
.nav.overlay .brand span { display: none; }
.menu-btn { width: 46px; height: 46px; display: grid; place-items: center; background: var(--white); border: 1px solid var(--divider); border-radius: var(--radius-md); color: var(--text); cursor: pointer; }
.menu-btn:hover { background: var(--cream); }
.menu-btn .i-close, .menu-btn[aria-expanded="true"] .i-menu { display: none; }
.menu-btn[aria-expanded="true"] .i-close { display: block; }
.menu { position: fixed; top: 96px; right: var(--gutter); z-index: 21; min-width: 200px; display: flex; flex-direction: column; gap: 2px; padding: var(--space-2); background: var(--white); border: 1px solid var(--divider); border-radius: var(--radius-md); box-shadow: var(--shadow-md); }
.nav:not(.overlay) ~ .menu { top: 88px; }
.menu[hidden] { display: none; }
.menu a { padding: 10px 12px; color: var(--text); border-radius: var(--radius-sm); }
.menu a:hover { color: var(--teal); }
.menu a[aria-current="page"] { color: var(--teal); }
.menu hr { margin: 6px 4px; }
.menu .btn { margin: 4px; }

/* ── buttons ──────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 12px 28px; border: 1px solid transparent; border-radius: var(--radius-md); font: 500 15px/1.2 var(--font-body); letter-spacing: 0.02em; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s; }
.btn:hover { text-decoration: none; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--teal-dark); border-color: var(--teal-dark); }
.btn-primary:active:not(:disabled) { background: var(--teal-darker); }
.btn-secondary { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
.btn-secondary:hover:not(:disabled) { background: var(--yellow-hover); border-color: var(--yellow-hover); }
.btn-secondary:active:not(:disabled) { background: var(--yellow-press); border-color: var(--yellow-press); }
.btn-ghost { padding-inline: 16px; background: var(--teal-20); border-color: var(--teal-20); color: var(--ink); }
.btn-ghost:hover:not(:disabled) { background: var(--teal-58); border-color: var(--teal-58); }
.btn-light { background: var(--white); border-color: var(--white); color: var(--ink); }
.btn-light:hover { background: var(--cream); }
.btn-block { width: 100%; }
.btn-sm { min-height: 36px; padding: 6px 14px; font-size: 14px; }

/* ── chips & tags ─────────────────────────────────── */
.tag { display: inline-block; padding: 4px 12px; border-radius: 999px; font: 500 12px/1.4 var(--font-body); letter-spacing: .02em; background: var(--teal-12); color: var(--teal); }
.tag-ok { background: var(--teal-12); color: var(--teal); }
.tag-muted { background: var(--cream); color: var(--ink); }
.tag-new { background: var(--yellow); color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chip { min-height: 42px; padding: 10px 20px; border-radius: 999px; border: 1px solid var(--cream); background: var(--cream); color: var(--ink); font: 500 14px var(--font-body); cursor: pointer; }
.chip:hover { background: var(--cream-40); text-decoration: none; }
.chip[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: #fff; }

/* ── images & placeholders ────────────────────────── */
.plate { border: 6px solid var(--cream); outline: 1px solid var(--divider); background: var(--cream); overflow: hidden; }
.photo { width: 100%; height: 100%; object-fit: cover; }
.ph { width: 100%; height: 100%; display: grid; place-items: center; text-align: center; padding: 12px; background: repeating-linear-gradient(135deg, var(--cream), var(--cream) 10px, color-mix(in srgb, var(--yellow) 26%, var(--white)) 10px, color-mix(in srgb, var(--yellow) 26%, var(--white)) 20px); color: var(--text-60); font-size: 13px; }
.ph svg { opacity: .5; margin: 0 auto 6px; }
.ratio-1 { aspect-ratio: 1; } .ratio-45 { aspect-ratio: 4 / 5; }
.rounded { border-radius: var(--radius-md); overflow: hidden; }

/* ── hero ─────────────────────────────────────────── */
.hero { position: relative; height: 82vh; min-height: 520px; background: var(--ink); color: #f9f8f6; overflow: hidden; }
.hero .bg { position: absolute; inset: 0; }
.hero .bg .ph { background: linear-gradient(135deg, #3a3a38, #282828); color: #bbb; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, color-mix(in srgb, var(--ink) 45%, transparent), color-mix(in srgb, var(--ink) 82%, transparent)); pointer-events: none; }
.hero .copy { position: relative; z-index: 1; height: 100%; max-width: 900px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 0 clamp(24px, 6vw, 96px); }
.hero .kicker { color: #f3f2f2; opacity: .85; margin-bottom: 16px; }
.hero h1 { font-size: clamp(40px, 6vw, 76px); line-height: 1.05; color: #f9f8f6; }
.hero p { font-size: 18px; max-width: 52ch; margin-top: 24px; color: #f3f2f2; }
.hero .actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: 32px; }

/* ── cards ────────────────────────────────────────── */
.piece-card { color: inherit; display: block; }
.piece-card:hover { text-decoration: none; }
.piece-card .plate { position: relative; aspect-ratio: 1; margin-bottom: 12px; transition: box-shadow .15s, transform .15s; }
.piece-card:hover .plate { box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.piece-card .name { font-family: var(--font-heading); font-size: 19px; margin-top: 4px; }
.piece-card .price { font-size: 15px; color: var(--teal); margin-top: 2px; font-variant-numeric: tabular-nums; }
.is-sold .photo, .is-sold .ph { filter: grayscale(1); opacity: .55; }
.is-sold .price { color: var(--text-60); }
.stamp { position: absolute; top: 14px; right: 10px; transform: rotate(8deg); padding: 4px 12px; border: 2px solid var(--ink); border-radius: var(--radius-sm); background: color-mix(in srgb, var(--white) 85%, transparent); color: var(--ink); font: 600 12px/1.2 var(--font-body); letter-spacing: .12em; text-transform: uppercase; }
.cat-card { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--radius-md); color: #fff; }
.cat-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, color-mix(in srgb, var(--ink) 70%, transparent)); }
.cat-card span { position: absolute; left: 16px; bottom: 14px; z-index: 1; font-family: var(--font-heading); font-size: 24px; }
.cat-card:hover { text-decoration: none; }
.cat-card:hover .photo { transform: scale(1.03); }
.cat-card .photo { transition: transform .3s; }
.card { padding: 24px; border: 1px solid var(--divider); border-radius: var(--radius-md); background: var(--white); }
.card.elev { box-shadow: var(--shadow-sm); }
.card-title { font-family: var(--font-heading); font-size: 19px; margin-bottom: 8px; }
.card-kicker { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--teal); margin-bottom: 6px; }
.quote-card { display: flex; flex-direction: column; gap: 20px; padding: 28px; margin: 0; }
.quote-card blockquote { margin: 0; font: italic 21px/1.4 var(--font-heading); }
.quote-card figcaption { margin-top: auto; font-size: 14px; color: var(--text-70); }

/* ── forms ────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 13px; color: var(--text-70); }
.input { width: 100%; min-height: 44px; padding: 10px 12px; font: 15px var(--font-body); color: var(--text); background: var(--white); border: 1px solid var(--divider); border-radius: var(--radius-md); }
.input:hover { border-color: var(--teal-58); }
.input:focus-visible { border-color: var(--teal); outline-offset: 0; }
textarea.input { min-height: 110px; resize: vertical; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.error { font-size: 13px; color: #a3261f; }
.form-error { padding: 10px 12px; border-radius: var(--radius-md); background: #fbeceb; color: #8a1f1a; font-size: 14px; margin-bottom: 16px; }
.cf-turnstile { margin-bottom: 16px; min-height: 65px; }
input[type="range"] { width: 100%; accent-color: var(--teal); }

/* ── shop ─────────────────────────────────────────── */
.filters { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 24px; margin-bottom: 40px; }
.price-filter { min-width: 240px; }
.price-filter label { display: block; font-size: 13px; color: var(--text-70); margin-bottom: 6px; font-variant-numeric: tabular-nums; }
.empty-state { padding: 64px 0; text-align: center; color: var(--text-60); }

/* ── piece ────────────────────────────────────────── */
.piece-detail .plate { position: relative; aspect-ratio: 1; }
.piece-detail h1 { font-size: 40px; margin: 16px 0 12px; }
.piece-detail .price { font-size: 22px; color: var(--teal); margin-bottom: 20px; }
.piece-detail .dims { font-size: 14px; color: var(--text-70); margin: 16px 0 32px; }
.hr { height: 1px; border: 0; background: var(--divider); margin: 0 0 32px; }

/* ── footer ───────────────────────────────────────── */
.footer { max-width: 1200px; margin: 0 auto; padding: 48px var(--gutter) 32px; border-top: 1px solid var(--divider); }
.footer .cols { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; }
.footer .links { display: flex; gap: 48px; flex-wrap: wrap; }
.footer .links div { display: flex; flex-direction: column; gap: 8px; }
.footer h3 { font: 12px var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--teal); margin-bottom: 4px; }
.footer .copy { font-size: 12px; color: var(--text-60); margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--divider); }
.footer .brand-name { font-family: var(--font-heading); font-size: 20px; margin-bottom: 8px; }
.footer .tagline { font-size: 14px; color: var(--text-70); max-width: 32ch; }
.footer .mail { margin-top: 12px; }

.pull-quote { max-width: 760px; margin: 0 auto; text-align: center; }
.pull-quote blockquote { margin: 0; font: italic clamp(24px, 3vw, 32px)/1.35 var(--font-heading); }
.pull-quote figcaption { margin-top: 16px; color: var(--text-70); }

/* ── admin ────────────────────────────────────────── */
.admin-nav { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding: 16px var(--gutter); border-bottom: 1px solid var(--divider); position: sticky; top: 0; background: var(--white); z-index: 10; }
.admin-nav .brand { margin-right: auto; }
.admin-nav .who { font-size: 14px; color: var(--text-70); }
.admin-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 32px; }
.table-wrap { border: 1px solid var(--divider); border-radius: var(--radius-md); overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-60); padding: 12px 16px; border-bottom: 1px solid var(--divider); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--divider); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: color-mix(in srgb, var(--cream) 50%, transparent); }
.table .thumb { width: 44px; height: 44px; border-radius: var(--radius-md); overflow: hidden; flex: none; }
.table .pname { display: flex; align-items: center; gap: 12px; font-family: var(--font-heading); font-size: 16px; }
.row-actions { display: flex; gap: 8px; justify-content: flex-end; }
.row-actions form { margin: 0; }
dialog.dialog { width: min(560px, calc(100% - 32px)); max-height: 90vh; padding: 32px; border: 1px solid var(--divider); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
dialog.dialog::backdrop { background: color-mix(in srgb, var(--ink) 45%, transparent); }
.dialog h2 { font-size: 26px; margin-bottom: 24px; }
.dialog-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.dialog-actions .right { display: flex; gap: 12px; margin-left: auto; }
.photo-field { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.photo-field .preview { width: 96px; height: 96px; flex: none; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
.slot { display: flex; flex-direction: column; gap: 8px; }
.slot .frame { aspect-ratio: 1; border-radius: var(--radius-md); overflow: hidden; outline: 1px solid var(--divider); }
.slot .label { font-size: 13px; }
.inbox { display: grid; gap: var(--space-3); }
.inbox .meta { font-size: 13.5px; color: var(--text-70); }
.inbox .body { margin-top: 12px; white-space: pre-wrap; font-size: 14px; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); padding: 10px 16px; border-radius: var(--radius-md); background: var(--ink); color: #fff; font-size: 14px; box-shadow: var(--shadow-md); z-index: 60; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }

/* ── small utilities (no inline styles: the CSP forbids them) ── */
.m0 { margin: 0; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; } .mt-80 { margin-top: 80px; }
.mb-6 { margin-bottom: 6px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; } .mb-20 { margin-bottom: 20px; } .mb-24 { margin-bottom: 24px; } .mb-32 { margin-bottom: 32px; } .mb-40 { margin-bottom: 40px; } .mb-48 { margin-bottom: 48px; }
.pt-32 { padding-top: 32px; } .pt-80 { padding-top: 80px; } .pb-64 { padding-bottom: 64px; } .pb-96 { padding-bottom: 96px; }
.h-22 { font-size: 22px; } .h-28 { font-size: 28px; } .h-30 { font-size: 30px; } .h-32 { font-size: 32px; } .h-34 { font-size: 34px; } .h-36 { font-size: 36px; } .h-46 { font-size: 46px; }
.muted { font-size: 14.5px; color: var(--text-70); }
.name-lg { font-family: var(--font-heading); font-size: 20px; }
.small { font-size: 14px; }
.row-gap { display: flex; gap: 12px; flex-wrap: wrap; }
.center { text-align: center; } .center-block { margin-inline: auto; }
.wrap-narrow { max-width: 1000px; margin: 0 auto; padding-inline: var(--gutter); }
.split-56.align-start { align-items: start; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; margin-top: 4px; }
.check input { width: 18px; height: 18px; accent-color: var(--teal); }
.label-text { font-size: 13px; color: var(--text-70); }
.num { font-variant-numeric: tabular-nums; }
.login-card { max-width: 440px; padding: 32px; }
.brand-name { font-family: var(--font-heading); font-size: 22px; }
.admin-tabs .chip { display: inline-flex; align-items: center; }
.admin-tabs .chip[aria-selected="true"] { background: var(--teal); border-color: var(--teal); color: #fff; }
.inbox .section-head { margin-bottom: 0; align-items: flex-start; }
.inbox select.input { min-height: 38px; padding: 6px 10px; width: auto; }
.preview .ph { font-size: 12px; background: var(--cream); }
.thumb .ph { padding: 0; }
.thumb .ph svg, .thumb .ph div div { display: none; }
