/* ─────────────── kepasa.css — papírová báze, inkoust, jediný akcent ───────────────  */

:root {
  --paper: #0b0b0d;
  --paper-deep: #141417;
  --paper-warm: #16161a;
  --ink: #f1eee7;
  --ink-faded: #a8a49b;
  --ink-soft: #74716a;
  --accent: #d68a44;        /* ochra z mikiny — používej spořivě */
  --accent-deep: #c97e3a;
  --line: rgba(241,238,231,.16);
  --line-soft: rgba(241,238,231,.08);
  --serif: "Chakra Petch", "Segoe UI", sans-serif;
  --serif-2: "Chakra Petch", "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --tt-h1: clamp(64px, 9vw, 160px);
  --tt-h2: clamp(36px, 5vw, 72px);
  --tt-h3: clamp(28px, 3.5vw, 48px);
  --tt-body: clamp(16px, 1.15vw, 19px);
  --tt-mono: 12px;
  --ease: cubic-bezier(.2,.7,.2,1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #0b0b0d;
  color: var(--ink);
  font-family: var(--serif-2);
  font-weight: 400;
  font-size: var(--tt-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body {
  position: relative;
  background: #09090b;
}

img { max-width: 100%; display: block; }
#scale-outer { position: relative; }
#scale-wrap { transform-origin: top left; }
a { color: inherit; text-decoration: none; }
em { font-style: italic; font-family: var(--serif-2); }

.mono {
  font-family: var(--mono);
  font-size: var(--tt-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faded);
  font-weight: 400;
}

/* paper grain — subtle SVG noise */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.4;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='3'/><feColorMatrix values='0 0 0 0 0.55  0 0 0 0 0.55  0 0 0 0 0.52  0 0 0 0.5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ─────────────── SPINE NAV ─────────────── */
.spine {
  position: fixed;
  left: 28px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 18px;
  z-index: 50;
}
.spine-link {
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0.45;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.spine-link:hover { opacity: 1; transform: translateX(3px); }
.spine-link.active { opacity: 1; }
.spine-link .num {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  display: inline-block;
  width: 18px;
}
.spine-link .lbl {
  font-family: var(--serif-2);
  font-style: italic;
  font-size: 14px;
  color: var(--ink-faded);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
  white-space: nowrap;
}
.spine-link:hover .lbl,
.spine-link.active .lbl {
  opacity: 1;
  transform: translateX(0);
}
.spine-link::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--ink);
  margin-right: 4px;
  transition: width .3s var(--ease);
}
.spine-link.active::before { width: 32px; }

/* ─────────────── TOP META ─────────────── */
.top-meta {
  position: fixed;
  top: 24px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 32px 0 80px;
  z-index: 40;
  pointer-events: none;
}
.top-meta > * { pointer-events: auto; }
.meta-left { display: flex; align-items: center; gap: 10px; }
.dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .55; transform: scale(.85); }
}

/* ─────────────── FRAGMENT BASE ─────────────── */
.fragment {
  position: relative;
  padding: 140px 80px 120px 140px;
  min-height: 100vh;
  background: radial-gradient(62% 58% at 104% 104%, rgba(176,176,186,0.42) 0%, rgba(120,120,132,0.20) 32%, rgba(20,20,24,0) 62%);
}

.frag-num {
  position: absolute;
  top: 80px;
  left: 140px;
  display: flex;
  align-items: baseline;
  gap: 16px;
  color: var(--ink-faded);
}
.frag-num .big-num {
  font-family: var(--serif);
  font-size: clamp(54px, 7vw, 110px);
  line-height: 1;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* ─────────────── 00 — HERO ─────────────── */
.fragment-00 {
  padding-top: 100px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.2);
  will-change: transform, filter;
  animation: heroDrift 42s ease-in-out infinite alternate;
}
@keyframes heroDrift {
  0%   { transform: scale(1.16) translate(-1.5%, -1%);  filter: hue-rotate(0deg)   saturate(1.05); }
  100% { transform: scale(1.28) translate(2.5%, 2%);    filter: hue-rotate(28deg)  saturate(1.15); }
}
.hero-veil {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(7,7,9,0.72) 0%, rgba(7,7,9,0.5) 40%, rgba(7,7,9,0.62) 100%),
    radial-gradient(130% 100% at 50% 50%, rgba(7,7,9,0.28) 0%, rgba(7,7,9,0.66) 100%);
}
@media (prefers-reduced-motion: reduce) {
  .hero-bg img { animation: none; }
}
.hero-grid {
  position: relative;
  z-index: 101;
  display: grid;
  grid-template-columns: 0.82fr 1.1fr;
  gap: 48px;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  align-items: center;
}
.hero-photo-stage {
  position: relative;
  max-width: 380px;
  width: 100%;
}
.hero-photo {
  position: relative;
  z-index: 1;
  aspect-ratio: 3 / 4;
  max-width: 380px;
  width: 100%;
  overflow: hidden;
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.0) saturate(0.92);
}
.photo-tag {
  position: absolute;
  bottom: 14px;
  left: 14px;
  color: #f1eee7;
  text-shadow: 0 1px 6px rgba(0,0,0,.7);
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding-right: 20px;
}
.hero-eyebrow { margin: 0 0 8px; }
.logo-mark {
  margin: 0;
  max-width: 420px;
}
.logo-mark img {
  width: 100%;
  height: auto;
  margin-left: -8px;
}
.hero-tagline {
  letter-spacing: 0.18em;
  margin: -10px 0 0 4px;
}
.hero-poem {
  font-family: var(--serif);
  font-size: clamp(23px, 2.3vw, 34px);
  line-height: 1.25;
  color: var(--ink);
  font-weight: 500;
  margin: 12px 0 0;
  max-width: 14ch;
  text-wrap: balance;
}
.hero-poem em {
  font-family: var(--serif-2);
  font-style: italic;
  color: var(--ink-faded);
}
.hero-scroll {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  align-self: flex-start;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 4px;
}
.hero-scroll .arr {
  animation: bob 2s ease-in-out infinite;
  display: inline-block;
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* ─────────────── 01 — MANIFEST ─────────────── */
.manifest-wrap {
  margin-top: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 34px 80px;
  align-items: start;
}
.manifest-pre,
.manifest-title,
.manifest-body { grid-column: 1; }
.manifest-side { grid-column: 2; grid-row: 1 / span 3; }
.manifest-pre { margin: 0 0 20px; }
.manifest-title {
  font-family: var(--serif);
  font-size: var(--tt-h2);
  line-height: 1.12;
  margin: 0 0 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-wrap: pretty;
  max-width: 18ch;
}
.manifest-title em {
  color: var(--ink-faded);
  font-family: var(--serif-2);
  font-style: italic;
}
.manifest-body {
  max-width: 50ch;
  font-size: clamp(18px, 1.3vw, 22px);
  line-height: 1.65;
}
.manifest-body p { margin: 0 0 22px; }
.manifest-body .indent { padding-left: 60px; color: var(--ink-faded); }
.manifest-body .indent em { color: var(--ink); font-weight: 500; }
.signature {
  margin-top: 36px !important;
}
.signature img {
  max-width: 180px;
  opacity: 0.88;
}
.manifest-side {
  margin: 0;
  position: relative;
  align-self: center;
}
.manifest-side img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  filter: grayscale(0.15);
  transform: rotate(2deg);
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.3);
}
.manifest-side .photo-tag {
  color: var(--ink-faded);
  text-shadow: none;
  bottom: -22px;
  left: 8px;
}

/* ─────────────── 02 — GALLERY / WALL ─────────────── */
.fragment-02 {
  padding-bottom: 100px;
}
.gallery-intro {
  margin: 60px 0 40px;
  font-family: var(--serif);
  font-size: clamp(28px, 2.5vw, 40px);
  line-height: 1.2;
  font-weight: 600;
  max-width: 18ch;
}
.gallery-intro em { font-family: var(--serif-2); color: var(--ink-faded); }

.wall {
  position: relative;
  width: 100%;
  height: 1850px;
  margin-top: 20px;
}
.piece {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  margin: 0;
  transform: rotate(var(--r));
  z-index: var(--z);
  cursor: pointer;
}
.piece::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  box-shadow: 0 0 20px 4px rgba(120,120,128,0.85);
  transition: opacity .45s var(--ease);
}
.piece:hover::before { opacity: 1; }
.piece {
  transition: transform .5s var(--ease), filter .4s var(--ease), z-index 0s;
  animation: pieceIn 1.2s var(--ease) both;
  animation-delay: calc(var(--z) * 0.05s);
}
@keyframes pieceIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.piece img {
  width: 100%;
  height: auto;
  aspect-ratio: 2/3;
  object-fit: cover;
  box-shadow: 0 25px 50px -30px rgba(0,0,0,.4), 0 8px 16px -10px rgba(0,0,0,.2);
  background: var(--paper-deep);
  filter: contrast(1.02) saturate(0.95);
}
.piece.wide img { aspect-ratio: 3/2; }
.piece figcaption {
  position: absolute;
  bottom: -22px;
  left: 0;
  color: var(--ink-soft);
}
.piece.cap-dark figcaption {
  color: #000;
  text-shadow: 0 0 2px #9a9a9a, 0 0 2px #9a9a9a, 0 0 3px #9a9a9a;
}
.piece.cap-dark.cap-faint figcaption {
  text-shadow: 0 0 1px #b5b5b5, 0 0 1px #b5b5b5;
}
.piece:hover {
  z-index: 20;
  transform: rotate(0) scale(1.04);
}
.piece:hover img {
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.6);
}

.annot {
  position: absolute;
  font-family: var(--serif-2);
  font-style: italic;
  color: var(--ink-faded);
  font-size: 17px;
  white-space: nowrap;
  pointer-events: none;
}
.annot-1 {
  top: 22%;
  left: 51%;
  transform: rotate(-4deg);
}
.annot-2 {
  top: 47%;
  left: 30%;
  transform: rotate(2deg);
}

.wall-hint {
  margin-top: 30px;
  color: var(--ink-soft);
  opacity: 0.5;
}

/* ─────────────── 03 — PROCESS ─────────────── */
.process-grid {
  margin-top: 80px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 80px;
  align-items: center;
}
.process-photo {
  position: relative;
  aspect-ratio: 3/4;
  overflow: visible;
}
.process-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.process-arrows {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}
.process-arrows path {
  fill: none;
  stroke: #141414;
  stroke-width: 1.5;
  stroke-dasharray: 4 3;
  opacity: 0.8;
}
.process-arrows text {
  font-family: var(--serif-2);
  font-style: italic;
  font-size: 19px;
  fill: #141414;
  paint-order: stroke;
  stroke: rgba(255,255,255,.65);
  stroke-width: 2.4;
}

.process-text {
  padding-top: 20px;
}
.step {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 16px;
  margin: 0 0 24px;
  align-items: baseline;
  font-size: clamp(18px, 1.3vw, 22px);
  line-height: 1.55;
}
.step-num {
  color: var(--accent-deep);
  font-size: 13px;
}
.step em {
  font-family: var(--serif-2);
  font-style: italic;
  color: var(--ink-faded);
}

/* ─────────────── 04 — LETTER ─────────────── */
.fragment-04 {
  padding-bottom: 90px;
}
.letter {
  margin-top: 80px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.6fr);
  gap: 60px;
  align-items: start;
}
.letter-paper {
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.015));
  padding: 50px 60px 60px;
  border: 1px solid var(--line);
  box-shadow: 0 60px 120px -50px rgba(0,0,0,.6), 0 20px 40px -30px rgba(0,0,0,.4);
  position: relative;
  min-height: 540px;
}
.letter-paper::before,
.letter-paper::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 6px;
  left: 0;
  background:
    repeating-linear-gradient(90deg, transparent 0 12px, var(--line-soft) 12px 14px);
}
.letter-paper::before { top: 0; }
.letter-paper::after { bottom: 0; }

.letter-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 30px;
  padding-bottom: 18px;
  border-bottom: 1px dashed var(--line);
}

.letter-progress {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 36px;
}
.letter-progress .bar {
  display: block;
  height: 1px;
  background: var(--ink);
  flex: 1;
  max-width: 240px;
  transition: width .6s var(--ease);
}
.progress-label em {
  font-family: var(--serif-2);
  font-style: italic;
  color: var(--ink);
  font-size: 14px;
  text-transform: none;
  letter-spacing: 0;
}

.q {
  display: none;
  animation: qFade .55s var(--ease) both;
}
.q.active { display: block; }

@keyframes qFade {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.q-prompt {
  font-family: var(--serif);
  font-size: clamp(26px, 2.4vw, 38px);
  line-height: 1.25;
  margin: 0 0 30px;
  font-weight: 600;
  text-wrap: pretty;
}
.q-prompt em { font-family: var(--serif-2); color: var(--ink-faded); }
.q-label {
  display: inline-block;
  margin-right: 14px;
  font-size: 13px;
  color: var(--accent-deep);
  vertical-align: middle;
}

.q input[type="text"],
.q input[type="email"],
.q input[type="tel"],
.q textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  font-family: var(--serif-2);
  font-size: clamp(20px, 1.6vw, 26px);
  padding: 10px 0;
  color: var(--ink);
  outline: none;
  transition: border-color .3s var(--ease);
  margin-bottom: 12px;
}
.q input::placeholder,
.q textarea::placeholder {
  color: var(--ink-soft);
  font-style: italic;
  opacity: 0.6;
}
.q input:focus,
.q textarea:focus {
  border-color: var(--ink);
}
.q textarea {
  resize: vertical;
  min-height: 80px;
  font-size: 20px;
  line-height: 1.5;
}

.chips, .swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}
.chips label {
  position: relative;
  cursor: pointer;
}
.chips label input { position: absolute; opacity: 0; pointer-events: none; }
.chips label span {
  display: inline-block;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 0;
  font-family: var(--serif-2);
  font-style: italic;
  font-size: 17px;
  transition: all .25s var(--ease);
}
.chips label:hover span { border-color: var(--ink); }
.chips label input:checked + span {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.swatches label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 8px;
  transition: transform .25s var(--ease);
}
.swatches label input { position: absolute; opacity: 0; pointer-events: none; }
.swatches label .sw {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: block;
  transition: transform .25s var(--ease);
  position: relative;
}
.swatches label .sw-q {
  background: rgba(255,255,255,.04);
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 28px;
  color: var(--ink-faded);
  border: 1px dashed var(--line);
}
.swatches label b {
  font-family: var(--serif-2);
  font-style: italic;
  font-weight: 400;
  font-size: 14px;
  color: var(--ink-faded);
}
.swatches label:hover .sw { transform: scale(1.08); }
.swatches label input:checked + .sw {
  outline: 1px solid var(--ink);
  outline-offset: 4px;
}
.swatches label input:checked ~ b {
  color: var(--ink);
}

.q-next, .q-send, .q-restart {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  font-family: var(--serif-2);
  font-style: italic;
  font-size: 22px;
  color: var(--ink);
  cursor: pointer;
  padding: 8px 0;
  margin-top: 10px;
  border-bottom: 1px solid var(--ink);
  transition: gap .25s var(--ease), color .25s var(--ease);
}
.q-next:hover, .q-restart:hover {
  gap: 16px;
}
.q-send {
  font-size: 24px;
  color: var(--accent-deep);
  border-color: var(--accent-deep);
}
.q-send:hover { color: var(--ink); border-color: var(--ink); }

.q-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}
.q-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  font-family: var(--serif-2);
  font-style: italic;
  font-size: 22px;
  color: var(--ink);
  opacity: 0.4;
  cursor: pointer;
  padding: 8px 0;
  margin-top: 10px;
  border-bottom: 1px solid transparent;
  transition: gap .25s var(--ease), opacity .25s var(--ease);
}
.q-back:hover { gap: 16px; opacity: 0.75; }

.q-thanks {
  text-align: center;
  padding: 40px 0;
}
.thanks-mark {
  font-size: 60px;
  color: var(--accent);
  margin: 0 0 14px;
  font-family: var(--serif);
}
.q-thanks h3 {
  font-family: var(--serif);
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.1;
  margin: 0 0 16px;
  font-weight: 600;
}
.q-thanks p { margin: 8px 0; }
.q-thanks .small { font-size: 11px; margin-top: 26px; }

/* letter splat — landed ink as you progress */
.letter-splat {
  width: 100%;
  height: 600px;
  align-self: center;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.06));
}

/* ─────────────── INK SPLATTER FIELD (background) ─────────────── */
main { position: relative; }
.foot { position: relative; z-index: 1; }
.ink-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.ink {
  position: absolute;
  width: auto;
  height: auto;
  filter: drop-shadow(0 0 1px rgba(255,255,255,.05));
}
.ink-1 { top: 1%;  right: -8%;  width: 46vw; transform: rotate(6deg);   opacity: 0.22; }
.ink-2 { top: 17%; left: -10%;  width: 30vw; transform: rotate(-12deg); opacity: 0.16; }
.ink-3 { top: 33%; right: -6%;  width: 44vw; transform: rotate(-4deg);  opacity: 0.20; }
.ink-4 { top: 50%; left: -6%;   width: 26vw; transform: rotate(8deg);   opacity: 0.17; }
.ink-5 { top: 66%; right: -4%;  width: 24vw; transform: rotate(-8deg);  opacity: 0.20; }
.ink-6 { top: 80%; left: -8%;   width: 40vw; transform: rotate(10deg);  opacity: 0.15; }
.ink-7 { top: 92%; right: 2%;   width: 30vw; transform: rotate(3deg);   opacity: 0.14; }

/* ─────────────── SECTION INK BRUSHES (foreground, per-section) ─────────────── */
.sec-ink {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.brush {
  position: absolute;
  pointer-events: none;
  filter: drop-shadow(0 0 1px rgba(255,255,255,.04));
  will-change: transform;
}
/* lift section content above the brush layer (frag-num stays absolute, paints above via DOM order) */
.manifest-wrap, .gallery-intro, .wall, .wall-hint, .process-grid, .letter,
.foot-logo, .foot-meta, .foot-links {
  position: relative;
  z-index: 1;
}

/* ─────────────── SPLATTERS (positional) ─────────────── */
.splat {
  position: absolute;
  pointer-events: none;
  opacity: 0.92;
}
.splat-1 { top: 12%; right: 6%; width: 110px; transform: rotate(20deg); opacity: 0.65; }
.splat-2 { bottom: 8%; left: 8%; width: 160px; transform: rotate(-15deg); opacity: 0.55; }
.splat-3 { top: 10%; right: 4%; width: 200px; transform: rotate(35deg); opacity: 0.4; }
.splat-4 { bottom: 6%; left: 4%; width: 240px; transform: rotate(-20deg); opacity: 0.45; }

/* cursor trail */
.cursor-trail {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
}
.cursor-trail svg {
  position: absolute;
  opacity: 0;
  animation: trail 1.7s cubic-bezier(.2,.6,.2,1) forwards;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.18));
  will-change: opacity;
}
@keyframes trail {
  0% { opacity: 0; }
  10% { opacity: 0.95; }
  100% { opacity: 0; }
}

/* ─────────────── MODAL ─────────────── */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(6,6,8,.9);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 40px;
  animation: modalIn .35s var(--ease);
}
@keyframes modalIn { from { opacity: 0; } to { opacity: 1; } }
.modal[hidden] { display: none; }
.modal-close {
  position: absolute;
  top: 24px;
  right: 32px;
  background: transparent;
  border: 1px solid var(--ink);
  color: var(--ink);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  transition: background .25s var(--ease);
}
.modal-close:hover { background: var(--ink); color: #0b0b0d; }
.modal-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 60px;
  max-width: 1200px;
  width: 100%;
  align-items: center;
}
.modal-img img {
  width: 100%;
  max-height: 80vh;
  object-fit: contain;
  background: var(--paper-deep);
}
.modal-text {
  color: var(--ink);
}
.modal-text .mono { color: var(--accent); }
.modal-text h3 {
  font-family: var(--serif);
  font-size: clamp(36px, 4vw, 64px);
  margin: 16px 0 24px;
  font-weight: 600;
  line-height: 1.05;
  text-transform: uppercase;
}
.modal-text p { line-height: 1.55; }
.modal-meta { margin-top: 30px !important; opacity: 0.7; }
.modal-cta {
  display: inline-block;
  margin-top: 30px;
  padding: 12px 0;
  font-family: var(--serif-2);
  font-style: italic;
  font-size: 22px;
  border-bottom: 1px solid var(--ink);
}

/* ─────────────── FOOTER ─────────────── */
.foot {
  background: linear-gradient(180deg, #050506 0%, #0f0f12 100%);
  color: var(--ink);
  padding: 100px 80px 40px 140px;
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.7fr) minmax(0, 0.9fr);
  gap: 40px;
  align-items: end;
  border-top: 1px solid var(--line-soft);
}
.foot-logo img {
  width: 220px;
  opacity: 0.9;
}
.foot-meta p {
  margin: 4px 0;
  color: var(--ink);
  opacity: 0.6;
}
.foot-meta .copy { opacity: 0.4; margin-top: 16px; }
.foot-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}
.foot-links a {
  color: var(--ink);
  opacity: 0.6;
  transition: opacity .25s var(--ease);
}
.foot-links a:hover { opacity: 1; }

/* ─────────────── REVEAL ON SCROLL ─────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
[data-reveal].in {
  opacity: 1;
  transform: translateY(0);
}

/* ─────────────── RESPONSIVE ─────────────── */
/* Below design width the whole desktop layout is scaled down as one unit
   (see #scale-wrap in app.js) so mobile mirrors the desktop composition
   instead of reflowing into a different layout. Only true viewport chrome
   (nav spine, top meta, modal overlay) gets its own small-screen rules. */
@media (max-width: 1100px) {
  .modal-inner { grid-template-columns: 1fr; gap: 30px; }
  .modal-img img { max-height: 50vh; }
}
@media (max-width: 900px) {
  .spine { left: 12px; gap: 14px; }
  .spine-link .lbl { display: none; }
  .top-meta { padding: 0 20px 0 50px; }
}
