/* =========================================================================
   Цукр №6 — «Побачити сумську ідентичність»
   Аестетика: дзеркальна фольга на нічному тлі. Обкладинка журналу —
   срібляста, плакати в місті — дзеркальні, тож уся сторінка поводиться
   як відбивна поверхня: ловить курсор, нахил телефону, світло.
   ========================================================================= */

:root {
  /* фольга — світлові щаблі, від найяскравішого блікy до тіні */
  --foil-0: #ffffff;
  --foil-1: #dfe7ee;
  --foil-2: #a9b6c2;
  --foil-3: #6c7884;
  --foil-4: #39424c;

  /* градієнт для тексту-фольги — окремо від поверхонь, бо в світлій темі
     метал на тексті має бути темним, інакше літери зникають */
  --ft-a: #7c8894;
  --ft-b: #dfe7ee;
  --ft-c: #ffffff;
  --ft-d: #a6b2be;

  --bg:        #07080b;
  --bg-2:      #0b0d12;
  --surface:   rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --line:      rgba(255, 255, 255, 0.11);
  --line-soft: rgba(255, 255, 255, 0.06);

  --text:   #e9edf1;
  --muted:  #8d97a2;
  --dim:    #5d6771;

  /* єдиний теплий контрапункт до холодного срібла */
  --brass: #d7b482;

  --btn-bg:   #f2f5f8;
  --btn-ink:  #0a0c10;

  --shadow-lg: 0 40px 90px -30px rgba(0, 0, 0, 0.9);
  --shadow-md: 0 18px 44px -22px rgba(0, 0, 0, 0.8);

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-pill: 100px;

  --gut: clamp(20px, 5vw, 72px);
  --maxw: 1320px;

  /* поліграфічне зерно — генерується фільтром, а не картинкою */
  --grain-url: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='180' height='180' filter='url(%23n)' opacity='0.6'/></svg>");

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);

  color-scheme: dark;
}

:root[data-theme='light'] {
  --foil-0: #ffffff;
  --foil-1: #f0f2f4;
  --foil-2: #b9c2cb;
  --foil-3: #7c8792;
  --foil-4: #2d343b;

  --ft-a: #9aa5b0;
  --ft-b: #2b333c;
  --ft-c: #0c1015;
  --ft-d: #5d6771;

  --bg:        #eceae5;
  --bg-2:      #f5f4f1;
  --surface:   rgba(10, 14, 20, 0.035);
  --surface-2: rgba(10, 14, 20, 0.06);
  --line:      rgba(10, 14, 20, 0.14);
  --line-soft: rgba(10, 14, 20, 0.08);

  --text:  #0d1014;
  --muted: #59626c;
  --dim:   #8b939c;

  --brass: #9a6f2c;

  --btn-bg:  #0d1014;
  --btn-ink: #f4f4f2;

  --shadow-lg: 0 40px 80px -34px rgba(20, 26, 34, 0.5);
  --shadow-md: 0 16px 40px -24px rgba(20, 26, 34, 0.45);

  color-scheme: light;
}

/* ---------------------------------------------------------------- база */

*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease);
}

img { max-width: 100%; display: block; }
a { color: inherit; }

::selection { background: var(--foil-1); color: #0a0c10; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gut);
}

.mono {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* зерно — тонка плівка поверх усього, «поліграфічний» шум */
.grain {
  position: fixed; inset: -50%;
  pointer-events: none; z-index: 9;
  opacity: 0.05;
  background-image: var(--grain-url);
  background-size: 180px 180px;
  animation: grain 7s steps(6) infinite;
  mix-blend-mode: overlay;
}
:root[data-theme='light'] .grain { opacity: 0.09; mix-blend-mode: multiply; }

@keyframes grain {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-6%, 4%); }
  40%  { transform: translate(3%, -7%); }
  60%  { transform: translate(-4%, -3%); }
  80%  { transform: translate(6%, 5%); }
  100% { transform: translate(0, 0); }
}

/* ---------------------------------------------------------- фольга */
/*
   Ефект будується трьома шарами: холодний градієнт-основа, рухома
   «смуга світла» під кутом і дрібні пасма, що імітують заломлення
   тисненої фольги. Позиція джерела світла — у --mx/--my, їх крутить JS
   від курсора або гіроскопа.
*/
.foil {
  --mx: 50%;
  --my: 40%;
  background:
    radial-gradient(120% 90% at var(--mx) var(--my),
      var(--foil-0) 0%, var(--foil-1) 16%, var(--foil-2) 34%,
      var(--foil-3) 58%, var(--foil-4) 100%),
    repeating-linear-gradient(112deg,
      rgba(255, 255, 255, 0.07) 0 3px,
      rgba(0, 0, 0, 0.035) 3px 8px,
      rgba(255, 255, 255, 0.025) 8px 15px);
  background-blend-mode: overlay, normal;
}

.foil-text {
  background:
    linear-gradient(96deg,
      var(--ft-a) 0%, var(--ft-b) 17%, var(--ft-c) 29%,
      var(--ft-d) 45%, var(--ft-c) 61%, var(--ft-b) 77%,
      var(--ft-a) 100%);
  background-size: 220% 100%;
  background-position: var(--shift, 0%) 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ============================================================== шапка */

.top {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 18px var(--gut);
  transition: background-color 0.4s var(--ease), backdrop-filter 0.4s;
}
.top.is-stuck {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line-soft);
}

.brand {
  display: inline-flex; align-items: baseline; gap: 10px;
  text-decoration: none;
}
.brand__mark {
  font-weight: 800; font-size: 1.32rem; letter-spacing: -0.045em;
  line-height: 1;
}
.brand__issue {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem; letter-spacing: 0.2em;
  color: var(--muted);
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
}

.top__right { display: flex; align-items: center; gap: 10px; }

.theme-toggle {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.3s, background 0.3s, transform 0.3s var(--ease);
}
.theme-toggle:hover { border-color: var(--foil-2); transform: rotate(-18deg); }
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle .i-moon { display: none; }
:root[data-theme='light'] .theme-toggle .i-moon { display: block; }
:root[data-theme='light'] .theme-toggle .i-sun { display: none; }

/* ================================================================ hero */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 128px 0 72px;
  overflow: hidden;
  isolation: isolate;
}

/* дзеркальна пляма, що йде за курсором */
.hero__light {
  position: absolute; inset: -20%;
  z-index: -2;
  background:
    radial-gradient(46% 42% at var(--mx, 50%) var(--my, 34%),
      rgba(214, 231, 245, 0.20) 0%,
      rgba(150, 176, 200, 0.10) 32%,
      rgba(0, 0, 0, 0) 68%);
  transition: background 0.5s linear;
  pointer-events: none;
}
:root[data-theme='light'] .hero__light {
  background:
    radial-gradient(44% 40% at var(--mx, 50%) var(--my, 34%),
      rgba(255, 255, 255, 0.55) 0%,
      rgba(176, 192, 208, 0.20) 36%,
      rgba(0, 0, 0, 0) 72%);
}

/* мапа Сум як тиха підкладка */
.hero__map {
  position: absolute;
  z-index: -3;
  top: 46%; right: -6%;
  translate: 0 -50%;
  width: min(680px, 78%);
  color: var(--foil-2);
  opacity: 0.19;
  mask-image: radial-gradient(60% 55% at 50% 45%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(60% 55% at 50% 45%, #000 30%, transparent 78%);
  pointer-events: none;
}
:root[data-theme='light'] .hero__map { opacity: 0.26; color: var(--foil-3); }
@media (max-width: 900px) { .hero__map { right: -22%; width: 105%; opacity: 0.09; } }
.hero__map svg { width: 100%; height: auto; }

.hero__grid {
  position: absolute; inset: 0; z-index: -4;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 100px 100px;
  mask-image: radial-gradient(80% 70% at 50% 40%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(80% 70% at 50% 40%, #000 0%, transparent 75%);
  opacity: 0.7;
}

.hero__inner { position: relative; }

.kicker {
  display: inline-flex; align-items: center; gap: 12px;
  margin-bottom: clamp(20px, 3vw, 34px);
}
.kicker::before {
  content: ''; width: clamp(28px, 6vw, 70px); height: 1px;
  background: linear-gradient(90deg, transparent, var(--foil-2));
}

.hero h1 {
  margin: 0;
  font-weight: 800;
  font-size: clamp(2.3rem, 5.9vw, 5.2rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  max-width: 15ch;
}
.hero h1 .w { display: block; }
.hero h1 .w:nth-child(2) { padding-left: clamp(0px, 3.5vw, 62px); }
.hero h1 .w:nth-child(3) {
  padding-left: clamp(0px, 7vw, 132px);
  font-weight: 300;
  font-style: italic;
  letter-spacing: -0.02em;
}

.hero__lead {
  margin: clamp(26px, 4vw, 44px) 0 0;
  max-width: 46ch;
  font-size: clamp(1rem, 1.55vw, 1.24rem);
  font-weight: 300;
  line-height: 1.55;
  color: var(--muted);
}
.hero__lead strong { color: var(--text); font-weight: 600; }

/* ---------------------------------------------------------- лічильник */

.count-wrap { margin-top: clamp(28px, 4vw, 48px); position: relative; }

/* лічильник відбивається, ніби стоїть на дзеркальній поверхні */
.count-wrap__mirror {
  transform: scaleY(-1);
  opacity: 0.17;
  filter: blur(1.5px);
  margin-top: 2px;
  height: clamp(40px, 6vw, 78px);
  overflow: hidden;
  mask-image: linear-gradient(#000, transparent 82%);
  -webkit-mask-image: linear-gradient(#000, transparent 82%);
  pointer-events: none; user-select: none;
}
:root[data-theme='light'] .count-wrap__mirror { opacity: 0.22; }
.count-wrap__mirror .count { margin: 0; }

.count {
  display: flex; flex-wrap: wrap; align-items: flex-end;
  gap: clamp(12px, 3vw, 40px);
}

.count__unit { position: relative; }

.count__num {
  display: block;
  font-weight: 800;
  font-size: clamp(2.5rem, 7.4vw, 6.2rem);
  line-height: 0.88;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}
.count__num.is-tick { animation: tick 0.5s var(--ease); }
@keyframes tick {
  0%   { opacity: 0.35; transform: translateY(-0.055em) scale(0.985); }
  100% { opacity: 1;    transform: none; }
}

.count__label {
  display: block; margin-top: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.63rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--dim);
}

.count__sep {
  font-weight: 300;
  font-size: clamp(2rem, 6vw, 4.4rem);
  line-height: 1;
  color: var(--foil-4);
  padding-bottom: clamp(24px, 3vw, 44px);
}
:root[data-theme='light'] .count__sep { color: var(--foil-2); }

/* остання доба — сторінка «стискається» до годин */
.count.is-final .count__unit[data-unit='d'] { display: none; }
.count.is-final .count__num { font-size: clamp(3rem, 9.4vw, 7.6rem); }

.count__done {
  font-weight: 800;
  font-size: clamp(2rem, 6vw, 4.4rem);
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

/* ---------------------------------------------------------------- CTA */

.actions {
  margin-top: clamp(36px, 5vw, 56px);
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
}

.btn {
  position: relative;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 28px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: 0.94rem;
  letter-spacing: 0.005em;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease),
              border-color 0.3s, color 0.3s, background 0.3s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--btn-bg);
  color: var(--btn-ink);
  box-shadow: var(--shadow-md);
}
/* блік, що пробігає кнопкою — та сама фольга */
.btn--primary::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 20%,
    rgba(255, 255, 255, 0.75) 45%, transparent 70%);
  translate: -120% 0;
  transition: translate 0.75s var(--ease);
}
:root[data-theme='light'] .btn--primary::after {
  background: linear-gradient(100deg, transparent 20%,
    rgba(255, 255, 255, 0.28) 45%, transparent 70%);
}
.btn--primary:hover::after { translate: 120% 0; }

.btn--ghost {
  border-color: var(--line);
  color: var(--text);
  background: var(--surface);
}
.btn--ghost:hover { border-color: var(--foil-2); background: var(--surface-2); }

.btn__meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase;
  opacity: 0.6;
}

.subs {
  display: inline-flex; align-items: center; gap: 9px;
  color: var(--muted); font-size: 0.87rem;
}
.subs__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--brass);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--brass) 60%, transparent);
  animation: pulse 2.8s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brass) 55%, transparent); }
  70%  { box-shadow: 0 0 0 11px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.subs b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

.scroll-hint {
  position: absolute; left: var(--gut); bottom: 26px;
  display: flex; align-items: center; gap: 12px;
}
.scroll-hint__line {
  width: 1px; height: 42px;
  background: linear-gradient(var(--foil-3), transparent);
  animation: drop 2.4s var(--ease-io) infinite;
  transform-origin: top;
}
@keyframes drop {
  0%, 100% { transform: scaleY(0.3); opacity: 0.35; }
  50%      { transform: scaleY(1);   opacity: 1; }
}

/* ============================================================== секції */

.section { position: relative; padding: clamp(84px, 12vw, 170px) 0; }
.section + .section { border-top: 1px solid var(--line-soft); }

.section__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
  margin-bottom: clamp(34px, 5vw, 64px);
}
.section__title {
  margin: 0;
  font-weight: 800;
  font-size: clamp(1.7rem, 4.2vw, 3.3rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  max-width: 18ch;
}

/* ------------------------------------------------------- маніфест */

.manifest__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.72fr);
  gap: clamp(34px, 6vw, 90px);
  align-items: center;
}
@media (max-width: 900px) { .manifest__grid { grid-template-columns: 1fr; } }

.manifest__text p {
  margin: 0 0 1.15em;
  font-size: clamp(1.06rem, 2.05vw, 1.6rem);
  font-weight: 300;
  line-height: 1.48;
  letter-spacing: -0.012em;
}
.manifest__text p:first-child {
  font-weight: 600;
  font-size: clamp(1.35rem, 3.1vw, 2.5rem);
  line-height: 1.16;
  letter-spacing: -0.032em;
  margin-bottom: 0.7em;
}
.manifest__text p:last-child { margin-bottom: 0; color: var(--muted); }

.manifest__map {
  position: relative;
  aspect-ratio: 1000 / 1133;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
  color: var(--foil-2);
}
/* на світлому тлі тонкі лінії треба темніші, інакше карта зникає */
:root[data-theme='light'] .manifest__map { color: var(--foil-4); }
.manifest__map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.manifest__map .map-cap {
  position: absolute; left: 18px; bottom: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--dim);
}
/* лінії промальовуються, коли блок з’являється в кадрі */
.manifest__map path {
  stroke-dasharray: 2600;
  stroke-dashoffset: 2600;
}
.manifest__map.is-in path {
  animation: draw 2.6s var(--ease-io) forwards;
}
.manifest__map.is-in path:nth-child(2) { animation-delay: 0.14s; }
.manifest__map.is-in path:nth-child(3) { animation-delay: 0.28s; }
.manifest__map.is-in path:nth-child(4) { animation-delay: 0.42s; }
.manifest__map.is-in path:nth-child(5) { animation-delay: 0.56s; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ------------------------------------------------------------ теми */

.themes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.theme {
  position: relative;
  padding: clamp(26px, 3.4vw, 42px);
  background: var(--bg);
  transition: background 0.45s var(--ease);
  overflow: hidden;
}
.theme::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(70% 60% at 50% 0%,
    color-mix(in srgb, var(--foil-2) 14%, transparent), transparent 70%);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.theme:hover::before { opacity: 1; }
.theme__n {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.63rem; letter-spacing: 0.2em;
  color: var(--brass);
}
.theme__name {
  position: relative;
  margin: 20px 0 10px;
  font-weight: 800;
  font-size: clamp(1.2rem, 2.3vw, 1.7rem);
  letter-spacing: -0.03em;
  text-transform: uppercase;
}
.theme__desc {
  position: relative;
  margin: 0; color: var(--muted);
  font-size: 0.94rem; line-height: 1.55;
}

/* --------------------------------------------------------- обʼєкт */

.object__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
  gap: clamp(40px, 7vw, 100px);
  align-items: center;
}
@media (max-width: 900px) {
  .object__grid { grid-template-columns: 1fr; }
}

/* 3D-журнал: обкладинка, корінець і зріз сторінок */
.stage {
  perspective: 1600px;
  perspective-origin: 50% 42%;
  display: grid; place-items: center;
  padding: clamp(20px, 4vw, 50px) 0;
}

/* повільний оберт навколо власної осі — те саме, що роблять із журналом
   у руках, коли розглядають обкладинку з усіх боків */
.book-spin {
  transform-style: preserve-3d;
  animation: spin 26s linear infinite;
}
.book-spin.is-held { animation-play-state: paused; }
@keyframes spin {
  from { transform: rotateY(0deg); }
  to   { transform: rotateY(360deg); }
}
@media (prefers-reduced-motion: reduce) { .book-spin { animation: none; } }

.book {
  --rx: 6deg;
  --ry: -18deg;
  position: relative;
  width: clamp(200px, 30vw, 320px);
  aspect-ratio: 1 / 1.414;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 0.9s var(--ease);
  animation: float 9s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -14px; }
}

.book__face {
  position: absolute; inset: 0;
  border-radius: 3px 6px 6px 3px;
  overflow: hidden;
  backface-visibility: hidden;
}
.book__front {
  transform: translateZ(11px);
  box-shadow: var(--shadow-lg);
}
.book__back {
  transform: translateZ(-11px) rotateY(180deg);
  box-shadow: var(--shadow-lg);
}
.cover__map--back {
  position: absolute; inset: 0;
  color: #10131a; opacity: 0.4;
  overflow: hidden;
}
.cover__map--back svg {
  position: absolute; right: -46%; top: 0; height: 100%; width: auto;
}
/* корінець */
.book__spine {
  position: absolute;
  top: 0; left: 0;
  width: 22px; height: 100%;
  transform: rotateY(-90deg) translateZ(11px);
  transform-origin: left center;
  background: linear-gradient(90deg, var(--foil-4), var(--foil-2), var(--foil-3));
  display: grid; place-items: center;
}
.book__spine span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.55rem; letter-spacing: 0.22em;
  color: rgba(0, 0, 0, 0.6);
  text-transform: uppercase;
}
/* зріз сторінок */
.book__edge {
  position: absolute;
  top: 0; right: 0;
  width: 22px; height: 100%;
  transform: rotateY(90deg) translateZ(11px);
  transform-origin: right center;
  background: repeating-linear-gradient(90deg,
    #e9e6df 0 1px, #cfcbc2 1px 2px);
}

/* поверхня обкладинки в тизері — фольга без деталей */
.book__front .cover {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 16% 12% 12%;
}
.book__front .cover__logo {
  font-weight: 800; font-size: clamp(1.4rem, 3.4vw, 2.2rem);
  letter-spacing: -0.05em; color: #10131a;
}
.book__front .cover__title {
  font-size: clamp(0.5rem, 1.15vw, 0.72rem);
  font-weight: 600; line-height: 1.35;
  letter-spacing: 0.02em; text-transform: uppercase;
  color: #10131a; text-align: right;
}
.book__front .cover__title em { font-style: italic; font-weight: 800; display: block; }
.book__front .cover__map {
  position: absolute; inset: 0;
  color: #10131a; opacity: 0.34;
  overflow: hidden;
}
.book__front .cover__map svg {
  position: absolute; left: -58%; top: 0; height: 100%; width: auto;
}
.book__front img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* блік, що ковзає обкладинкою слідом за нахилом */
.book__glare {
  position: absolute; inset: 0;
  background: linear-gradient(102deg,
    transparent 30%,
    rgba(255, 255, 255, 0.55) 46%,
    rgba(255, 255, 255, 0.1) 54%,
    transparent 68%);
  background-size: 260% 100%;
  background-position: var(--glare, 40%) 0;
  mix-blend-mode: screen;
  pointer-events: none;
}

.book__shadow {
  position: absolute;
  left: 50%; bottom: -9%;
  width: 84%; height: 26px;
  translate: -50% 0;
  background: radial-gradient(50% 50%, rgba(0, 0, 0, 0.55), transparent 72%);
  filter: blur(11px);
  transform: rotateX(84deg);
}

.specs { display: grid; gap: 0; margin: 34px 0 0; }
.spec {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 18px;
  padding: 15px 0;
  border-top: 1px solid var(--line-soft);
}
.spec:last-child { border-bottom: 1px solid var(--line-soft); }
.spec__k {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--dim);
}
.spec__v { font-weight: 600; text-align: right; }

/* -------------------------------------------------------- плакати */

.poster__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(30px, 5vw, 70px);
  align-items: center;
}
@media (max-width: 860px) { .poster__grid { grid-template-columns: 1fr; } }

/* сцена «плакат на стіні» — зібрана зі стилів, не фотографія */
.poster__wall {
  position: relative;
  aspect-ratio: 5 / 4;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  display: grid; place-items: center;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.36), transparent 42%),
    repeating-linear-gradient(90deg,
      rgba(255, 255, 255, 0.028) 0 1px, transparent 1px 96px),
    repeating-linear-gradient(0deg,
      rgba(255, 255, 255, 0.028) 0 1px, transparent 1px 132px),
    linear-gradient(148deg, #6e6f6c, #4c4e4d 46%, #3b3d3d);
}
:root[data-theme='light'] .poster__wall {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.14), transparent 42%),
    repeating-linear-gradient(90deg,
      rgba(0, 0, 0, 0.03) 0 1px, transparent 1px 96px),
    repeating-linear-gradient(0deg,
      rgba(0, 0, 0, 0.03) 0 1px, transparent 1px 132px),
    linear-gradient(148deg, #b7b6b1, #9d9d99 46%, #868886);
}
.poster__wall::after {
  content: '';
  position: absolute; inset: 0;
  background-image: var(--grain-url);
  background-size: 200px 200px;
  opacity: 0.14;
  mix-blend-mode: overlay;
}

.poster__sheet {
  position: relative;
  width: 54%;
  aspect-ratio: 1 / 1.414;
  border-radius: 2px;
  overflow: hidden;
  transform: perspective(900px) rotateY(-13deg) rotateX(2deg);
  box-shadow: 22px 26px 42px -18px rgba(0, 0, 0, 0.72);
  /* легка хвиля наклеєного аркуша */
  clip-path: polygon(0.6% 0, 100% 1.6%, 99.4% 100%, 0 98.6%);
}
.poster__sheet-in {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 12% 10%;
  color: #12151b;
}
.poster__logo { font-weight: 800; font-size: clamp(1rem, 2.6vw, 1.7rem); letter-spacing: -0.05em; }
.poster__txt {
  font-size: clamp(0.46rem, 1.05vw, 0.68rem);
  font-weight: 600; line-height: 1.4;
  letter-spacing: 0.03em; text-transform: uppercase;
}
.poster__txt em { font-style: italic; font-weight: 800; display: block; }
/* справжній QR на identity.cukr.club — його можна відсканувати просто з екрана */
.poster__qr {
  position: absolute; right: 9%; bottom: 10%;
  width: clamp(30px, 7vw, 56px); aspect-ratio: 1;
  padding: 6%;
  background: rgba(255, 255, 255, 0.72);
  color: #12151b;
  border-radius: 2px;
}
.poster__qr svg { width: 100%; height: 100%; display: block; }
/* смуга світла, що ковзає плакатом — те, заради чого його друкують на фользі */
.poster__gloss {
  position: absolute; inset: -30%;
  background: linear-gradient(104deg,
    transparent 34%, rgba(255, 255, 255, 0.7) 47%,
    rgba(255, 255, 255, 0.08) 53%, transparent 66%);
  mix-blend-mode: screen;
  animation: sweep 7s var(--ease-io) infinite;
}
@keyframes sweep {
  0%, 62% { translate: -60% 0; }
  92%, 100% { translate: 60% 0; }
}
.poster__note {
  font-size: clamp(1.02rem, 1.85vw, 1.4rem);
  font-weight: 300; line-height: 1.5;
}

/* ------------------------------------------------------- розвороти */

.spreads {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
  gap: 14px;
}
.spread {
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface);
  transition: transform 0.5s var(--ease), border-color 0.4s;
}
.spread:hover { transform: translateY(-4px); border-color: var(--foil-3); }
.spread img { width: 100%; height: auto; }

/* ----------------------------------------------------------- форма */

.form-section { position: relative; overflow: hidden; }
.form-section::before {
  content: '';
  position: absolute; inset: auto 0 -40% 0; height: 80%;
  background: radial-gradient(50% 60% at 50% 100%,
    color-mix(in srgb, var(--foil-2) 12%, transparent), transparent 70%);
  pointer-events: none;
}

.form-card {
  position: relative;
  max-width: 720px;
  margin-inline: auto;
  padding: clamp(28px, 4.4vw, 54px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: color-mix(in srgb, var(--bg-2) 92%, transparent);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(6px);
}

.form-card h2 {
  margin: 0 0 10px;
  font-weight: 800;
  font-size: clamp(1.5rem, 3.4vw, 2.4rem);
  letter-spacing: -0.035em;
  line-height: 1.05;
  text-transform: uppercase;
}
.form-card__sub { margin: 0 0 30px; color: var(--muted); font-size: 0.98rem; }

.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
@media (max-width: 520px) { .choice { grid-template-columns: 1fr; } }

.choice label {
  position: relative;
  display: block;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color 0.3s, background 0.3s;
}
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice label:hover { border-color: var(--foil-3); }
.choice input:checked + .choice__body { color: var(--text); }
.choice label:has(input:checked) {
  border-color: var(--foil-1);
  background: var(--surface-2);
}
.choice__t { display: block; font-weight: 600; font-size: 0.95rem; }
.choice__d { display: block; margin-top: 3px; font-size: 0.8rem; color: var(--muted); }

.field { margin-bottom: 14px; }
.field label {
  display: block; margin-bottom: 7px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--dim);
}
.input, .textarea, select.input {
  width: 100%;
  padding: 14px 16px;
  font: inherit; font-size: 0.98rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: border-color 0.3s, background 0.3s;
}
.input:focus, .textarea:focus {
  outline: none;
  border-color: var(--foil-1);
  background: var(--surface-2);
}
.textarea { min-height: 84px; resize: vertical; }
.input::placeholder { color: var(--dim); }

.row2 { display: grid; grid-template-columns: 1fr 120px; gap: 14px; }
@media (max-width: 520px) { .row2 { grid-template-columns: 1fr; } }

.hp { position: absolute; left: -9999px; opacity: 0; }

.form-card .btn--primary { width: 100%; justify-content: center; margin-top: 8px; }

.form-note {
  margin: 16px 0 0;
  font-size: 0.78rem; line-height: 1.5;
  color: var(--dim);
}

.form-msg {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 0.92rem;
  display: none;
}
.form-msg.is-on { display: block; animation: rise 0.5s var(--ease); }
.form-msg.is-err { border-color: color-mix(in srgb, #e2604f 45%, var(--line)); }
.form-msg.is-ok { border-color: color-mix(in srgb, var(--brass) 45%, var(--line)); }
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------- FAQ */

.faq { display: grid; gap: 0; max-width: 860px; }
.faq details {
  border-top: 1px solid var(--line-soft);
  padding: 4px 0;
}
.faq details:last-of-type { border-bottom: 1px solid var(--line-soft); }
.faq summary {
  list-style: none;
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px;
  padding: 22px 0;
  cursor: pointer;
  font-weight: 600;
  font-size: clamp(1rem, 1.8vw, 1.16rem);
  transition: color 0.3s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--foil-1); }
.faq summary::after {
  content: '';
  flex: none;
  width: 13px; height: 13px;
  border-right: 1.5px solid var(--foil-3);
  border-bottom: 1.5px solid var(--foil-3);
  rotate: 45deg;
  transition: rotate 0.4s var(--ease);
}
.faq details[open] summary::after { rotate: -135deg; }
.faq details p {
  margin: 0 0 22px;
  max-width: 62ch;
  color: var(--muted);
  line-height: 1.65;
}

.pickup { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.pickup span {
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: 0.85rem;
  color: var(--muted);
}

/* --------------------------------------------------------- футер */

.footer {
  border-top: 1px solid var(--line-soft);
  padding: clamp(44px, 6vw, 76px) 0 40px;
}
.footer__grid {
  display: flex; flex-wrap: wrap; gap: 28px;
  align-items: flex-end; justify-content: space-between;
}
.footer__logo {
  font-weight: 800; font-size: clamp(2.6rem, 9vw, 6.4rem);
  letter-spacing: -0.055em; line-height: 0.85;
}
.footer__links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer__links a {
  text-decoration: none; color: var(--muted);
  font-size: 0.9rem;
  border-bottom: 1px solid transparent;
  transition: color 0.3s, border-color 0.3s;
}
.footer__links a:hover { color: var(--text); border-color: var(--foil-3); }
.footer__legal {
  margin-top: 34px; padding-top: 22px;
  border-top: 1px solid var(--line-soft);
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between;
  font-size: 0.76rem; color: var(--dim);
}

/* ------------------------------------------------- доступність */

/* видима рамка для навігації з клавіатури — на фользі потрібен контраст */
:focus-visible {
  outline: 2px solid var(--foil-1);
  outline-offset: 3px;
  border-radius: 4px;
}
:root[data-theme='light'] :focus-visible { outline-color: #0d1014; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 30;
  padding: 12px 20px;
  background: var(--btn-bg); color: var(--btn-ink);
  border-radius: var(--r-pill);
  font-weight: 600; font-size: 0.9rem; text-decoration: none;
  transition: top 0.25s var(--ease);
}
.skip:focus { top: 12px; }

/* ------------------------------------------------------- поява */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }

/* повага до налаштувань доступності */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .manifest__map path { stroke-dashoffset: 0; }
  .grain { display: none; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { padding-top: 104px; }
  .count { gap: 12px 20px; }
  .scroll-hint { display: none; }
}
