/* ============================================================
   ekcelo — scrollytelling site
   Цвета по ТЗ:
   --bg:        #0d1117  (угольный фон)
   --neon-cyan: #00f3ff  собственность
   --neon-pink: #ff007f  аренда
   --neon-lime: #39ff14  договор снабжения
   ============================================================ */

:root {
  --bg: #07090f;
  --bg-soft: #161b22;
  --ink: #e6edf3;
  --ink-dim: #8b949e;
  --ink-mute: #6e7681;
  --neon-cyan: #00f3ff;
  --neon-pink: #ff007f;
  --neon-lime: #39ff14;
  --neon-white: #f0fbff;
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.10);
  --font-sans: "Inter Tight", "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  overflow-x: hidden;
  min-height: 100vh;
}

/* ============================================================
   HEADER
   ============================================================ */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: 64px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: linear-gradient(180deg, rgba(13,17,23,0.90) 0%, rgba(13,17,23,0.55) 60%, rgba(13,17,23,0) 100%);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  pointer-events: none;
}
.site-header > * { pointer-events: auto; }

.logo {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}
.logo::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--neon-cyan);
  box-shadow: 0 0 8px var(--neon-cyan), 0 0 14px rgba(0,243,255,0.6);
  transform: translateY(-1px);
  margin-right: 8px;
}
.logo span {
  color: var(--ink-dim);
  font-weight: 400;
  margin-left: 6px;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.btn-contact {
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: transparent;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  padding: 9px 18px;
  cursor: pointer;
  transition: all 0.25s ease;
}
.btn-contact:hover {
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  box-shadow: 0 0 12px rgba(0,243,255,0.25);
}

/* Header right cluster (token input + Contact button) */
.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Non-distracting token input in the header */
.token-input {
  font: inherit;
  font-size: 12px;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  color: var(--ink-dim);
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  padding: 8px 14px;
  width: 200px;
  outline: none;
  transition: all 0.25s ease;
}
.token-input::placeholder {
  color: var(--ink-mute);
  font-weight: 400;
  letter-spacing: 0.04em;
  font-family: var(--font-sans);
  font-size: 12px;
}
.token-input:hover {
  border-color: rgba(255,255,255,0.18);
  color: var(--ink);
}
.token-input:focus {
  border-color: var(--neon-cyan);
  color: var(--ink);
  background: rgba(0,243,255,0.04);
  box-shadow: 0 0 0 3px rgba(0,243,255,0.10);
}
.token-input.invalid {
  border-color: var(--neon-pink);
  color: var(--neon-pink);
  box-shadow: 0 0 0 3px rgba(255,0,127,0.10);
}

/* ============================================================
   GENERIC MODAL (Contact)
   ============================================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
}
.modal.open { display: flex; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 12, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: modal-fade 0.25s ease both;
}
.modal-panel {
  position: relative;
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 28px 28px 26px;
  background: rgba(13, 17, 23, 0.92);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6),
              0 0 0 1px rgba(0,243,255,0.08),
              inset 0 1px 0 rgba(255,255,255,0.06);
  animation: modal-rise 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes modal-fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes modal-rise {
  from { opacity: 0; transform: translateY(20px) scale(0.97) }
  to   { opacity: 1; transform: translateY(0)    scale(1) }
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 50%;
  color: var(--ink-dim);
  cursor: pointer;
  transition: all 0.2s ease;
}
.modal-close:hover {
  color: var(--ink);
  border-color: var(--ink);
  background: rgba(255,255,255,0.05);
}
.modal-panel h3 {
  font-size: 22px;
  font-weight: 600;
  margin: 6px 0 22px;
  letter-spacing: -0.01em;
}
.contact-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.contact-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 16px;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
}
.contact-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.contact-value {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}
.contact-value:hover { color: var(--neon-cyan); }
.contact-item .qr {
  width: 100%;
  max-width: 120px;
  aspect-ratio: 1;
  border-radius: 6px;
  background: #fff;
  padding: 6px;
  margin-top: 6px;
  align-self: center;
}

/* Inline row inside .contact-item: value + copy button on one line */
.contact-row-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

/* ============================================================
   CONTACT MODAL — partners + quality blocks
   ============================================================ */
.contact-intro {
  text-align: center;
  font-size: 14px;
  color: var(--ink-dim);
  margin: 0 0 18px;
  line-height: 1.45;
}
.partners-wrap[hidden] { display: none; }
.partners-block {
  margin: 0 0 22px;
  padding: 16px;
  background: rgba(0, 243, 255, 0.03);
  border: 1px solid rgba(0, 243, 255, 0.12);
  border-radius: 12px;
}
.partners-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--neon-cyan);
  margin-bottom: 10px;
  text-align: center;
}
.partners-list {
  /* Show ~3.5 rows then scroll on desktop, ~2.5 on mobile */
  max-height: 360px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
  -webkit-overflow-scrolling: touch;
}
.partners-list::-webkit-scrollbar { width: 6px; }
.partners-list::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.12);
  border-radius: 3px;
}
.partner-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
}
.partner-row .partner-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 2px;
  min-width: 0;
}
.partner-row .partner-head .partner-city {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 10px;
  color: var(--ink-mute);
}
.partner-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.partner-line .copy-btn-mini {
  margin-left: auto;
  flex-shrink: 0;
}
.partner-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}
.partner-city {
  font-size: 11px;
  color: var(--ink-mute);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}
.partner-link {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--neon-cyan);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
  transition: opacity 0.18s ease;
}
.partner-link:hover { opacity: 0.7; }
.partner-contact {
  font-size: 12px;
  color: var(--ink-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}
.copy-btn-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 5px;
  color: var(--ink-mute);
  cursor: pointer;
  transition: all 0.18s ease;
  padding: 0;
}
.copy-btn-mini svg { width: 12px; height: 12px; }
.copy-btn-mini:hover {
  color: var(--neon-cyan);
  border-color: var(--neon-cyan);
  background: rgba(0,243,255,0.06);
}
.copy-btn-mini.copied {
  color: var(--neon-lime);
  border-color: var(--neon-lime);
  box-shadow: 0 0 8px rgba(57,255,20,0.3);
}

.quality-block { margin: 0; }
.quality-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 10px;
}
/* Все шрифты внутри quality-block — серые (как .contact-intro);
   размер ссылок телефона/email — как у .partner-link (12 px, mono). */
.quality-block .contact-label { color: var(--ink-dim); }
.quality-block .contact-value {
  color: var(--ink-dim);
  font-size: 12px;
}
.quality-block .contact-value:hover { color: var(--ink); }

/* New compact «quality» card — same vocabulary as .partner-row, with QRs aside. */
.quality-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 14px;
  background: rgba(0, 243, 255, 0.03);
  border: 1px solid rgba(0, 243, 255, 0.12);
  border-radius: 10px;
}
.quality-lines {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
}
.quality-qrs {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.qr-mini {
  width: 72px;
  height: 72px;
  border-radius: 6px;
  background: #fff;
  padding: 4px;
  box-sizing: border-box;
  display: block;
}
@media (max-width: 720px) {
  .quality-row { flex-direction: column; align-items: stretch; gap: 10px; }
  .quality-qrs { justify-content: flex-start; }
}
.copy-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 6px;
  color: var(--ink-dim);
  cursor: pointer;
  transition: all 0.18s ease;
  flex-shrink: 0;
}
.copy-btn:hover {
  color: var(--neon-cyan);
  border-color: var(--neon-cyan);
  background: rgba(0,243,255,0.06);
}
.copy-btn.copied {
  color: var(--neon-lime);
  border-color: var(--neon-lime);
  box-shadow: 0 0 10px rgba(57,255,20,0.3);
}

/* Floating toast for "copied" feedback */
.copy-toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%) translateY(20px);
  z-index: 200;
  padding: 10px 18px;
  background: rgba(13, 17, 23, 0.95);
  border: 1px solid rgba(57,255,20,0.4);
  border-radius: 999px;
  color: var(--ink);
  font-size: 13px;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5), 0 0 16px rgba(57,255,20,0.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.22s ease;
}
.copy-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================================
   SCROLL CONTAINER
   ============================================================ */

#scrolly {
  position: relative;
  width: 100%;
  /* total scroll length = 6 phases * 110vh — controlled by inline JS  */
}

/* DESKTOP split-screen: sticky graphic left, text flows right */
.scrolly-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.graphic-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  background: var(--bg);
}

.text-flow {
  position: relative;
  z-index: 2;
}

/* ============================================================
   GRAPHIC STAGE: frames + neon overlay + cards
   ============================================================ */

.stage-canvas {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.frames {
  position: relative;
  width: min(100%, calc(100vh * 1.5));
  aspect-ratio: 1536 / 1024;
  max-width: 100%;
  max-height: 100%;
}

.frames img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
  user-select: none;
}

.frames img.active { opacity: 1; }

/* The neon "ПВЗ Фреон" sign overlay — sits on top of frame 5
   to ensure it glows brilliantly (frame 5's sign is already lit,
   but we add an extra halo) */
.sign-halo {
  position: absolute;
  /* approx position of the sign on frame 5 (1536x1024 native) */
  left: 27.5%;
  top: 35%;
  width: 32%;
  height: 7%;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
  background: radial-gradient(ellipse at center,
    rgba(240, 251, 255, 0.55) 0%,
    rgba(0, 243, 255, 0.35) 30%,
    rgba(0, 243, 255, 0.08) 60%,
    transparent 75%);
  filter: blur(8px);
  mix-blend-mode: screen;
}

.frames.phase-final .sign-halo { opacity: 1; }

/* ============================================================
   NEON SVG OVERLAY
   ============================================================ */

.neon-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

/* Generic stroke base — line "drawn" via stroke-dashoffset */
.neon-line {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: var(--len, 1000);
  stroke-dashoffset: var(--len, 1000);
  transition: stroke-dashoffset 0.9s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.5s ease;
  opacity: 0;
}
.neon-line.lit {
  stroke-dashoffset: 0;
  opacity: 1;
}

.neon-line.cyan {
  stroke: var(--neon-cyan);
  filter: drop-shadow(0 0 4px var(--neon-cyan)) drop-shadow(0 0 10px rgba(0,243,255,0.55));
}
.neon-line.pink {
  stroke: var(--neon-pink);
  filter: drop-shadow(0 0 4px var(--neon-pink)) drop-shadow(0 0 10px rgba(255,0,127,0.55));
}
.neon-line.lime {
  stroke: var(--neon-lime);
  filter: drop-shadow(0 0 4px var(--neon-lime)) drop-shadow(0 0 10px rgba(57,255,20,0.55));
}

/* Plot polygon */
.plot-outline {
  fill: rgba(0, 243, 255, 0.04);
  stroke: var(--neon-cyan);
  stroke-width: 2.5;
  stroke-dasharray: var(--len, 4000);
  stroke-dashoffset: var(--len, 4000);
  filter: drop-shadow(0 0 4px var(--neon-cyan)) drop-shadow(0 0 10px rgba(0,243,255,0.5));
  transition: stroke-dashoffset 1.2s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.5s ease;
  opacity: 0;
}
.plot-outline.lit {
  stroke-dashoffset: 0;
  opacity: 1;
}

/* Hotspot dots (water manhole, transformer, etc) */
.hotspot {
  opacity: 0;
  transform-origin: center;
  transform-box: fill-box;
  transition: opacity 0.5s ease;
}
.hotspot.lit { opacity: 1; }
.hotspot circle.core {
  fill: currentColor;
}
.hotspot circle.halo {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  opacity: 0.6;
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50%      { transform: scale(1.8); opacity: 0; }
}
.hotspot.cyan { color: var(--neon-cyan); filter: drop-shadow(0 0 6px var(--neon-cyan)); }
.hotspot.pink { color: var(--neon-pink); filter: drop-shadow(0 0 6px var(--neon-pink)); }
.hotspot.lime { color: var(--neon-lime); filter: drop-shadow(0 0 6px var(--neon-lime)); }
.hotspot.white { color: var(--neon-white); filter: drop-shadow(0 0 8px var(--neon-white)) drop-shadow(0 0 14px rgba(0,243,255,0.6)); }

/* Node bubbles for legal graph (Beneficiary / Tenant / Asset) */
.node {
  opacity: 0;
  transition: opacity 0.6s ease, transform 0.6s ease;
  transform: translateY(8px);
}
.node.lit {
  opacity: 1;
  transform: translateY(0);
}
.node-bg {
  fill: rgba(13, 17, 23, 0.85);
  stroke: var(--neon-cyan);
  stroke-width: 1.5;
  filter: drop-shadow(0 0 6px var(--neon-cyan));
}
.node-label {
  fill: var(--ink);
  font-family: var(--font-sans);
  font-size: 25px;
  font-weight: 600;
  text-anchor: middle;
  letter-spacing: 0.02em;
}
.node-sub {
  fill: var(--ink-dim);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  text-anchor: middle;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* Tag labels along neon lines (textPath) */
.path-label {
  font-family: var(--font-mono);
  font-size: 26px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.6s ease 0.3s;
}
.path-label.lit { opacity: 1; }
.path-label.cyan { fill: var(--neon-cyan); filter: drop-shadow(0 0 6px var(--neon-cyan)) drop-shadow(0 0 14px rgba(0,243,255,0.45)); }
.path-label.pink { fill: var(--neon-pink); filter: drop-shadow(0 0 6px var(--neon-pink)) drop-shadow(0 0 14px rgba(255,0,127,0.45)); }
.path-label.lime { fill: var(--neon-lime); filter: drop-shadow(0 0 6px var(--neon-lime)) drop-shadow(0 0 14px rgba(57,255,20,0.45)); }

/* ============================================================
   FLOATING DOCUMENT CARDS (frosted glass)
   ============================================================ */

.docs-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.doc-card {
  position: absolute;
  min-width: 180px;
  max-width: 240px;
  padding: 14px 16px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.45),
              inset 0 1px 0 rgba(255,255,255,0.06);
  opacity: 0;
  transform: translateY(12px) scale(0.96);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.doc-card.lit {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.doc-card .doc-kicker {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.doc-card .doc-kicker::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 6px currentColor;
}
.doc-card.cyan .doc-kicker { color: var(--neon-cyan); }
.doc-card.pink .doc-kicker { color: var(--neon-pink); }
.doc-card.lime .doc-kicker { color: var(--neon-lime); }
.doc-card.white .doc-kicker { color: var(--neon-white); }

.doc-card .doc-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
  margin-bottom: 4px;
}
.doc-card .doc-meta {
  font-size: 11px;
  color: var(--ink-mute);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

/* Position cards inside the stage (desktop) */
.doc-card.pos-tl { top: 14%; left: 4%; }
.doc-card.pos-tr { top: 18%; right: 4%; }
.doc-card.pos-bl { bottom: 12%; left: 4%; }
.doc-card.pos-br { bottom: 16%; right: 4%; }
.doc-card.pos-ml { top: 48%; left: 3%; }
.doc-card.pos-mr { top: 42%; right: 3%; }

/* ============================================================
   TEXT FLOW (right column on desktop)
   ============================================================ */

.text-flow {
  padding: 0 56px;
}

.intro-block,
.text-step {
  min-height: 38vh;
  padding: 7vh 0 3vh;
  max-width: 540px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.intro-block {
  padding-top: 14vh;
  min-height: 60vh;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--neon-cyan);
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--neon-cyan);
  box-shadow: 0 0 6px var(--neon-cyan);
}

.intro-block h1 {
  font-size: clamp(38px, 4vw, 62px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 28px;
  text-wrap: balance;
}

.intro-block h1 em {
  font-style: normal;
  background: linear-gradient(120deg, var(--neon-cyan), var(--neon-white));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 12px rgba(0,243,255,0.35));
}

.intro-block p {
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-dim);
  margin: 0 0 14px;
  text-wrap: pretty;
}

/* Pulsing scroll arrow */
.scroll-arrow {
  margin-top: 32px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 40px;
  height: 56px;
  color: var(--neon-cyan);
  transition: opacity 0.5s ease, transform 0.5s ease;
  opacity: 1;
}
.scroll-arrow.hidden {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}
#scroll-cue {
  transition: opacity 0.5s ease, transform 0.5s ease;
}
#scroll-cue.hidden {
  opacity: 0;
  transform: translateY(-4px);
}
.scroll-arrow svg {
  width: 28px;
  height: 44px;
  animation: arrow-bounce 1.6s ease-in-out infinite;
  filter: drop-shadow(0 0 6px var(--neon-cyan)) drop-shadow(0 0 14px rgba(0,243,255,0.5));
}
@keyframes arrow-bounce {
  0%, 100% { transform: translateY(-3px); opacity: 0.55; }
  50%      { transform: translateY(6px);  opacity: 1; }
}

/* Text step blocks */
.text-step .step-no {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-mute);
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.text-step .step-no .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid currentColor;
  font-size: 12px;
  font-weight: 600;
}
.text-step.cyan .step-no { color: var(--neon-cyan); }
.text-step.pink .step-no { color: var(--neon-pink); }
.text-step.lime .step-no { color: var(--neon-lime); }
.text-step.white .step-no { color: var(--neon-white); }

.text-step h2 {
  font-size: clamp(28px, 2.6vw, 38px);
  line-height: 1.1;
  font-weight: 700;
  margin: 0 0 22px;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.text-step p {
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-dim);
  margin: 0 0 14px;
  text-wrap: pretty;
}

.text-step ul {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
}
.text-step ul li {
  position: relative;
  padding: 10px 0 10px 26px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.text-step ul li:last-child { border-bottom: none; }
.text-step ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  width: 14px;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}
.text-step.cyan ul li { color: var(--ink); }
.text-step.cyan ul li::before { background: var(--neon-cyan); box-shadow: 0 0 4px var(--neon-cyan); opacity: 1; }
.text-step.pink ul li::before { background: var(--neon-pink); box-shadow: 0 0 4px var(--neon-pink); opacity: 1; }
.text-step.lime ul li::before { background: var(--neon-lime); box-shadow: 0 0 4px var(--neon-lime); opacity: 1; }
.text-step.white ul li::before { background: var(--neon-white); box-shadow: 0 0 4px var(--neon-white); opacity: 1; }

.text-step .step-meta {
  margin-top: 14px;
  padding: 12px 14px;
  border-left: 2px solid var(--neon-cyan);
  background: rgba(0, 243, 255, 0.04);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-dim);
  line-height: 1.5;
}
.text-step.pink .step-meta { border-left-color: var(--neon-pink); background: rgba(255,0,127,0.04); }
.text-step.lime .step-meta { border-left-color: var(--neon-lime); background: rgba(57,255,20,0.04); }
.text-step.white .step-meta { border-left-color: var(--neon-white); background: rgba(240,251,255,0.04); }

/* Closing CTA section */
.closing {
  min-height: 40vh;
  padding: 8vh 0 6vh;
  max-width: 540px;
}
.closing h2 {
  font-size: clamp(32px, 3vw, 46px);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 22px;
  letter-spacing: -0.015em;
}
.closing p {
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-dim);
  margin-bottom: 32px;
}
.closing .closing-list {
  list-style: none;
  counter-reset: closing;
  padding: 0;
  margin: 0 0 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
}
.closing .closing-list li {
  position: relative;
  padding-left: 38px;
  counter-increment: closing;
}
.closing .closing-list li::before {
  content: counter(closing) ".";
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-mono);
  font-size: 17px;
  color: var(--neon-cyan);
  font-weight: 600;
}
.closing .cta-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.btn-primary {
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--bg);
  background: var(--neon-cyan);
  border: none;
  border-radius: 999px;
  padding: 14px 28px;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(0,243,255,0.45);
  transition: all 0.25s ease;
}
.btn-primary:hover {
  box-shadow: 0 0 28px rgba(0,243,255,0.7);
  transform: translateY(-1px);
}
.btn-ghost {
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: transparent;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  padding: 13px 28px;
  cursor: pointer;
  transition: all 0.25s ease;
}
.btn-ghost:hover { border-color: var(--ink); }

/* ============================================================
   TOKEN GATE PLATE
   Sits centered between the upper (graphic) and lower (text) zones
   ============================================================ */

.token-gate {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 40;
  width: min(440px, calc(100vw - 40px));
  padding: 22px 24px 20px;
  background: rgba(13, 17, 23, 0.72);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 24px 80px rgba(0,0,0,0.6),
              0 0 0 1px rgba(0,243,255,0.08),
              inset 0 1px 0 rgba(255,255,255,0.06);
  opacity: 0;
  transition: opacity 0.6s ease, transform 0.7s cubic-bezier(0.4,0,0.2,1);
  pointer-events: none;
}
.token-gate.visible {
  opacity: 1;
  pointer-events: auto;
}
.token-gate.flying-up {
  transform: translate(-50%, -260%);
  opacity: 0;
  pointer-events: none;
}

/* Token gate close button — позиционируется аналогично .modal-close */
.tg-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
}

.token-gate .tg-kicker {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--neon-cyan);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.token-gate .tg-kicker::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--neon-cyan);
  box-shadow: 0 0 6px var(--neon-cyan);
}
.token-gate h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 16px;
  line-height: 1.3;
}
.token-gate .tg-form {
  display: flex;
  gap: 8px;
}
.token-gate input {
  flex: 1;
  font: inherit;
  font-size: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 11px 14px;
  color: var(--ink);
  outline: none;
  transition: all 0.2s ease;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
}
.token-gate input:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 0 3px rgba(0,243,255,0.12);
}
.token-gate input::placeholder { color: var(--ink-mute); }
.token-gate button {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--bg);
  background: var(--neon-cyan);
  border: none;
  border-radius: 8px;
  padding: 0 18px;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(0,243,255,0.4);
  transition: all 0.2s ease;
}
.token-gate button:hover { box-shadow: 0 0 18px rgba(0,243,255,0.7); }
.token-gate .tg-hint {
  margin-top: 10px;
  font-size: 12px;
  color: var(--ink-mute);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}
.token-gate .tg-error {
  margin-top: 6px;
  font-size: 12px;
  color: var(--neon-pink);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  min-height: 16px;
}

/* ============================================================
   PROGRESS RAIL (right edge, desktop)
   ============================================================ */

.progress-rail {
  position: fixed;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.progress-rail .seg {
  width: 2px;
  height: 22px;
  background: rgba(255,255,255,0.12);
  border-radius: 2px;
  transition: background 0.4s ease, box-shadow 0.4s ease;
}
.progress-rail .seg.passed { background: var(--neon-cyan); box-shadow: 0 0 6px rgba(0,243,255,0.6); }
.progress-rail .seg.active { background: var(--neon-cyan); box-shadow: 0 0 10px var(--neon-cyan); height: 38px; }

/* ============================================================
   MOBILE — sticky sandwich
   ============================================================ */

@media (max-width: 1023px) {
  .scrolly-inner {
    grid-template-columns: 1fr;
  }
  /* On mobile hide the header token input — it competes with the logo for space */
  .token-input { display: none; }
  .contact-row { grid-template-columns: 1fr; }
  .modal-panel {
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .partners-list {
    /* Compact 2.5 visible rows on smartphone, scroll the rest */
    max-height: 220px;
  }
  .partner-row { padding: 8px 10px; gap: 3px; }
  .partner-name { font-size: 12px; }
  .partner-link, .partner-contact { font-size: 11px; }
  .partner-city { font-size: 10px; }
  .graphic-stage {
    position: sticky;
    top: 0;
    height: 46vh;
    z-index: 10;
  }
  .text-flow {
    padding: 0 22px;
    padding-top: 2vh;
  }
  /* Schliepnut' gaps mezhdu fazami — minimal vertical padding on mobile.
     Each text-step gets just enough room to read; no idle scroll between phases. */
  .intro-block,
  .text-step,
  .closing {
    min-height: 0;
    padding-top: 3vh;
    padding-bottom: 3vh;
  }
  .intro-block { padding-top: 3vh; padding-bottom: 4vh; }
  .closing { padding-top: 4vh; padding-bottom: 6vh; }

  .frames { width: 100%; }

  /* Cards inline into text flow on mobile (hidden in stage) */
  .docs-layer { display: none; }

  /* На мобиле в графической зоне оставляем только неоновые контуры
     земельного участка и здания. Всё остальное (хотспоты, узлы,
     финальные нити, подписи) скрываем — они портят логику чтения. */
  #hs-water,
  #hs-power,
  #hs-sign,
  #hs-plot,
  #line-water,
  #line-power,
  #line-sign,
  #line-sign-doc,
  #line-chain,
  #line-rent,
  #line-rent2,
  #line-rent-doc,
  #line-egrn-doc,
  #line-own,
  #line-supply,
  #label-rent,
  #label-own,
  #label-supply,
  #node-asset,
  #node-tenant,
  #node-beneficiary { display: none !important; }

  /* Mobile inline doc cards inside text — render via JS */
  .inline-doc-card {
    margin: 18px 0;
    padding: 14px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    backdrop-filter: blur(8px);
  }

  .node-label { font-size: 14px; }
  .node-sub { font-size: 9px; }
  .path-label { font-size: 10px; }

  .progress-rail { right: 10px; }
  .progress-rail .seg { width: 2px; height: 14px; }
  .progress-rail .seg.active { height: 26px; }

  .token-gate { width: calc(100vw - 32px); padding: 18px; }
  .token-gate h3 { font-size: 16px; }

  .site-header { padding: 0 18px; height: 56px; }
  .logo { font-size: 17px; }
  .logo span { display: none; }
}

/* Mobile inline doc cards — СКРЫТЫ по требованию: на смартфоне карточки документов в тексте не показываются между фазами */
.inline-doc-card { display: none !important; }

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
