/* ===========================
   ZHUSAN — Steppe / Radio Signal
   Landing page styles
   =========================== */

/* ===========================
   Local fonts (self-hosted)
   =========================== */

/* Bitter 700 — cyrillic-ext */
@font-face {
    font-family: 'Bitter';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('fonts/bitter-700-cyrillic-ext.woff2') format('woff2');
    unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

/* Bitter 700 — cyrillic */
@font-face {
    font-family: 'Bitter';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('fonts/bitter-700-cyrillic.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* Bitter 700 — latin */
@font-face {
    font-family: 'Bitter';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('fonts/bitter-700-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Source Sans 3 — cyrillic-ext */
@font-face {
    font-family: 'Source Sans 3';
    font-style: normal;
    font-weight: 300 400;
    font-display: swap;
    src: url('fonts/source-sans-3-cyrillic-ext.woff2') format('woff2');
    unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

/* Source Sans 3 — cyrillic */
@font-face {
    font-family: 'Source Sans 3';
    font-style: normal;
    font-weight: 300 400;
    font-display: swap;
    src: url('fonts/source-sans-3-cyrillic.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* Source Sans 3 — latin */
@font-face {
    font-family: 'Source Sans 3';
    font-style: normal;
    font-weight: 300 400;
    font-display: swap;
    src: url('fonts/source-sans-3-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    /* Dawn palette (default) */
    --sky-top: #1a1520;
    --sky-bottom: #2d1f2a;
    --horizon-color: #d4a574;
    --text-color: #e8ddd0;
    --text-muted: #a89880;
    --glow-color: transparent;
    --stars-opacity: 0;
    --wormwood-color: #4a5a3a;
    --wormwood-glow: transparent;
    --smoke-opacity: 0;
    --shimmer-opacity: 0;
}

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

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

body {
    font-family: 'Source Sans 3', 'Segoe UI', sans-serif;
    background: #0a0a0a;
    color: var(--text-color);
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
    line-height: 1.6;
}

/* ===========================
   Sky layer (fixed background)
   =========================== */

.sky {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-bottom) 60%, var(--horizon-color) 100%);
    transition: none;
}

/* ===========================
   Stars layer
   =========================== */

.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60%;
    z-index: 1;
    opacity: var(--stars-opacity);
    background-image:
        radial-gradient(1px 1px at 10% 15%, #ffffff 100%, transparent),
        radial-gradient(1px 1px at 25% 8%, #ffffff 100%, transparent),
        radial-gradient(1.5px 1.5px at 40% 22%, #ffffdd 100%, transparent),
        radial-gradient(1px 1px at 55% 5%, #ffffff 100%, transparent),
        radial-gradient(1px 1px at 70% 18%, #ffffff 100%, transparent),
        radial-gradient(1.5px 1.5px at 85% 12%, #ffffcc 100%, transparent),
        radial-gradient(1px 1px at 15% 35%, #ffffff 100%, transparent),
        radial-gradient(1px 1px at 30% 28%, #ffffff 100%, transparent),
        radial-gradient(1px 1px at 50% 32%, #ffffff 100%, transparent),
        radial-gradient(1.5px 1.5px at 65% 25%, #ffffdd 100%, transparent),
        radial-gradient(1px 1px at 80% 38%, #ffffff 100%, transparent),
        radial-gradient(1px 1px at 92% 20%, #ffffff 100%, transparent),
        radial-gradient(1px 1px at 5% 45%, #ffffff 100%, transparent),
        radial-gradient(1px 1px at 35% 42%, #ffffff 100%, transparent),
        radial-gradient(1.5px 1.5px at 60% 48%, #ffffee 100%, transparent),
        radial-gradient(1px 1px at 75% 40%, #ffffff 100%, transparent),
        radial-gradient(1px 1px at 88% 35%, #ffffff 100%, transparent),
        radial-gradient(1px 1px at 20% 52%, #ffffff 100%, transparent),
        radial-gradient(1px 1px at 45% 55%, #ffffff 100%, transparent),
        radial-gradient(1px 1px at 95% 48%, #ffffff 100%, transparent);
    pointer-events: none;
}

/* ===========================
   Horizon layer
   =========================== */

.horizon {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 35%;
    z-index: 2;
    pointer-events: none;
}

.mountains {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('mountains.png') bottom center / cover no-repeat;
    opacity: 0.6;
}

.polygon-wrapper {
    position: absolute;
    bottom: 0;
    right: 10%;
    width: 25%;
    height: 60%;
    pointer-events: none;
    animation: polygon-glow 4s ease-in-out infinite;
}

.polygon-silhouette {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('polygon.png') bottom center / contain no-repeat;
    opacity: 0.4;
    filter: drop-shadow(0 0 40px var(--glow-color));
}

@keyframes polygon-glow {
    0%, 100% { filter: drop-shadow(0 0 20px var(--glow-color)); }
    50% { filter: drop-shadow(0 0 50px var(--glow-color)) drop-shadow(0 0 80px var(--glow-color)); }
}

/* ===========================
   Standing ones (horizon figures)
   =========================== */

.standing-ones {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}

.standing-one {
    position: absolute;
    bottom: 58%;
    background: #0a0a0a;
    -webkit-mask-image: url('standing-figure.png');
    mask-image: url('standing-figure.png');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: bottom center;
    mask-position: bottom center;
    opacity: 0;
    transform-origin: bottom center;
}

@keyframes standing-sway {
    0%, 100% { transform: rotate(var(--so-tilt, 0deg)); }
    50% { transform: rotate(calc(var(--so-tilt, 0deg) + 1.5deg)); }
}

@keyframes standing-sway-alt {
    0%, 100% { transform: rotate(var(--so-tilt, 0deg)); }
    50% { transform: rotate(calc(var(--so-tilt, 0deg) - 1deg)); }
}

.standing-one--close {
    bottom: 35%;
}

/* ===========================
   Heat shimmer
   =========================== */

.heat-shimmer {
    position: fixed;
    bottom: 20%;
    left: 0;
    width: 100%;
    height: 15%;
    z-index: 2;
    pointer-events: none;
    opacity: var(--shimmer-opacity, 0);
    filter: url(#heat-shimmer-filter);
}

/* ===========================
   Wormwood field
   =========================== */

.wormwood-field {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 20%;
    z-index: 3;
    pointer-events: none;
    overflow: hidden;
}

.wormwood {
    position: absolute;
    bottom: 0;
    width: 20px;
    background: var(--wormwood-color);
    -webkit-mask-image: url('wormwood-plant.png');
    mask-image: url('wormwood-plant.png');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: bottom center;
    mask-position: bottom center;
    transform-origin: bottom center;
    filter: drop-shadow(0 0 4px var(--wormwood-glow));
}

@keyframes sway {
    0%, 100% { transform: rotate(-3deg); }
    50% { transform: rotate(3deg); }
}

@keyframes sway-alt {
    0%, 100% { transform: rotate(2deg); }
    50% { transform: rotate(-4deg); }
}

@keyframes sway-slow {
    0%, 100% { transform: rotate(-1.5deg); }
    50% { transform: rotate(2.5deg); }
}

/* ===========================
   Main content (scrollable)
   =========================== */

.content {
    position: relative;
    z-index: 10;
}

.scene {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    position: relative;
}

.scene--dawn {
    min-height: 120vh;
}

.scene--day {
    min-height: 110vh;
}

.scene--world {
    min-height: 100vh;
}

.scene--dusk {
    min-height: 110vh;
}

.scene--night {
    min-height: 130vh;
}

.scene--end {
    min-height: 80vh;
}

.scene__inner {
    max-width: 700px;
    width: 90%;
    padding: 60px 0;
    text-align: center;
}

/* ===========================
   Typography
   =========================== */

.title--main {
    font-family: 'Bitter', Georgia, serif;
    font-size: clamp(3.5rem, 10vw, 8rem);
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--text-color);
    text-shadow: 0 0 40px rgba(212, 165, 116, 0.3);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 2s ease, transform 2s ease;
}

.title--sub {
    font-family: 'Source Sans 3', sans-serif;
    font-size: clamp(1rem, 3vw, 1.5rem);
    font-weight: 300;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 2s ease 1.5s, transform 2s ease 1.5s;
}

.title--context {
    font-family: 'Source Sans 3', sans-serif;
    font-size: clamp(0.8rem, 2vw, 0.95rem);
    font-weight: 400;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 1.2rem;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 2s ease 3s, transform 2s ease 3s;
}

.title--final {
    font-family: 'Bitter', Georgia, serif;
    font-size: clamp(2.5rem, 7vw, 5rem);
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1.5s ease, transform 1.5s ease;
}

.title--author {
    font-family: 'Source Sans 3', sans-serif;
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    font-weight: 300;
    letter-spacing: 0.2em;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 1.5s ease 0.3s, transform 1.5s ease 0.3s;
}

/* ===========================
   Sensory fragments
   =========================== */

.fragments {
    margin: 2rem 0 3rem;
}

.fragment {
    font-family: 'Source Sans 3', sans-serif;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 300;
    color: var(--text-color);
    margin: 1.5rem 0;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 1.2s ease, transform 1.2s ease;
}

.fragment:nth-child(2) {
    transition-delay: 0.4s;
}

.fragment:nth-child(3) {
    transition-delay: 0.8s;
}

.fragment:nth-child(4) {
    transition-delay: 1.2s;
}

.fragment:nth-child(5) {
    transition-delay: 1.6s;
}

.fragment:nth-child(6) {
    transition-delay: 2.0s;
}

/* ===========================
   Radio messages
   =========================== */

.radio-message {
    font-family: 'Source Sans 3', sans-serif;
    font-size: clamp(0.85rem, 2vw, 1rem);
    font-weight: 400;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    margin: 3rem 0;
    padding: 1rem 1.5rem;
    border-left: 2px solid var(--text-muted);
    text-align: left;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 1s ease, transform 1s ease;
}

.radio-message + .radio-message {
    margin-top: 1.5rem;
}

.radio-static {
    opacity: 0.4;
    animation: static-flicker 0.3s infinite;
    margin-right: 0.5em;
}

@keyframes static-flicker {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.1; }
}

.radio-cursor {
    animation: cursor-blink 0.8s step-end infinite;
}

@keyframes cursor-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ===========================
   Radio indicator (fixed)
   =========================== */

.radio-indicator {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 100;
    display: flex;
    align-items: flex-end;
    gap: 3px;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.radio-indicator.active {
    opacity: 1;
}

.radio-bar {
    width: 4px;
    background: var(--text-muted);
    border-radius: 1px;
    opacity: 0.6;
}

.radio-bar:nth-child(1) {
    height: 6px;
    animation: bar-pulse 1.2s ease-in-out infinite 0s;
}

.radio-bar:nth-child(2) {
    height: 10px;
    animation: bar-pulse 1.2s ease-in-out infinite 0.15s;
}

.radio-bar:nth-child(3) {
    height: 14px;
    animation: bar-pulse 1.2s ease-in-out infinite 0.3s;
}

.radio-bar:nth-child(4) {
    height: 8px;
    animation: bar-pulse 1.2s ease-in-out infinite 0.45s;
}

@keyframes bar-pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* ===========================
   Silhouettes
   =========================== */

.silhouettes {
    position: relative;
    height: 120px;
    margin: 2rem auto;
    max-width: 400px;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 1.5s ease, transform 1.5s ease;
}

.silhouette {
    position: absolute;
    bottom: 0;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 1.5s ease, transform 1.5s ease;
}

/* Wanderer silhouette */
.silhouette--wanderer {
    left: 25%;
    width: 60px;
    height: 160px;
    background: var(--text-muted);
    -webkit-mask-image: url('wanderer.png');
    mask-image: url('wanderer.png');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    opacity: 0.5;
}

/* Girl silhouette */
.silhouette--girl {
    right: 25%;
    width: 50px;
    height: 140px;
    background: var(--text-muted);
    -webkit-mask-image: url('girl.png');
    mask-image: url('girl.png');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    opacity: 0.5;
}

/* Buildings silhouette */
.silhouette--buildings {
    left: 10%;
    width: 250px;
    height: 100px;
    background: var(--text-muted);
    -webkit-mask-image: url('garrison.png');
    mask-image: url('garrison.png');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: bottom center;
    mask-position: bottom center;
    opacity: 0.3;
}

/* Commander silhouette */
.silhouette--commander {
    right: 15%;
    width: 60px;
    height: 170px;
    background: var(--text-muted);
    -webkit-mask-image: url('commander.png');
    mask-image: url('commander.png');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    opacity: 0.5;
}

/* Mysterious silhouette */
.silhouette--mysterious {
    width: 60px;
    height: 180px;
    margin: 2rem auto;
    position: relative;
    background: url('mysterious.png') center / contain no-repeat;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 2s ease, transform 2s ease;
    filter: drop-shadow(0 0 30px var(--glow-color)) drop-shadow(0 0 60px var(--glow-color));
}

/* ===========================
   Smoke effect (dusk)
   =========================== */

.smoke {
    position: absolute;
    top: 10%;
    right: 15%;
    width: 100px;
    height: 150px;
    pointer-events: none;
    opacity: var(--smoke-opacity);
}

.smoke::before,
.smoke::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(180, 160, 140, 0.15) 0%, transparent 70%);
    animation: smoke-rise 4s ease-out infinite;
}

.smoke::before {
    width: 60px;
    height: 60px;
    bottom: 0;
    left: 20%;
}

.smoke::after {
    width: 40px;
    height: 40px;
    bottom: 10px;
    left: 40%;
    animation-delay: 1.5s;
}

@keyframes smoke-rise {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0.4;
    }
    100% {
        transform: translateY(-100px) scale(2);
        opacity: 0;
    }
}

/* ===========================
   Wormwood divider
   =========================== */

.wormwood-divider {
    width: 60%;
    max-width: 300px;
    height: 2px;
    margin: 0 auto 3rem;
    position: relative;
    background: linear-gradient(90deg, transparent, var(--text-muted), transparent);
    opacity: 0.4;
}

.wormwood-divider::before {
    content: '';
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    background: url('wormwood-sprig.png') center / contain no-repeat;
    opacity: 0.5;
}

/* ===========================
   Field entries (World section)
   =========================== */

.field-entries {
    text-align: left;
    max-width: 540px;
    margin: 0 auto;
}

.field-entry {
    position: relative;
    padding: 1.5rem;
    padding-left: 3.5rem;
    margin-bottom: 2rem;
    border: 1px dashed rgba(168, 152, 128, 0.2);
    background: repeating-linear-gradient(
        180deg,
        transparent,
        transparent 27px,
        rgba(168, 152, 128, 0.06) 27px,
        rgba(168, 152, 128, 0.06) 28px
    );
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 1.2s ease, transform 1.2s ease;
}

.field-entry:nth-child(2) {
    transition-delay: 0.3s;
}

.field-entry:nth-child(3) {
    transition-delay: 0.6s;
}

.field-number {
    position: absolute;
    top: 1.5rem;
    left: 1rem;
    font-family: 'Bitter', Georgia, serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    opacity: 0.5;
}

.field-header {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.field-label {
    font-family: 'Bitter', Georgia, serif;
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    font-weight: 700;
    color: var(--text-color);
    letter-spacing: 0.05em;
}

.field-marker {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    opacity: 0.7;
}

.field-text {
    font-family: 'Source Sans 3', sans-serif;
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    font-weight: 300;
    color: var(--text-color);
    line-height: 1.7;
    opacity: 0.85;
}

/* ===========================
   Wormwood growth (night)
   =========================== */

.wormwood-growth {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 10px;
    height: 70px;
    margin-top: 2rem;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 1.5s ease, transform 1.5s ease;
}

.wormwood-stem {
    display: block;
    width: 2px;
    height: 0;
    background: var(--wormwood-color);
    border-radius: 1px 1px 0 0;
    transition: height 2s ease var(--delay, 0s);
    position: relative;
}

.wormwood-stem::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 7px;
    height: 7px;
    background: var(--wormwood-color);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    opacity: 0.7;
    box-shadow: 0 0 6px var(--wormwood-glow);
}

.wormwood-stem::after {
    content: '';
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translateX(-50%) rotate(-20deg);
    width: 5px;
    height: 5px;
    background: var(--wormwood-color);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    opacity: 0.5;
    box-shadow: 0 0 4px var(--wormwood-glow);
}

.wormwood-growth.revealed .wormwood-stem {
    height: var(--h, 40px);
}

/* ===========================
   Book block (end section)
   =========================== */

.book-block {
    display: flex;
    align-items: flex-start;
    gap: 2.5rem;
    text-align: left;
    margin: 2rem 0;
}

.book-cover {
    width: clamp(180px, 30vw, 280px);
    height: auto;
    border: 1px solid rgba(168, 152, 128, 0.2);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1.5s ease, transform 1.5s ease;
}

.book-info {
    flex: 1;
    min-width: 0;
    padding-top: 0.5rem;
}

.book-info .title--final {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

.book-info .title--author {
    margin-bottom: 0.75rem;
}

.genre-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 1.2s ease 0.5s, transform 1.2s ease 0.5s;
}

.genre-tag {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    border: 1px solid var(--text-muted);
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
}

.book-tagline {
    font-family: 'Source Sans 3', sans-serif;
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    font-weight: 300;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 1rem 0 1.5rem;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 1.2s ease 0.7s, transform 1.2s ease 0.7s;
}

/* ===========================
   CTA and links
   =========================== */

.cta-button {
    display: inline-block;
    font-family: 'Bitter', Georgia, serif;
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-color);
    text-decoration: none;
    padding: 1rem 3rem;
    border: 1px solid var(--text-muted);
    position: relative;
    transition: all 0.3s ease;
    cursor: default;
    opacity: 0;
    transform: translateY(15px);
}

.cta-button::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    white-space: nowrap;
}

.back-link {
    display: block;
    margin-top: 2.5rem;
    font-family: 'Source Sans 3', sans-serif;
    font-size: clamp(0.85rem, 2vw, 1rem);
    font-weight: 300;
    color: var(--text-muted);
    text-decoration: none;
    letter-spacing: 0.05em;
    transition: color 0.3s ease, transform 0.3s ease;
    opacity: 0;
    transform: translateY(10px);
    text-align: center;
}

.back-link:hover {
    color: var(--text-color);
    transform: translateX(-5px);
}

/* ===========================
   Reveal state
   =========================== */

[data-reveal].revealed {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* ===========================
   Reduced motion
   =========================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    [data-reveal] {
        opacity: 1 !important;
        transform: none !important;
    }

    .wormwood {
        animation: none !important;
    }

    .radio-static {
        animation: none !important;
        opacity: 0.4 !important;
    }

    .radio-cursor {
        animation: none !important;
        opacity: 1 !important;
    }

    .smoke::before,
    .smoke::after {
        animation: none !important;
    }

    .standing-one {
        animation: none !important;
    }

    .heat-shimmer {
        display: none !important;
    }

    .polygon-wrapper {
        animation: none !important;
        filter: none !important;
    }

    .wormwood-stem {
        height: var(--h, 40px) !important;
        transition: none !important;
    }
}

/* ===========================
   Responsive — Tablet
   =========================== */

@media (max-width: 768px) {
    .scene__inner {
        padding: 40px 0;
    }

    .silhouettes {
        height: 80px;
        max-width: 280px;
    }

    .silhouette--buildings {
        width: 180px;
        height: 75px;
    }

    .silhouette--wanderer {
        width: 45px;
        height: 120px;
    }

    .silhouette--girl {
        width: 36px;
        height: 100px;
    }

    .silhouette--commander {
        width: 45px;
        height: 130px;
    }

    .silhouette--mysterious {
        width: 45px;
        height: 135px;
    }

    .radio-indicator {
        top: 1.5rem;
        right: 1.5rem;
    }

    .smoke {
        width: 70px;
        height: 100px;
    }

    .book-block {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .book-cover {
        width: clamp(160px, 50vw, 240px);
    }

    .book-info {
        padding-top: 0;
    }

    .book-info .title--final {
        font-size: clamp(2rem, 7vw, 3rem);
    }

    .genre-tags {
        justify-content: center;
    }

    .book-tagline {
        text-align: center;
    }

    .book-info .cta-button {
        display: block;
        text-align: center;
    }

    .field-entry {
        padding-left: 3rem;
    }

    .field-number {
        left: 0.75rem;
    }
}

/* ===========================
   Responsive — Mobile
   =========================== */

@media (max-width: 480px) {
    .scene--dawn {
        min-height: 100vh;
    }

    .scene--day,
    .scene--dusk {
        min-height: 95vh;
    }

    .scene--world {
        min-height: 90vh;
    }

    .scene--night {
        min-height: 110vh;
    }

    .scene--end {
        min-height: 70vh;
    }

    .silhouettes {
        height: 60px;
        max-width: 220px;
        transform: scale(0.7);
    }

    .silhouette--mysterious {
        width: 42px;
        height: 126px;
    }

    .fragment {
        margin: 1rem 0;
    }

    .radio-message {
        margin: 2rem 0;
        padding: 0.8rem 1rem;
    }

    .radio-indicator {
        top: 1rem;
        right: 1rem;
    }

    .cta-button {
        padding: 0.8rem 2rem;
    }

    .book-cover {
        width: clamp(140px, 45vw, 200px);
    }

    .field-entry {
        padding: 1.2rem;
        padding-left: 2.8rem;
    }

    .field-number {
        left: 0.6rem;
        top: 1.2rem;
    }

    .wormwood-growth {
        height: 50px;
        gap: 8px;
    }
}

/* ===========================
   HUD — Бортовой журнал
   =========================== */

.hud {
    position: fixed;
    top: 2rem;
    left: 2rem;
    z-index: 100;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    text-transform: uppercase;
}

.hud.active {
    opacity: 1;
}

.hud__row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
    white-space: nowrap;
}

.hud__label {
    opacity: 0.5;
    min-width: 5.5em;
}

.hud__value {
    font-weight: 400;
    font-variant-numeric: tabular-nums;
}

.hud__value--small {
    font-size: 0.6rem;
    opacity: 0.6;
}

.hud__value.critical {
    color: #c44;
}

.hud__bar {
    display: inline-block;
    width: 50px;
    height: 5px;
    background: rgba(168, 152, 128, 0.15);
    position: relative;
    vertical-align: middle;
}

.hud__bar-fill {
    display: block;
    height: 100%;
    background: var(--text-muted);
    transition: width 0.1s linear;
    width: 100%;
}

.hud__bar-fill.critical {
    background: #c44;
}

/* ===========================
   Disturbance overlay
   =========================== */

.disturbance {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 4;
    pointer-events: none;
    opacity: 0;
}

.disturbance::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
    opacity: 0.4;
    animation: grain-shift 0.5s steps(8) infinite;
}

.disturbance::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.06) 2px,
        rgba(0, 0, 0, 0.06) 4px
    );
    opacity: 0;
    transition: opacity 0.3s;
}

.disturbance.scanlines-on::after {
    opacity: 1;
}

@keyframes grain-shift {
    0% { transform: translate(0, 0); }
    12.5% { transform: translate(-5%, -5%); }
    25% { transform: translate(3%, -8%); }
    37.5% { transform: translate(-7%, 2%); }
    50% { transform: translate(5%, 5%); }
    62.5% { transform: translate(-3%, 8%); }
    75% { transform: translate(7%, -2%); }
    87.5% { transform: translate(-1%, 3%); }
    100% { transform: translate(0, 0); }
}

/* ===========================
   Vignette overlay
   =========================== */

.vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    pointer-events: none;
    background: radial-gradient(ellipse at center, transparent 50%, rgba(0, 0, 0, 0.6) 100%);
    opacity: 0;
}

/* ===========================
   Analog textures — Field entries
   =========================== */

.field-entry::after {
    content: 'ПОЛЕВАЯ ЗАПИСЬ';
    position: absolute;
    top: 0.6rem;
    right: 0.8rem;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.55rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    opacity: 0.25;
    transform: rotate(-2deg);
}

/* Analog radio indicator — Nokia bars */
.radio-bar {
    border-radius: 0 !important;
    width: 5px !important;
}

/* ===========================
   Character tooltips
   =========================== */

.silhouette[data-character] {
    cursor: pointer;
}

.character-tooltip {
    position: absolute;
    bottom: 105%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 10, 10, 0.9);
    border: 1px solid rgba(168, 152, 128, 0.3);
    padding: 0.6rem 1rem;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    pointer-events: none;
    max-width: 280px;
    white-space: normal;
    text-align: left;
    line-height: 1.5;
    z-index: 20;
}

.character-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(168, 152, 128, 0.3);
}

.silhouette[data-character].tooltip-active .character-tooltip {
    opacity: 1;
    visibility: visible;
}

.tooltip-cursor {
    animation: cursor-blink 0.8s step-end infinite;
}

/* ===========================
   Route map
   =========================== */

.route-map {
    margin: 3rem auto 0;
    max-width: 420px;
    padding: 1.5rem;
    border: 1px dashed rgba(168, 152, 128, 0.2);
    background: repeating-linear-gradient(
        180deg,
        transparent,
        transparent 27px,
        rgba(168, 152, 128, 0.04) 27px,
        rgba(168, 152, 128, 0.04) 28px
    );
    position: relative;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 1.2s ease, transform 1.2s ease;
}

.route-map::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 1px;
    height: 100%;
    background: rgba(168, 152, 128, 0.08);
}

.route-map__svg {
    width: 100%;
    height: auto;
    color: var(--text-muted);
}

.route-point circle {
    transition: fill 0.3s, opacity 0.3s;
}

.route-point.active circle {
    fill: currentColor;
}

.route-point.passed {
    opacity: 0.35;
}

.route-point.passed circle {
    fill: currentColor;
}

.route-marker {
    filter: drop-shadow(0 0 6px currentColor);
    transition: cx 0.2s ease;
}

/* ===========================
   Radio tuner
   =========================== */

.radio-tuner {
    margin: 3rem auto 0;
    max-width: 380px;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 1.2s ease, transform 1.2s ease;
}

.tuner__body {
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid rgba(168, 152, 128, 0.2);
    border-radius: 4px;
    padding: 1.2rem;
}

.tuner__display {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    margin-bottom: 1rem;
    padding: 0.5rem 0.8rem;
    background: rgba(0, 20, 0, 0.3);
    border: 1px solid rgba(168, 152, 128, 0.1);
    font-family: 'Source Sans 3', sans-serif;
}

.tuner__freq {
    font-size: 1.6rem;
    font-variant-numeric: tabular-nums;
    color: var(--text-color);
    letter-spacing: 0.05em;
}

.tuner__unit {
    font-size: 0.7rem;
    color: var(--text-muted);
    opacity: 0.5;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.tuner__signal {
    margin-left: auto;
    display: flex;
    align-items: flex-end;
    gap: 2px;
}

.tuner__bar {
    width: 5px;
    background: var(--text-muted);
    border-radius: 0;
    opacity: 0.2;
}

.tuner__bar:nth-child(1) { height: 5px; }
.tuner__bar:nth-child(2) { height: 9px; }
.tuner__bar:nth-child(3) { height: 13px; }
.tuner__bar:nth-child(4) { height: 17px; }

.tuner__bar.on {
    opacity: 0.9;
}

.tuner__track {
    position: relative;
    height: 32px;
    margin: 0.8rem 0;
    cursor: pointer;
    touch-action: none;
}

.tuner__track-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(168, 152, 128, 0.2);
    transform: translateY(-50%);
}

.tuner__knob {
    position: absolute;
    top: 50%;
    left: 0%;
    width: 20px;
    height: 20px;
    background: var(--text-muted);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    cursor: grab;
    transition: box-shadow 0.2s;
    outline: none;
}

.tuner__knob:focus-visible {
    box-shadow: 0 0 0 2px var(--text-color);
}

.tuner__knob:active {
    cursor: grabbing;
}

.tuner__output {
    min-height: 3rem;
    padding: 0.6rem 0.8rem;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.6;
    border-top: 1px solid rgba(168, 152, 128, 0.1);
}

.tuner__static {
    opacity: 0.3;
    animation: static-flicker 0.3s infinite;
    letter-spacing: 0.3em;
}

/* ===========================
   Terminus text (end section)
   =========================== */

.terminus {
    margin-bottom: 3rem;
    text-align: center;
}

.terminus__line {
    font-family: 'Source Sans 3', sans-serif;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 300;
    color: var(--text-color);
    margin: 1.2rem 0;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 1.5s ease, transform 1.5s ease;
}

.terminus__line.revealed {
    opacity: 1;
    transform: translateY(0);
}

.terminus__line--muted {
    color: var(--text-muted);
    font-size: clamp(1rem, 2.5vw, 1.4rem);
}

/* Book emergence */
.book-block--emerge {
    opacity: 0;
    transform: scale(0.97);
    transition: opacity 2s ease, transform 2s ease;
}

.book-block--emerge.revealed {
    opacity: 1;
    transform: scale(1);
}

.book-block--emerge .title--final,
.book-block--emerge .title--author,
.book-block--emerge .genre-tags,
.book-block--emerge .book-tagline,
.book-block--emerge .book-cover {
    opacity: 1;
    transform: none;
}

/* CTA as radio transmission */
.cta-radio {
    display: inline-block;
    font-family: 'Source Sans 3', sans-serif;
    font-size: clamp(0.85rem, 2vw, 1rem);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 1rem 0;
    margin-top: 1rem;
}

.cta-radio__static {
    opacity: 0.4;
    animation: static-flicker 0.3s infinite;
    margin-right: 0.5em;
}

.cta-radio__text {
    animation: cta-pulse 3s ease-in-out infinite;
}

@keyframes cta-pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* ===========================
   Glitch animation
   =========================== */

@keyframes glitch-text {
    0%, 95%, 100% { transform: none; opacity: 1; }
    96% { transform: translate(-2px, 1px) skewX(-1deg); opacity: 0.8; }
    97% { transform: translate(2px, -1px) skewX(1deg); opacity: 0.9; }
    98% { transform: translate(-1px, 0); opacity: 0.7; }
    99% { transform: translate(1px, 1px); opacity: 1; }
}

.glitch-active {
    animation: glitch-text 4s linear infinite;
}

/* ===========================
   New reduced-motion overrides
   =========================== */

@media (prefers-reduced-motion: reduce) {
    .disturbance {
        display: none !important;
    }

    .vignette {
        display: none !important;
    }

    .hud {
        transition: none !important;
    }

    .character-tooltip {
        transition: none !important;
    }

    .tooltip-cursor {
        animation: none !important;
        opacity: 1 !important;
    }

    .glitch-active {
        animation: none !important;
    }

    .cta-radio__text {
        animation: none !important;
        opacity: 1 !important;
    }

    .cta-radio__static {
        animation: none !important;
        opacity: 0.4 !important;
    }

    .terminus__line {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .book-block--emerge {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .tuner__static {
        animation: none !important;
        opacity: 0.3 !important;
    }

    .route-marker {
        transition: none !important;
    }
}

/* ===========================
   Mobile — tooltips & tuner
   =========================== */

@media (max-width: 768px) {
    .hud {
        top: 1.2rem;
        left: 1.2rem;
        font-size: 0.6rem;
    }

    .hud__bar {
        width: 35px;
    }

    .character-tooltip {
        bottom: auto;
        top: 105%;
        max-width: 220px;
        font-size: 0.75rem;
    }

    .character-tooltip::after {
        top: auto;
        bottom: 100%;
        border-top-color: transparent;
        border-bottom-color: rgba(168, 152, 128, 0.3);
    }

    .tuner__knob {
        width: 32px;
        height: 32px;
    }

    .route-map {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .hud {
        top: 1rem;
        left: 0.8rem;
        font-size: 0.55rem;
    }

    .hud__label {
        min-width: 4.5em;
    }

    .hud__bar {
        width: 28px;
    }

    .terminus__line {
        margin: 0.8rem 0;
    }

    .tuner__freq {
        font-size: 1.3rem;
    }

    .route-map__svg text {
        font-size: 8px;
    }
}
