/* ============================================================
   Subtle Sway — gallery stylesheet
   Dark quiet-luxury theme: espresso, bone, brass.
   Type: Fraunces (display) + Inter (body), both SIL OFL 1.1, self-hosted.
   ============================================================ */

@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-latin-full-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-latin-full-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #1b1713;
  --panel: #241f19;
  --panel-2: #2c261f;
  --ink: #ede6d9;
  --muted: #b3a894;
  --brass: #c6a15b;
  --brass-ink: #1b1713;
  --clay: #c08768;
  --hairline: #3a3229;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", -apple-system, "Segoe UI", sans-serif;
  --max: 1160px;
  --radius: 4px;
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.65 var(--sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(56rem 32rem at 12% -12%, rgba(198, 161, 91, 0.1), transparent 65%),
    radial-gradient(46rem 28rem at 90% -6%, rgba(138, 148, 121, 0.08), transparent 65%);
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--brass); color: var(--brass-ink); }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 1rem; top: -3rem; z-index: 100;
  background: var(--brass); color: var(--brass-ink); padding: 0.5rem 1rem; border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }
main.wrap { flex: 1; padding-top: 2rem; padding-bottom: 4rem; animation: page-in 0.4s var(--ease) both; }
/* Transform only: content is never invisible, even if animations are paused. */
@keyframes page-in { from { transform: translateY(6px); } to { transform: none; } }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.15; letter-spacing: -0.01em; }
.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass);
  text-decoration: none;
  margin-bottom: 0.6rem;
}

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--hairline); position: sticky; top: 0; z-index: 20; background: rgba(27, 23, 19, 0.92); backdrop-filter: blur(8px); }
.header-row { display: flex; align-items: center; justify-content: space-between; min-height: 4.25rem; gap: 1rem; }
.site-name { font-family: var(--serif); font-size: 1.45rem; text-decoration: none; letter-spacing: -0.01em; }
.site-name::after { content: "."; color: var(--brass); }
.site-nav { display: flex; align-items: center; gap: 1.75rem; }
.site-nav a { text-decoration: none; font-size: 0.9rem; color: var(--muted); transition: color 0.2s; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav .nav-etsy { color: var(--brass); border: 1px solid var(--hairline); padding: 0.35rem 0.8rem; border-radius: 999px; }
.site-nav .nav-etsy:hover { border-color: var(--brass); color: var(--brass); }
.nav-toggle { display: none; background: none; border: 0; width: 2.75rem; height: 2.75rem; cursor: pointer; position: relative; }
.nav-toggle span[aria-hidden],
.nav-toggle span[aria-hidden]::before,
.nav-toggle span[aria-hidden]::after {
  position: absolute; left: 50%; width: 1.4rem; height: 1.5px; background: var(--ink); transform: translateX(-50%); transition: transform 0.2s;
}
.nav-toggle span[aria-hidden] { top: 50%; }
.nav-toggle span[aria-hidden]::before { content: ""; top: -6px; left: 0; transform: none; }
.nav-toggle span[aria-hidden]::after { content: ""; top: 6px; left: 0; transform: none; }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  background: var(--brass); color: var(--brass-ink);
  padding: 0.85rem 1.5rem; border-radius: var(--radius); border: 1px solid var(--brass);
  text-decoration: none; font-weight: 600; font-size: 0.95rem; letter-spacing: 0.01em;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.btn:hover { background: #d5b46f; transform: translateY(-1px); }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--hairline); font-weight: 500; padding: 0.6rem 1rem; font-size: 0.875rem; }
.btn-quiet:hover { background: transparent; border-color: var(--brass); color: var(--brass); }
.btn-buy { width: 100%; padding: 1rem 1.5rem; font-size: 1rem; }
.text-link { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--hairline); padding-bottom: 2px; font-size: 0.925rem; transition: border-color 0.2s, color 0.2s; white-space: nowrap; }
.text-link:hover { border-color: var(--brass); color: var(--brass); }
.text-link-etsy { color: var(--brass); }

/* ---------- Home ---------- */
.hero { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 3rem; align-items: center; padding: 2rem 0 3rem; }
.hero-text-only { grid-template-columns: 1fr; max-width: 760px; }
.hero h1 { font-size: clamp(2.4rem, 5.5vw, 3.75rem); margin-bottom: 1.25rem; }
.hero p { color: var(--muted); font-size: 1.075rem; max-width: 36rem; margin-bottom: 2rem; }
.hero-actions { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.hero-image { display: block; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--hairline); }
.hero-image img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform 1.2s var(--ease); }
.hero-image:hover img { transform: scale(1.03); }

.steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--hairline); border: 1px solid var(--hairline); border-radius: var(--radius); overflow: hidden; margin-bottom: 4rem; }
.steps li { background: var(--panel); padding: 1.5rem; }
.step-n { font-family: var(--serif); color: var(--brass); font-size: 1.5rem; display: block; margin-bottom: 0.4rem; }
.steps h2 { font-size: 1.15rem; margin-bottom: 0.3rem; }
.steps p { color: var(--muted); font-size: 0.9rem; }

.home-section { margin-bottom: 4.5rem; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; margin-bottom: 1.75rem; padding-bottom: 1rem; border-bottom: 1px solid var(--hairline); }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.section-lede { color: var(--muted); margin-top: 0.4rem; max-width: 40rem; font-size: 0.95rem; }
.section-actions { display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; }

.empty-state { text-align: center; padding: 4rem 1rem; border: 1px dashed var(--hairline); border-radius: var(--radius); margin-bottom: 4rem; }
.empty-state h2, .empty-state h1 { font-size: 1.8rem; margin-bottom: 0.75rem; }
.empty-state p { color: var(--muted); margin: 0 auto 1.5rem; max-width: 34rem; }
.not-found .hero-actions { justify-content: center; }

/* ---------- Product grid ---------- */
.product-grid { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem 1.5rem; }
.product-card a { display: block; text-decoration: none; }
.card-media { aspect-ratio: 1; overflow: hidden; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--hairline); margin-bottom: 0.85rem; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.product-card a:hover .card-media img { transform: scale(1.04); }
.card-eyebrow { display: block; font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.25rem; }
.card-title { font-size: 1.1rem; line-height: 1.3; transition: color 0.2s; }
.product-card a:hover .card-title { color: var(--brass); }
.card-note { display: block; font-size: 0.8rem; color: var(--muted); margin-top: 0.2rem; }

/* ---------- Products page ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; margin-bottom: 2rem; }
.page-title { font-size: clamp(2rem, 4.5vw, 3rem); margin-bottom: 0.6rem; }
.page-lede { color: var(--muted); max-width: 38rem; }
.etsy-box { text-align: right; flex-shrink: 0; }
.etsy-box p { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.6rem; }
.chip-row { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.chip { text-decoration: none; font-size: 0.875rem; padding: 0.45rem 1rem; border: 1px solid var(--hairline); border-radius: 999px; color: var(--muted); transition: all 0.2s; }
.chip:hover { color: var(--ink); border-color: var(--muted); }
.chip[aria-current="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.filter-bar { display: flex; gap: 1rem; flex-wrap: wrap; align-items: flex-end; padding: 1rem 0 1.5rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--hairline); }
.filter-search { flex: 1 1 14rem; }
.filter-bar input, .filter-bar select {
  width: 100%; background: var(--panel); color: var(--ink); border: 1px solid var(--hairline); border-radius: var(--radius);
  padding: 0.65rem 0.85rem; font: inherit; font-size: 0.9rem;
}
.filter-bar input:focus, .filter-bar select:focus { border-color: var(--brass); outline: none; }
.filter-select { display: flex; flex-direction: column; gap: 0.3rem; flex: 0 1 11rem; }
.filter-select span { font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.no-results { text-align: center; color: var(--muted); padding: 3rem 0; }

/* ---------- Product page ---------- */
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; font-size: 0.8rem; color: var(--muted); margin-bottom: 1.5rem; }
.breadcrumb li + li::before { content: "/"; margin-right: 0.4rem; color: var(--hairline); }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: var(--ink); }
.product { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 3rem; align-items: start; margin-bottom: 3rem; }
.gallery { position: sticky; top: 5.5rem; min-width: 0; }
.stage { position: relative; aspect-ratio: 1; background: var(--panel); border: 1px solid var(--hairline); border-radius: var(--radius); overflow: hidden; touch-action: pan-y; }
.slide { position: absolute; inset: 0; }
.slide img, .slide video { width: 100%; height: 100%; object-fit: cover; }
.zoom { display: block; width: 100%; height: 100%; border: 0; padding: 0; background: none; cursor: zoom-in; }
.nav-btn {
  position: absolute; top: 50%; transform: translateY(-50%); width: 2.75rem; height: 2.75rem; border-radius: 50%;
  border: 1px solid rgba(237, 230, 217, 0.25); background: rgba(27, 23, 19, 0.7); font-size: 1.5rem; line-height: 1; cursor: pointer;
  opacity: 0.85; transition: opacity 0.2s, border-color 0.2s;
}
.nav-btn:hover { opacity: 1; border-color: var(--brass); }
.prev { left: 0.75rem; }
.next { right: 0.75rem; }
.thumbs { display: flex; gap: 0.5rem; margin-top: 0.75rem; overflow-x: auto; padding-bottom: 0.25rem; scrollbar-width: thin; }
.thumb { flex: 0 0 4.5rem; aspect-ratio: 1; padding: 0; border: 1px solid var(--hairline); border-radius: var(--radius); overflow: hidden; background: var(--panel); cursor: pointer; opacity: 0.6; position: relative; transition: opacity 0.2s, border-color 0.2s; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb:hover, .thumb[aria-selected="true"] { opacity: 1; border-color: var(--brass); }
.thumb.is-video::after { content: "▶"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 1rem; background: rgba(27, 23, 19, 0.35); }

.product-info h1 { font-size: clamp(2rem, 3.6vw, 2.75rem); margin-bottom: 0.6rem; }
.product-sub { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.75rem; }
.buy { padding: 1.25rem; background: var(--panel); border: 1px solid var(--hairline); border-radius: var(--radius); margin-bottom: 1.75rem; }
.buy-note { font-size: 0.85rem; color: var(--muted); margin-top: 0.75rem; text-align: center; }
.attrs { display: grid; gap: 0.6rem; margin-bottom: 1.75rem; font-size: 0.9rem; }
.attrs div { display: grid; grid-template-columns: 7rem 1fr; gap: 1rem; padding-bottom: 0.6rem; border-bottom: 1px solid var(--hairline); }
.attrs dt { color: var(--muted); }
.desc-intro p { margin-bottom: 1rem; color: var(--ink); }
.desc-intro p:first-child { font-family: var(--serif); font-size: 1.2rem; line-height: 1.5; }

.product-desc { max-width: 760px; margin: 0 auto 4rem; }
.desc-section { margin-bottom: 2rem; }
.desc-section h2 { font-size: 1.5rem; margin-bottom: 1rem; }
.product-desc ul { padding-left: 1.2rem; margin-bottom: 1rem; }
.product-desc li { margin-bottom: 0.5rem; }
.product-desc li::marker { color: var(--brass); }
.product-desc p { margin-bottom: 1rem; }
.desc-acc { border-top: 1px solid var(--hairline); }
.desc-acc:last-of-type { border-bottom: 1px solid var(--hairline); }
.desc-acc summary { cursor: pointer; list-style: none; padding: 1.1rem 0; font-family: var(--serif); font-size: 1.2rem; display: flex; align-items: center; gap: 0.5rem; }
.desc-acc summary::-webkit-details-marker { display: none; }
.desc-acc summary::after { content: "+"; margin-left: auto; color: var(--brass); font-family: var(--sans); font-size: 1.3rem; transition: transform 0.2s; }
.desc-acc[open] summary::after { transform: rotate(45deg); }
.acc-body { padding-bottom: 1.25rem; color: var(--muted); }
.acc-body li, .acc-body p { color: var(--muted); }
.desc-cta { margin-top: 2rem; max-width: 26rem; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(12, 10, 8, 0.96); display: grid; place-items: center; padding: 1rem; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; cursor: zoom-out; }
.lightbox .close { position: absolute; top: 1rem; right: 1rem; width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 1px solid rgba(237, 230, 217, 0.3); background: none; font-size: 1.4rem; cursor: pointer; }

/* ---------- Text pages ---------- */
.text-page { max-width: 720px; margin: 0 auto; }
.updated { color: var(--muted); font-size: 0.85rem; margin-bottom: 2rem; }
.prose h2 { font-size: 1.5rem; margin: 2.25rem 0 0.75rem; }
.prose p { margin-bottom: 1.1rem; }
.prose ul { padding-left: 1.2rem; margin-bottom: 1.1rem; }
.prose li { margin-bottom: 0.4rem; }
.prose li::marker { color: var(--brass); }
.prose a { color: var(--brass); text-underline-offset: 3px; }
.prose strong { font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--hairline); padding: 3rem 0 2rem; background: rgba(36, 31, 25, 0.4); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; margin-bottom: 2.5rem; }
.footer-tag { color: var(--muted); font-size: 0.9rem; margin: 0.5rem 0 1.25rem; max-width: 22rem; }
.footer-head { font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brass); margin-bottom: 0.9rem; font-weight: 500; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 0.45rem; }
.site-footer nav a { text-decoration: none; color: var(--muted); font-size: 0.9rem; }
.site-footer nav a:hover { color: var(--ink); }
.footer-legal { border-top: 1px solid var(--hairline); padding-top: 1.5rem; }
.footer-legal p { font-size: 0.8rem; color: var(--muted); margin-bottom: 0.3rem; }

/* ---------- Motion ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 2rem; padding-top: 0.5rem; }
  .product { grid-template-columns: 1fr; gap: 2rem; }
  .gallery { position: static; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .etsy-box { text-align: left; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--hairline); padding: 0.5rem 1.25rem 1rem;
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 0.8rem 0; border-bottom: 1px solid var(--hairline); font-size: 1rem; }
  .site-nav .nav-etsy { border: 0; border-radius: 0; padding: 0.8rem 0; }
  .steps { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem 1rem; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .section-actions { justify-content: flex-start; }
  .filter-select { flex: 1 1 calc(50% - 0.5rem); }
  .card-title { font-size: 1rem; }
}
