/* METANOIA — metanoiaftp.com
   Daylight resistance. Bone canvas, soot ink, one Protest Red per screen.
   Taste file: Metanoia HQ Resources/METANOIA-DNA.md (it wins). */

:root {
  --bone: #EDE6DA;
  --unbleached: #D9CFBF;
  --earth: #6B5138;
  --olive: #5A5A40;
  --soot: #26221E;
  --signal: #B3301B;
  --hairline: rgba(107, 81, 56, 0.3);
  --pill-h: 52px;
  --metabar-h: 44px;
  --gutter: clamp(20px, 4vw, 64px);
  --grain-opacity: 0.035;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: auto; }
body {
  background: var(--bone);
  color: var(--soot);
  font-family: 'Archivo', Helvetica, Arial, sans-serif;
  font-variation-settings: 'wdth' 100, 'wght' 450;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; background: none; border: none; cursor: pointer; color: inherit; }
::selection { background: var(--soot); color: var(--bone); }

/* Arabic companion */
[lang="ar"] { font-family: 'Noto Kufi Arabic', sans-serif; direction: rtl; }

/* ---------- type roles ---------- */
.placard {
  font-variation-settings: 'wdth' 63, 'wght' 900;
  font-weight: 900;
  text-transform: uppercase;
  line-height: 0.95;
  letter-spacing: -0.01em;
}
.subhead {
  font-variation-settings: 'wdth' 80, 'wght' 700;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.label {
  font-variation-settings: 'wdth' 100, 'wght' 500;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  color: var(--olive);
}
.label--ink { color: var(--soot); }

/* ---------- layers ---------- */
#dotfield {
  position: fixed; inset: 0;
  width: 100vw; height: 100dvh;
  z-index: 0; pointer-events: none;
}
.grain {
  position: fixed; inset: -50px;
  z-index: 9; pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}
.page { position: relative; z-index: 1; transition: filter 0.45s ease; }
body.menu-open .page { filter: blur(10px); }
body.golden .page { filter: sepia(0.05) saturate(1.03); }
body.menu-open.golden .page { filter: blur(10px) sepia(0.05); }

/* ---------- preloader ---------- */
#preloader {
  position: fixed; inset: 0; z-index: 100;
  background:
    radial-gradient(rgba(38, 34, 30, 0.16) 1px, transparent 1.5px) 0 0 / 14px 14px,
    var(--bone);
  display: flex; align-items: center; justify-content: center;
}
.pl-mark { position: relative; font-size: clamp(40px, 9vw, 120px); }
.pl-mark span {
  display: block; mix-blend-mode: multiply;
  position: absolute; inset: 0; white-space: nowrap;
}
.pl-mark span:nth-child(1) { color: var(--earth); position: relative; }
.pl-mark span:nth-child(2) { color: var(--olive); }
.pl-mark span:nth-child(3) { color: var(--soot); }
.pl-count {
  position: absolute; left: var(--gutter); bottom: calc(var(--metabar-h) + 18px);
  font-variation-settings: 'wdth' 63, 'wght' 900;
  font-size: clamp(28px, 5vw, 56px); text-transform: uppercase;
}
.pl-label {
  position: absolute; right: var(--gutter); bottom: calc(var(--metabar-h) + 26px);
}
body.loaded #preloader { display: none; }

/* ---------- nav pill ---------- */
#navpill {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  z-index: 50;
  width: min(560px, calc(100vw - 2 * var(--gutter)));
  background: var(--soot); color: var(--bone);
  border-radius: 4px;
  display: flex; align-items: center; justify-content: space-between;
  height: var(--pill-h); padding: 0 14px;
}
#navpill .label { color: var(--bone); }
#pill-mark { width: 42px; height: 42px; display: block; object-fit: contain; filter: grayscale(1) brightness(0) invert(1); }
#pill-label { flex: 1; text-align: center; font-size: 11px; white-space: nowrap; overflow: hidden; }
#pill-bag {
  color: var(--bone); font-size: 10px; white-space: nowrap;
  padding: 8px 12px; margin-right: 4px;
  border: 1px solid rgba(237, 230, 218, 0.3); border-radius: 2px;
  transition: border-color 0.25s ease;
}
#pill-bag:hover, #pill-bag.has-items { border-color: var(--bone); }
#burger { display: flex; flex-direction: column; gap: 5px; padding: 8px 2px; }
#burger i { display: block; width: 20px; height: 2px; background: var(--bone); transition: transform 0.35s ease, opacity 0.35s ease; }
body.menu-open #burger i:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
body.menu-open #burger i:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }

#menu {
  position: fixed; top: calc(16px + var(--pill-h) + 8px); left: 50%;
  transform: translateX(-50%) translateY(-8px);
  z-index: 49;
  width: min(560px, calc(100vw - 2 * var(--gutter)));
  background: var(--bone); color: var(--soot);
  border: 1px solid var(--hairline); border-radius: 4px;
  padding: 8px;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0.3s;
}
body.menu-open #menu {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateX(-50%) translateY(0);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
#menu a.menu-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 12px;
  border-bottom: 1px solid var(--hairline);
  font-variation-settings: 'wdth' 80, 'wght' 700;
  text-transform: uppercase; letter-spacing: 0.04em; font-size: 18px;
  clip-path: inset(0 0 0 0);
}
#menu a.menu-row .label { pointer-events: none; }
#menu .menu-cta {
  display: block; margin-top: 8px; padding: 16px 12px; text-align: center;
  background: var(--signal); color: var(--bone);
  font-variation-settings: 'wdth' 80, 'wght' 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  border-radius: 2px;
}

/* ---------- sections ---------- */
section { position: relative; padding: clamp(90px, 14vh, 160px) var(--gutter); }
.section-label { display: block; margin-bottom: 28px; }

/* hero */
#hero {
  min-height: 100dvh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding-bottom: calc(var(--metabar-h) + 48px);
  overflow: hidden;
}
#hero .hero-media {
  position: absolute; inset: 0; z-index: -1;
}
#hero .hero-media > video,
#hero .hero-media > img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(0.92);
}
#hero .hero-media > video { z-index: 0; opacity: 0; }
#hero .hero-media > img {
  z-index: 1;
  transition: opacity 0.3s ease;
}
#hero .hero-media.is-video-playing > video { opacity: 1; }
#hero .hero-media.is-video-playing > img { opacity: 0; }
/* stationary print screen: same 16px/1.3px grid as the dotfield canvas,
   phase-aligned to it; main.js counter-translates so it holds still in
   viewport space while the photo scrolls underneath */
#hero .hero-media .shade {
  position: absolute; inset: 0; z-index: 2;
  background-image: radial-gradient(circle, rgba(38, 34, 30, 0.38) 1.3px, transparent 1.7px);
  background-size: 16px 16px;
  mix-blend-mode: multiply;
  will-change: transform;
  pointer-events: none;
}
/* scroll-driven halftone derez (js/halftone.js paints it); sits over the
   photo and the shade, under the ::after wash */
#hero .hero-media canvas.halftone {
  position: absolute; inset: 0; z-index: 3;
  width: 100%; height: 100%;
  pointer-events: none;
}
#hero .hero-media::after {
  content: ''; position: absolute; inset: 0; z-index: 4;
  background: linear-gradient(180deg, rgba(237, 230, 218, 0.28) 0%, rgba(237, 230, 218, 0) 40%, rgba(237, 230, 218, 0.55) 88%, var(--bone) 100%);
  pointer-events: none;
}
#hero h1 {
  font-size: clamp(44px, 8.6vw, 148px);
  max-width: 14ch;
  mix-blend-mode: multiply;
}
#hero .hero-row {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; flex-wrap: wrap; margin-top: 40px;
}

/* statement */
#why .statement {
  font-variation-settings: 'wdth' 75, 'wght' 900;
  font-weight: 900; text-transform: uppercase;
  font-size: clamp(26px, 4.6vw, 64px);
  line-height: 1.08; max-width: 22ch;
  text-indent: 2.2em;
}
/* text-indent inherits into each inline-block word and indents it internally;
   zero it on the words so only the container's first line carries the indent */
#why .statement .w { opacity: 0.22; display: inline-block; text-indent: 0; }
#why .side-label { position: absolute; right: var(--gutter); bottom: clamp(90px, 14vh, 160px); }

/* shop rail: a solid field lets the pieces breathe apart from the editorial dot field */
#shop { background: var(--bone); }
#shop h2 { font-size: clamp(40px, 7vw, 110px); margin-bottom: 12px; }
#shop .shop-intro { max-width: 46ch; color: var(--olive); margin-bottom: 56px; }
.artifact { border-top: 1px solid var(--hairline); }
.artifact:last-of-type { border-bottom: 1px solid var(--hairline); }
.artifact-head {
  width: 100%;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 0.62fr);
  gap: clamp(12px, 3vw, 40px); align-items: center;
  padding: 22px 0; text-align: left;
}
.artifact-toggle {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(150px, 0.55fr) 48px;
  gap: clamp(12px, 3vw, 40px); align-items: center;
  text-align: left; padding: 0;
}
.artifact-head h3 {
  font-variation-settings: 'wdth' 63, 'wght' 900;
  font-weight: 900; text-transform: uppercase; line-height: 1;
  font-size: clamp(20px, 2.6vw, 34px);
}
.artifact .tags { display: flex; gap: 8px; flex-wrap: wrap; }
.artifact .tag {
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  font-variation-settings: 'wdth' 100, 'wght' 500;
  border: 1px solid var(--hairline); padding: 4px 8px; border-radius: 2px;
  color: var(--olive);
}
.artifact .plus {
  font-variation-settings: 'wdth' 100, 'wght' 500;
  font-size: 12px; letter-spacing: 0.14em; color: var(--olive);
  justify-self: end;
}
/* single placeholder frame: hover cycles the other shots, press opens the gallery */
.artifact .frame {
  position: relative; display: block; padding: 0;
  justify-self: stretch;
  aspect-ratio: 4 / 3;
  border-radius: 2px; overflow: hidden;
  background: var(--unbleached);
  transform: translateZ(0);
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.artifact .frame::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  border: 1px solid var(--hairline); border-radius: 2px;
}
.artifact .frame:hover, .artifact .frame:focus-visible { transform: scale(1.012); }
.artifact .frame:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }
.frame-stack { position: absolute; inset: 0; display: block; }
.frame-stack img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.frame-stack img.is-on { opacity: 1; }
.frame-stack img.crop-top { object-position: top; }
.frame-cue {
  position: absolute; left: 14px; bottom: 12px; z-index: 2;
  font-variation-settings: 'wdth' 100, 'wght' 500;
  font-size: 10px; letter-spacing: 0.16em; color: var(--bone);
  padding: 5px 9px; border: 1px solid rgba(237, 230, 218, 0.5);
  border-radius: 2px; background: rgba(38, 34, 30, 0.3);
  opacity: 0; transform: translateY(6px);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.artifact .frame:hover .frame-cue,
.artifact .frame:focus-visible .frame-cue { opacity: 1; transform: translateY(0); }
.frame-meta {
  position: absolute; right: 14px; bottom: 12px; z-index: 2;
  display: flex; align-items: center; gap: 10px;
}
.frame-count {
  font-variation-settings: 'wdth' 80, 'wght' 700;
  font-size: 10px; letter-spacing: 0.12em; color: var(--bone);
  text-shadow: 0 1px 3px rgba(38, 34, 30, 0.55);
}
.frame-tick {
  display: block; width: 44px; height: 1px;
  background: rgba(237, 230, 218, 0.4); overflow: hidden;
}
.frame-tick i {
  display: block; width: 100%; height: 100%; background: var(--bone);
  transform: scaleX(0); transform-origin: left center;
}
.frame-tick i.run { transform: scaleX(1); transition: transform 1.5s linear; }
.artifact-body {
  overflow: hidden; height: 0;
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.6fr);
  gap: clamp(12px, 3vw, 40px);
}
.artifact-body .conviction {
  padding: 0 0 26px; color: var(--earth); max-width: 40ch;
}
.artifact-body .buy { padding: 0 0 26px; }
.price {
  font-variation-settings: 'wdth' 80, 'wght' 700;
  letter-spacing: 0.04em; white-space: nowrap;
}

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border: 1px solid var(--soot); border-radius: 2px;
  font-variation-settings: 'wdth' 80, 'wght' 700;
  font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; font-size: 13px;
  transition: background 0.25s ease, color 0.25s ease;
}
.btn .arr { transition: transform 0.25s ease; }
.btn:hover .arr { transform: translate(2px, -2px); }
.btn--signal {
  background: var(--signal); border-color: var(--signal); color: var(--bone);
}
.btn--ghost:hover { background: var(--soot); color: var(--bone); }
.btn[disabled] { cursor: default; opacity: 0.85; }

/* ---------- shop: size picker (js/shop.js builds it) ---------- */
.buy .size-label { display: block; margin-bottom: 10px; }
.sizes { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.sizes .size {
  min-width: 46px; padding: 9px 12px;
  border: 1px solid var(--hairline); border-radius: 2px;
  font-variation-settings: 'wdth' 100, 'wght' 500;
  font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--soot);
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.sizes .size:hover:not([disabled]) { border-color: var(--soot); }
.sizes .size.is-on { background: var(--soot); border-color: var(--soot); color: var(--bone); }
/* sold out reads as struck from the sheet. Struck, not dimmed: fading it
   would drop a real piece of information below AA contrast */
.sizes .size[disabled] {
  cursor: default; color: var(--olive);
  border-style: dashed;
  text-decoration: line-through; text-decoration-thickness: 1px;
}
.buy .buy-note { display: block; margin-top: 12px; color: var(--signal); }
.buy .buy-note:empty { margin-top: 0; }

/* ---------- the bag ---------- */
#bag { position: fixed; inset: 0; z-index: 60; visibility: hidden; }
body.bag-open #bag { visibility: visible; }
.bag-scrim {
  position: absolute; inset: 0;
  background: rgba(38, 34, 30, 0.42);
  opacity: 0; transition: opacity 0.4s ease;
}
body.bag-open .bag-scrim { opacity: 1; }
.bag-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(420px, 100vw);
  background: var(--bone);
  border-left: 1px solid var(--hairline);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
body.bag-open .bag-panel { transform: none; }
.bag-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px var(--gutter);
  border-bottom: 1px solid var(--hairline);
}
.bag-x {
  font-variation-settings: 'wdth' 100, 'wght' 500;
  font-size: 12px; letter-spacing: 0.14em; color: var(--olive);
}
.bag-x:hover { color: var(--soot); }
.bag-empty { padding: 40px var(--gutter); }
.bag-lines { list-style: none; overflow-y: auto; flex: 1; padding: 0 var(--gutter); }
.bag-lines li {
  display: grid; grid-template-columns: 64px 1fr auto;
  gap: 16px; align-items: center;
  padding: 18px 0; border-bottom: 1px solid var(--hairline);
  transition: opacity 0.2s ease;
}
.bag-lines li.is-busy { opacity: 0.4; }
.bag-lines img, .bag-noimg {
  width: 64px; height: 78px; object-fit: cover;
  border-radius: 2px; background: var(--unbleached);
}
.bag-meta h4 {
  font-variation-settings: 'wdth' 63, 'wght' 900;
  font-weight: 900; text-transform: uppercase;
  font-size: 17px; line-height: 1;
}
.bag-meta .label { display: block; margin: 5px 0 6px; }
.bag-meta .price { font-size: 14px; }
.bag-qty { display: flex; align-items: center; gap: 10px; }
.bag-qty button {
  width: 26px; height: 26px;
  border: 1px solid var(--hairline); border-radius: 2px;
  line-height: 1; color: var(--soot);
  transition: border-color 0.2s ease;
}
.bag-qty button:hover:not([disabled]) { border-color: var(--soot); }
.bag-qty button[disabled] { opacity: 0.35; cursor: default; }
.bag-qty span { font-size: 13px; min-width: 12px; text-align: center; }
.bag-foot { padding: 22px var(--gutter) 28px; border-top: 1px solid var(--hairline); }
.bag-sum { display: flex; align-items: baseline; justify-content: space-between; }
.bag-sum .price { font-size: 20px; }
.bag-note { display: block; margin: 10px 0 18px; }
/* the one dominant CTA on this surface */
.bag-go { width: 100%; justify-content: center; }

@media (max-width: 760px) {
  .bag-panel { width: 100vw; }
}

@media (prefers-reduced-motion: reduce) {
  .bag-panel, .bag-scrim { transition: none; }
  .sizes .size, .bag-qty button, .bag-lines li { transition: none; }
}

/* marquee */
#marquee { padding: clamp(50px, 8vh, 90px) 0; overflow: hidden; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.marquee-track {
  display: flex; gap: 0; width: max-content;
  animation: marquee 60s linear infinite;
}
#marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
  font-variation-settings: 'wdth' 63, 'wght' 900;
  font-weight: 900; text-transform: uppercase;
  font-size: clamp(40px, 7vw, 110px); line-height: 1; white-space: nowrap;
  color: transparent; -webkit-text-stroke: 1.5px var(--soot);
  padding-right: 0.6em;
}
/* each language is its own word: outline by default, solid on the alternates,
   so the belt reads as a rhythm of hollow/filled prints of the same name */
.marquee-track i {
  font-style: normal;
  -webkit-text-stroke: 0; color: transparent;
  background: none;
}
.marquee-track i:not(.solid) { -webkit-text-stroke: 1.5px var(--soot); color: transparent; }
.marquee-track i.solid { color: var(--soot); -webkit-text-stroke: 0; }
/* non-Latin scripts fall outside the condensed display face; give them a
   heavy system stack so they stay bold and sit on the same baseline */
.marquee-track i[lang="ar"],
.marquee-track i[lang="am"],
.marquee-track i[lang="ru"],
.marquee-track i[lang="el"],
.marquee-track i[lang="ko"],
.marquee-track i[lang="ja"],
.marquee-track i[lang="hi"] {
  font-variation-settings: normal;
  font-weight: 800;
  font-family: system-ui, "Segoe UI", "Noto Sans", sans-serif;
  text-transform: none;
}
.marquee-track i[lang="ar"] { font-family: "Segoe UI", "Noto Naskh Arabic", system-ui, sans-serif; }
.marquee-track i[lang="am"] { font-family: "Noto Sans Ethiopic", "Nyala", system-ui, sans-serif; }
.marquee-track i[lang="ja"] { font-family: "Yu Gothic", "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif; }
.marquee-track i[lang="ko"] { font-family: "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif; }
.marquee-track i[lang="hi"] { font-family: "Nirmala UI", "Noto Sans Devanagari", system-ui, sans-serif; }
.marquee-track i[lang="am"] { font-family: "Nyala", "Noto Sans Ethiopic", system-ui, sans-serif; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* universe */

/* out-there film band: footage dissolving into bone, riso ink running out at the sheet's edge */
.bleed {
  position: relative;
  margin: 0 calc(-1 * var(--gutter)) 44px;
  height: min(76vh, 640px);
  height: min(76svh, 640px);
  overflow: hidden;
  background: var(--unbleached);
}
.bleed video {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.bleed .bleed-caption {
  position: absolute; left: var(--gutter); bottom: 16px; z-index: 2;
}
/* three interleaved opaque dot layers = a true dither density ramp, not a gray veil.
   pure paint, zero runtime */
.dissolve { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.dissolve::before, .dissolve::after { content: ""; }
.dissolve::before, .dissolve::after, .dissolve i {
  position: absolute; inset: 0; display: block;
}
.dissolve::before {
  background: radial-gradient(circle, var(--bone) 0.8px, transparent 1px) 0 0 / 5px 5px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 46%, var(--soot) 58%);
          mask-image: linear-gradient(to bottom, transparent 46%, var(--soot) 58%);
}
.dissolve::after {
  background: radial-gradient(circle, var(--bone) 1.2px, transparent 1.4px) 2px 3px / 5px 5px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 58%, var(--soot) 70%);
          mask-image: linear-gradient(to bottom, transparent 58%, var(--soot) 70%);
}
.dissolve i {
  background:
    linear-gradient(to bottom, transparent 86%, var(--bone) 97%),
    radial-gradient(circle, var(--bone) 1.7px, transparent 1.9px) 1px 1px / 5px 5px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 70%, var(--soot) 84%);
          mask-image: linear-gradient(to bottom, transparent 70%, var(--soot) 84%);
}

#universe .grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start;
}
#universe .grid figure { overflow: hidden; border-radius: 2px; }
#universe .grid img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3 / 4; }
#universe figcaption { padding-top: 10px; }
#universe .history {
  margin-top: 56px; max-width: 52ch; color: var(--earth);
}

/* join / footer */
#join { padding-bottom: 0; }
#join h2 { font-size: clamp(34px, 6vw, 96px); max-width: 16ch; margin-bottom: 48px; }
#join form { display: flex; gap: 10px; max-width: 520px; flex-wrap: wrap; }
#join input[type="email"] {
  flex: 1 1 260px; padding: 14px 16px;
  background: transparent; border: 1px solid var(--soot); border-radius: 2px;
  font: inherit; color: var(--soot);
}
#join input[type="email"]::placeholder { color: var(--olive); }
#join .form-note { margin-top: 14px; }
.info-cols {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(24px, 4vw, 56px);
  margin-top: 72px;
}
.info-col .section-label { display: block; }
.info-col p { margin-top: 12px; max-width: 40ch; color: var(--earth); }
.info-col p a { color: var(--soot); border-bottom: 1px solid var(--hairline); }
.info-col p a:hover { border-bottom-color: var(--soot); }
.footer-nav {
  display: flex; gap: 28px; flex-wrap: wrap;
  margin: 72px 0 24px;
}
.seller-line { font-size: 10px; line-height: 1.8; margin-bottom: 40px; }
.big-wordmark {
  font-size: clamp(64px, 14.5vw, 260px);
  line-height: 0.9; text-align: center;
  margin: 0 calc(-1 * var(--gutter));
  padding-bottom: calc(var(--metabar-h) + 24px);
  user-select: none;
}

/* ---------- metadata bar ---------- */
#metabar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  height: var(--metabar-h);
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; padding: 0 var(--gutter);
  background: var(--bone);
  border-top: 1px solid var(--hairline);
  font-size: 11px;
}
#metabar .label { font-size: 10px; }
#metabar .clock-dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--signal); margin-right: 6px;
  animation: blink 1.6s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0.15; } }
#red-thread {
  position: absolute; top: -1px; left: 0; height: 2px; width: 100%;
  background: var(--signal);
  transform: scaleX(0); transform-origin: left center;
}
#metabar .meta-right { display: flex; gap: 18px; align-items: center; }
#metabar .hide-sm { display: inline; }

/* cursor chip */
#cursor-chip {
  position: fixed; z-index: 45; top: 0; left: 0;
  padding: 8px 12px; border-radius: 2px;
  background: var(--soot); color: var(--bone);
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  font-variation-settings: 'wdth' 100, 'wght' 500;
  pointer-events: none; opacity: 0;
  transform: translate(-50%, -140%);
  white-space: nowrap;
}

/* reveals (JS adds .in) */
.reveal { opacity: 0; transform: translateY(28px); }
.reveal.in { opacity: 1; transform: none; transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1); }
.hairline {
  position: absolute; top: 0; left: var(--gutter); right: var(--gutter);
  height: 1px; background: var(--hairline);
}
.hairline-draw { transform-origin: left center; transform: scaleX(0); }
.hairline-draw.in { transform: scaleX(1); transition: transform 1s cubic-bezier(0.22, 1, 0.36, 1); }

/* ---------- lightbox ---------- */
body.lightbox-open { overflow: hidden; }
#lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.4s ease;
}
#lightbox[hidden] { display: none; }
#lightbox.in { opacity: 1; }
#lightbox .lb-veil { position: absolute; inset: 0; background: rgba(38, 34, 30, 0.94); }
.lb-shell {
  position: relative; z-index: 1;
  width: min(1180px, 100%); height: 100%;
  padding: clamp(16px, 3vh, 30px) var(--gutter);
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  gap: clamp(10px, 2vh, 20px);
}
.lb-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.lb-title { color: var(--bone); font-variation-settings: 'wdth' 63, 'wght' 900; font-size: 15px; }
.lb-close { color: var(--bone); padding: 6px 0; }
.lb-close:hover { color: var(--signal); }
.lb-stage { display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; align-items: center; gap: 8px; }
.lb-canvas { height: 100%; display: flex; align-items: center; justify-content: center; }
.lb-img {
  max-width: 100%; max-height: 100%; width: auto; height: auto;
  object-fit: contain; border-radius: 2px;
  opacity: 0; transform: scale(0.985);
  transition: opacity 0.45s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.lb-img.in { opacity: 1; transform: scale(1); }
.lb-nav {
  color: var(--bone); font-size: 30px; line-height: 1;
  height: 64px; width: 44px; border: 1px solid rgba(237, 230, 218, 0.22);
  border-radius: 2px; opacity: 0.72;
  transition: opacity 0.25s ease, border-color 0.25s ease;
}
.lb-nav:hover { opacity: 1; border-color: var(--signal); }
.lb-nav[hidden] { visibility: hidden; }
.lb-foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.lb-count { color: var(--bone); font-variation-settings: 'wdth' 80, 'wght' 700; }
.lb-film { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.lb-film::-webkit-scrollbar { display: none; }
.lb-film button {
  flex: 0 0 auto; width: 62px; height: 46px; padding: 0;
  border: 1px solid rgba(237, 230, 218, 0.24); border-radius: 2px; overflow: hidden;
  opacity: 0.45; transition: opacity 0.3s ease, border-color 0.3s ease;
}
.lb-film button img { width: 100%; height: 100%; object-fit: cover; }
.lb-film button:hover { opacity: 0.8; }
.lb-film button.is-on { opacity: 1; border-color: var(--bone); }
.lb-film[hidden] { display: none; }

/* ---------- mobile ---------- */
@media (max-width: 760px) {
  .artifact-head { grid-template-columns: 1fr; grid-template-rows: auto auto; }
  .artifact-toggle { grid-template-columns: 1fr auto; grid-template-rows: auto auto; }
  .artifact-toggle .tags { grid-column: 1 / -1; grid-row: 2; }
  .artifact .frame { grid-row: 2; margin-bottom: 4px; aspect-ratio: 5 / 4; }
  .artifact .frame-cue { opacity: 1; transform: none; }
  .lb-stage { grid-template-columns: minmax(0, 1fr); }
  .lb-nav { display: none; }
  .artifact-body { grid-template-columns: 1fr; }
  .bleed { height: min(58vh, 480px); height: min(58svh, 480px); margin-bottom: 32px; }
  .dissolve::before {
    -webkit-mask-image: linear-gradient(to bottom, transparent 54%, var(--soot) 65%);
            mask-image: linear-gradient(to bottom, transparent 54%, var(--soot) 65%);
  }
  .dissolve::after {
    -webkit-mask-image: linear-gradient(to bottom, transparent 65%, var(--soot) 76%);
            mask-image: linear-gradient(to bottom, transparent 65%, var(--soot) 76%);
  }
  .dissolve i {
    -webkit-mask-image: linear-gradient(to bottom, transparent 76%, var(--soot) 88%);
            mask-image: linear-gradient(to bottom, transparent 76%, var(--soot) 88%);
  }
  #metabar .hide-sm { display: none; }
  #why .side-label { position: static; display: block; margin-top: 32px; }
  #hero .hero-row .label { flex-basis: 100%; }
  #cursor-chip { display: none; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  #metabar .clock-dot { animation: none; }
  .reveal, .hairline-draw { opacity: 1 !important; transform: none !important; transition: none !important; }
  .page, body.menu-open .page { transition: none; }
  #menu { transition: none; }
  #cursor-chip { display: none; }
  #hero .hero-media > img { transition: none; }
  .artifact .frame, .frame-stack img, .frame-cue, .lb-img, #lightbox { transition: none !important; }
  .artifact .frame:hover { transform: none; }
  .frame-tick { display: none; }
}
