/* ---------- Fonts (self-hosted, variable) ---------- */
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url("assets/fonts/fraunces-latin.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("assets/fonts/instrument-sans-latin.woff2") format("woff2"); }

/* ---------- Tokens ---------- */
:root {
  --paper: #f5ede3;
  --paper-2: #ece0d1;
  --paper-3: #e3d3c0;
  --ink: #2a1c15;
  --ink-2: #5c4638;
  --ink-3: #6b5344;
  --ember: #b8461f;
  --ember-deep: #93360f;
  --glow: #f2b46d;
  --line: rgba(42, 28, 21, .14);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Instrument Sans", system-ui, sans-serif;
  --r: 14px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --shadow: 0 1px 2px rgba(42,28,21,.06), 0 12px 32px -12px rgba(42,28,21,.22);
  --wrap: min(1240px, 100% - clamp(32px, 6vw, 96px));
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-color: var(--paper-3) var(--paper); }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--glow); color: var(--ink); }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; border-radius: 6px; }
img { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.05; letter-spacing: -.02em; margin: 0; text-wrap: balance; }
svg { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 8px; z-index: 99; }
.skip:focus { left: 8px; }

/* ---------- Header ---------- */
.announce {
  background: var(--ink); color: #f1e4d4; text-align: center;
  font-size: .8125rem; letter-spacing: .01em; padding: 9px 16px;
}
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 32px;
  padding: 14px max(calc((100% - 1240px) / 2), clamp(16px, 3vw, 48px));
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--line);
}
.wordmark {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 1.5rem/1 var(--serif); letter-spacing: -.02em; text-decoration: none; margin: 0;
}
.wordmark svg { width: 22px; height: 22px; fill: var(--ember); stroke: none; }
.wordmark-sm { font-size: 1.25rem; }
.nav { display: flex; gap: 24px; margin-right: auto; }
.nav a { text-decoration: none; color: var(--ink-2); font-size: .9375rem; }
.nav a:hover { color: var(--ink); text-decoration: underline; }
.cart-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 8px 10px 8px 14px;
  transition: border-color .2s, background .2s;
}
.cart-btn:hover { border-color: var(--ink); }
.cart-count {
  min-width: 24px; height: 24px; display: grid; place-items: center; border-radius: 999px;
  background: var(--ember); color: #fff; font-size: .8125rem; font-weight: 600; font-variant-numeric: tabular-nums;
}
.cart-count.bump { animation: bump .5s var(--ease); }
@keyframes bump { 30% { transform: scale(1.3); } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px; border-radius: 999px; font-weight: 600; font-size: 1rem;
  text-decoration: none; border: 1px solid transparent; transition: background .2s, transform .2s var(--ease), border-color .2s;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--ember); color: #fff; }
.btn-primary:hover { background: var(--ember-deep); }
.btn-dark { background: var(--ink); color: var(--paper); }
.btn-dark:hover { background: #000; }
.btn-quiet { border-color: var(--line); color: var(--ink); }
.btn-quiet:hover { border-color: var(--ink); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  width: var(--wrap); margin: 0 auto;
  display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: center;
  padding: clamp(40px, 7vw, 96px) 0 clamp(40px, 6vw, 72px);
}
.hero h1 { font-size: clamp(2.75rem, 6.4vw, 5.5rem); font-weight: 400; letter-spacing: -.035em; }
.hero h1 em { font-style: normal; font-weight: 600; color: var(--ember); }
.lede { font-size: clamp(1.0625rem, 1.4vw, 1.25rem); color: var(--ink-2); max-width: 34ch; margin: 24px 0 36px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-media {
  position: relative; margin: 0; aspect-ratio: 4 / 5; border-radius: 28px; overflow: hidden;
  background: linear-gradient(180deg, #3a2419 0%, #6b3520 52%, #c86a35 100%);
  box-shadow: var(--shadow);
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 2; }
/* The one authored moment: the lamp's sun rises and warms the panel on load */
.hero-sun {
  position: absolute; left: 50%; top: 44%; width: 62%; aspect-ratio: 1; translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(circle, #ffe2a8 0%, #f6a85a 38%, rgba(232,120,58,.55) 60%, rgba(232,120,58,0) 72%);
  filter: blur(2px);
  animation: rise 2.4s var(--ease) both;
}
.hero-wall {
  position: absolute; inset: auto 0 0 0; height: 30%;
  background: linear-gradient(180deg, rgba(42,28,21,0), rgba(42,28,21,.55));
}
.hero-caption {
  position: absolute; left: 20px; right: 20px; bottom: 20px; z-index: 3;
  display: flex; justify-content: space-between; align-items: end; gap: 12px; color: #fbefe1;
}
.hero-caption strong { font: 500 1.375rem/1.15 var(--serif); display: block; }
.hero-caption span { font-size: .875rem; opacity: .9; }
.hero-caption .btn { padding: 10px 18px; font-size: .9375rem; background: #fbefe1; color: var(--ink); }
@keyframes rise {
  from { translate: -50% -8%; scale: .7; opacity: 0; filter: blur(18px); }
  to   { translate: -50% -50%; scale: 1; opacity: 1; filter: blur(2px); }
}

/* ---------- Promises ---------- */
.promises {
  width: var(--wrap); margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr);
  border-block: 1px solid var(--line);
}
.promises p { margin: 0; padding: 20px 20px 20px 0; color: var(--ink-2); font-size: .9375rem; }
.promises p + p { padding-left: 20px; border-left: 1px solid var(--line); }
.promises strong { display: block; color: var(--ink); font-weight: 600; }

/* ---------- Shop ---------- */
.shop { width: var(--wrap); margin: 0 auto; padding: clamp(64px, 8vw, 112px) 0 40px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 36px; }
.section-head h2, .faq h2 { font-size: clamp(2rem, 3.6vw, 3.25rem); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 8px 16px; font-size: .9375rem; color: var(--ink-2);
  transition: background .2s, color .2s, border-color .2s;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.is-on { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 48px 28px; }
.grid > li[hidden] { display: none; }
.card { display: flex; flex-direction: column; height: 100%; }
.card-media {
  position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: var(--r); overflow: hidden;
  aspect-ratio: 1; background: var(--paper-2);
}
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: scale .8s var(--ease); }
.card:hover .card-media img { scale: 1.04; }
.badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  background: var(--paper); color: var(--ink); font-size: .75rem; font-weight: 600; padding: 4px 10px; border-radius: 999px;
}
.card-body { padding-top: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card h3 { font-size: 1.375rem; letter-spacing: -.015em; }
.card h3 button { all: unset; cursor: pointer; }
.card h3 button:hover { text-decoration: underline; text-underline-offset: .18em; text-decoration-thickness: 1px; }
.card h3 button:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; border-radius: 4px; }
.card p { margin: 0; color: var(--ink-2); font-size: .9375rem; }
.card-foot { margin-top: auto; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.price { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 1.0625rem; }
.price s { color: var(--ink-3); font-weight: 400; margin-left: 6px; font-size: .9375rem; }
.add {
  border: 1px solid var(--ink); background: transparent; border-radius: 999px; padding: 8px 16px; font-weight: 600; font-size: .9375rem;
  transition: background .2s, color .2s;
}
.add:hover { background: var(--ink); color: var(--paper); }
.add.is-added { background: var(--ember); border-color: var(--ember); color: #fff; }

/* Placeholder art when a supplier photo hasn't been added yet */
.ph {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center;
  background:
    radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--t) 70%, #fff) 0%, var(--t) 45%, color-mix(in srgb, var(--t) 70%, #2a1c15) 100%);
  color: #fffaf3;
}
.ph span { font: italic 400 clamp(1.25rem, 2vw, 1.625rem)/1.15 var(--serif); max-width: 12ch; text-shadow: 0 1px 12px rgba(42,28,21,.35); }

/* ---------- Bundle ---------- */
.bundle {
  width: var(--wrap); margin: clamp(56px, 7vw, 96px) auto; border-radius: 28px; overflow: hidden;
  display: grid; grid-template-columns: 1fr 1fr; background: var(--ink); color: #f4e6d6;
}
.bundle-art { position: relative; min-height: 420px; }
.bundle-copy { padding: clamp(32px, 5vw, 72px); display: flex; flex-direction: column; justify-content: center; gap: 20px; }
.bundle h2 { font-size: clamp(2rem, 4vw, 3.5rem); font-weight: 400; color: #fbefe1; }
.bundle p { margin: 0; color: #d9c6b2; max-width: 44ch; }
.bundle ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.bundle li { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 10px; border-bottom: 1px solid rgba(244,230,214,.16); font-variant-numeric: tabular-nums; }
.bundle li span:last-child { color: #c9b39c; }
.bundle-price { font: 500 2rem/1 var(--serif); font-variant-numeric: tabular-nums; color: #fbefe1; }
.bundle-price s { font: 400 1.125rem var(--sans); color: #b39c86; margin-left: 10px; }
.bundle-price em { font: 600 .875rem var(--sans); font-style: normal; color: var(--glow); margin-left: 10px; }
.bundle .btn-primary { align-self: start; }

/* ---------- FAQ ---------- */
.faq { width: var(--wrap); margin: 0 auto; padding: 24px 0 clamp(64px, 8vw, 112px); display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; }
.faq-list { border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); }
summary {
  list-style: none; cursor: pointer; padding: 20px 0; font-weight: 600; font-size: 1.0625rem;
  display: flex; justify-content: space-between; gap: 16px;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font: 300 1.5rem/1 var(--serif); color: var(--ink-3); transition: rotate .3s var(--ease); }
details[open] summary::after { rotate: 45deg; }
details p { margin: 0 0 20px; color: var(--ink-2); max-width: 62ch; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line); background: var(--paper-2);
  padding: 48px max(calc((100% - 1240px) / 2), clamp(16px, 3vw, 48px));
  display: grid; grid-template-columns: 1fr auto; gap: 24px 48px; color: var(--ink-2); font-size: .9375rem;
}
.site-footer p { margin: 4px 0 0; }
.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; align-items: start; }
.site-footer nav a { text-decoration: none; }
.site-footer nav a:hover { text-decoration: underline; color: var(--ink); }
.fine { grid-column: 1 / -1; font-size: .8125rem; color: var(--ink-3); }

/* ---------- Product dialog ---------- */
.product-dialog {
  border: 0; padding: 0; border-radius: 24px; width: min(960px, 100% - 32px); max-height: min(92vh, 760px);
  background: var(--paper); color: var(--ink); box-shadow: 0 30px 80px -20px rgba(42,28,21,.5);
}
.product-dialog::backdrop { background: rgba(42,28,21,.45); backdrop-filter: blur(3px); }
.product-dialog[open] { animation: lift .45s var(--ease); }
@keyframes lift { from { opacity: 0; translate: 0 16px; } }
.pd { display: grid; grid-template-columns: 1fr 1fr; }
.pd-media { position: relative; aspect-ratio: 1; background: var(--paper-2); }
.pd-media img { width: 100%; height: 100%; object-fit: cover; }
.pd-copy { padding: clamp(24px, 4vw, 48px); display: flex; flex-direction: column; gap: 16px; position: relative; }
.pd-copy h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); padding-right: 40px; }
.pd-copy > p { margin: 0; color: var(--ink-2); }
.pd-copy ul { margin: 0; padding-left: 1.1em; color: var(--ink-2); display: grid; gap: 4px; }
.pd-copy ul li::marker { color: var(--ember); }
.pd-ship { font-size: .875rem; color: var(--ink-3); }
.pd-actions { display: grid; gap: 10px; margin-top: auto; }
.pd-close { position: absolute; top: 16px; right: 16px; }
.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 999px;
  border: 1px solid var(--line); background: var(--paper);
}
.icon-btn:hover { border-color: var(--ink); }

/* ---------- Cart drawer ---------- */
.scrim { position: fixed; inset: 0; background: rgba(42,28,21,.4); z-index: 40; opacity: 0; transition: opacity .3s; }
.scrim.is-on { opacity: 1; }
.cart {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 41; width: min(440px, 100%);
  background: var(--paper); display: flex; flex-direction: column;
  translate: 100% 0; transition: translate .45s var(--ease); box-shadow: -20px 0 60px -20px rgba(42,28,21,.35);
}
.cart.is-open { translate: 0 0; }
.cart-head { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.cart-head h2 { font-size: 1.75rem; }
.ship-meter { padding: 16px 24px; font-size: .9375rem; color: var(--ink-2); border-bottom: 1px solid var(--line); }
.ship-meter .bar { height: 6px; border-radius: 99px; background: var(--paper-3); margin-top: 10px; overflow: hidden; }
.ship-meter .bar i { display: block; height: 100%; background: var(--ember); border-radius: inherit; transition: width .5s var(--ease); }
.cart-lines { list-style: none; margin: 0; padding: 8px 24px; overflow-y: auto; flex: 1; }
.line { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: center; }
.line-thumb { position: relative; width: 72px; height: 72px; border-radius: 10px; overflow: hidden; background: var(--paper-2); }
.line-thumb img { width: 100%; height: 100%; object-fit: cover; }
.line-thumb .ph span { font-size: .75rem; }
.line h3 { font: 600 .9375rem/1.3 var(--sans); letter-spacing: 0; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; margin-top: 8px; }
.qty button { width: 30px; height: 30px; border: 0; background: transparent; border-radius: 999px; }
.qty button:hover { background: var(--paper-2); }
.qty output { min-width: 22px; text-align: center; font-variant-numeric: tabular-nums; font-size: .9375rem; }
.line-end { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.remove { display: block; margin-top: 8px; margin-left: auto; border: 0; background: none; color: var(--ink-3); font-size: .8125rem; text-decoration: underline; padding: 0; }
.remove:hover { color: var(--ember); }
.cart-empty { padding: 48px 0; text-align: center; color: var(--ink-2); }
.cart-empty p { margin: 0 0 20px; }
.cart-foot { padding: 20px 24px 24px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.totals { display: grid; gap: 6px; font-variant-numeric: tabular-nums; }
.totals div { display: flex; justify-content: space-between; color: var(--ink-2); }
.totals .grand { color: var(--ink); font-weight: 700; font-size: 1.125rem; }
.secure { font-size: .8125rem; color: var(--ink-3); text-align: center; margin: 0; }
.notice { background: #fbe9d8; border: 1px solid #ecc6a4; color: #6b3218; border-radius: 10px; padding: 12px 14px; font-size: .875rem; margin: 0; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60; translate: -50% 20px; opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--paper); padding: 12px 20px; border-radius: 999px; font-size: .9375rem;
  transition: opacity .3s, translate .4s var(--ease);
}
.toast.is-on { opacity: 1; translate: -50% 0; }

/* ---------- Policies page ---------- */
.policy { width: min(720px, 100% - 40px); margin: 0 auto; padding: 64px 0 96px; }
.policy h1 { font-size: clamp(2.5rem, 5vw, 3.5rem); margin-bottom: 16px; }
.policy h2 { font-size: 1.75rem; margin: 56px 0 12px; scroll-margin-top: 90px; }
.policy p, .policy li { color: var(--ink-2); max-width: 68ch; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-media { aspect-ratio: 5 / 4; }
  .promises { grid-template-columns: 1fr 1fr; }
  .promises p:nth-child(3) { padding-left: 0; border-left: 0; }
  .promises p:nth-child(n+3) { border-top: 1px solid var(--line); }
  .bundle, .pd, .faq { grid-template-columns: 1fr; }
  .bundle-art { min-height: 280px; }
  .faq { gap: 24px; }
}
@media (max-width: 600px) {
  .nav { display: none; }
  .site-header { justify-content: space-between; }
  .cart-btn > span:not(.cart-count) { display: none; }
  .grid { grid-template-columns: 1fr 1fr; gap: 32px 14px; }
  .card h3 { font-size: 1.125rem; }
  .card p { display: none; }
  .card-foot { flex-direction: column; align-items: stretch; }
  .add { width: 100%; }
  .site-footer { grid-template-columns: 1fr; }
  .pd-media { aspect-ratio: 4 / 3; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
