/* ============================================================
   IRON & INK — Artisan Letterpress Studio
   Industrial Monochrome: Black & Red only.
   Palette: #0A0A0A ink / #FFFFFF paper / #B80000 blood / #333333 mid
   Type: Fraunces (display) + JetBrains Mono (UI)
   ============================================================ */

:root {
  --ink: #050505;
  --surface: #0D0D0D;
  --raised: #121212;
  --paper: #FFFFFF;
  --blood: #B80000;
  --mid: #222222;
  --text-primary: #F0F0F0;
  --text-secondary: #999999;
  --text-muted: #666666;
  --hairline: 1px solid #222222;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --font-display: "Fraunces", Georgia, serif;
  --font-mono: "JetBrains Mono", "Courier New", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--surface);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--blood); color: var(--paper); }

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }

.mono { font-family: var(--font-mono); }

/* ============================================================
   SHEEN UTILITY — background-clip:text, white → pale-red glint
   Wide shoulder ramps (40%→50%→60%) so the glint breathes.
   ============================================================ */
.sheen {
  background: linear-gradient(120deg, #FFFFFF 40%, #FFE0E0 50%, #FFFFFF 60%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* dark variant for elements sitting on paper-white (spines) */
.sheen-dark {
  background: linear-gradient(120deg, #0A0A0A 40%, #B80000 50%, #0A0A0A 60%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

@keyframes sheen {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================================
   ALWAYS-ACTIVE REVEAL LOOPS
   ============================================================ */
@keyframes breathe-opacity {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}

/* ============================================================
   UNIFIED ALWAYS-ACTIVE REVEAL — one class, IO play-state toggle
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease) !important;
  will-change: transform, opacity;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   PAGE-EDGE PROGRESS BAR (fore-edge of the book)
   ============================================================ */
.edge-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 2px;
  height: 100vh;
  background: linear-gradient(var(--blood), var(--blood)) left / 2px 100% no-repeat;
  background-size: 2px 0%;
  background-position: top;
  z-index: 200;
  pointer-events: none;
  will-change: background-size;
}

/* ============================================================
   NAV / TOP RULE
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--surface);
}

.top-rule {
  height: 1px;
  background: var(--mid);
  transition: height 0.6s var(--ease), background 0.6s var(--ease);
}

.site-header.scrolled .top-rule {
  height: 2px;
  background: var(--paper);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  max-width: 1440px;
  margin: 0 auto;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

/* the "&" in the wordmark — solid red + darkest-blood shadow fills AA fringe */
.wordmark .amp {
  color: var(--blood);
  text-shadow: 0 0 1px #4A0000, 0 0 2px #4A0000;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.site-header.loaded .wordmark { opacity: 1; transform: translateY(0); }

.nav-links {
  display: flex;
  gap: 34px;
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--text-primary);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease), color 0.3s var(--ease);
  position: relative;
  display: inline-block;
}

/* reset default button chrome for nav-link buttons (cart toggle) */
button.nav-link {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
}

.site-header.loaded .nav-link { opacity: 1; transform: translateY(0); }
.site-header.loaded .nav-links li:nth-child(1) .nav-link { transition-delay: 0.08s; }
.site-header.loaded .nav-links li:nth-child(2) .nav-link { transition-delay: 0.16s; }
.site-header.loaded .nav-links li:nth-child(3) .nav-link { transition-delay: 0.24s; }
.site-header.loaded .nav-links li:nth-child(4) .nav-link { transition-delay: 0.32s; }

/* underline expand from center */
.nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -4px;
  width: 0;
  height: 1px;
  background: var(--paper);
  transition: width 0.35s var(--ease), left 0.35s var(--ease), background 0.3s var(--ease);
}

.nav-link:hover::after {
  width: 100%;
  left: 0;
}

.nav-link:hover { color: var(--paper); }

.nav-cart { display: inline-flex; align-items: center; gap: 8px; }

.cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--blood);
  color: var(--paper);
  font-size: 11px;
  font-weight: 700;
  border-radius: 0;
  line-height: 1;
  will-change: transform;
}

/* bump when an item is added — obvious "you added something" feedback */
.cart-count.bump {
  animation: cart-bump 0.5s var(--ease);
}

@keyframes cart-bump {
  0% { transform: scale(1); }
  40% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  min-width: 56px; /* keeps "MENU"/"CLOSE" from shifting the cart aside */
  text-align: right;
}

/* always-visible cart toggle + menu group (shown on mobile) */
.nav-mobile-actions {
  display: none;
  align-items: center;
  gap: 18px;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 18px;
  padding: 10px 28px 24px;
  border-top: var(--hairline);
}

.mobile-menu a { font-size: 13px; letter-spacing: 0.18em; }

/* ============================================================
   HERO — THE PRESS
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  overflow: hidden;
  background: var(--ink);
}

/* 3-layer parallax — each depth layer moves at a different scroll rate */
.hero-layer { will-change: transform; }
.hero-layer-bg {
  position: absolute;
  inset: 0;
  transform: translateY(calc(var(--parallax-y, 0px) * 0.15));
}
.hero-layer-mid {
  position: relative;
  z-index: 4;
  transform: translateY(calc(var(--parallax-y, 0px) * 0.35));
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* CSS paper-fiber texture: noise + horizontal grain (RAF-driven drift) */
.hero-fiber {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.6;
  background-image:
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.035) 0px,
      rgba(255, 255, 255, 0.035) 1px,
      transparent 1px,
      transparent 3px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.03) 0px,
      rgba(255, 255, 255, 0.03) 2px,
      transparent 2px,
      transparent 6px
    ),
    repeating-linear-gradient(
      45deg,
      rgba(255, 255, 255, 0.015) 0px,
      rgba(255, 255, 255, 0.015) 1px,
      transparent 1px,
      transparent 8px
    );
  background-size: 100% 100%, 200% 100%, 300% 100%;
  will-change: background-position, transform;
}

/* noise layer — fiber density breathing */
.hero-noise {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.98;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px),
    radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px),
    radial-gradient(circle at 40% 80%, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px),
    radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px);
  background-size: 90px 90px, 130px 130px, 110px 110px, 150px 150px;
  animation: noise-breathe 8s ease-in-out infinite;
  will-change: opacity;
}

@keyframes noise-breathe {
  0%, 100% { opacity: 0.98; }
  50% { opacity: 1; }
}

/* impression flash — thin red line sweeping top→bottom */
.hero-flash {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: var(--blood);
  opacity: 0;
  pointer-events: none;
  z-index: 3;
}

.hero-flash.active {
  animation: flash-sweep 600ms ease-out forwards;
}

@keyframes flash-sweep {
  0% { transform: translateY(0); opacity: 0.9; }
  100% { transform: translateY(100vh); opacity: 0; }
}

/* ghost trace of the impression — fades over 2s */
.hero-ghost {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  z-index: 2;
  background: linear-gradient(to bottom, transparent, rgba(184, 0, 0, 0.12), transparent);
}

.hero-ghost.active {
  animation: ghost-fade 2s ease-out forwards;
}

@keyframes ghost-fade {
  0% { opacity: 0.6; }
  100% { opacity: 0; }
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(64px, 16vw, 200px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: clamp(8px, 2vw, 28px);
  position: relative;
  z-index: 4;
}

.hero-word { display: inline-flex; }

.letter {
  display: inline-block;
  will-change: transform;
  animation: float 6s ease-in-out infinite;
}

.hero-word:nth-child(1) .letter:nth-child(1) { animation-delay: 0s; }
.hero-word:nth-child(1) .letter:nth-child(2) { animation-delay: 0.4s; }
.hero-word:nth-child(1) .letter:nth-child(3) { animation-delay: 0.8s; }
.hero-word:nth-child(1) .letter:nth-child(4) { animation-delay: 1.2s; }
.hero-word:nth-child(3) .letter:nth-child(1) { animation-delay: 1.6s; }
.hero-word:nth-child(3) .letter:nth-child(2) { animation-delay: 2.0s; }
.hero-word:nth-child(3) .letter:nth-child(3) { animation-delay: 2.4s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-0.5px); }
}

/* the red "&" — breathes + sheen (white → pale-red glint) */
.hero-amp {
  font-weight: 700;
  font-size: 0.7em;
  background: linear-gradient(
    120deg,
    #B80000 0%,
    #FF1A1A 30%,
    #FF6B6B 50%,
    #FF1A1A 70%,
    #B80000 100%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: breathe 6s ease-in-out infinite, sheen 6s ease-in-out infinite;
  will-change: opacity, background-position;
}

@keyframes breathe {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.hero-sub {
  margin-top: 40px;
  font-family: var(--font-mono);
  font-size: clamp(13px, 2vw, 16px);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-primary);
  opacity: 0.85;
  position: relative;
  z-index: 4;
}

/* ============================================================
   SECTION HEADINGS (shared) — sheen on the whole Fraunces title
   ============================================================ */
.section-head {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 28px;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 8vw, 96px);
  line-height: 1;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
  background: linear-gradient(120deg, #FFFFFF 40%, #FFE0E0 50%, #FFFFFF 60%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: sheen 10s ease-in-out infinite;
  will-change: background-position;
}

/* red emphasis word — blood gradient (dark→bright) so edges blend
   on the dark bg instead of pixelating */
.section-title .red-emphasis {
  background-image:
    linear-gradient(
      120deg,
      rgba(255, 235, 235, 0) 0%,
      rgba(255, 235, 235, 0) 38%,
      rgba(255, 230, 230, 0.95) 50%,
      rgba(255, 235, 235, 0) 62%,
      rgba(255, 235, 235, 0) 100%
    ),
    linear-gradient(
      180deg,
      #4A0000 0%,
      #8B0000 25%,
      #B80000 50%,
      #D42E2E 75%,
      #FF4444 100%
    );
  background-size: 220% 100%, 100% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: red-shimmer 10s ease-in-out infinite, blood-pulse 6s ease-in-out infinite;
  will-change: background-position;
}

/* shimmer sweep + vertical blood breathe in one */
@keyframes red-shimmer {
  0%, 100% { background-position: 200% 0%, 50% 0%; }
  50% { background-position: -200% 0%, 50% 100%; }
}

/* red breathing — slow opacity pulse like the hero "&" */
@keyframes blood-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* "&" variant — pale-red glint sweep (same technique as hero) */
.section-title .red-emphasis.amp {
  background: linear-gradient(120deg, #B80000 40%, #FFE0E0 50%, #B80000 60%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: sheen 10s ease-in-out infinite, blood-pulse 6s ease-in-out infinite;
  will-change: background-position;
}

/* red emphasis inside the mono cart title — blood gradient + shimmer */
.cart-title .red-emphasis {
  background-image:
    linear-gradient(
      120deg,
      rgba(255, 235, 235, 0) 0%,
      rgba(255, 235, 235, 0) 38%,
      rgba(255, 230, 230, 0.95) 50%,
      rgba(255, 235, 235, 0) 62%,
      rgba(255, 235, 235, 0) 100%
    ),
    linear-gradient(
      180deg,
      #4A0000 0%,
      #8B0000 25%,
      #B80000 50%,
      #D42E2E 75%,
      #FF4444 100%
    );
  background-size: 220% 100%, 100% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: red-shimmer 10s ease-in-out infinite, blood-pulse 6s ease-in-out infinite;
  will-change: background-position;
}

/* pixel-outline fix — darkest-blood shadow fills the AA fringe,
   antialiased smoothing, clean compositor layer (no disruptive transform) */
.section-title .red-emphasis,
.cart-title .red-emphasis {
  display: inline-block;
  text-shadow: 0 0 1px #4A0000, 0 0 2px #4A0000;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transform: translateZ(0);
}

.section-note {
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--text-secondary);
  text-transform: uppercase;
  padding-bottom: 20px;
  border-bottom: var(--hairline);
}

/* ============================================================
   WORKS — THE EDITIONS (vertical stack, always-active reveal)
   ============================================================ */
.works {
  padding: 120px 0 40px;
  border-top: var(--hairline);
}

.editions {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 28px;
}

.edition {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
  padding: 40px 8px;
  border-bottom: var(--hairline);
  cursor: pointer;
  position: relative;
  background: var(--raised);
  box-shadow: inset 0 1px 0 var(--mid), inset 0 0 24px rgba(0, 0, 0, 0.4);
  will-change: transform, box-shadow;
  transition: transform 0.4s var(--ease);
}

/* hover: transform-only, no layout change, no blur-radius change.
   specificity beats the .reveal.in-view transform so it still shifts */
.edition.reveal:hover {
  transform: translateX(2px);
}

/* breathing lives on an inner wrapper so the card's hover
   transform is never overridden by the animation (uses .reveal) */
.edition-breathe {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
  flex: 1;
}

.edition-num {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(48px, 9vw, 120px);
  line-height: 1;
  min-width: 0.6em;
  background: linear-gradient(120deg, #FFFFFF 40%, #FFE0E0 50%, #FFFFFF 60%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: bob 7s ease-in-out infinite, sheen 10s ease-in-out infinite;
  will-change: transform, background-position;
}

.edition.soldout .edition-num {
  background: none;
  -webkit-text-fill-color: var(--mid);
  color: var(--mid);
  animation: bob 7s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-0.5px); }
}

.edition-body { flex: 1; }

.edition-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(24px, 4vw, 44px);
  line-height: 1.1;
  will-change: transform;
}

.edition-specs {
  margin-top: 10px;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.edition-badge {
  display: inline-block;
  align-self: center;
  margin-right: 28px; /* pull off the right edge */
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  padding: 8px 14px;
  white-space: nowrap;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease);
}

.edition-badge.available {
  color: var(--blood);
  border: 1px solid var(--blood);
}

.edition-badge.soldout {
  background: var(--blood);
  color: var(--paper);
}

/* hover — ADD TO CART: lift + red glow + soft fill */
.edition-badge.available:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 10px rgba(184, 0, 0, 0.45);
  background: rgba(184, 0, 0, 0.08);
}

/* hover — SOLD OUT: lift + red glow */
.edition-badge.soldout:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 12px rgba(184, 0, 0, 0.55);
}

/* accordion colophon */
.edition-colophon {
  flex-basis: 100%;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.6s var(--ease);
}

.edition-colophon-inner {
  padding: 24px 8px 8px;
  border-top: var(--hairline);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
}

.colophon-item .colophon-label {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  text-transform: uppercase;
  display: block;
  margin-bottom: 4px;
}

.colophon-item .colophon-value {
  font-size: 13px;
  color: var(--paper);
}

/* ============================================================
   PROCESS — THE PRESS ROOM (hover effects + always-active)
   ============================================================ */
.process {
  padding: 120px 0 40px;
  border-top: var(--hairline);
}

.stations {
  max-width: 1440px;
  margin: 0 auto;
  padding: 40px 28px 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.station {
  border: var(--hairline);
  padding: 32px 24px;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  background: var(--raised);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
  box-shadow: inset 0 1px 0 var(--mid);
  will-change: transform;
}

.station:hover { box-shadow: inset 0 1px 0 var(--mid), inset 0 0 24px rgba(0, 0, 0, 0.5); }

/* breathe wrapper — always-active reveal lives here so the
   station's own transform (impression compress) stays free (uses .reveal) */
.station-breathe {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.station-top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 28px; }

.station-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  color: var(--blood);
  transition: text-shadow 0.4s var(--ease);
}

.station-label {
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 0.2em;
  font-weight: 500;
  display: inline-block;
  will-change: transform;
}

.station-label .cl { display: inline-block; opacity: 0; transform: translateY(8px); transition: opacity 0.4s var(--ease), transform 0.4s var(--ease); }
.station.cascaded .cl { opacity: 1; transform: translateY(0); }

.station-desc {
  margin-top: auto;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* COMPOSING — interactive alphabet typewriter */
.typewriter {
  font-family: var(--font-mono);
  font-size: 22px;
  color: var(--text-primary);
  background: var(--raised);
  border: 1px solid var(--mid);
  padding: 16px;
  min-height: 84px;
  margin: 8px 0 24px;
  line-height: 1.6;
  overflow-x: hidden;
  caret-color: var(--blood);
  cursor: text;
  word-break: break-all;
}

.typewriter:empty::before {
  content: attr(data-placeholder);
  color: var(--text-muted);
}

.typewriter:focus {
  outline: 1px solid var(--blood);
}

.type-char {
  color: var(--blood);
  transition: color 150ms ease;
}

/* INKING — rotating red disk; hover: 3x speed + glow */
.ink-disk {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 1px solid var(--mid);
  margin: 8px auto 24px;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 30% 30%, rgba(184, 0, 0, 0.9), rgba(184, 0, 0, 0.2) 60%, transparent 70%);
  animation: spin 14s linear infinite;
  transition: box-shadow 0.4s var(--ease);
  will-change: transform;
}

.ink-disk-inner {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(184, 0, 0, 0.35) 40deg, transparent 80deg, transparent 180deg, rgba(184, 0, 0, 0.35) 220deg, transparent 260deg);
  animation: spin 14s linear infinite reverse;
}

@keyframes spin { to { transform: rotate(360deg); } }

.station[data-station="2"]:hover .ink-disk,
.station[data-station="2"]:hover .ink-disk-inner {
  animation-duration: 4.67s; /* 14s / 3 */
}

.station[data-station="2"]:hover .ink-disk {
  box-shadow: 0 0 24px rgba(184, 0, 0, 0.5);
}

/* INKING — red shimmer on the paragraph (12s linear, hypnotic) */
.station[data-station="2"] .station-desc {
  background: linear-gradient(
    120deg,
    #333333 0%,
    #333333 35%,
    #FF6B6B 50%,
    #333333 65%,
    #333333 100%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: sheen 12s linear infinite;
  will-change: background-position;
}

/* IMPRESSION — platen compress on hover, spring back on leave */
.station[data-station="3"] {
  transition: transform 0.5s var(--spring), box-shadow 0.5s var(--ease);
}

.station[data-station="3"]:hover {
  transform: scaleY(0.96);
  transition: transform 150ms ease-out, box-shadow 0.5s var(--ease);
}

.station[data-station="3"]:hover .station-num {
  text-shadow: 0 0 8px rgba(184, 0, 0, 0.6);
}

.platen {
  margin: 8px auto 24px;
  width: 160px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.platen-top, .platen-bed {
  height: 14px;
  background: var(--paper);
  border: 1px solid var(--mid);
}

.platen-sheet {
  height: 60px;
  background: var(--paper);
  border: 1px solid var(--mid);
  position: relative;
}

.platen-sheet::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(10,10,10,0.06) 0 1px, transparent 1px 4px);
}

/* ============================================================
   STOCK — TYPE CASE DRAWERS
   ============================================================ */
.stock {
  padding: 120px 0 40px;
  border-top: var(--hairline);
}

.drawers {
  max-width: 1440px;
  margin: 0 auto;
  padding: 40px 28px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.drawer {
  position: relative;
  border: var(--hairline);
  background: var(--raised);
}

/* open drawer: static full opacity, no breathe (uses .reveal otherwise) */
.drawer.open {
  opacity: 1;
  transform: none;
  animation: none;
}

/* drawer front — 80px, wood grain, raised surface, toggle on right */
.drawer-front {
  position: relative;
  height: 80px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.02) 0 2px, transparent 2px 7px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px 6px),
    var(--raised);
  box-shadow: inset 0 1px 0 var(--mid);
  transition: transform 300ms var(--ease), filter 300ms var(--ease);
  will-change: transform;
}

/* hover on front (non-button): subtle lift + wood-grain brightens 5% */
.drawer-front:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.drawer-pull {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--blood);
  flex-shrink: 0;
  transition: box-shadow 0.4s var(--ease);
}

.drawer-front:hover .drawer-pull {
  box-shadow: 0 0 8px rgba(184, 0, 0, 0.4);
}

.drawer-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(18px, 3vw, 28px);
  letter-spacing: 0.02em;
  background: linear-gradient(120deg, #FFFFFF 40%, #FFE0E0 50%, #FFFFFF 60%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: sheen 10s ease-in-out infinite;
  will-change: background-position;
}

/* toggle button — right edge, square, + / − in red mono */
.drawer-toggle {
  width: 32px;
  height: 32px;
  margin-left: auto;
  flex-shrink: 0;
  background: var(--raised);
  border: 1px solid var(--mid);
  color: var(--blood);
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.3s var(--ease), color 0.3s var(--ease);
}

.drawer-toggle:hover {
  box-shadow: 0 0 8px rgba(184, 0, 0, 0.4);
}

/* specimen — tall box expanding downward (accordion) */
.drawer-specimen {
  max-height: 0;
  overflow: hidden;
  transition: max-height 300ms var(--ease);
}

.drawer.open .drawer-specimen {
  max-height: 320px;
}

.drawer-specimen-inner {
  height: 320px;
  background: var(--paper);
  border: 2px solid var(--mid);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transition: opacity 200ms var(--ease) 200ms;
}

.drawer.open .drawer-specimen-inner {
  opacity: 1;
}

/* large paper texture fills the box */
.specimen-texture {
  flex: 1;
  position: relative;
  border-bottom: 1px solid var(--mid);
}

/* DRAWER 01 — ZERKALL LAID: horizontal wire marks, 1px line / 3px gap, 25% */
.specimen-texture.laid {
  background: repeating-linear-gradient(
    0deg,
    transparent 0px,
    transparent 3px,
    rgba(10, 10, 10, 0.25) 3px,
    rgba(10, 10, 10, 0.25) 4px
  );
}

/* DRAWER 02 — TENERIFE WOVE: layered stipple, no direction */
.specimen-texture.wove {
  background-image:
    radial-gradient(circle at 20% 30%, rgba(10, 10, 10, 0.2) 1px, transparent 1px),
    radial-gradient(circle at 80% 70%, rgba(10, 10, 10, 0.15) 1px, transparent 1px),
    radial-gradient(circle at 40% 80%, rgba(10, 10, 10, 0.18) 1px, transparent 1px);
}

/* DRAWER 03 — COTTON RAG: 60 random fibers generated via JS */
.specimen-texture.cotton {
  background: var(--paper);
}

.specimen-texture.cotton .fiber {
  position: absolute;
  height: 0.5px;
  background: rgba(10, 10, 10, 0.3);
  pointer-events: none;
}

/* red watermark: 2px, centered, 80% width, 60% opacity */
.specimen-watermark {
  position: absolute;
  left: 10%;
  right: 10%;
  top: 50%;
  height: 2px;
  background: var(--blood);
  opacity: 0.6;
}

/* specs panel at bottom */
.specimen-specs-panel {
  height: 80px;
  background: #F5F5F5;
  border-top: 1px solid var(--mid);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 28px;
}

.specimen-specs {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
}

.swatch-request {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--blood);
  white-space: nowrap;
  position: relative;
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: text-shadow 0.3s var(--ease);
}

.swatch-request::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -4px;
  width: 0;
  height: 1px;
  background: var(--blood);
  transition: width 0.35s var(--ease), left 0.35s var(--ease);
}

.swatch-request:hover::after { width: 100%; left: 0; }
.swatch-request:hover { text-shadow: 0 0 8px rgba(184, 0, 0, 0.4); }

/* ============================================================
   CART — STACK THE CART
   ============================================================ */
.cart {
  position: fixed;
  top: 0;
  right: 0;
  width: 320px;
  height: 100vh;
  background: var(--surface);
  border-left: var(--hairline);
  z-index: 150;
  transform: translateX(100%);
  transition: transform 0.6s var(--ease);
  display: flex;
  flex-direction: column;
  padding: 24px;
  will-change: transform;
}

body[data-cart-open="true"] .cart {
  transform: translateX(0);
  animation: breathe-opacity 8s ease-in-out infinite;
}

/* no-push: prevent horizontal scroll without removing the vertical
   scrollbar (removing it is what caused the layout shift) */
body.cart-open {
  overflow-x: hidden;
}

.cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: var(--hairline);
}

.cart-title { font-size: 13px; letter-spacing: 0.2em; }

.cart-close {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 14px;
  letter-spacing: 0.18em;
}

.cart-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.cart-stack {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: 20px;
}

/* book spine — physical stack growing upward */
.spine {
  height: 46px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--mid);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  position: relative;
  margin-top: -6px; /* overlap so next sits on top */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
  animation: spine-drop 0.6s var(--ease);
  will-change: transform, opacity;
}

@keyframes spine-drop {
  0% { transform: translateY(-40px); opacity: 0; }
  60% { transform: translateY(4px); opacity: 1; }
  100% { transform: translateY(0); opacity: 1; }
}

/* cart spine — drop in once, stays visible (overrides hidden .reveal) */
.spine.reveal {
  animation: spine-drop 0.6s var(--ease);
  animation-play-state: running;
  opacity: 1;
  transform: none;
}

.spine-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
  background: linear-gradient(120deg, #0A0A0A 40%, #B80000 50%, #0A0A0A 60%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: sheen 10s ease-in-out infinite;
  will-change: background-position;
}

.spine-title {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

/* thin red headband line */
.spine::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--blood);
}

.cart-foot {
  border-top: var(--hairline);
  padding: 16px;
  margin-top: auto;
  position: sticky;
  bottom: 0;
  background: var(--surface);
}

.cart-total {
  font-weight: 700;
  text-align: right;
  background: linear-gradient(120deg, #FFFFFF 40%, #FFE0E0 50%, #FFFFFF 60%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: sheen 10s ease-in-out infinite;
  will-change: background-position;
}

.cart-actions {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.cart-actions .ship {
  flex: 1;
  background: var(--blood);
  color: var(--paper);
  border: none;
  padding: 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  transition: box-shadow 0.4s var(--ease);
}

.cart-actions .ship:hover { box-shadow: 0 0 8px rgba(184, 0, 0, 0.4); }

.cart-actions .clear {
  flex: 1;
  background: none;
  color: var(--paper);
  border: 1px solid var(--mid);
  padding: 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}

.cart-actions .clear:hover { border-color: var(--paper); }

.cart-scrim {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.6);
  z-index: 140;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  padding: 60px 28px 40px;
  border-top: var(--hairline);
  margin-top: 80px;
}

.footer-rule { height: 1px; background: var(--mid); margin-bottom: 40px; }

.footer-grid {
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  font-size: 12px;
  letter-spacing: 0.08em;
  line-height: 1.9;
  color: var(--text-primary);
}

.footer-copy {
  max-width: 1440px;
  margin: 40px auto 0;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .stations { grid-template-columns: 1fr; }
  .station { min-height: 320px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-mobile-actions { display: flex; }
  .menu-toggle { display: block; }
  .mobile-menu.open { display: flex; }
  /* editions: stack, text left, badge pinned right */
  .edition { flex-direction: column; align-items: stretch; gap: 12px; }
  .edition-breathe { flex-direction: column; align-items: flex-start; gap: 12px; }
  .edition-num { font-size: 64px; }
  .edition-body { width: 100%; text-align: left; }
  .edition-badge { margin-left: auto; margin-right: 0; }
  .hero-title { flex-wrap: wrap; }
  .drawer-toggle { width: 44px; height: 44px; }
  /* drawer text: show full label, wrap instead of truncating */
  .drawer-front { padding: 12px 16px; gap: 10px; height: auto; min-height: 60px; align-items: center; }
  .drawer-num { flex: 1; min-width: 0; font-size: 15px; white-space: normal; word-break: break-word; line-height: 1.3; }
  .specimen-specs-panel { flex-direction: column; align-items: flex-start; justify-content: center; gap: 8px; padding: 0 20px; }
  .specimen-specs { white-space: normal; word-break: break-word; }
}

@media (max-width: 600px) {
  /* cart becomes a top drawer (slides down from the top) */
  .cart {
    top: 0;
    bottom: auto;
    left: 0;
    right: 0;
    width: 100%;
    height: auto;
    max-height: 70vh;
    border-left: none;
    border-bottom: var(--hairline);
    border-top: none;
    transform: translateY(-100%);
  }
  body[data-cart-open="true"] .cart { transform: translateY(0); }
}

@media (max-width: 480px) {
  .cart-actions { flex-direction: column; gap: 8px; }
}

/* ============================================================
   REDUCED MOTION — kill all idle loops, keep functional state
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  /* idle loops off */
  .hero-noise, .hero-amp, .letter, .section-title, .wordmark,
  .edition-num, .drawer-num, .cart-total, .spine-num,
  .ink-disk, .ink-disk-inner {
    animation: none !important;
  }

  /* sheen → static base color */
  .hero-amp {
    background: none;
    -webkit-text-fill-color: var(--blood);
    color: var(--blood);
  }
  .section-title, .edition-num, .drawer-num, .cart-total {
    background: none;
    -webkit-text-fill-color: var(--paper);
    color: var(--paper);
  }
  .wordmark {
    background: none;
    -webkit-text-fill-color: var(--text-primary);
    color: var(--text-primary);
  }
  /* red emphasis words: blood gradient static (dark at top, no motion) */
  .section-title .red-emphasis,
  .cart-title .red-emphasis {
    animation: none;
    background-position: 50% 0%;
  }
  /* "&" shimmer → static red */
  .section-title .red-emphasis.amp {
    background: none;
    -webkit-text-fill-color: var(--blood);
    color: var(--blood);
    animation: none;
  }
  /* inking paragraph shimmer → static readable grey */
  .station[data-station="2"] .station-desc {
    background: none;
    -webkit-text-fill-color: var(--text-secondary);
    color: var(--text-secondary);
    animation: none;
  }
  .spine-num {
    background: none;
    -webkit-text-fill-color: var(--ink);
    color: var(--ink);
  }
  .edition.soldout .edition-num {
    -webkit-text-fill-color: var(--mid);
    color: var(--mid);
  }

  /* scroll reveals → static full opacity */
  .reveal,
  body[data-cart-open="true"] .cart {
    animation: none;
    transition: none !important;
    opacity: 1;
    transform: none;
  }

  /* parallax static */
  html { --parallax-y: 0px; }

  /* drawers: no hover lift; specimen visible on click only (instant) */
  .drawer-front:hover { transform: none; filter: none; }
  .drawer-specimen { transition: none; }
  .drawer-specimen-inner { transition: none; opacity: 1; }

  /* process hover: keep functional compress, drop spring */
  .station[data-station="3"] { transition: transform 0.15s ease-out; }
  .station[data-station="3"]:hover { transform: scaleY(0.96); }

  .spine { animation: none; }
  .edge-progress { transition: none; }
}
