/* Layout: apothecary shelf. Lit hero, then a shelf of labelled jars, a burn-care sequence, the story, and a visit/contact footer. */
:root {
  --ground: #e4e8df;      /* pale sage, like unbleached wax paper */
  --shelf: #d6dccf;       /* slightly deeper band */
  --ink: #22261f;
  --muted: #5f665a;
  --plum: #6b2f4a;        /* label ink accent */
  --flame: #e3a12f;
  --line: #bcc4b4;
  --label: #f3f4ee;

  --display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --body: "Figtree", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;

  --step--1: 0.8125rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.75rem;
  --step-3: clamp(2.25rem, 5vw, 3.25rem);
  --step-4: clamp(3rem, 9vw, 6.5rem);
  --wrap: 72rem;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ground: #191b17; --shelf: #21241f; --ink: #e9e7dc; --muted: #a3a898;
    --plum: #d394b1; --flame: #f0b54a; --line: #3a3e35; --label: #262922;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ground: #191b17; --shelf: #21241f; --ink: #e9e7dc; --muted: #a3a898;
  --plum: #d394b1; --flame: #f0b54a; --line: #3a3e35; --label: #262922;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 4.5rem; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
img { max-width: 100%; }
[hidden] { display: none !important; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--ground);
  color: var(--ink);
  font: 400 var(--step-0)/1.6 var(--body);
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; z-index: 10;
  height: env(safe-area-inset-top, 0px); background: var(--ground);
}
.wrap {
  max-width: var(--wrap); margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
h1, h2, h3 { font-family: var(--display); font-weight: 500; text-wrap: balance; margin: 0; line-height: 1.05; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--plum); outline-offset: 3px; }
.eyebrow {
  font: 500 var(--step--1)/1.2 var(--mono);
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted);
}

/* Header */
header.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5;
  background: var(--ground); border-bottom: 1px solid var(--line);
}
header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 0.9rem; }
.logo { font: italic 600 var(--step-1)/1 var(--display); text-decoration: none; }
nav { display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; }
nav a { text-decoration: none; font-size: 0.95rem; color: var(--muted); }
nav a:hover { color: var(--ink); }
.bag { font: 500 var(--step--1) var(--mono); border: 1px solid var(--ink); border-radius: 999px; padding: 0.3rem 0.8rem; color: var(--ink); background: none; cursor: pointer; text-decoration: none; }
.bag[aria-expanded="true"] { background: var(--ink); color: var(--ground); }
header.top .wrap { position: relative; }
.bag-panel {
  position: absolute; top: calc(100% + 6px); right: max(16px, env(safe-area-inset-right, 0px));
  width: min(24rem, calc(100vw - 32px)); max-height: calc(100vh - 7rem); overflow-y: auto;
  background: var(--label); border: 1px solid var(--line); border-radius: 4px;
  box-shadow: 0 14px 36px rgba(20, 24, 16, .16);
  padding: 1.1rem; display: flex; flex-direction: column; gap: .9rem;
}
.bag-panel h2 { font-size: var(--step-1); }
.panel-empty { color: var(--muted); font-size: .95rem; }
.panel-foot { display: flex; flex-direction: column; gap: .8rem; }
.panel-foot .btn { text-align: center; }
.bag-page { padding-block: clamp(2rem, 6vw, 4rem); }
.bag-page h1 { font-size: var(--step-3); margin-top: .5rem; }
.back { font-size: .95rem; color: var(--muted); }
.sent { display: flex; flex-direction: column; gap: .75rem; align-items: flex-start; }
.sent h2 { font-size: var(--step-2); }
@media (max-width: 640px) { nav a:not(.bag) { display: none; } }

/* Hero */
.hero .wrap {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 3rem; align-items: center;
  padding-block: clamp(3rem, 8vw, 6rem);
}
.hero h1 { font-size: var(--step-4); letter-spacing: -0.02em; }
.hero h1 em { color: var(--plum); }
.hero .lede { margin-top: 1.5rem; max-width: 34rem; font-size: var(--step-1); color: var(--muted); line-height: 1.5; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.btn {
  display: inline-block; font: 600 0.95rem var(--body); text-decoration: none; cursor: pointer;
  padding: 0.8rem 1.4rem; border-radius: 999px; border: 1px solid var(--ink);
  background: var(--ink); color: var(--ground);
}
.btn.ghost { background: transparent; color: var(--ink); }
.btn:hover { background: var(--plum); border-color: var(--plum); color: var(--label); }

/* Lit candle */
.stage { display: grid; place-items: center; min-height: 340px; }
.candle { position: relative; width: 150px; height: 190px; margin-top: 120px; }
.candle .jar {
  position: absolute; inset: 0; border-radius: 10px 10px 18px 18px;
  background: linear-gradient(90deg, rgba(255,255,255,.25), rgba(255,255,255,0) 30%, rgba(0,0,0,.08));
  border: 2px solid var(--line); background-color: #b9c3ae;
}
.candle .wax { position: absolute; left: 8px; right: 8px; top: 26px; bottom: 8px; border-radius: 6px 6px 12px 12px; background: #efe9d8; }
.candle .tag {
  position: absolute; left: 50%; top: 92px; transform: translateX(-50%);
  background: var(--label); border: 1px solid var(--plum); color: var(--plum);
  font: 500 10px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase;
  padding: .4rem .6rem; text-align: center; white-space: nowrap;
}
.wick { position: absolute; left: 50%; top: 10px; width: 3px; height: 18px; background: #2b2723; transform: translateX(-50%); border-radius: 2px; }
.flame {
  position: absolute; left: 50%; bottom: calc(100% - 14px); width: 26px; height: 64px;
  transform: translateX(-50%); transform-origin: 50% 100%;
  border-radius: 50% 50% 45% 45% / 65% 65% 35% 35%;
  background: radial-gradient(ellipse at 50% 80%, #fff8e1 0 18%, #ffd36b 35%, var(--flame) 60%, rgba(227,161,47,0) 75%);
  animation: flicker 2.8s ease-in-out infinite;
}
.glow {
  position: absolute; left: 50%; top: -110px; width: 320px; height: 320px; transform: translateX(-50%);
  background: radial-gradient(circle, rgba(240,181,74,.35), rgba(240,181,74,0) 65%);
  pointer-events: none; animation: breathe 3.5s ease-in-out infinite;
}
@keyframes flicker {
  0%,100% { transform: translateX(-50%) scale(1,1) rotate(-1deg); }
  30% { transform: translateX(-50%) scale(.94,1.06) rotate(2deg); }
  60% { transform: translateX(-50%) scale(1.04,.95) rotate(-2deg); }
}
@keyframes breathe { 50% { opacity: .7; } }
@media (prefers-reduced-motion: reduce) { .flame, .glow { animation: none; } }

/* Strip of facts */
.facts { border-block: 1px solid var(--line); }
.facts .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; padding-block: 1.25rem; }
.facts div { display: flex; flex-direction: column; gap: .2rem; }
.facts strong { font: 500 var(--step-1) var(--display); }

section.block { padding-block: clamp(3.5rem, 8vw, 6rem); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 2.5rem; }
.section-head h2 { font-size: var(--step-3); }
.section-head p { max-width: 28rem; color: var(--muted); }

/* Shop */
#shop { background: var(--shelf); }
.shelf { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.product { display: flex; flex-direction: column; gap: 1rem; }
.vessel {
  aspect-ratio: 4 / 3; max-width: 100%; display: grid; place-items: end center;
  background: var(--ground); border-radius: 4px; padding-bottom: 1.5rem; position: relative; overflow: hidden;
}
.vessel .pot { width: 38%; aspect-ratio: 3 / 4; border-radius: 8px 8px 14px 14px; position: relative; background: var(--c); }
.vessel .pot::before { content: ""; position: absolute; left: 7%; right: 7%; top: 12%; height: 12%; border-radius: 50%; background: rgba(255,255,255,.55); }
.vessel .pot::after { content: ""; position: absolute; left: 50%; top: 4%; width: 3px; height: 14%; background: #2b2723; transform: translateX(-50%); }
.vessel .no { position: absolute; top: .8rem; left: .9rem; }
.product .label { background: var(--label); border: 1px solid var(--line); padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.product h3 { font-size: var(--step-2); }
.notes { font-size: .95rem; color: var(--muted); }
.spec { display: flex; flex-wrap: wrap; gap: .35rem 1rem; font: 400 var(--step--1) var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.buy { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: .6rem; border-top: 1px dashed var(--line); }
.price { font: 500 var(--step-1) var(--mono); font-variant-numeric: tabular-nums; }
.add { font: 600 .9rem var(--body); background: none; border: 1px solid var(--ink); color: var(--ink); border-radius: 999px; padding: .45rem 1rem; cursor: pointer; }
.add:hover { background: var(--ink); color: var(--ground); }
.add:disabled { opacity: .45; cursor: not-allowed; background: none; color: var(--ink); }

/* Order */
.order-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 2.5rem; align-items: start; }
.slip { background: var(--label); border: 1px solid var(--line); padding: 1.25rem; display: flex; flex-direction: column; gap: .75rem; }
.lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .75rem; }
.lines li { display: grid; grid-template-columns: 1fr auto auto; gap: .75rem; align-items: center; padding-bottom: .75rem; border-bottom: 1px dashed var(--line); }
.item-name { font: 500 1.05rem var(--display); }
.item-meta { font: 400 var(--step--1) var(--mono); color: var(--muted); }
.qty { display: flex; align-items: center; gap: .4rem; font: 500 .95rem var(--mono); font-variant-numeric: tabular-nums; }
.qty button { width: 1.9rem; height: 1.9rem; border-radius: 50%; border: 1px solid var(--line); background: none; color: var(--ink); cursor: pointer; font: inherit; }
.qty button:hover { border-color: var(--ink); }
.line-total, .subtotal span:last-child { font: 500 1rem var(--mono); font-variant-numeric: tabular-nums; text-align: right; min-width: 3.5rem; }
.subtotal { display: flex; justify-content: space-between; font-weight: 600; }
.slip .empty { color: var(--muted); }
.order-form { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { display: flex; flex-direction: column; gap: .35rem; }
.field.full { grid-column: 1 / -1; }
.field label, .field legend { font: 500 var(--step--1) var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding: 0; }
.field input, .field textarea {
  font: inherit; color: var(--ink); background: var(--label); border: 1px solid var(--line);
  border-radius: 4px; padding: .7rem .8rem; width: 100%;
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--plum); outline-offset: 0; border-color: transparent; }
fieldset.field { border: 0; margin: 0; padding: 0; }
.choice { display: flex; gap: 1.25rem; flex-wrap: wrap; padding-top: .25rem; }
.choice label { display: flex; align-items: center; gap: .4rem; font: 400 1rem var(--body); text-transform: none; letter-spacing: 0; color: var(--ink); cursor: pointer; white-space: nowrap; }
.choice input { margin: 0; accent-color: var(--plum); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { grid-column: 1 / -1; display: flex; flex-direction: column; gap: .75rem; align-items: flex-start; }
.form-foot small { color: var(--muted); max-width: 34rem; }
.order-msg { font: 500 .95rem var(--body); min-height: 1.2em; }
.order-msg.error { color: var(--plum); }
.btn:disabled { opacity: .55; cursor: wait; }
@media (max-width: 900px) { .order-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .order-form { grid-template-columns: 1fr; } }

/* Care */
.care { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; list-style: none; padding: 0; margin: 0; counter-reset: step; }
.care li { counter-increment: step; display: flex; flex-direction: column; gap: .6rem; border-top: 2px solid var(--ink); padding-top: 1rem; }
.care li::before { content: "Step " counter(step); font: 500 var(--step--1) var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--plum); }
.care h3 { font-size: var(--step-1); }
.care p { color: var(--muted); font-size: .95rem; }

/* Story */
.story .wrap { display: grid; grid-template-columns: 1fr 1.2fr; gap: 3rem; align-items: start; }
.story h2 { font-size: var(--step-3); }
.story h2 em { color: var(--plum); }
.story .copy { display: flex; flex-direction: column; gap: 1rem; max-width: 38rem; font-size: 1.05rem; }

/* Newsletter + footer */
.join { background: var(--ink); color: var(--ground); }
.join .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; padding-block: 3.5rem; }
.join h2 { font-size: var(--step-3); }
.join p { opacity: .8; margin-top: .6rem; }
.join form { display: flex; gap: .5rem; flex-wrap: wrap; }
.join input {
  flex: 1 1 14rem; font: inherit; padding: .8rem 1.1rem; border-radius: 999px;
  border: 1px solid var(--muted); background: transparent; color: var(--ground);
}
.join input::placeholder { color: var(--ground); opacity: .55; }
.join button { background: var(--flame); color: #22261f; border-color: var(--flame); }
.join .msg { flex-basis: 100%; font: 500 var(--step--1) var(--mono); color: var(--flame); min-height: 1.2em; }

footer .wrap { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; padding-block: 3rem; font-size: .95rem; }
footer h4 { margin: 0 0 .5rem; font: 500 var(--step--1) var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .3rem; }
footer .fine { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 1.25rem; color: var(--muted); font-size: var(--step--1); }

.toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
  background: var(--ink); color: var(--ground); padding: .7rem 1.2rem; border-radius: 999px;
  font-size: .9rem; z-index: 20;
}

@media (max-width: 900px) {
  .hero .wrap, .story .wrap, .join .wrap { grid-template-columns: 1fr; }
  .stage { min-height: 300px; }
  .shelf { grid-template-columns: 1fr 1fr; }
  .care, .facts .wrap { grid-template-columns: 1fr 1fr; }
  footer .wrap { grid-template-columns: 1fr 1fr; }
  footer .wrap > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .shelf, .care { grid-template-columns: 1fr; }
  .vessel { aspect-ratio: 16 / 9; padding-bottom: 1rem; }
  .vessel .pot { width: 22%; }
  .stage { min-height: 260px; }
  .candle { margin-top: 90px; }
  .facts strong { font-size: 1.05rem; }
  header.top .wrap { padding-block: .7rem; }
}
