/* The Night Apothecary — shop takeover page.
   Deliberately its own dark world, separate from styles.css: the shop is a
   seasonal destination, not a journal page. Scoped to /shop/ only. */

:root {
  --night: #0e1512;
  --night-deep: #0a100d;
  --panel: #141d18;
  --line: #2a3a31;
  --bone: #e8dfc8;
  --bone-dim: #b9b098;
  --sage: #8fa68e;
  --amber: #d9a441;
  --amber-glow: #e8b95a;
  --violet: #7b6290;
  --serif-display: "IM Fell English", Georgia, serif;
  --serif-sc: "IM Fell English SC", Georgia, serif;
  --serif-body: "Crimson Pro", Georgia, serif;
  --mono: "IBM Plex Mono", "SF Mono", Menlo, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--night);
  color: var(--bone);
  font-family: var(--serif-body);
  font-size: 1.125rem;
  font-weight: 340;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--amber); color: var(--night-deep);
  padding: 0.5rem 1rem; z-index: 50; font-family: var(--mono);
}
.skip-link:focus { left: 0; }

/* ---- top bar ---- */
.shop-topbar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.1rem clamp(1rem, 4vw, 2.4rem);
}
.shop-topbar .brand {
  font-family: var(--serif-sc); font-size: 1.05rem; letter-spacing: 0.06em;
  color: var(--sage); text-decoration: none;
}
.shop-topbar .brand:hover, .shop-topbar .brand:focus-visible { color: var(--bone); }
.shop-topbar nav { display: flex; gap: 1.6rem; }
.shop-topbar nav a {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--sage); text-decoration: none;
  border-bottom: 1px solid transparent; transition: color 0.2s, border-color 0.2s;
}
.shop-topbar nav a:hover, .shop-topbar nav a:focus-visible {
  color: var(--bone); border-color: var(--sage);
}

/* ---- hero ---- */
.shop-hero {
  position: relative;
  min-height: 92vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; overflow: hidden;
  background: var(--night-deep);
  padding: 5rem 1.5rem;
}
/* Cinematic photographic ground — a frame from the Poison Garden film.
   Slow drift (Ken Burns) gives it life; the scrim keeps type legible. */
.hero-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 42%;
  z-index: 0;
  transform: scale(1.06);
  animation: heroDrift 34s ease-in-out infinite alternate;
}
@keyframes heroDrift {
  from { transform: scale(1.06) translate3d(0, 0, 0); }
  to   { transform: scale(1.14) translate3d(-1.5%, -2%, 0); }
}
.hero-scrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    /* soft warm bloom rising from the candle low-center */
    radial-gradient(80% 55% at 50% 88%, rgba(217, 164, 65, 0.16), transparent 60%),
    /* darken behind the wordmark for legibility */
    radial-gradient(90% 62% at 50% 44%, rgba(8, 12, 10, 0.72), transparent 72%),
    /* top-and-bottom cinematic vignette */
    linear-gradient(180deg, rgba(8, 12, 10, 0.82) 0%, rgba(8, 12, 10, 0.28) 30%, rgba(8, 12, 10, 0.34) 66%, rgba(8, 12, 10, 0.9) 100%);
}
/* edge vignette for depth */
.shop-hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  box-shadow: inset 0 0 220px 60px rgba(6, 9, 7, 0.9);
}
#fog { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; opacity: 0.55; }

.hero-inner { position: relative; max-width: 46rem; z-index: 3; }
.hero-eyebrow {
  font-family: var(--mono); font-size: 0.78rem; font-weight: 400;
  letter-spacing: 0.32em; text-transform: uppercase; color: var(--sage);
  opacity: 0; animation: rise 1.1s ease 0.2s forwards;
}
.shop-hero h1 {
  font-family: var(--serif-display); font-weight: 400;
  font-size: clamp(2.9rem, 9vw, 5.4rem); line-height: 1.04;
  margin: 0.35em 0 0.3em; text-wrap: balance; color: var(--bone);
  text-shadow: 0 2px 30px rgba(6, 9, 7, 0.85), 0 0 60px rgba(217, 164, 65, 0.28);
}
.hero-eyebrow, .hero-sub { text-shadow: 0 1px 14px rgba(6, 9, 7, 0.9); }
.shop-hero h1 .w { display: inline-block; opacity: 0; animation: rise 1.2s cubic-bezier(0.2, 0.7, 0.2, 1) forwards; }
.shop-hero h1 .w:nth-child(1) { animation-delay: 0.45s; }
.shop-hero h1 .w:nth-child(2) { animation-delay: 0.62s; }
.shop-hero h1 .w:nth-child(3) { animation-delay: 0.79s; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.hero-sub {
  font-size: 1.25rem; font-style: italic; color: var(--bone-dim);
  max-width: 34rem; margin: 0 auto;
  opacity: 0; animation: rise 1.2s ease 1.05s forwards;
}
.hero-cta {
  display: inline-block; margin-top: 2.4rem;
  font-family: var(--mono); font-size: 0.82rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--amber); text-decoration: none;
  border: 1px solid rgba(217, 164, 65, 0.45);
  padding: 0.85rem 1.7rem; border-radius: 2px;
  background: rgba(217, 164, 65, 0.05);
  transition: background 0.3s ease, box-shadow 0.3s ease;
  opacity: 0; animation: rise 1.2s ease 1.3s forwards;
}
.hero-cta:hover, .hero-cta:focus-visible {
  background: rgba(217, 164, 65, 0.14);
  box-shadow: 0 0 26px rgba(217, 164, 65, 0.25);
}
.hero-cta:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

/* ---- sections ---- */
.shop-main { max-width: 72rem; margin: 0 auto; padding: 0 1.5rem 3rem; }
.shop-main section { padding: 4.5rem 0 1rem; }
.sec-head { max-width: 46rem; margin: 0 auto 3rem; text-align: center; }
.sec-eyebrow {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--sage);
}
.sec-head h2 {
  font-family: var(--serif-display); font-weight: 400;
  font-size: clamp(1.9rem, 4.5vw, 2.7rem);
  margin: 0.3em 0 0.35em; text-wrap: balance; color: var(--bone);
}
.sec-head p { color: var(--bone-dim); font-style: italic; margin: 0; }
.rule { width: 110px; height: 14px; margin: 1.1rem auto 0; opacity: 0.6; display: block; }

/* ---- cards ---- */
.group-head {
  font-family: var(--serif-display); font-weight: 400;
  font-size: 1.5rem; color: var(--bone);
  margin: 3.2rem 0 1.2rem; text-align: center;
}
.group-head:first-of-type { margin-top: 0; }
.group-note {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--sage); font-style: normal;
}
.shelf {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.6rem;
}
.card {
  background: linear-gradient(180deg, var(--panel) 0%, #101813 100%);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 1.4rem 1.4rem 1.5rem;
  display: flex; flex-direction: column; gap: 1rem;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
.card:hover {
  transform: translateY(-5px);
  border-color: rgba(217, 164, 65, 0.4);
  box-shadow: 0 18px 42px -18px rgba(0, 0, 0, 0.7), 0 0 30px -12px rgba(217, 164, 65, 0.3);
}
.plate {
  aspect-ratio: 1 / 1.05;
  border: 1px solid var(--line);
  border-radius: 2px;
  background:
    radial-gradient(80% 60% at 50% 38%, rgba(217, 164, 65, 0.06) 0%, transparent 70%),
    #0c120f;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; position: relative;
}
.plate svg { width: 78%; height: 78%; }
.plate .plate-note {
  position: absolute; bottom: 0.5rem; right: 0.7rem;
  font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.14em;
  color: #5c6b5e; text-transform: uppercase;
}
.shelf-solo { max-width: 22rem; margin-left: auto; margin-right: auto; }
.shelf-posters { grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); }
.card h3, .card h4 {
  font-family: var(--serif-display); font-weight: 400;
  font-size: 1.45rem; margin: 0; line-height: 1.2; color: var(--bone);
}
.shelf-posters .card h4 { font-size: 1.3rem; }
.card .desc { font-size: 1rem; color: var(--bone-dim); margin: 0; flex: 1; }
.buy-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.price {
  font-family: var(--mono); font-weight: 500; font-size: 1.05rem;
  color: var(--amber); font-variant-numeric: tabular-nums;
}
.price small { font-size: 0.68rem; color: var(--bone-dim); font-weight: 300; }
.btn {
  font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--night-deep); background: var(--amber);
  border: none; border-radius: 2px;
  padding: 0.7rem 1.15rem; cursor: pointer; text-decoration: none; display: inline-block;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}
.btn:hover, .btn:focus-visible { background: var(--amber-glow); box-shadow: 0 0 22px rgba(217, 164, 65, 0.4); }
.btn:focus-visible { outline: 2px solid var(--bone); outline-offset: 2px; }
.btn.ghost { background: transparent; color: var(--sage); border: 1px solid var(--line); }
.btn.ghost:hover, .btn.ghost:focus-visible { color: var(--bone); border-color: var(--sage); box-shadow: none; }
.card.soon .plate { filter: saturate(0.92); }
.plate img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Posters carry their own frame + caption baked in — show the whole plate. */
.plate-poster { aspect-ratio: 11 / 14; background: #0a0f0c; }
.plate-poster img { object-fit: contain; }
.ribbon {
  align-self: flex-start;
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--violet);
  border: 1px solid rgba(123, 98, 144, 0.5);
  border-radius: 2px; padding: 0.28rem 0.6rem;
  background: rgba(123, 98, 144, 0.08);
}
.stock {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.12em;
  color: #5c6b5e; text-transform: uppercase;
}

/* ---- size guide ---- */
.size-guide summary {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--sage); cursor: pointer;
  list-style: none;
}
.size-guide summary::-webkit-details-marker { display: none; }
.size-guide summary::before { content: "+ "; color: var(--amber); }
.size-guide[open] summary::before { content: "− "; }
.size-guide summary:hover, .size-guide summary:focus-visible { color: var(--bone); }
.size-table-wrap { overflow-x: auto; margin-top: 0.7rem; }
.size-guide table {
  border-collapse: collapse; width: 100%; min-width: 430px;
  font-family: var(--mono); font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}
.size-guide th, .size-guide td {
  border: 1px solid var(--line); padding: 0.35rem 0.5rem; text-align: center;
  color: var(--bone-dim); font-weight: 400;
}
.size-guide th { color: var(--sage); text-transform: uppercase; letter-spacing: 0.08em; }
.size-guide .sg-note { font-size: 0.85rem; font-style: italic; color: #7e7a69; margin: 0.6rem 0 0; }

/* ---- shipment note ---- */
.shipnote {
  margin: 2.6rem auto 0; max-width: 44rem;
  border: 1px dashed var(--line); border-radius: 3px;
  padding: 1.1rem 1.4rem;
  font-size: 0.98rem; color: var(--bone-dim);
  display: flex; gap: 0.9rem; align-items: baseline;
}
.shipnote .tick { color: var(--amber); font-family: var(--mono); }

/* ---- notify / signup ---- */
.notify-block {
  margin: 4.5rem auto 0; max-width: 34rem; text-align: center;
  border: 1px solid var(--line); border-radius: 3px;
  background: linear-gradient(180deg, var(--panel) 0%, #101813 100%);
  padding: 2.2rem 1.8rem 2rem;
}
.notify-block h2 {
  font-family: var(--serif-display); font-weight: 400;
  font-size: 1.7rem; margin: 0 0 0.4em; color: var(--bone);
}
.notify-block > p { color: var(--bone-dim); font-style: italic; margin: 0 0 1.4rem; }
.signup-form { display: flex; flex-direction: column; gap: 0.8rem; }
.signup-form input {
  background: #0c120f; border: 1px solid var(--line); border-radius: 2px;
  color: var(--bone); font-family: var(--serif-body); font-size: 1rem;
  padding: 0.75rem 0.9rem;
}
.signup-form input::placeholder { color: #5c6b5e; }
.signup-form input:focus-visible { outline: 2px solid var(--amber); outline-offset: 1px; border-color: var(--amber); }
.cf-turnstile { min-height: 65px; }
.signup-form button[type="submit"] {
  font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--night-deep); background: var(--amber);
  border: none; border-radius: 2px; padding: 0.85rem 1.15rem; cursor: pointer;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}
.signup-form button[type="submit"]:hover,
.signup-form button[type="submit"]:focus-visible {
  background: var(--amber-glow); box-shadow: 0 0 22px rgba(217, 164, 65, 0.4);
}
.form-error { color: #d98f8f; font-size: 0.95rem; }

/* ---- footer ---- */
.shop-footer {
  border-top: 1px solid var(--line);
  margin-top: 4rem; padding: 2.6rem 1.5rem 3.2rem; text-align: center;
}
.foot-mark { font-family: var(--serif-sc); font-size: 1.15rem; color: var(--sage); letter-spacing: 0.08em; }
.shop-footer p { max-width: 38rem; margin: 0.8rem auto 0; font-size: 0.95rem; font-style: italic; color: #7e7a69; }
.shop-footer .legal { font-style: normal; font-size: 0.82rem; }
.foot-links {
  margin-top: 1.4rem; display: flex; gap: 2rem; justify-content: center; flex-wrap: wrap;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase;
}
.foot-links a { color: var(--sage); text-decoration: none; border-bottom: 1px solid transparent; transition: color 0.2s, border-color 0.2s; }
.foot-links a:hover, .foot-links a:focus-visible { color: var(--bone); border-color: var(--sage); }

@media (max-width: 640px) {
  .shop-topbar nav { gap: 1rem; }
  .hero-bg { object-position: 50% 38%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero-eyebrow, .shop-hero h1 .w, .hero-sub, .hero-cta { opacity: 1; }
  .hero-bg { transform: scale(1.06); }
  #fog { display: none; }
}
