/* ============================================================
   CRYPTWICK CANDLEWORKS — main.css
   Occult apothecary. Ink, bone, brass, kraft.
   ============================================================ */

/* ---------- fonts ---------- */
@font-face {
  font-family: "Elaine Dawn";
  src: url("../assets/fonts/ElaineDawn-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Elaine Dawn";
  src: url("../assets/fonts/ElaineDawn-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* ---------- tokens ---------- */
:root {
  --ink:        #0B0A08;
  --ink-2:      #121009;
  --ink-3:      #1A1710;
  --ink-4:      #242019;

  --bone:       #EAE3D3;
  --bone-dim:   #CDC5B2;
  --ash:        #9A947F;   /* secondary text — lightened for contrast on ink */
  --ash-deep:   #55514A;   /* hairlines, ornaments only */

  --brass:        #9C7A3C; /* large type / ornament on ink */
  --brass-bright: #C9A15C; /* small text, links on ink */
  --brass-dim:    #6E5527;

  --kraft:      #B3986B;
  --kraft-deep: #987E53;
  --tag-ink:    #241D12;

  --oxblood:    #4A1F1F;   /* a whisper, never a voice */

  --font-display: "Elaine Dawn", "Palatino Linotype", serif;
  --font-body:    "EB Garamond", Georgia, serif;
  --font-label:   "EB Garamond", Georgia, serif;

  --measure: 62ch;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --hairline: 1px solid rgba(234, 227, 211, 0.14);

  --ease-drift: cubic-bezier(.23, 1, .32, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  color-scheme: dark;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--font-body);
  font-size: clamp(1.0625rem, 0.95rem + 0.4vw, 1.1875rem);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}

img, svg, canvas { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }

::selection { background: var(--brass); color: var(--ink); }

/* subtle vellum grain over everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

/* ---------- typography ---------- */
h1, h2, h3 { font-weight: 500; line-height: 1.08; text-wrap: balance; }

.display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.01em;
}

.label {
  font-family: var(--font-label);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ash);
}

.label--brass { color: var(--brass-bright); }

p { max-width: var(--measure); }

.lede {
  font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.6rem);
  line-height: 1.5;
  color: var(--bone);
}

a {
  color: var(--brass-bright);
  text-decoration-color: rgba(201, 161, 92, 0.4);
  text-underline-offset: 0.2em;
  transition: color 0.25s var(--ease-drift), text-decoration-color 0.25s;
}
a:hover { color: var(--bone); text-decoration-color: var(--bone); }

:focus-visible {
  outline: 2px solid var(--brass-bright);
  outline-offset: 3px;
  border-radius: 1px;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--gutter);
  z-index: 200;
  padding: 0.6rem 1rem;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--font-label);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
}
.skip-link:focus { top: 0.75rem; color: var(--ink); }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- layout primitives ---------- */
.wrap {
  width: min(100% - 2 * var(--gutter), 78rem);
  margin-inline: auto;
}

.section { padding-block: clamp(4.5rem, 10vw, 9rem); position: relative; z-index: 2; }
.section--first { padding-top: clamp(8rem, 16vh, 12rem); }

.copy { color: var(--bone-dim); }
.copy + .copy, .lede + .copy { margin-top: 1.4rem; }
.copy strong { color: var(--bone); font-weight: 500; }
.copy--gap-after { margin-bottom: 2rem; }

main { position: relative; z-index: 2; }

/* ---------- ornaments: moon phase strip ---------- */
.phase-strip {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  color: var(--ash-deep);
}
.phase-strip .ph { width: 14px; height: 14px; flex: none; }
.phase-strip .ph.is-lit { color: var(--brass-bright); }
.phase-strip::before,
.phase-strip::after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, transparent, rgba(234,227,211,0.18));
}
.phase-strip::after {
  background: linear-gradient(90deg, rgba(234,227,211,0.18), transparent);
}

.section-head { margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.section-head .phase-strip { margin-bottom: 2rem; }
.section-head .label { display: block; margin-bottom: 1rem; }
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.4rem, 2rem + 3vw, 4.4rem);
  color: var(--bone);
}
.section-head .lede { margin-top: 1.6rem; color: var(--bone-dim); max-width: 52ch; }

.chapter-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 1.6rem + 2vw, 3.2rem);
  color: var(--bone);
}

/* ---------- header ---------- */
.site-head {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.1rem var(--gutter);
  transition: background 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}
.site-head.is-scrolled {
  background: rgba(11, 10, 8, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: rgba(234, 227, 211, 0.09);
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
/* logotype rendered via mask so it recolors like a link (SVG is monochrome) */
.head-logo {
  display: block;
  height: 62px;
  aspect-ratio: 769.58 / 342.26;
  background-color: var(--bone-dim);
  -webkit-mask: url("../assets/brand-logo.svg") no-repeat center / contain;
  mask: url("../assets/brand-logo.svg") no-repeat center / contain;
  transition: background-color 0.25s var(--ease-drift);
}
.brand:hover .head-logo,
.brand:focus-visible .head-logo { background-color: var(--brass-bright); }
@media (max-width: 46rem) { .head-logo { height: 48px; } }

.site-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  list-style: none;
  padding: 0;
}
.site-nav a {
  font-family: var(--font-label);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--bone-dim);
  padding: 0.4rem 0;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--brass-bright); }
.site-nav a[aria-current="page"] {
  border-bottom: 1px solid var(--brass);
}
.nav-etsy {
  border: 1px solid rgba(201, 161, 92, 0.45);
  padding: 0.55rem 1rem !important;
  color: var(--brass-bright) !important;
}
.nav-etsy:hover { border-color: var(--bone); color: var(--bone) !important; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(234, 227, 211, 0.25);
  color: var(--bone);
  font-family: var(--font-label);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.55rem 1rem;
  cursor: pointer;
}

@media (max-width: 46rem) {
  .nav-toggle { display: inline-block; position: relative; z-index: 120; }
  .site-nav {
    position: fixed;
    inset: 0;
    z-index: 110;
    display: grid;
    place-content: center;
    background: rgba(11, 10, 8, 0.96);
    backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s var(--ease-drift), visibility 0.35s;
  }
  .site-nav.is-open { opacity: 1; visibility: visible; }
  .site-nav ul { flex-direction: column; gap: 2.25rem; text-align: center; }
  .site-nav a { font-size: 0.95rem; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.95rem 1.9rem;
  font-family: var(--font-label);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  background: var(--brass);
  border: 1px solid var(--brass);
  cursor: pointer;
  transition: background 0.3s var(--ease-drift), color 0.3s, border-color 0.3s, transform 0.3s;
}
.btn:hover { background: var(--bone); border-color: var(--bone); color: var(--ink); transform: translateY(-2px); }

.btn--ghost {
  background: transparent;
  color: var(--bone);
  border-color: rgba(234, 227, 211, 0.3);
}
.btn--ghost:hover { background: transparent; color: var(--brass-bright); border-color: var(--brass); }

.btn--quiet {
  background: transparent;
  border: none;
  padding: 0.4rem 0;
  color: var(--brass-bright);
  border-bottom: 1px solid rgba(201, 161, 92, 0.4);
}
.btn--quiet:hover { color: var(--bone); border-color: var(--bone); transform: none; background: none; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 7rem var(--gutter) 8rem;
  overflow: hidden;
  z-index: 2;
}
#hero-field {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.hero-inner { max-width: 52rem; display: grid; justify-items: center; }

.hero-mark {
  width: clamp(140px, 22vw, 210px);
  aspect-ratio: 297.69 / 342.26; /* brand icon's native proportions */
  height: auto;
  margin-bottom: 1.5rem;
  color: var(--bone);
  filter: drop-shadow(0 0 22px rgba(201, 161, 92, 0.18));
  animation: mark-breathe 7s ease-in-out infinite;
}
@keyframes mark-breathe {
  0%, 100% { filter: drop-shadow(0 0 22px rgba(201, 161, 92, 0.18)); }
  50% { filter: drop-shadow(0 0 42px rgba(201, 161, 92, 0.4)); }
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(3.2rem, 2rem + 7vw, 7rem);
  color: var(--bone);
  margin-bottom: 1.4rem;
}
.hero h1 em {
  font-style: normal;
  color: var(--brass-bright);
}
.hero .lede { margin-inline: auto; max-width: 34ch; color: var(--bone-dim); }

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 2.6rem;
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--ash);
  font-family: var(--font-label);
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  display: grid;
  justify-items: center;
  gap: 0.7rem;
  text-decoration: none;
}
.hero-scroll::after {
  content: "";
  width: 1px;
  height: 44px;
  background: linear-gradient(180deg, var(--brass), transparent);
  animation: wick-draw 2.6s var(--ease-drift) infinite;
  transform-origin: top;
}
@keyframes wick-draw {
  0% { transform: scaleY(0); opacity: 0; }
  35% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}
/* on short viewports the cue would crowd the CTAs — drop it */
@media (max-height: 740px) { .hero-scroll { display: none; } }


/* ---------- maker statement band ---------- */
.statement { text-align: center; }
.statement blockquote {
  font-family: var(--font-body);
  font-size: clamp(1.5rem, 1.2rem + 1.6vw, 2.4rem);
  font-style: italic;
  line-height: 1.45;
  max-width: 28ch;
  margin-inline: auto;
  color: var(--bone);
}
.statement blockquote strong { color: var(--brass-bright); font-weight: 500; }
.statement .label { margin-top: 2.2rem; display: block; }

/* ---------- ledger (specimen index) ---------- */
.ledger { border-top: var(--hairline); }

.specimen {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(1.5rem, 4vw, 4.5rem);
  align-items: center;
  padding-block: clamp(2.5rem, 6vw, 5rem);
  border-bottom: var(--hairline);
}
.specimen:nth-child(even) { direction: rtl; }
.specimen:nth-child(even) > * { direction: ltr; }

.specimen-meta { display: grid; gap: 1.1rem; justify-items: start; }

.specimen-no {
  font-family: var(--font-label);
  font-size: 0.68rem;
  letter-spacing: 0.26em;
  color: var(--ash);
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
}
.specimen-no .ph { width: 13px; height: 13px; color: var(--brass); }

.specimen-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 1.6rem + 2.4vw, 3.6rem);
  color: var(--bone);
}

.specimen-notes {
  font-family: var(--font-label);
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--brass-bright);
}

.specimen-desc { color: var(--bone-dim); max-width: 46ch; }

.specimen-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  padding: 0;
  margin: 0.25rem 0 0.5rem;
}
.specimen-facts div { display: grid; gap: 0.2rem; }
.specimen-facts dt {
  font-family: var(--font-label);
  font-size: 0.6rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ash);
}
.specimen-facts dd {
  margin: 0;
  font-family: var(--font-label);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--bone);
}

/* ---------- specimen plate (illustration frame) ---------- */
.plate {
  position: relative;
  border: 1px solid rgba(156, 122, 60, 0.35);
  outline: 1px solid rgba(234, 227, 211, 0.07);
  outline-offset: 6px;
  background:
    radial-gradient(120% 90% at 50% 12%, rgba(156, 122, 60, 0.1), transparent 55%),
    linear-gradient(180deg, var(--ink-3), var(--ink-2));
  padding: clamp(1.5rem, 4vw, 3rem);
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 5;
}
.plate svg { width: min(62%, 240px); height: auto; overflow: visible; }
.plate figcaption {
  position: absolute;
  bottom: 0.9rem;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--font-label);
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ash);
}
/* candle-flame glow inside plates */
.plate::after {
  content: "";
  position: absolute;
  top: 12%;
  left: 50%;
  width: 42%;
  aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 161, 92, 0.16), transparent 65%);
  pointer-events: none;
}

/* candle finishes (SVG custom props) */
.finish-black  { --wax: #17140E; --line: #B7AD95; --socket: #050403; }
.finish-bone   { --wax: #E2D8C1; --line: #2A2214; --socket: #16110A; }
.finish-silver { --wax: #B0AEA8; --line: #211F1B; --socket: #14120F; }
.finish-gold   { --wax: #A5813F; --line: #251A0B; --socket: #17100A; }

.candle-line { stroke: var(--line, #B7AD95); }
.candle-wax  { fill: var(--wax, #17140E); }

/* ---------- kraft hang-tag card ---------- */
.tag-card {
  --tag-w: 15.5rem;
  width: var(--tag-w);
  padding: 2.3rem 1.4rem 1.6rem;
  background:
    radial-gradient(circle 7px at 50% 1.15rem, var(--ink-2) 46%, rgba(11,10,8,0.55) 52%, transparent 58%),
    linear-gradient(160deg, #BCA275 0%, var(--kraft) 45%, var(--kraft-deep) 100%);
  color: var(--tag-ink);
  clip-path: polygon(50% 0, 88% 9%, 100% 22%, 100% 100%, 0 100%, 0 22%, 12% 9%);
  text-align: center;
  display: grid;
  gap: 0.55rem;
  justify-items: center;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}
.tag-card .tag-mark { width: 30px; height: 38px; color: var(--tag-ink); opacity: 0.9; }
.tag-card .tag-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1;
}
.tag-card .tag-notes,
.tag-card .tag-weight {
  font-family: var(--font-label);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.tag-card .tag-weight { opacity: 0.75; }
.tag-card hr {
  width: 3rem;
  border: 0;
  border-top: 1px solid rgba(36, 29, 18, 0.4);
  margin: 0.2rem 0;
}

/* ---------- featured band (home) ---------- */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
}
.featured-card {
  text-decoration: none;
  color: var(--bone);
  display: grid;
  gap: 1.1rem;
  transition: transform 0.45s var(--ease-drift);
}
.featured-card:hover { transform: translateY(-6px); color: var(--bone); }
.featured-card .plate { aspect-ratio: 3 / 4; }
.featured-card:hover .plate { border-color: rgba(201, 161, 92, 0.7); }
.featured-card h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.7rem;
}
.featured-card .specimen-notes { font-size: 0.66rem; }
.featured-card:hover .specimen-notes { color: var(--bone); }

@media (max-width: 52rem) {
  .featured-grid { grid-template-columns: 1fr; max-width: 26rem; margin-inline: auto; }
}

/* ---------- chapter rail (collection wayfinding) ---------- */
.chapter-rail {
  position: fixed;
  left: 1.4rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  display: grid;
  gap: 1.3rem;
  justify-items: center;
}
.chapter-rail a {
  color: var(--ash-deep);
  display: block;
  width: 15px;
  height: 15px;
  transition: color 0.3s;
}
/* active chapter changes colour only — the rail never shifts position */
.chapter-rail a.is-active { color: var(--brass-bright); }
.chapter-rail a:hover { color: var(--bone); }
@media (max-width: 64rem) { .chapter-rail { display: none; } }

.chapter { scroll-margin-top: 6rem; }
.chapter + .chapter { margin-top: clamp(4rem, 9vw, 8rem); }

/* ---------- maker page: pinned rite panels ---------- */
.rite {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
  padding-block: clamp(4rem, 9vw, 7rem);
  border-top: var(--hairline);
}
.rite-pin {
  position: sticky;
  top: 7.5rem;
  display: grid;
  gap: 1.4rem;
  justify-items: start;
}
.rite-pin .ph { width: 30px; height: 30px; color: var(--brass); }
.rite-pin h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.2rem, 1.8rem + 2.4vw, 3.8rem);
}
.rite-body { display: grid; gap: 1.4rem; max-width: var(--measure); }
.rite-body p { color: var(--bone-dim); }
.rite-body p strong { color: var(--bone); font-weight: 500; }
@media (max-width: 52rem) {
  .rite { grid-template-columns: 1fr; }
  .rite-pin { position: static; }
}

/* ---------- correspondence form ---------- */
.correspond {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}
@media (max-width: 52rem) { .correspond { grid-template-columns: 1fr; } }

.field { display: grid; gap: 0.55rem; margin-bottom: 1.6rem; }
.field label {
  font-family: var(--font-label);
  font-size: 0.66rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ash);
}
.field input,
.field select,
.field textarea {
  background: var(--ink-2);
  border: 1px solid rgba(234, 227, 211, 0.18);
  color: var(--bone);
  padding: 0.85rem 1rem;
  font-family: var(--font-body);
  font-size: 1.05rem;
  border-radius: 0;
  transition: border-color 0.3s;
}
.field textarea { min-height: 9.5rem; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--brass); outline: none; }
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%239A947F' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}
.form-note { color: var(--ash); font-size: 0.95rem; max-width: 48ch; margin-top: 1.2rem; }
.form-note--confirm { color: var(--brass-bright); margin-top: 0.8rem; }

.direct-line {
  border: 1px solid rgba(156, 122, 60, 0.35);
  padding: 1.6rem 1.8rem;
  display: grid;
  gap: 0.5rem;
  margin-top: 2.4rem;
}
.direct-line .label { color: var(--ash); }
.direct-line a { font-family: var(--font-label); font-size: 0.9rem; letter-spacing: 0.06em; }

/* ---------- story band / cross-links ---------- */
.crosslink {
  border-top: var(--hairline);
  border-bottom: var(--hairline);
  text-align: center;
  padding-block: clamp(4rem, 9vw, 7rem);
}
.crosslink h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.2rem, 1.8rem + 3vw, 4.4rem);
  max-width: 20ch;
  margin-inline: auto;
  margin-bottom: 2.2rem;
}

/* ---------- footer ---------- */
.site-foot {
  position: relative;
  z-index: 2;
  border-top: var(--hairline);
  padding: clamp(3rem, 7vw, 5rem) var(--gutter) 2.2rem;
  background: linear-gradient(180deg, transparent, rgba(18, 16, 9, 0.9));
}
.foot-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
  margin-bottom: 3rem;
}
@media (max-width: 52rem) { .foot-grid { grid-template-columns: 1fr; } }
.foot-logo { width: min(250px, 100%); height: auto; margin-bottom: 1.2rem; }
.foot-tag { color: var(--ash); font-size: 0.98rem; max-width: 34ch; }
.foot-col h4 {
  font-family: var(--font-label);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ash);
  margin-bottom: 1.1rem;
}
.foot-col ul { list-style: none; padding: 0; display: grid; gap: 0.65rem; }
.foot-col a { text-decoration: none; color: var(--bone-dim); }
.foot-col a:hover { color: var(--brass-bright); }
.foot-base {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.8rem;
  border-top: var(--hairline);
  color: var(--ash);
  font-family: var(--font-label);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.site-foot .phase-strip { margin-bottom: 3rem; }

/* ---------- reveal on scroll (JS-gated) ---------- */
html.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease-drift), transform 0.9s var(--ease-drift);
}
html.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- candlelight cursor system ---------- */
/* layers are created by js/cursor.js only when (hover:hover)&(pointer:fine) */
.gloom, .halo {
  position: fixed;
  top: 0; left: 0;
  width: 340vmax; height: 340vmax;
  margin: -170vmax 0 0 -170vmax;
  pointer-events: none;
  will-change: transform;
}
.gloom {
  z-index: 40;
  background: radial-gradient(circle,
    transparent 0,
    transparent 170px,
    rgba(4, 3, 2, 0.16) 300px,
    rgba(4, 3, 2, 0.4) 560px,
    rgba(4, 3, 2, 0.46) 100%);
}
.halo {
  z-index: 41;
  mix-blend-mode: screen;
  background: radial-gradient(circle,
    rgba(201, 161, 92, 0.2) 0,
    rgba(156, 122, 60, 0.09) 170px,
    transparent 380px);
  transition: opacity 0.5s;
}
/* cursor layers sit above everything, including the sticky header */
#ember-canvas {
  position: fixed;
  inset: 0;
  z-index: 9990;
  pointer-events: none;
}
.flame-cursor {
  position: fixed;
  top: 0; left: 0;
  z-index: 9991;
  width: 30px; height: 36px;
  margin: -28px 0 0 -15px;
  pointer-events: none;
  will-change: transform;
  transition: opacity 0.4s;
}
.flame-cursor svg {
  width: 100%; height: 100%;
  overflow: visible;
  transform-origin: 50% 76%; /* physics transforms pivot at the flame base */
  will-change: transform;
}
.flame-cursor.is-keen svg { filter: brightness(1.35) drop-shadow(0 0 10px rgba(201,161,92,0.65)); }
body.cursor-lit,
body.cursor-lit a,
body.cursor-lit button,
body.cursor-lit input,
body.cursor-lit select,
body.cursor-lit textarea,
body.cursor-lit label { cursor: none; }

/* reduced motion: calmer, still complete */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.15s !important;
  }
  html.js .reveal { opacity: 1; transform: none; }
  .hero-mark { animation: none; }
  .hero-scroll::after { animation: none; transform: none; opacity: 0.6; }
}

/* touch devices: fully lit base state, no cursor conceit (belt & braces —
   JS also gates on input capability) */
@media (hover: none), (pointer: coarse) {
  .gloom, .halo, .flame-cursor, #ember-canvas { display: none !important; }
  body, body a, body button { cursor: auto; }
}

/* ---------- small screens ---------- */
@media (max-width: 52rem) {
  .specimen { grid-template-columns: 1fr; }
  .specimen:nth-child(even) { direction: ltr; }
  .plate { max-width: 24rem; width: 100%; margin-inline: auto; }
  .tag-card { --tag-w: 14rem; }
}

@media print {
  body::before, .gloom, .halo, .flame-cursor, #ember-canvas, #hero-field { display: none !important; }
  body { background: #fff; color: #000; }
}
