/* ТЁМНОЕ НЕБО — спецпроект медиа «Полутон» */
:root {
  --night: #0B1020;
  --deep: #16213D;
  --deep2: #111A31;
  --grid: rgba(246, 241, 225, .08);
  --paper: #F3EEE3;
  --paper2: #E6DFD0;
  --ink: #1A1A1F;
  --ink2: #5E6271;
  --star: #F6F1E1;
  --star2: rgba(246, 241, 225, .66);
  --cold: #9FD3FF;
  --sodium: #FF8A3D;
  --sodium-ink: #A8440F;
  --f-display: 'Sofia Sans Extra Condensed', 'Arial Narrow', sans-serif;
  --f-serif: 'Cormorant Garamond', Georgia, serif;
  --f-text: 'Inter Tight', 'Helvetica Neue', Arial, sans-serif;
  --pad: 32px;
  --ease: cubic-bezier(.2, .75, .2, 1);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font: 400 17px/1.6 var(--f-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
p, h1, h2, h3, ol, ul, dl, dd, figure, blockquote { margin: 0; padding: 0; }
ol, ul { list-style: none; }
::selection { background: var(--sodium); color: var(--night); }
:focus-visible { outline: 2px solid var(--sodium); outline-offset: 3px; border-radius: 2px; }

.wrap { position: relative; max-width: 1440px; margin: 0 auto; padding-inline: var(--pad); }
.cap {
  font: 500 12px/1.45 var(--f-text);
  letter-spacing: .08em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}
.serif { font-family: var(--f-serif); font-style: italic; font-weight: 500; }
.kicker { color: var(--sodium); margin-bottom: 20px; }
.kicker--ink { color: var(--sodium-ink); }

/* фон-бумага и ночь */
.paper { background: var(--paper); color: var(--ink); position: relative; isolation: isolate; }
.paper--2 { background: var(--paper2); }
.paper::after {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: var(--grain); opacity: .07; mix-blend-mode: multiply;
}
.night { background: var(--night); color: var(--star); position: relative; isolation: isolate; }
.has-cols::before {
  content: ''; position: absolute; top: 0; bottom: 0; left: var(--pad); right: var(--pad);
  max-width: calc(1440px - 2 * var(--pad)); margin-inline: auto; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgba(26, 26, 31, .08) 1px, transparent 1px) 0 0 / 25% 100%;
  border-right: 1px solid rgba(26, 26, 31, .08);
}
.has-cols--dark::before {
  background-image: linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  border-right-color: var(--grid);
}
.grain { position: absolute; inset: 0; pointer-events: none; background: var(--grain); }
.grain--dark { opacity: .06; mix-blend-mode: screen; }

/* ===== служебное ===== */
.all-demos {
  position: fixed; right: 16px; bottom: 16px; z-index: 60;
  padding: 8px 12px; font-size: 11px; text-decoration: none;
  color: var(--star); background: rgba(11, 16, 32, .82);
  border: 1px solid rgba(246, 241, 225, .22);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: border-color .3s, color .3s;
}
.all-demos:hover { color: var(--sodium); border-color: var(--sodium); }
.progress { position: fixed; inset: 0 0 auto; height: 2px; z-index: 55; pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--sodium); transform-origin: 0 50%; transform: scaleX(0); }

/* ===== прелоадер ===== */
.preloader { display: none; }
.js .preloader {
  display: grid; place-items: center;
  position: fixed; inset: 0; z-index: 100;
  background-color: var(--night);
  background-image:
    linear-gradient(rgba(246, 241, 225, .13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(246, 241, 225, .13) 1px, transparent 1px),
    linear-gradient(rgba(246, 241, 225, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(246, 241, 225, .05) 1px, transparent 1px);
  background-size: 100px 100px, 100px 100px, 10px 10px, 10px 10px;
  background-position: center;
  color: var(--star);
  transition: transform .9s cubic-bezier(.75, 0, .2, 1), visibility 0s .9s;
  animation: pl-failsafe 0s 7s forwards;
}
.js:not(.is-loading) .preloader { transform: translateY(-100%); visibility: hidden; }
@keyframes pl-failsafe { to { visibility: hidden; transform: translateY(-100%); } }
.preloader__text { font-size: 14px; padding: 10px 16px; background: var(--night); border: 1px solid rgba(246, 241, 225, .2); }
.preloader__pct { display: inline-block; min-width: 2.2ch; text-align: right; color: var(--sodium); }
.preloader__corner { position: absolute; color: var(--star2); }
.preloader__corner--tl { top: 24px; left: var(--pad); }
.preloader__corner--br { bottom: 24px; right: var(--pad); }
.preloader__stars { position: absolute; inset: 0; }
.preloader__stars i {
  position: absolute; width: 3px; height: 3px; border-radius: 50%;
  background: var(--star); box-shadow: 0 0 6px rgba(246, 241, 225, .8);
  opacity: 0; animation: pl-star .5s ease-out forwards;
}
.preloader__stars i.is-cold { background: var(--cold); }
@keyframes pl-star { from { opacity: 0; transform: scale(.2); } to { opacity: 1; transform: none; } }

/* ===== HERO ===== */
.hero {
  position: relative; overflow: hidden;
  min-height: max(100svh, 680px);
  background: var(--night); color: var(--star);
}
.hero__sky { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__glow {
  position: absolute; left: -10%; right: -10%; bottom: 0; height: 62%; pointer-events: none;
  background:
    radial-gradient(48% 70% at 50% 100%, rgba(255, 150, 80, .5), rgba(255, 138, 61, .16) 48%, transparent 78%),
    linear-gradient(to top, rgba(255, 138, 61, .16), transparent 45%);
}
.hero__city { position: absolute; left: 0; bottom: 0; width: 100%; height: 13%; min-height: 70px; }
.hero__inner {
  position: relative; z-index: 2;
  min-height: inherit;
  display: grid; grid-template-rows: auto 1fr auto; grid-template-columns: minmax(0, 1fr);
  padding: 24px var(--pad) 22px;
  max-width: 1440px; margin: 0 auto;
}
.hero__top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 24px; }
.logo { display: inline-flex; flex-direction: column; gap: 2px; text-decoration: none; justify-self: start; }
.logo__mark { font: 800 30px/.9 var(--f-display); text-transform: uppercase; letter-spacing: .01em; }
.logo__mark::after { content: ''; display: inline-block; width: .32em; height: .32em; margin-left: .08em; border-radius: 50%; background: var(--sodium); vertical-align: .05em; }
.logo__sub { color: var(--star2); font-size: 11px; }
.hero__issue { text-align: center; color: var(--star2); }
.sound {
  justify-self: end; display: inline-flex; align-items: center; gap: 10px;
  background: none; border: 0; padding: 6px 0; color: var(--star);
}
.sound b { font-weight: 500; color: var(--sodium); }
.sound__bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.sound__bars i { width: 2px; height: 4px; background: currentColor; transform-origin: bottom; }
.sound[aria-pressed="true"] .sound__bars i { animation: bars 1s ease-in-out infinite alternate; }
.sound[aria-pressed="true"] .sound__bars i:nth-child(2) { animation-delay: -.4s; }
.sound[aria-pressed="true"] .sound__bars i:nth-child(3) { animation-delay: -.7s; }
@keyframes bars { from { transform: scaleY(1); } to { transform: scaleY(3); } }
.sound:hover { color: var(--sodium); }

.toc { position: absolute; inset: 0; pointer-events: none; }
.toc ol { display: contents; }
.toc__i { position: absolute; pointer-events: auto; }
.toc a {
  font: 500 15px/1.3 var(--f-text); letter-spacing: .04em; text-transform: uppercase;
  text-decoration: none; color: var(--star); white-space: nowrap;
  background: linear-gradient(var(--sodium), var(--sodium)) 0 100% / 0 1px no-repeat;
  transition: background-size .4s var(--ease), color .3s;
}
.toc a:hover, .toc a:focus-visible { background-size: 100% 1px; }
.toc a span { color: var(--sodium); }
.toc__i--1 { left: var(--pad); top: 24%; }
.toc__i--2 { left: 9%; top: calc(24% + 28px); }
.toc__i--3 { right: var(--pad); top: 19%; }
.toc__i--4 { right: 7%; top: calc(19% + 28px); }
.toc__i--5 { right: 15%; top: calc(19% + 56px); }

.hero__title-wrap { align-self: end; text-align: center; padding-bottom: 10px; }
.hero__kicker { font-size: clamp(22px, 2.3vw, 34px); line-height: 1.1; color: rgba(246, 241, 225, .88); margin-bottom: .1em; }
.hero__title {
  font: 800 20vw/1 var(--f-display);
  text-transform: uppercase; letter-spacing: -.02em;
  white-space: nowrap; margin: 0;
  filter: drop-shadow(0 .06em .18em rgba(255, 138, 61, .28));
}
.hero__line { display: inline-block; overflow: hidden; vertical-align: top; margin-top: -.12em; margin-bottom: -.06em; }
.hero__line + .hero__line { margin-left: .16em; }
.hero__word {
  position: relative; display: inline-block;
  padding: .22em 0 .05em; line-height: .78;
  background: linear-gradient(180deg, #F6F1E1 0%, #F6F1E1 46%, #FFD3AE 72%, #FF9A55 92%, #FF8A3D 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero.is-open .hero__line { overflow: visible; }
.stroke {
  position: absolute; left: 3%; width: 94%; bottom: -.03em; height: .12em; overflow: visible;
  filter: url(#rough);
}
.stroke path {
  fill: none; stroke: var(--sodium); stroke-width: 9; stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: 0;
}
.hero__bottom {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 24px;
  padding-top: 18px; border-top: 1px solid rgba(246, 241, 225, .22);
  color: var(--star2); padding-right: 120px;
}
.hero__read { text-align: right; }
.hero__scroll { text-decoration: none; color: var(--star); }
.hero__scroll span { display: inline-block; color: var(--sodium); animation: nudge 2.4s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(4px); } }

/* стартовая анимация hero (после прелоадера) */
.js .hero__word { transform: translateY(105%); transition: transform 1.3s var(--ease); }
.js .hero__line + .hero__line .hero__word { transition-delay: .12s; }
.js .stroke path { stroke-dashoffset: 1; transition: stroke-dashoffset 1.2s .9s var(--ease); }
.js .hero__kicker, .js .hero__top, .js .hero__bottom, .js .toc__i {
  opacity: 0; transform: translateY(12px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.js .is-ready .hero__word, .js.is-ready .hero__word { transform: none; }
.js.is-ready .stroke path { stroke-dashoffset: 0; }
.js.is-ready .hero__kicker, .js.is-ready .hero__top, .js.is-ready .hero__bottom, .js.is-ready .toc__i { opacity: 1; transform: none; }
.js.is-ready .hero__kicker { transition-delay: .5s; }
.js.is-ready .hero__top { transition-delay: .3s; }
.js.is-ready .hero__bottom { transition-delay: .7s; }
.js.is-ready .toc__i--1 { transition-delay: .8s; }
.js.is-ready .toc__i--2 { transition-delay: .9s; }
.js.is-ready .toc__i--3 { transition-delay: 1s; }
.js.is-ready .toc__i--4 { transition-delay: 1.1s; }
.js.is-ready .toc__i--5 { transition-delay: 1.2s; }

/* ===== появление ===== */
.js .rv { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js .rv.in { opacity: 1; transform: none; }
.mask { display: block; overflow: hidden; padding-top: .12em; margin-top: -.12em; padding-bottom: .04em; }
.mask > span { display: block; }
.js .mask > span { transform: translateY(110%); transition: transform 1.1s var(--ease); }
.js .mask.in > span { transform: none; }
.js .mask + .mask > span { transition-delay: .1s; }
.js .mask + .mask + .mask > span { transition-delay: .2s; }

/* ===== общие заголовки глав ===== */
section { scroll-margin-top: 0; }
.ch-head { margin-bottom: 72px; }
.ch-head--split { display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 24px; align-items: end; }
.ch-head--split > div { grid-column: 1 / span 7; }
.ch-head--split .ch-intro { grid-column: 9 / span 4; }
.ch-title {
  font: 800 clamp(64px, 11.2vw, 172px)/.84 var(--f-display);
  text-transform: uppercase; letter-spacing: -.01em;
}
.ch-intro { font-size: 18px; line-height: 1.55; }
.night .ch-intro { color: var(--star2); }

/* ===== ЛИД ===== */
.lead { padding: 160px 0 150px; text-align: center; }
.lead__title {
  font: 800 clamp(46px, 7.1vw, 108px)/.9 var(--f-display);
  text-transform: uppercase; letter-spacing: -.005em;
}
.paren { white-space: nowrap; color: var(--ink); }
.lead__pill {
  display: inline-block; width: 2.3em; height: .74em; margin: 0 .06em;
  border-radius: 999px; vertical-align: .02em;
  box-shadow: inset 0 0 0 1px rgba(26, 26, 31, .5);
  background: var(--night);
}
.lead__text { max-width: 780px; margin: 56px auto 0; font-size: 22px; line-height: 1.55; }
.lead__sign { margin-top: 36px; color: var(--ink2); }

/* ===== ГЛАВА 1 ===== */
.ch1 { padding: 40px 0 160px; }
.ch1 .ch-head { padding-top: 96px; border-top: 1px solid rgba(26, 26, 31, .14); }
.ch1__grid { display: grid; grid-template-columns: 5fr 7fr; gap: 56px; align-items: start; }
.ch1__text { columns: 2; column-gap: 32px; font-size: 15px; line-height: 1.62; }
.ch1__text p { margin-bottom: 1em; break-inside: avoid-column; }
.dropcap { float: left; font: 800 76px/.74 var(--f-display); margin: 6px 8px 0 0; color: var(--sodium-ink); }
.city__frame { position: relative; overflow: hidden; aspect-ratio: 900 / 640; background: var(--night); }
.city__svg { width: 100%; height: 100%; }
.city__dome { transform-box: view-box; }
.city__cap { margin-top: 18px; font-size: 15px; line-height: 1.55; max-width: 640px; }
.city__year { color: var(--sodium-ink); font-size: 13px; margin-right: 6px; }

/* ===== ГЛАВА 2 · БОРТЛЬ ===== */
.ch2 { padding: 160px 0; }
.bortle { display: grid; grid-template-columns: 8fr 4fr; gap: 48px; align-items: stretch; }
.bortle__view { position: relative; overflow: hidden; aspect-ratio: 16 / 10; border: 1px solid rgba(246, 241, 225, .18); background: var(--night); }
.bortle__sky { position: absolute; inset: 0; width: 100%; height: 100%; }
.bortle__horizon { position: absolute; left: 0; bottom: 0; width: 100%; height: 12%; }
.bortle__tag { position: absolute; color: var(--star2); }
.bortle__tag--tl { top: 16px; left: 18px; }
.bortle__tag--tr { top: 16px; right: 18px; }
.bortle__tag b { color: var(--star); font-weight: 500; }
.bortle__panel { display: flex; flex-direction: column; }
.bortle__class {
  font: 800 clamp(140px, 15vw, 230px)/.78 var(--f-display); color: var(--sodium);
  font-variant-numeric: tabular-nums; margin-bottom: 18px;
}
.bortle__class span { display: inline-block; }
.bortle__class span.flip { animation: flip .45s var(--ease); }
@keyframes flip { from { opacity: 0; transform: translateY(18%); } to { opacity: 1; transform: none; } }
.bortle__line { font-size: 13px; color: var(--star); padding-bottom: 14px; border-bottom: 1px solid rgba(246, 241, 225, .2); }
.bortle__desc { margin-top: 16px; font-size: 17px; color: var(--star2); min-height: 5.2em; }
.bortle__facts { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 22px 0 28px; }
.bortle__facts dt { color: var(--star2); font-size: 11px; margin-bottom: 4px; }
.bortle__facts dd { font: 700 26px/1.05 var(--f-display); text-transform: uppercase; letter-spacing: .01em; }
.bortle__facts sup { font-size: .55em; color: var(--sodium); }
.range { margin-top: auto; }
.range__label { display: block; color: var(--star2); margin-bottom: 6px; }
.range__input {
  -webkit-appearance: none; appearance: none; width: 100%; height: 36px; margin: 0;
  background: transparent; cursor: pointer;
}
.range__input::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(90deg, var(--star), var(--sodium)); }
.range__input::-moz-range-track { height: 2px; background: linear-gradient(90deg, var(--star), var(--sodium)); }
.range__input::-webkit-slider-thumb {
  -webkit-appearance: none; width: 26px; height: 26px; margin-top: -12px; border-radius: 50%;
  background: var(--sodium); border: 6px solid var(--night); box-shadow: 0 0 0 1px var(--sodium), 0 0 24px rgba(255, 138, 61, .6);
}
.range__input::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%; background: var(--sodium);
  border: 6px solid var(--night); box-shadow: 0 0 0 1px var(--sodium), 0 0 24px rgba(255, 138, 61, .6);
}
.range__input:focus-visible { outline: 2px solid var(--sodium); outline-offset: 4px; }
.range__ticks { display: flex; justify-content: space-between; padding: 0 8px; color: var(--star2); font-size: 11px; }
.range__ends { display: flex; justify-content: space-between; margin-top: 8px; color: var(--star2); font-size: 11px; }

/* ===== ЦИФРЫ ===== */
.facts { padding: 140px 0 150px; }
.facts__stage { position: relative; display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 24px; }
.fact { position: relative; z-index: 2; }
.fact--1 { grid-column: 1 / span 4; grid-row: 1; }
.fact--2 { grid-column: 10 / span 3; grid-row: 1; padding-top: 90px; }
.fact--3 { grid-column: 1 / span 4; grid-row: 3; margin-top: 24px; }
.facts__diagram { grid-column: 1 / -1; grid-row: 2; width: 100%; max-width: 1000px; margin: -40px auto 0; height: auto; }
.fact__num {
  font: 800 clamp(120px, 14vw, 210px)/.8 var(--f-display); letter-spacing: -.02em;
  font-variant-numeric: tabular-nums; white-space: nowrap; display: inline-block;
}
.fact__num small { font-size: .34em; margin-left: .06em; letter-spacing: 0; color: var(--sodium-ink); }
.fact__text { margin-top: 14px; max-width: 300px; font-size: 16px; line-height: 1.5; }
.facts__callouts { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 1; }
.facts__callouts path { fill: none; stroke: var(--sodium-ink); stroke-width: 1; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.4s var(--ease); }
.facts__callouts circle { fill: var(--sodium-ink); }
.facts__callouts.in path { stroke-dashoffset: 0; }

/* ===== ГЛАВА 3 · ГЛАЗ ===== */
.ch3 { padding: 160px 0; }
.eye { display: grid; grid-template-columns: 7fr 4fr; gap: 56px; align-items: center; }
.eye__svg { width: 100%; height: auto; }
.eye__n { opacity: 0; transition: opacity .5s; }
.eye__n.on { opacity: 1; }
.eye__n.hl rect { fill: var(--sodium); }
.eye__rays path { stroke-dasharray: 6 4; animation: rays 3s linear infinite; }
@keyframes rays { to { stroke-dashoffset: -40; } }
.eye__list { display: grid; gap: 4px; counter-reset: e; }
.eye__list li {
  display: grid; grid-template-columns: 30px 1fr; gap: 2px 14px; align-items: start;
  padding: 12px 0; border-top: 1px solid rgba(26, 26, 31, .14);
  opacity: .32; transition: opacity .5s;
}
.eye__list li.on { opacity: 1; }
.eye__num {
  grid-row: span 2; display: grid; place-items: center; width: 24px; height: 24px;
  background: var(--paper2); border: 1px solid var(--ink); font-weight: 600; font-size: 12px;
}
.eye__list b { display: inline-block; justify-self: start; font-weight: 600; padding: 1px 6px; background: var(--paper2); }
.eye__list li > span:last-child { font-size: 15px; line-height: 1.45; }
.eye__list li:hover .eye__num { background: var(--sodium); }

/* тест */
.quiz { display: grid; grid-template-columns: 5fr 7fr; gap: 56px; align-items: center; margin-top: 140px; padding-top: 72px; border-top: 1px solid rgba(26, 26, 31, .14); }
.quiz__title { font: 800 clamp(52px, 6vw, 92px)/.88 var(--f-display); text-transform: uppercase; }
.quiz__lead { margin-top: 24px; font-size: 17px; max-width: 460px; }
.quiz__result { margin-top: 22px; min-height: 4.8em; font-size: 17px; max-width: 460px; padding-left: 16px; border-left: 2px solid var(--sodium); }
.quiz__result:empty { border-color: transparent; }
.quiz__result b { color: var(--sodium-ink); }
.quiz__btns { display: flex; gap: 12px; margin-top: 18px; }
.quiz__note { margin-top: 28px; color: var(--ink2); max-width: 420px; }
.quiz__sky { position: relative; }
.quiz__svg { width: 100%; max-width: 640px; margin-left: auto; height: auto; box-shadow: 0 30px 60px -30px rgba(11, 16, 32, .6); }
.qs { cursor: pointer; outline: none; }
.qs__hit { fill: transparent; stroke: transparent; transition: stroke .2s; }
.qs__dot { fill: var(--star); transition: fill .3s; }
.qs:hover .qs__hit, .qs:focus-visible .qs__hit { stroke: var(--sodium); stroke-width: 1.2; }
.qs.is-wrong .qs__dot { fill: var(--cold); }
.qs.is-wrong .qs__hit { stroke: rgba(159, 211, 255, .6); stroke-dasharray: 2 3; stroke-width: 1; }
.ql { stroke-dashoffset: 1; stroke-dasharray: 1; transition: stroke-dashoffset 1.6s var(--ease); }
.ql--pointer { stroke-dasharray: 4 5; stroke-dashoffset: 0; visibility: hidden; }
.quiz--hint .ql--dipper, .quiz--solved .ql--dipper, .quiz--solved .ql--little { stroke-dashoffset: 0; }
.quiz--solved .ql--pointer { visibility: visible; animation: fadein 1s .6s both; }
.quiz__names, .quiz__ring { visibility: hidden; }
.quiz--solved .quiz__names, .quiz--solved .quiz__ring { visibility: visible; animation: fadein .8s 1s both; }
.quiz--hint .quiz__names text:not(:first-child) { visibility: visible; }
.quiz__ring { transform-origin: 388px 96px; }
.quiz--solved .quiz__ring { animation: fadein .8s 1s both, pulse 2.4s 1.8s ease-in-out infinite; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse { 50% { transform: scale(1.35); opacity: .4; } }

.btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 20px;
  font: 600 14px/1 var(--f-text); letter-spacing: .04em; text-transform: uppercase; text-decoration: none;
  border: 1px solid currentColor; background: none; border-radius: 0;
  transition: background .25s, color .25s, border-color .25s;
}
.btn--ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn--sodium { background: var(--sodium); color: var(--night); border-color: var(--sodium); clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%); padding-right: 30px; }
.btn--sodium:hover { background: var(--star); border-color: var(--star); }

/* ===== ЦИТАТА ===== */
.quote { padding: 150px 0 170px; text-align: center; }
.quote__edge { position: absolute; left: 0; top: -59px; width: 100%; height: 60px; z-index: 1; }
.quote__sky { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: .9; }
.quote__fig { max-width: 1120px; margin: 0 auto; }
.quote__text { font-size: clamp(32px, 4.3vw, 62px); line-height: 1.12; color: var(--star); }
.quote__text p::first-letter { color: var(--sodium); }
.quote figcaption { margin-top: 36px; color: var(--sodium); }

/* ===== ГЛАВА 4 · ПОЛАРОИДЫ ===== */
.ch4 { padding: 160px 0 120px; overflow: hidden; }
.ch4 .ch-head { margin-bottom: 24px; }
.strip-wrap { position: relative; }
.strip {
  display: flex; gap: 44px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding: 64px max(var(--pad), calc((100vw - 1440px) / 2 + var(--pad))) 48px;
  scroll-padding-inline: max(var(--pad), calc((100vw - 1440px) / 2 + var(--pad)));
  scrollbar-width: thin; scrollbar-color: var(--ink2) transparent;
}
.strip:focus-visible { outline-offset: -4px; }
.polaroid {
  flex: 0 0 300px; position: relative; scroll-snap-align: start;
  padding: 14px 14px 20px; background: #FBF8F1;
  box-shadow: 0 1px 0 rgba(26, 26, 31, .08), 0 24px 40px -22px rgba(26, 26, 31, .45);
  transform: rotate(var(--tilt, 0deg));
  transition: transform .5s var(--ease);
}
.polaroid:hover { transform: rotate(0deg) translateY(-6px); }
.polaroid::before, .polaroid::after {
  content: ''; position: absolute; left: 50%; top: -24px;
  border: 2px solid #8C909C; border-radius: 10px; border-bottom-color: transparent;
  transform: translateX(-50%) rotate(6deg);
}
.polaroid::before { width: 16px; height: 50px; border-bottom-color: #8C909C; }
.polaroid::after { width: 9px; height: 34px; top: -18px; margin-left: 1px; border-color: #A4A8B3; border-top-color: transparent; }
.polaroid__photo {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden;
  background:
    radial-gradient(130% 75% at 50% 100%, rgba(255, 170, 105, var(--glow)) 0%, rgba(255, 138, 61, calc(var(--glow) * .55)) 38%, transparent 80%),
    linear-gradient(180deg, rgba(58, 53, 80, calc(var(--glow) * .8)), transparent 70%),
    linear-gradient(180deg, #0B1020, #16213D);
}
.polaroid__photo svg { width: 100%; height: 100%; }
.polaroid__photo::after { content: ''; position: absolute; inset: 0; background: var(--grain); opacity: .08; mix-blend-mode: screen; pointer-events: none; }
.polaroid__city { margin-top: 14px; font-size: 30px; line-height: 1; color: var(--ink); }
.polaroid__val { margin-top: 10px; color: var(--ink); }
.polaroid__val b { font: 800 26px/1 var(--f-display); letter-spacing: 0; margin-right: 4px; color: var(--sodium-ink); }
.polaroid__meta { margin-top: 6px; color: var(--ink2); font-size: 11px; }
.strip-nav { display: flex; align-items: center; justify-content: space-between; }
.strip-hint { color: var(--ink2); }
.btn-round {
  width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--ink); background: none; font-size: 18px;
  transition: background .25s, color .25s;
}
.btn-round + .btn-round { margin-left: 8px; }
.btn-round:hover { background: var(--ink); color: var(--paper); }

/* ===== ГЛАВА 5 · ЧТО ДЕЛАТЬ ===== */
.ch5 { padding: 200px 0 140px; }
.todo { display: grid; grid-template-columns: 7fr 5fr; gap: 56px; align-items: start; }
.todo__list { border-bottom: 1px solid rgba(246, 241, 225, .18); }
.todo__item {
  display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; width: 100%;
  padding: 22px 0 24px; text-align: left; background: none; border: 0;
  border-top: 1px solid rgba(246, 241, 225, .18);
}
.todo__n { font: 800 28px/1 var(--f-display); color: var(--sodium); padding-top: .4em; }
.todo__t {
  font: 800 clamp(48px, 5.4vw, 80px)/.88 var(--f-display); text-transform: uppercase;
  color: rgba(246, 241, 225, .4); transition: color .35s;
}
.todo__d { grid-column: 2; max-width: 520px; font-size: 16px; line-height: 1.5; color: var(--star2); opacity: .7; transition: opacity .35s; }
.todo__item:hover .todo__t, .todo__item.is-active .todo__t { color: var(--star); }
.todo__item.is-active .todo__d { opacity: 1; }
.todo__item.is-active .todo__t::after { content: ' ←'; color: var(--sodium); font-size: .6em; vertical-align: .2em; }
.lamp { position: sticky; top: 72px; }
.lamp__svg { width: 100%; height: auto; background: radial-gradient(80% 60% at 50% 30%, var(--deep), var(--night)); border: 1px solid rgba(246, 241, 225, .18); }
.lamp__cap { margin-top: 14px; color: var(--star2); }
.lamp__cap span { color: var(--star); }
.lv { display: none; }
.lamp[data-state="1"] .lv--1, .lamp[data-state="2"] .lv--2, .lamp[data-state="3"] .lv--3, .lamp[data-state="4"] .lv--4 { display: inline; animation: fadein .5s ease both; }
.lamp__stars { transition: opacity .6s; }
.lamp__pulse { animation: lpulse 3.2s ease-in-out infinite; }
@keyframes lpulse { 0%, 30% { opacity: .25; } 45%, 80% { opacity: 1; } 100% { opacity: .25; } }
.lamp__walker { animation: walk 3.2s ease-in-out infinite; }
@keyframes walk { 0% { transform: translateX(30px); opacity: 0; } 20% { opacity: 1; } 80% { opacity: 1; } 100% { transform: translateX(-120px); opacity: 0; } }

.darkmap {
  display: grid; grid-template-columns: 6fr 6fr; gap: 56px; align-items: end;
  margin-top: 140px; padding-top: 64px; border-top: 1px solid rgba(246, 241, 225, .18);
}
.darkmap__cta {
  display: inline-block; font: 800 clamp(44px, 5vw, 76px)/.9 var(--f-display); text-transform: uppercase;
  color: var(--sodium); text-decoration: none;
  background: linear-gradient(var(--sodium), var(--sodium)) 0 100% / 0 3px no-repeat; padding-bottom: 6px;
  transition: background-size .5s var(--ease);
}
.darkmap__cta:hover { background-size: 100% 3px; }
.darkmap__cta span { display: inline-block; transition: transform .4s var(--ease); }
.darkmap__cta:hover span { transform: translateX(8px); }
.darkmap__text p { margin-top: 20px; max-width: 520px; color: var(--star2); }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 24px; align-items: start; }
.field { display: grid; gap: 6px; }
.field label { color: var(--star2); }
.field input {
  width: 100%; padding: 12px 0; font: 400 18px/1.3 var(--f-text); color: var(--star);
  background: none; border: 0; border-bottom: 1px solid rgba(246, 241, 225, .45); border-radius: 0;
  transition: border-color .25s;
}
.field input::placeholder { color: rgba(246, 241, 225, .38); }
.field input:focus { outline: none; border-bottom-color: var(--sodium); }
.field input:focus-visible { outline: 2px solid var(--sodium); outline-offset: 4px; }
.field.is-invalid input { border-bottom-color: var(--sodium); }
.field__err { min-height: 1.45em; color: var(--sodium); font-size: 11px; }
.form .btn { grid-column: 1 / -1; justify-self: start; }
.form__ok { grid-column: 1 / -1; font: 500 italic 28px/1.25 var(--f-serif); color: var(--star); padding: 18px 0 0; border-top: 1px solid var(--sodium); }
.form.is-sent .field, .form.is-sent .btn { display: none; }

/* ===== ПОДВАЛ ===== */
.footer { padding: 140px 0 28px; overflow: hidden; }
.footer__sky { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.footer__cols { display: grid; grid-template-columns: 5fr 7fr; gap: 56px; align-items: start; }
.footer__note { font-size: clamp(28px, 2.8vw, 40px); line-height: 1.15; color: var(--star); max-width: 520px; }
.footer__credits { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.footer__credits dt { color: var(--star2); margin-bottom: 6px; }
.footer__credits dd { font-size: 15px; line-height: 1.5; color: var(--star); }
.footer__credits a { text-decoration: none; border-bottom: 1px solid rgba(246, 241, 225, .3); }
.footer__credits a:hover { color: var(--sodium); border-color: var(--sodium); }
.footer__big {
  margin: 110px 0 18px; text-align: center; white-space: nowrap;
  font: 800 20vw/.8 var(--f-display); text-transform: uppercase; letter-spacing: -.02em;
  color: #1B2747;
}
.footer__big span { display: inline-block; }
.footer__bottom { display: flex; justify-content: space-between; gap: 16px; padding-top: 18px; border-top: 1px solid rgba(246, 241, 225, .16); color: var(--star2); padding-right: 120px; }
.footer__bottom a { text-decoration: none; color: var(--star); }
.footer__bottom a:hover { color: var(--sodium); }

/* ===== АДАПТИВ ===== */
@media (max-width: 1180px) {
  .toc__i--2 { left: 6%; }
  .toc__i--5 { right: 10%; }
  .ch-head--split > div { grid-column: 1 / -1; }
  .ch-head--split .ch-intro { grid-column: 1 / span 8; margin-top: 32px; }
  .bortle { grid-template-columns: 7fr 5fr; gap: 36px; }
  .footer__credits { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1024px) {
  .ch1__grid { grid-template-columns: 1fr; gap: 48px; }
  .ch1__text { max-width: 760px; }
  .bortle { grid-template-columns: 1fr; }
  .bortle__panel { display: grid; grid-template-columns: auto 1fr; gap: 0 36px; align-items: start; }
  .bortle__class { grid-row: span 3; margin: 0; }
  .range { grid-column: 1 / -1; margin-top: 8px; }
  .eye { grid-template-columns: 1fr; gap: 24px; }
  .eye__list { grid-template-columns: 1fr 1fr; gap: 0 32px; }
  .quiz { grid-template-columns: 1fr; gap: 40px; }
  .quiz__svg { margin: 0 auto; }
  .todo { grid-template-columns: 1fr 1fr; gap: 40px; }
  .darkmap { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 900px) {
  .facts__stage { display: flex; flex-direction: column; gap: 56px; }
  .facts__diagram { order: -1; margin: 0; }
  .fact { padding: 0 0 0 20px; border-left: 2px solid var(--sodium); }
  .fact--2 { padding-top: 0; }
  .facts__callouts { display: none; }
  .fact__text { max-width: 420px; }
}
@media (max-width: 768px) {
  :root { --pad: 24px; }
  .hero__issue { display: none; }
  .hero__top { grid-template-columns: 1fr auto; }
  .hero__inner { grid-template-rows: auto 1fr auto auto; }
  .toc { position: static; grid-row: 3; margin: 26px 0 22px; pointer-events: auto; }
  .toc ol { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
  .toc__i { position: static; }
  .toc a { font-size: 13px; white-space: normal; }
  .hero__title-wrap { grid-row: 2; }
  .hero__bottom { grid-row: 4; }
  .ch-head { margin-bottom: 48px; }
  .ch-head--split .ch-intro { grid-column: 1 / -1; }
  .lead, .ch2, .ch3 { padding: 110px 0; }
  .ch1 { padding-bottom: 110px; }
  .ch1 .ch-head { padding-top: 72px; }
  .facts { padding: 110px 0; }
  .todo { grid-template-columns: 1fr; }
  .lamp { position: relative; top: 0; order: -1; max-width: 420px; }
  .footer__cols { grid-template-columns: 1fr; gap: 40px; }
  .has-cols::before { background-size: 50% 100%; }
}
@media (max-width: 600px) {
  :root { --pad: 16px; }
  body { font-size: 16px; }
  .hero { min-height: max(100svh, 640px); }
  .hero__inner { padding-top: 18px; padding-bottom: 18px; }
  .logo__mark { font-size: 26px; }
  .logo__sub { display: none; }
  .hero__title { white-space: normal; line-height: 1; }
  .hero__line { display: block; margin-bottom: -.1em; }
  .hero__line + .hero__line { margin-left: 0; }
  .hero__title-wrap { align-self: center; padding-top: 12px; }
  .hero__kicker { font-size: 22px; max-width: 280px; margin: 0 auto 8px; }
  .hero__bottom { grid-template-columns: 1fr 1fr; gap: 12px; font-size: 11px; padding-right: 0; padding-bottom: 44px; }
  .hero__scroll { display: none; }
  .hero__city { height: 9%; }
  .lead { text-align: left; }
  .lead__title { font-size: 10.6vw; line-height: .94; }
  .lead__pill { width: 1.7em; }
  .city__label-view { display: none; }
  .lead__text { font-size: 18px; margin-top: 36px; }
  .ch-title { font-size: 19vw; }
  .ch1__text { columns: 1; font-size: 16px; }
  .city__frame { aspect-ratio: 4 / 5; }
  .city__svg { aspect-ratio: auto; }
  .ch2 { padding: 96px 0; }
  .bortle__view { aspect-ratio: 4 / 5; }
  .bortle__panel { display: flex; align-items: stretch; }
  .bortle__class { font-size: 150px; margin-bottom: 14px; }
  .bortle__tag--tr { top: auto; bottom: 14%; right: 14px; }
  .fact__num { font-size: 34vw; }
  .eye__list { grid-template-columns: 1fr; }
  .quiz { margin-top: 96px; padding-top: 56px; }
  .quiz__btns .btn { flex: 1; justify-content: center; }
  .quote { padding: 110px 0 120px; text-align: left; }
  .quote__edge { height: 30px; top: -29px; }
  .ch4 { padding: 110px 0 90px; }
  .strip { gap: 28px; padding-top: 48px; }
  .polaroid { flex-basis: 78vw; max-width: 320px; }
  .ch5 { padding: 130px 0 100px; }
  .todo__item { gap: 4px 12px; padding: 18px 0 20px; }
  .todo__n { font-size: 20px; }
  .todo__t { font-size: 13vw; }
  .darkmap { margin-top: 96px; padding-top: 48px; }
  .form { grid-template-columns: 1fr; }
  .form .btn { justify-self: stretch; justify-content: center; }
  .footer { padding-top: 100px; }
  .footer__credits { grid-template-columns: 1fr 1fr; gap: 20px; }
  .footer__big { margin-top: 72px; }
  .footer__bottom { flex-direction: column; gap: 6px; padding-right: 0; padding-bottom: 48px; }
  .has-cols::before { background-size: 50% 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .js .rv, .js .mask > span, .js .hero__word { opacity: 1; transform: none; }
  .strip { scroll-behavior: auto; }
}
