/* ══════════════════════════════════════════════
   מעבדת אותיות — Hebrew Type Lab
   Palette: paper / ink / vermillion
   ══════════════════════════════════════════════ */

:root {
  --paper: #EDE6D6;
  --paper-2: #E3DAC4;
  --ink: #16130E;
  --ink-2: #262019;
  --red: #E8401C;
  --muted: rgba(22, 19, 14, 0.55);
  --muted-l: rgba(237, 230, 214, 0.5);
  --f-display: 'Noto Sans Hebrew', 'Heebo', sans-serif;
  --f-ui: 'Heebo', sans-serif;
  --f-mono: 'IBM Plex Mono', monospace;
  --line: 2px solid var(--ink);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: var(--f-ui);
  background: var(--paper);
  color: var(--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* paper grain */
body::after {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 999;
  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)'/%3E%3C/svg%3E");
}

.mono { font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.04em; }

::selection { background: var(--red); color: var(--paper); }

/* ══════════ LOADER ══════════ */
.loader {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--ink);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 1.4rem;
  transition: transform 0.7s cubic-bezier(0.76, 0, 0.24, 1);
}
.loader.done { transform: translateY(-101%); }
.loader-letter {
  font-family: var(--f-display);
  font-variation-settings: 'wght' 900, 'wdth' 100;
  font-size: clamp(5rem, 18vw, 11rem);
  line-height: 1;
  color: var(--paper);
}
.loader-tag { color: var(--muted-l); }

/* ══════════ HEADER ══════════ */
.site-header {
  position: fixed; top: 0; right: 0; left: 0;
  z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 2rem;
  mix-blend-mode: difference;
  color: var(--paper);
}
.logo {
  font-family: var(--f-display);
  font-variation-settings: 'wght' 300;
  font-size: 1.25rem;
  color: var(--paper);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.logo b { font-variation-settings: 'wght' 900; font-weight: normal; }
.site-nav { display: flex; gap: 1.6rem; }
.site-nav a {
  color: var(--paper);
  text-decoration: none;
  font-size: 0.85rem;
  position: relative;
  padding-bottom: 2px;
}
.site-nav a::after {
  content: '';
  position: absolute; bottom: 0; right: 0;
  width: 0; height: 1.5px;
  background: currentColor;
  transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.site-nav a:hover::after, .site-nav a.active::after { width: 100%; }
.nav-guide { border: 1px solid currentColor; border-radius: 99px; padding: 0.15rem 0.7rem 0.25rem; }
.nav-guide::after { display: none; }

/* ══════════ HERO ══════════ */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  overflow: hidden;
  border-bottom: var(--line);
  cursor: crosshair;
}
.hero-ghost {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-display);
  font-variation-settings: 'wght' 200, 'wdth' 100;
  font-size: min(110vw, 130vh);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(232, 64, 28, 0.35);
  pointer-events: none;
  user-select: none;
  will-change: transform;
}
.hero-cross {
  position: absolute;
  background: rgba(22, 19, 14, 0.22);
  pointer-events: none;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.hero-cross-v { top: 0; bottom: 0; width: 1px; left: 50%; }
.hero-cross-h { right: 0; left: 0; height: 1px; top: 50%; }
.hero-cursor-tag {
  position: absolute;
  top: 0; left: 0;
  z-index: 3;
  background: var(--ink);
  color: var(--paper);
  padding: 0.25rem 0.55rem;
  border-radius: 3px;
  pointer-events: none;
  white-space: nowrap;
  direction: ltr;
  opacity: 0;
  transition: opacity 0.5s ease;
  margin: 18px 0 0 14px;
}
.hero.aim .hero-cross, .hero.aim .hero-cursor-tag { opacity: 1; }
@media (hover: none) {
  .hero-cross, .hero-cursor-tag { display: none; }
}

.hero-frame {
  position: relative; z-index: 2;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column;
  justify-content: space-between;
  padding: 5.2rem 2rem 2rem;
}
.hero-meta { display: flex; justify-content: space-between; color: var(--muted); }
.hero-stage {
  flex: 1;
  position: relative;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  pointer-events: none;
}
.hero-letter-caption {
  color: var(--muted);
  margin-top: -0.4rem;
}
.hero-cue {
  color: var(--muted);
  animation: bob 2.4s ease-in-out infinite;
}
.hero-letter {
  pointer-events: auto;
  background: none; border: none; cursor: pointer;
  font-family: var(--f-display);
  font-variation-settings: 'wght' 400, 'wdth' 100;
  font-size: min(44vw, 52vh);
  line-height: 0.95;
  color: var(--ink);
  padding: 0 0.1em;
  user-select: none;
  will-change: font-variation-settings;
}
.hero-meta-bottom {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 1rem;
}
.hero-readout { display: flex; gap: 1.2rem; color: var(--muted); font-size: 0.78rem; }
.hero-readout b { color: var(--red); font-weight: 500; }
.hero-title {
  font-family: var(--f-display);
  font-variation-settings: 'wght' 800;
  font-weight: normal;
  font-size: clamp(1.4rem, 2.6vw, 2.1rem);
  line-height: 1.1;
  text-align: center;
}
.hero-title em { font-style: normal; color: var(--red); }
.hero-hint {
  justify-self: end;
  max-width: 180px;
  font-size: 0.78rem;
  color: var(--muted);
  text-align: left;
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ══════════ MARQUEE ══════════ */
.marquee {
  overflow: hidden;
  border-bottom: var(--line);
  background: var(--paper-2);
  padding: 0.9rem 0;
}
.marquee-ink { background: var(--red); border-top: var(--line); }
.marquee-ink .marquee-track { color: var(--paper); -webkit-text-stroke: 0; }
.marquee-track {
  display: inline-flex;
  white-space: nowrap;
  font-family: var(--f-display);
  font-variation-settings: 'wght' 850;
  font-size: clamp(1.6rem, 4vw, 3rem);
  line-height: 1.1;
  color: var(--ink);
  will-change: transform;
  animation: slide 26s linear infinite;
}
.marquee-reverse { animation-direction: reverse; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee { cursor: default; }
@keyframes slide {
  from { transform: translateX(0); }
  to { transform: translateX(50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .hero-scrolldown { animation: none; }
}

/* ══════════ AXIS PANELS ══════════ */
.panel { position: relative; }
.panel-ink { background: var(--ink); color: var(--paper); }
.panel-sticky {
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column;
  justify-content: space-between;
  padding: 5.2rem 2rem 2.6rem;
}
.panel-meta {
  display: flex; justify-content: space-between;
  color: var(--muted-l);
}
.axis-word {
  font-family: var(--f-display);
  font-variation-settings: 'wght' 100, 'wdth' 100;
  font-size: min(26vw, 34vh);
  line-height: 1;
  text-align: center;
  margin: auto 0;
  will-change: font-variation-settings;
  user-select: none;
}
.axis-word-red { color: var(--red); font-variation-settings: 'wght' 700, 'wdth' 100; }
.axis-instrument {
  display: flex; align-items: center; gap: 1rem;
  color: var(--muted-l);
}
.axis-bar {
  flex: 1; height: 2px;
  background: rgba(237, 230, 214, 0.18);
  position: relative;
}
.axis-fill {
  position: absolute; top: -1px; left: 0;
  height: 4px; width: 0%;
  background: var(--paper);
}
.axis-fill-red { background: var(--red); }
.axis-val { font-size: 1.5rem; color: var(--paper); min-width: 4ch; text-align: left; font-weight: 500; }
.axis-val-red { color: var(--red); }
.axis-caption {
  margin-top: 1.2rem;
  max-width: 340px;
  color: var(--muted-l);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ══════════ LETTERS GRID ══════════ */
.letters { padding: 7rem 2rem 6rem; border-bottom: var(--line); }
.section-head { max-width: 720px; margin-bottom: 3.4rem; }
.section-head .mono { color: var(--red); display: block; margin-bottom: 0.9rem; }
.section-head h2 {
  font-family: var(--f-display);
  font-variation-settings: 'wght' 900;
  font-weight: normal;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 1.02;
  margin-bottom: 1.1rem;
}
.section-head p { color: var(--muted); max-width: 420px; line-height: 1.65; }
.section-head-light p { color: var(--muted-l); }

.letter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  border-top: var(--line);
  border-right: var(--line);
}
.letter-cell {
  aspect-ratio: 1;
  border-bottom: var(--line);
  border-left: var(--line);
  background: none;
  cursor: pointer;
  position: relative;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-display);
  font-variation-settings: 'wght' 300, 'wdth' 100;
  font-size: clamp(2.6rem, 5.4vw, 4.4rem);
  color: var(--ink);
  transition:
    font-variation-settings 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.3s ease, color 0.3s ease;
  overflow: hidden;
}
.letter-cell .cell-idx {
  position: absolute; top: 0.5rem; right: 0.6rem;
  font-family: var(--f-mono);
  font-size: 0.62rem;
  color: var(--muted);
  transition: color 0.3s ease;
}
.letter-cell .cell-name {
  position: absolute;
  bottom: 0.55rem; right: 0; left: 0;
  text-align: center;
  font-family: var(--f-mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  color: var(--red);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.letter-cell:hover, .letter-cell:focus-visible {
  background: var(--ink);
  color: var(--paper);
  font-variation-settings: 'wght' 900, 'wdth' 70;
  outline: none;
}
.letter-cell:active { font-variation-settings: 'wght' 900, 'wdth' 62.5; }
.letter-cell:hover .cell-idx { color: var(--red); }
.letter-cell:hover .cell-name, .letter-cell:focus-visible .cell-name {
  opacity: 1; transform: translateY(0);
}
.letter-cell--sofit .cell-idx { color: var(--red); }
.letter-cell--sofit { color: var(--red); }
.letter-cell--sofit:hover, .letter-cell--sofit:focus-visible {
  background: var(--red);
  color: var(--paper);
}
.letter-cell--sofit:hover .cell-idx, .letter-cell--sofit:hover .cell-name { color: var(--paper); }

/* ══════════ ANATOMY STATION ══════════ */
.anatomy {
  padding: 7rem 2rem 6rem;
  border-bottom: var(--line);
  background: var(--paper-2);
}
.anatomy-lab {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 1fr);
  gap: 3rem;
  align-items: center;
}
.anatomy-stage {
  position: relative;
  border: var(--line);
  background: var(--paper);
  border-radius: 14px;
  padding: 1rem 1rem 3.6rem;
  box-shadow: 0 24px 60px -30px rgba(22, 19, 14, 0.4);
}
#anatomySvg { display: block; width: 100%; height: auto; }
.anatomy-glyph {
  font-family: var(--f-display);
  font-variation-settings: 'wght' 900, 'wdth' 100;
  font-size: 460px;
  fill: var(--ink);
  transition: font-variation-settings 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  user-select: none;
}
.an-guide {
  stroke: rgba(22, 19, 14, 0.3);
  stroke-width: 1;
  stroke-dasharray: 6 6;
}
.an-guide-tag {
  font-family: var(--f-mono);
  font-size: 15px;
  fill: var(--muted);
}
.an-line {
  fill: none;
  stroke: var(--red);
  stroke-width: 2;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}
.an-dot {
  fill: none;
  stroke: var(--red);
  stroke-width: 2;
}
.an-label {
  font-family: var(--f-mono);
  font-size: 19px;
  font-weight: 500;
  fill: var(--red);
}
.an-label-end { text-anchor: end; }
.an { transition: opacity 0.3s ease; }
#anatomySvg.focused .an { opacity: 0.16; }
#anatomySvg.focused .an.hot { opacity: 1; }
.an.hot .an-dot { fill: var(--red); }

.anatomy-weights {
  position: absolute;
  bottom: 1rem; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 0.5rem;
}
.aw-chip {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  background: none;
  border: 1.5px solid rgba(22, 19, 14, 0.35);
  border-radius: 99px;
  color: var(--ink);
  padding: 0.32rem 0.9rem;
  cursor: pointer;
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.15s;
}
.aw-chip:hover { border-color: var(--ink); transform: translateY(-2px); }
.aw-chip:active { transform: scale(0.94); }
.aw-chip[aria-checked="true"] {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.anatomy-list {
  list-style: none;
  counter-reset: part;
  display: flex; flex-direction: column;
}
.anatomy-list li {
  counter-increment: part;
  position: relative;
  padding: 1.05rem 2.4rem 1.05rem 0.4rem;
  border-bottom: 1px solid rgba(22, 19, 14, 0.18);
  cursor: pointer;
  transition: background 0.25s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  outline: none;
}
.anatomy-list li:first-child { border-top: 1px solid rgba(22, 19, 14, 0.18); }
.anatomy-list li::before {
  content: '0' counter(part);
  position: absolute;
  top: 1.2rem; right: 0.2rem;
  font-family: var(--f-mono);
  font-size: 0.68rem;
  color: var(--muted);
  transition: color 0.25s;
}
.anatomy-list b {
  display: block;
  font-family: var(--f-display);
  font-variation-settings: 'wght' 800;
  font-weight: normal;
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
  transition: color 0.25s;
}
.anatomy-list span {
  display: block;
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: 42ch;
}
.anatomy-list li:hover, .anatomy-list li:focus-visible, .anatomy-list li.hot {
  background: rgba(237, 230, 214, 0.75);
  transform: translateX(-4px);
}
.anatomy-list li:hover b, .anatomy-list li:focus-visible b, .anatomy-list li.hot b { color: var(--red); }
.anatomy-list li:hover::before, .anatomy-list li.hot::before { color: var(--red); }

/* ══════════ TWINS STATION ══════════ */
.twins {
  padding: 7rem 2rem 6.5rem;
  border-bottom: var(--line);
}
.twins-lab { display: flex; flex-direction: column; gap: 1.4rem; }
.twins-pairs { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.pair-chip {
  font-family: var(--f-display);
  font-variation-settings: 'wght' 600;
  font-size: 1.05rem;
  background: none;
  border: 1.5px solid rgba(22, 19, 14, 0.35);
  border-radius: 99px;
  color: var(--ink);
  padding: 0.4rem 1.15rem 0.5rem;
  cursor: pointer;
  transition: background 0.25s, color 0.25s, border-color 0.25s,
    transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.pair-chip:hover { border-color: var(--ink); transform: translateY(-3px); }
.pair-chip:active { transform: scale(0.93); }
.pair-chip[aria-selected="true"] {
  background: var(--ink); color: var(--paper); border-color: var(--ink);
}
.twins-stage {
  position: relative;
  border: var(--line);
  border-radius: 14px;
  background: var(--paper-2);
  min-height: clamp(300px, 44vh, 420px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 clamp(1rem, 10vw, 11rem);
  overflow: hidden;
  box-shadow: 0 24px 60px -34px rgba(22, 19, 14, 0.45);
}
.twins-corner {
  position: absolute; top: 0.85rem; right: 1.1rem; left: 1.1rem;
  display: flex; justify-content: space-between;
  color: var(--muted);
  pointer-events: none;
}
.twin {
  display: flex; flex-direction: column;
  align-items: center; gap: 0.5rem;
  padding: 2.4rem 0 1.6rem;
  min-width: 0;
}
.twin-ch {
  font-family: var(--f-display);
  font-variation-settings: 'wght' 500, 'wdth' 100;
  font-size: clamp(6.5rem, 19vw, 15rem);
  line-height: 1;
  color: var(--ink);
  user-select: none;
  will-change: font-variation-settings;
  transition: color 0.35s ease, opacity 0.35s ease;
}
.twin-name { color: var(--muted); transition: opacity 0.3s ease, color 0.3s ease; }
.twins-stage:not(.overlay) .twin { cursor: default; }
.twins-stage:not(.overlay) .twin:hover .twin-name { color: var(--red); }
.twins-stage:not(.overlay) .twin:hover .twin-ch { transform: translateY(-4px); }
.twin-ch { transition: color 0.35s ease, opacity 0.35s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
.twins-vs {
  color: var(--red);
  border: 1.5px solid var(--red);
  border-radius: 99px;
  padding: 0.3rem 0.8rem;
  transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
/* overlay (x-ray) mode: letters stack, difference glows red */
.twins-stage.overlay .twin {
  position: absolute; inset: 0;
  justify-content: center;
  padding: 0;
}
.twins-stage.overlay .twin-name { opacity: 0; }
.twins-stage.overlay .twins-vs { opacity: 0; transform: scale(0.6); }
.twins-stage.overlay .twin-b .twin-ch {
  color: var(--red);
  opacity: 0.62;
  mix-blend-mode: multiply;
}
.twins-console {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 1fr);
  gap: 2rem;
  align-items: center;
}
.twins-diff {
  color: var(--muted);
  line-height: 1.7;
  max-width: 56ch;
  min-height: 3.4em;
}
.twins-diff b { color: var(--ink); font-weight: 700; }
.twins-ctl { display: flex; align-items: center; gap: 1rem; }
.tw-chip {
  flex-shrink: 0;
  font-family: var(--f-ui);
  font-size: 0.85rem;
  background: none;
  border: 1.5px solid rgba(22, 19, 14, 0.35);
  border-radius: 99px;
  color: var(--ink);
  padding: 0.45rem 1.05rem;
  cursor: pointer;
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.2s;
}
.tw-chip:hover { border-color: var(--ink); transform: translateY(-2px); }
.tw-chip:active { transform: scale(0.94); }
.tw-chip[aria-pressed="true"] { background: var(--red); color: var(--paper); border-color: var(--red); }
.twins-slider { flex: 1; display: flex; align-items: center; gap: 0.8rem; color: var(--muted); }
.twins-slider input[type="range"] {
  appearance: none; -webkit-appearance: none;
  flex: 1; height: 2px;
  background: rgba(22, 19, 14, 0.25);
  border-radius: 99px;
  cursor: pointer;
}
.twins-slider input[type="range"]::-webkit-slider-thumb {
  appearance: none; -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--ink);
  border: 4px solid var(--paper);
  box-shadow: 0 0 0 1.5px var(--ink);
  transition: background 0.2s ease, transform 0.2s ease;
}
.twins-slider input[type="range"]:hover::-webkit-slider-thumb,
.twins-slider input[type="range"]:active::-webkit-slider-thumb { background: var(--red); transform: scale(1.15); }
.twins-slider input[type="range"]::-moz-range-thumb {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--ink);
  border: 3px solid var(--paper);
}

/* ══════════ POSTER GALLERY ══════════ */
.gallery {
  padding: 7rem 2rem 6.5rem;
  border-bottom: var(--line);
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.6rem;
}
.gallery-card {
  background: none; border: none; padding: 0;
  cursor: pointer;
  text-align: right;
  font-family: var(--f-ui);
  display: flex; flex-direction: column; gap: 0.9rem;
  outline-offset: 6px;
}
.g-sheet {
  position: relative;
  container-type: inline-size;
  aspect-ratio: 3 / 4;
  border: var(--line);
  display: flex; flex-direction: column;
  padding: 0.85rem 1rem;
  overflow: hidden;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.45s ease;
  box-shadow: 0 10px 30px -18px rgba(22, 19, 14, 0.5);
}
.gallery-card:hover .g-sheet, .gallery-card:focus-visible .g-sheet {
  transform: translateY(-8px) rotate(var(--tilt, -1.2deg));
  box-shadow: 0 30px 60px -22px rgba(22, 19, 14, 0.55);
}
.gallery-card:active .g-sheet { transform: translateY(-3px) scale(0.985); }
.g-head, .g-foot {
  display: flex; justify-content: space-between;
  font-size: 0.6rem;
  opacity: 0.75;
}
.g-foot { border-top: 1.5px solid currentColor; padding-top: 0.4rem; }
.g-letter-wrap {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.g-letter {
  font-family: var(--f-display);
  line-height: 0.95;
  white-space: nowrap;
  user-select: none;
  transform: rotate(var(--rot, 0deg));
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.gallery-card:hover .g-letter { transform: rotate(var(--rot, 0deg)) scale(1.06); }
.gallery-meta { display: flex; flex-direction: column; gap: 0.15rem; padding: 0 0.2rem; }
.gallery-meta b {
  font-family: var(--f-display);
  font-variation-settings: 'wght' 800;
  font-weight: normal;
  font-size: 1.05rem;
  color: var(--ink);
  transition: color 0.25s;
}
.gallery-card:hover .gallery-meta b { color: var(--red); }
.gallery-meta i {
  font-style: normal;
  font-family: var(--f-mono);
  font-size: 0.66rem;
  color: var(--muted);
  direction: ltr;
  text-align: right;
}
.gallery-open {
  margin-top: 0.2rem;
  font-size: 0.78rem;
  color: var(--muted);
  transition: color 0.25s;
}
.gallery-card:hover .gallery-open { color: var(--ink); }

/* ══════════ POSTER ══════════ */
.poster { padding: 7rem 2rem 7rem; }
.poster-lab {
  display: grid;
  grid-template-columns: minmax(280px, 380px) 1fr;
  gap: 3.5rem;
  align-items: start;
}
.poster-controls { display: flex; flex-direction: column; gap: 1.5rem; }
.ctl { display: flex; flex-direction: column; gap: 0.55rem; }
.ctl-name {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 0.88rem;
  color: var(--paper);
}
.ctl-name i {
  font-style: normal; color: var(--muted-l);
  display: inline-block;
  transition: color 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ctl-name i.pop { color: var(--red); transform: scale(1.12); transition-duration: 0.12s; }
.ctl input[type="text"] {
  background: var(--ink-2);
  border: 1px solid rgba(237, 230, 214, 0.25);
  border-radius: 6px;
  color: var(--paper);
  font-family: var(--f-display);
  font-variation-settings: 'wght' 700;
  font-size: 1.5rem;
  padding: 0.5rem 0.9rem;
  width: 100%;
}
.ctl input[type="text"]:focus { outline: none; border-color: var(--red); }
.ctl input[type="range"] {
  appearance: none; -webkit-appearance: none;
  width: 100%; height: 2px;
  background: rgba(237, 230, 214, 0.25);
  border-radius: 99px;
  cursor: pointer;
}
.ctl input[type="range"]::-webkit-slider-thumb {
  appearance: none; -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--paper);
  border: 4px solid var(--ink);
  box-shadow: 0 0 0 1.5px var(--paper);
  transition: background 0.2s ease, transform 0.2s ease;
}
.ctl input[type="range"]:hover::-webkit-slider-thumb { background: var(--red); transform: scale(1.15); }
.ctl input[type="range"]::-moz-range-thumb {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--paper);
  border: 3px solid var(--ink);
}
.scheme-row { display: flex; gap: 0.7rem; }
.scheme-swatch {
  width: 44px; height: 44px;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-display);
  font-variation-settings: 'wght' 800;
  font-size: 1.25rem;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.2s;
}
.scheme-swatch:hover { transform: translateY(-3px); }
.scheme-swatch:active { transform: scale(0.9); }
.scheme-swatch[aria-checked="true"] { border-color: var(--paper); }
.ctl-row { flex-direction: row; gap: 0.7rem; }
.chip {
  flex: 1;
  background: none;
  border: 1px solid rgba(237, 230, 214, 0.35);
  border-radius: 99px;
  color: var(--paper);
  font-family: var(--f-ui);
  font-size: 0.85rem;
  padding: 0.55rem 1rem;
  cursor: pointer;
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.2s;
}
.chip:hover { border-color: var(--paper); transform: translateY(-2px); }
.chip:active { transform: scale(0.95); }
.chip[aria-pressed="true"] { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn-primary {
  background: var(--red);
  color: var(--paper);
  border: none;
  border-radius: 8px;
  font-family: var(--f-ui);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.95rem 1.4rem;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(232, 64, 28, 0.35);
}
.btn-primary:active { transform: translateY(0); }

.poster-stage { position: relative; display: flex; justify-content: center; }
.poster-sheet {
  position: relative; z-index: 2;
  width: min(100%, 460px);
  aspect-ratio: 3 / 4;
  background: var(--paper);
  color: var(--ink);
  display: flex; flex-direction: column;
  padding: 1.4rem 1.6rem;
  transition: background 0.4s ease, color 0.4s ease;
  overflow: hidden;
}
.poster-head { display: flex; justify-content: space-between; opacity: 0.75; }
.poster-letter-wrap {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.poster-letter {
  font-family: var(--f-display);
  font-variation-settings: 'wght' 900, 'wdth' 100;
  line-height: 0.95;
  font-size: calc(var(--psize, 78) * 1% * 4.2);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  user-select: none;
  white-space: nowrap;
}
.poster-sheet.rotated .poster-letter { transform: rotate(-8deg); }
.poster-rule { height: 2px; background: currentColor; margin-bottom: 0.55rem; }
.poster-foot-row { display: flex; justify-content: space-between; opacity: 0.75; }
.poster-shadow {
  position: absolute; z-index: 1;
  inset: auto 0 -26px 0;
  margin: 0 auto;
  width: min(84%, 380px); height: 40px;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.55), transparent 70%);
  filter: blur(6px);
}

/* ══════════ FOOTER ══════════ */
.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding: 4rem 2rem 2rem;
  overflow: hidden;
  border-top: 2px solid var(--red);
}
.footer-big {
  font-family: var(--f-display);
  font-variation-settings: 'wght' 900, 'wdth' 62.5;
  font-size: clamp(2.4rem, 7.5vw, 7rem);
  line-height: 1;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px rgba(237, 230, 214, 0.3);
  margin-bottom: 3rem;
  user-select: none;
}
.footer-big span {
  display: inline-block;
  color: transparent;
  transition: color 0.45s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.footer-big span:hover {
  color: var(--red);
  transform: translateY(-6px);
  transition-duration: 0.12s;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(237, 230, 214, 0.16);
  margin-bottom: 1.6rem;
}
.footer-col { display: flex; flex-direction: column; align-items: flex-start; gap: 0.55rem; }
.footer-h { color: var(--red); margin-bottom: 0.4rem; }
.footer-logo { font-size: 1.4rem; margin-bottom: 0.4rem; }
.footer-brand p {
  color: var(--muted-l);
  font-size: 0.88rem;
  line-height: 1.7;
  max-width: 30ch;
}
.footer-col a {
  color: rgba(237, 230, 214, 0.78);
  text-decoration: none;
  font-size: 0.86rem;
  position: relative;
  transition: color 0.25s, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.footer-col nav a:hover { color: var(--paper); }
.footer-col a:hover { color: var(--paper); transform: translateX(-4px); }
.footer-spec { list-style: none; display: flex; flex-direction: column; gap: 0.45rem; color: var(--muted-l); text-align: left; }
.footer-top {
  margin-top: 0.8rem;
  background: none;
  border: 1.5px solid rgba(237, 230, 214, 0.35);
  border-radius: 99px;
  color: var(--paper);
  font-family: var(--f-ui);
  font-size: 0.82rem;
  padding: 0.5rem 1.1rem;
  cursor: pointer;
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.2s;
}
.footer-top:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); transform: translateY(-2px); }
.footer-top:active { transform: scale(0.95); }
.footer-row {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
  color: var(--muted-l);
}
.footer-guide {
  color: var(--paper);
  text-decoration: none;
  border-bottom: 1.5px solid var(--red);
  padding-bottom: 3px;
  transition: color 0.25s, border-color 0.25s;
}
.footer-guide:hover { color: var(--red); }

/* ══════════ MODAL ══════════ */
.modal {
  position: fixed; inset: 0; z-index: 500;
  display: flex; align-items: center; justify-content: center;
  visibility: hidden;
  pointer-events: none;
}
.modal.open { visibility: visible; pointer-events: auto; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(22, 19, 14, 0.72);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.modal.open .modal-backdrop { opacity: 1; }
.modal-card {
  position: relative;
  background: var(--paper);
  border: var(--line);
  width: min(92vw, 640px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 340px;
  transform: translateY(40px) scale(0.96);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
}
.modal.open .modal-card { transform: none; opacity: 1; }
.modal-letter {
  font-family: var(--f-display);
  font-variation-settings: 'wght' 900, 'wdth' 100;
  font-size: clamp(7rem, 22vw, 13rem);
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
  background: var(--ink);
  color: var(--paper);
  user-select: none;
}
.modal-info {
  padding: 2rem 1.8rem;
  display: flex; flex-direction: column;
  gap: 0.7rem;
  justify-content: center;
}
.modal-info .mono { color: var(--red); }
.modal-info h3 {
  font-family: var(--f-display);
  font-variation-settings: 'wght' 900;
  font-weight: normal;
  font-size: 2.6rem;
  line-height: 1;
}
.modal-info p { color: var(--muted); }
.modal-final b { color: var(--red); font-family: var(--f-display); font-size: 1.1rem; }
.modal-info .btn-primary { margin-top: 1rem; }
.modal-close {
  position: absolute; top: 0.8rem; left: 0.8rem;
  background: none; border: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--muted);
  z-index: 2;
  transition: color 0.2s, transform 0.3s;
}
.modal-close:hover { color: var(--red); transform: rotate(90deg); }

/* ══════════ REVEALS ══════════ */
.rv { opacity: 0; transform: translateY(36px); }
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; }
}

/* ══════════ RESPONSIVE ══════════ */
@media (max-width: 1080px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .site-header { padding: 0.9rem 1.1rem; }
  .site-nav { gap: 0.9rem; }
  .site-nav a { font-size: 0.78rem; }
  .site-nav .nav-sec { display: none; }
  .hero-frame { padding: 4.6rem 1.1rem 1.4rem; }
  .hero-letter { font-size: min(58vw, 46vh); }
  .hero-meta-bottom { grid-template-columns: 1fr; justify-items: center; gap: 0.9rem; text-align: center; }
  .hero-hint { justify-self: center; text-align: center; max-width: 260px; }
  .hero-readout { order: 3; }
  .hero-scrolldown { display: none; }
  .panel-sticky { padding: 4.6rem 1.1rem 2rem; }
  .axis-word { font-size: min(32vw, 30vh); }
  .letters, .poster, .anatomy, .gallery, .twins { padding: 4.5rem 1.1rem; }
  .twins-console { grid-template-columns: 1fr; gap: 1.2rem; }
  .twins-diff { min-height: 0; }
  .twin-ch { font-size: clamp(4.6rem, 26vw, 8rem); }
  .twins-stage { padding: 0 1rem; }
  .twins-corner { font-size: 0.58rem; }
  .letter-grid { grid-template-columns: repeat(4, 1fr); }
  .anatomy-lab { grid-template-columns: 1fr; gap: 2rem; }
  .anatomy-stage { padding: 0.5rem 0.5rem 3.2rem; }
  .anatomy-list span { max-width: none; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .poster-lab { grid-template-columns: 1fr; gap: 2.6rem; }
  .poster-stage { order: -1; }
  .modal-card { grid-template-columns: 1fr; }
  .modal-letter { padding: 1.4rem 0; font-size: clamp(6rem, 30vw, 9rem); }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-row { justify-content: center; text-align: center; }
}
