@import url("fonts/fonts.css");

/* ============================================================
   4snk — дорогой CRT-терминал
   Правило проекта: весь текст сайта строчными. Логотип — Chakra Petch 700.
   ============================================================ */

:root {
    /* --- поверхность экрана --- */
    --void:        #04060a;   /* стекло ЭЛТ — холодное, никогда не нейтрально-чёрное */
    --void-2:      #080c11;
    --void-3:      #0c1219;

    /* --- люминофор: светится только то, что реально «под током» --- */
    --phos:        #9dffc0;
    --phos-mid:    #63c98a;
    --phos-dim:    #4e8f68;
    --phos-ghost:  rgba(157,255,192,.075);
    --phos-line:   rgba(157,255,192,.14);
    --phos-line-2: rgba(157,255,192,.07);

    /* --- тёплый нарушитель: снят с терракотовой панели самой футболки --- */
    --ember:       #ff5f32;
    --ember-dim:   rgba(255,95,50,.55);
    --ember-ghost: rgba(255,95,50,.09);

    /* --- текст --- */
    --bone:        #e6e3d9;   /* кремовый с футболки — читается втрое лучше зелёного */
    --bone-dim:    rgba(230,227,217,.62);
    --slate:       #78857e;

    /* --- типографика --- */
    --f-logo: 'Chakra Petch', sans-serif;
    --f-mono: 'JetBrains Mono', ui-monospace, monospace;
    --f-text: 'Onest', system-ui, sans-serif;

    /* --- ритм --- */
    --rail-w: 264px;
    --gut:    clamp(1.15rem, 3.5vw, 3rem);
    --bloom:  22px;

    /* --- движение --- */
    --e-out: cubic-bezier(.16,1,.3,1);
    --e-io:  cubic-bezier(.65,0,.35,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
    min-height: 100vh;
    background: var(--void);
    color: var(--bone);
    font-family: var(--f-mono);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.6;
    letter-spacing: .01em;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

::selection { background: var(--phos); color: var(--void); }

a { color: inherit; }

/* ============================================================
   МАТЕРИАЛ ЭКРАНА
   Не «тема в зелёных тонах», а стекло с физикой: развёртка,
   апертурная решётка, зерно, послесвечение, виньетка.
   Каждый слой на грани заметности — их читаешь вместе, не по отдельности.
   ============================================================ */

.crt {
    position: fixed;
    inset: 0;
    z-index: 90;
    pointer-events: none;
}

/* строки развёртки — 1px через 3px, почти невидимо */
.crt::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        to bottom,
        rgba(0,0,0,.42) 0px, rgba(0,0,0,.42) 1px,
        transparent 1px, transparent 3px
    );
    opacity: .5;
}

/* апертурная решётка — расщепление на RGB-субпиксели, даёт цветную бахрому по краям букв */
.crt::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        to right,
        rgba(255,60,60,.055) 0px, rgba(255,60,60,.055) 1px,
        rgba(60,255,120,.055) 1px, rgba(60,255,120,.055) 2px,
        rgba(60,120,255,.055) 2px, rgba(60,120,255,.055) 3px
    );
    mix-blend-mode: screen;
}

/* виньетка + блик на стекле: намекает на кривизну кинескопа без искажения текста */
.crt-glass {
    position: fixed;
    inset: 0;
    z-index: 91;
    pointer-events: none;
    background:
        radial-gradient(120% 85% at 22% 8%, rgba(190,255,215,.045) 0%, transparent 42%),
        radial-gradient(150% 110% at 50% 50%, transparent 52%, rgba(0,0,0,.5) 88%, rgba(0,0,0,.78) 100%);
}

/* зерно люминофора — SVG-шум, дёргается ступенями, как настоящая плёнка */
.crt-grain {
    position: fixed;
    inset: -60px;
    z-index: 92;
    pointer-events: none;
    opacity: .5;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.34'/%3E%3C/svg%3E");
    animation: grain 1s steps(6) infinite;
}
@keyframes grain {
    0%   { transform: translate(0,0); }
    16%  { transform: translate(-14px,7px); }
    33%  { transform: translate(9px,-12px); }
    50%  { transform: translate(-7px,-9px); }
    66%  { transform: translate(13px,6px); }
    83%  { transform: translate(-11px,11px); }
    100% { transform: translate(0,0); }
}

/* фоновое поле импульсов (canvas) */
#grid-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: .85;
}

/* сетка координат под контентом */
.field {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-color: var(--void);
    background-image:
        radial-gradient(ellipse 120% 60% at 50% -10%, rgba(40,120,70,.13) 0%, transparent 62%),
        linear-gradient(var(--phos-line-2) 1px, transparent 1px),
        linear-gradient(90deg, var(--phos-line-2) 1px, transparent 1px);
    background-size: 100% 100%, 64px 64px, 64px 64px;
}

/* ============================================================
   РЕЙКА — приборная панель машины.
   Она не скроллится: терминал стоит на месте, мимо него едет вещь.
   ============================================================ */

.rail {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: var(--rail-w);
    z-index: 40;
    display: flex;
    flex-direction: column;
    padding: 1.6rem 1.35rem 1.35rem;
    border-right: 1px solid var(--phos-line);
    background: linear-gradient(180deg, rgba(6,10,14,.92) 0%, rgba(4,6,10,.86) 100%);
    backdrop-filter: blur(14px) saturate(1.1);
}

.rail-logo {
    font-family: var(--f-logo);
    font-weight: 700;
    font-size: 2.7rem;
    line-height: .9;
    color: var(--phos);
    text-shadow: 0 0 var(--bloom) rgba(157,255,192,.5);
    display: block;
    text-decoration: none;
}

.rail-tag {
    margin-top: .5rem;
    font-size: .625rem;
    letter-spacing: .19em;
    color: var(--phos-dim);
    line-height: 1.7;
}
.rail-tag span { display: block; color: rgba(120,133,126,.7); }

.rail-rule {
    height: 1px;
    background: var(--phos-line);
    margin: 1.25rem 0;
    flex-shrink: 0;
}

/* --- показания --- */
.readout { display: flex; flex-direction: column; gap: .85rem; }

.readout-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .6rem;
    font-size: .655rem;
    letter-spacing: .13em;
}
.readout-k { color: var(--slate); }
.readout-v { color: var(--bone); font-weight: 500; }
.readout-v.lit { color: var(--phos); text-shadow: 0 0 12px rgba(157,255,192,.4); }
.readout-v.warm { color: var(--ember); }

/* большая цифра остатка */
.rail-count {
    display: flex;
    align-items: flex-end;
    gap: .4rem;
    margin-top: .15rem;
}
.rail-count-n {
    font-size: 3.6rem;
    font-weight: 800;
    line-height: .82;
    letter-spacing: -.04em;
    color: var(--phos);
    text-shadow: 0 0 26px rgba(157,255,192,.42);
    font-variant-numeric: tabular-nums;
}
.rail-count-d {
    font-size: .7rem;
    letter-spacing: .1em;
    color: var(--slate);
    padding-bottom: .5rem;
}

/* шкала дропа: 12 делений, потушенные = проданные */
.tick-row { display: flex; gap: 3px; margin-top: .9rem; }
.tick {
    flex: 1;
    height: 15px;
    background: var(--phos-ghost);
    border-top: 1px solid var(--phos-line);
    transition: background .4s var(--e-out), box-shadow .4s var(--e-out);
}
.tick.on {
    background: linear-gradient(180deg, rgba(157,255,192,.5), rgba(157,255,192,.14));
    border-top-color: var(--phos);
    box-shadow: 0 0 10px rgba(157,255,192,.3);
}
.tick.gone {
    background: var(--ember-ghost);
    border-top-color: var(--ember-dim);
}

/* --- индикатор эфира --- */
.live {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .655rem;
    letter-spacing: .16em;
    color: var(--phos);
}
.live-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--phos);
    box-shadow: 0 0 9px var(--phos);
    flex-shrink: 0;
}
.live.off { color: var(--ember); }
.live.off .live-dot { background: var(--ember); box-shadow: 0 0 9px var(--ember); }

/* --- бегущая строка хеша --- */
.hash-ticker {
    overflow: hidden;
    height: 1.15rem;
    font-size: .62rem;
    letter-spacing: .05em;
    color: var(--phos-dim);
    white-space: nowrap;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 84%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 12%, #000 84%, transparent);
}
.hash-ticker span { display: inline-block; will-change: transform; }

.rail-foot {
    margin-top: auto;
    padding-top: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: .38rem;
    font-size: .62rem;
    letter-spacing: .09em;
}
.rail-foot a {
    color: var(--slate);
    text-decoration: none;
    transition: color .22s;
    width: fit-content;
}
.rail-foot a:hover, .rail-foot a:focus-visible { color: var(--phos); }
.rail-foot .copy { color: rgba(120,133,126,.5); margin-top: .35rem; line-height: 1.5; }

/* ============================================================
   СЦЕНА
   ============================================================ */

.stage {
    position: relative;
    z-index: 10;
    margin-left: var(--rail-w);
    padding: 0 var(--gut);
}
.wrap { max-width: 1080px; margin: 0 auto; }

/* ============================================================
   ТИПОГРАФИКА
   ============================================================ */

.eyebrow {
    font-size: .655rem;
    font-weight: 500;
    letter-spacing: .22em;
    color: var(--phos-dim);
    display: flex;
    align-items: center;
    gap: .7rem;
}
.eyebrow::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--phos-line), transparent);
}

.h-display {
    font-family: var(--f-mono);
    font-weight: 800;
    font-size: clamp(2.1rem, 5.6vw, 4.4rem);
    line-height: .98;
    letter-spacing: -.045em;
    color: var(--bone);
}

.h-sec {
    font-size: clamp(1.35rem, 2.9vw, 2.15rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -.035em;
    color: var(--bone);
}

.prose {
    font-family: var(--f-text);
    font-size: .93rem;
    line-height: 1.72;
    letter-spacing: 0;
    color: var(--bone-dim);
}
.prose strong { color: var(--bone); font-weight: 500; }

.mono-note {
    font-size: .68rem;
    letter-spacing: .1em;
    color: var(--slate);
}

/* ============================================================
   ГЕРОЙ — подпись проекта.
   Вещь проявляется из символов: сначала её видит машина, потом человек.
   ============================================================ */

.hero {
    min-height: 100svh;
    display: grid;
    grid-template-columns: 1fr minmax(300px, 42%);
    align-items: center;
    gap: clamp(1.5rem, 4vw, 4rem);
    padding: 5.5rem 0 4rem;
}

.hero-copy { position: relative; z-index: 2; }

.hero-title { margin: 1.5rem 0 0; }
.hero-title .ln { display: block; overflow: hidden; }
.hero-title .ln > span { display: block; will-change: transform; }
.hero-title em {
    font-style: normal;
    color: var(--phos);
    text-shadow: 0 0 30px rgba(157,255,192,.32);
}

.hero-lead { margin-top: 1.6rem; max-width: 46ch; }

.hero-meta {
    margin-top: 2.2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0 2.2rem;
    border-top: 1px solid var(--phos-line);
    padding-top: 1.1rem;
}
.hero-meta div { display: flex; flex-direction: column; gap: .2rem; }
.hero-meta dt { font-size: .62rem; letter-spacing: .16em; color: var(--slate); }
.hero-meta dd { font-size: .95rem; font-weight: 700; letter-spacing: -.01em; color: var(--bone); }
.hero-meta dd.warm { color: var(--ember); }

.hero-cta {
    margin-top: 2.1rem;
    display: inline-flex;
    align-items: center;
    gap: .8rem;
    padding: .82rem 1.5rem;
    background: transparent;
    border: 1px solid var(--phos);
    color: var(--phos);
    font-family: var(--f-mono);
    font-size: .73rem;
    font-weight: 700;
    letter-spacing: .17em;
    text-decoration: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: color .3s var(--e-out);
}
.hero-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--phos);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .42s var(--e-out);
}
.hero-cta > * { position: relative; z-index: 1; }
.hero-cta:hover, .hero-cta:focus-visible { color: var(--void); }
.hero-cta:hover::before, .hero-cta:focus-visible::before { transform: scaleX(1); }
.hero-cta .arrow { transition: transform .42s var(--e-out); }
.hero-cta:hover .arrow { transform: translateX(5px); }

/* --- подпись: ASCII → фотография --- */
.reveal {
    position: relative;
    aspect-ratio: 900 / 1024;
    width: 100%;
    border: 1px solid var(--phos-line);
    background: var(--void-2);
    overflow: hidden;
}
.reveal-img {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0;
    filter: saturate(.9) contrast(1.04);
}
.reveal-ascii {
    position: absolute;
    inset: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--f-mono);
    font-weight: 500;
    color: var(--phos);
    white-space: pre;
    line-height: 1;
    text-shadow: 0 0 7px rgba(157,255,192,.28);
    pointer-events: none;
    overflow: hidden;
}
.reveal-frame {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
}
/* угловые метки только здесь — на одном элементе, а не на каждой карточке */
.reveal-frame span {
    position: absolute;
    width: 15px; height: 15px;
    border: 0 solid var(--phos);
    opacity: .65;
}
.reveal-frame span:nth-child(1) { top: 9px; left: 9px;    border-width: 1px 0 0 1px; }
.reveal-frame span:nth-child(2) { top: 9px; right: 9px;   border-width: 1px 1px 0 0; }
.reveal-frame span:nth-child(3) { bottom: 9px; left: 9px; border-width: 0 0 1px 1px; }
.reveal-frame span:nth-child(4) { bottom: 9px; right: 9px;border-width: 0 1px 1px 0; }

.reveal-cap {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    z-index: 4;
    padding: .6rem .85rem;
    display: flex;
    justify-content: space-between;
    gap: .6rem;
    font-size: .58rem;
    letter-spacing: .13em;
    color: var(--phos-dim);
    background: linear-gradient(0deg, rgba(4,6,10,.9), transparent);
}

/* ============================================================
   ПАНЕЛИ
   ============================================================ */

.panel {
    position: relative;
    background: linear-gradient(160deg, var(--void-3) 0%, var(--void-2) 60%, var(--void) 100%);
    border: 1px solid var(--phos-line);
}
.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    padding: .85rem 1.15rem;
    border-bottom: 1px solid var(--phos-line);
    background: rgba(157,255,192,.022);
}
.panel-title {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .17em;
    color: var(--phos);
}
.panel-sub {
    font-size: .6rem;
    letter-spacing: .11em;
    color: var(--slate);
    margin-top: .15rem;
}
.panel-body { padding: 1.35rem; }

/* ============================================================
   БЛОК ЗАКАЗА
   ============================================================ */

.order {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.35rem;
    align-items: start;
    padding-bottom: clamp(4rem, 9vw, 7.5rem);
    scroll-margin-top: 2rem;
}

.order-intro { margin-bottom: 1.8rem; }
.order-intro .prose { max-width: 62ch; margin-top: .9rem; }

/* --- фото товара --- */
.product-img-wrap {
    position: relative;
    overflow: hidden;
    background: #8f8e8c;
    cursor: grab;
    touch-action: pan-y;
}
.product-img-wrap.grabbing, .product-img-wrap:active { cursor: grabbing; }
.product-slider {
    display: flex;
    transition: transform .55s var(--e-out);
    will-change: transform;
}
.product-slider.is-dragging { transition: none; }
.product-slider img {
    width: 100%;
    flex-shrink: 0;
    display: block;
    pointer-events: none;
    filter: saturate(.93) contrast(1.03);
    transition: filter .5s var(--e-out);
}
.product-img-wrap:hover .product-slider:not(.is-dragging) img { filter: saturate(1) contrast(1.05); }

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 7px;
    padding: .7rem 0 .1rem;
}
.slider-dot {
    width: 22px; height: 2px;
    background: var(--phos-ghost);
    cursor: pointer;
    transition: background .3s var(--e-out);
}
.slider-dot.active { background: var(--phos); box-shadow: 0 0 8px rgba(157,255,192,.5); }

/* на этапе оплаты не нужен весь лендинг — только карточка товара + форма/оплата */
body.has-reservation .hero,
body.has-reservation .order-intro { display: none; }

.product-panel.has-reservation .product-img-wrap::after {
    content: 'забронировано · ожидает оплаты';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(4,6,10,.72);
    backdrop-filter: blur(3px);
    font-size: .68rem;
    letter-spacing: .14em;
    color: var(--ember);
    z-index: 6;
}

.product-foot { padding: 1.15rem 1.25rem 1.3rem; border-top: 1px solid var(--phos-line); }

.price-line {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .8rem;
}
.price-label { font-size: .62rem; letter-spacing: .16em; color: var(--slate); }
.price-value {
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -.035em;
    color: var(--ember);
    font-variant-numeric: tabular-nums;
}

.info-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 1rem; }
.info-tag {
    font-size: .6rem;
    letter-spacing: .1em;
    color: var(--phos-dim);
    border: 1px solid var(--phos-line);
    padding: .22rem .55rem;
}

/* ============================================================
   ФОРМА
   ============================================================ */

.form-lbl {
    display: block;
    margin: 1.05rem 0 .32rem;
    font-size: .62rem;
    letter-spacing: .15em;
    color: var(--slate);
}
.form-lbl:first-child { margin-top: 0; }

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
    width: 100%;
    padding: .72rem .8rem;
    background: rgba(0,0,0,.34);
    border: 1px solid var(--phos-line);
    color: var(--bone);
    font-family: var(--f-mono);
    font-size: .87rem;
    letter-spacing: .01em;
    outline: none;
    transition: border-color .25s var(--e-out), box-shadow .25s var(--e-out), background .25s;
}
input::placeholder { color: rgba(120,133,126,.5); letter-spacing: .02em; }
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus {
    border-color: var(--phos);
    background: rgba(157,255,192,.045);
    box-shadow: 0 0 0 1px rgba(157,255,192,.22), 0 0 22px -6px rgba(157,255,192,.4);
}
input.valid, input[type="tel"].valid { border-color: rgba(157,255,192,.42); }
input.invalid, input[type="tel"].invalid {
    border-color: var(--ember);
    box-shadow: 0 0 0 1px rgba(255,95,50,.2);
}
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--bone);
    -webkit-box-shadow: 0 0 0 1000px #0a1016 inset;
    caret-color: var(--bone);
}

.error-hint {
    display: block;
    min-height: .95rem;
    margin-top: .22rem;
    font-size: .61rem;
    letter-spacing: .06em;
    color: var(--ember);
    opacity: 0;
    transform: translateY(-3px);
    transition: opacity .25s, transform .25s;
}
.error-hint:not(:empty) { opacity: 1; transform: none; }

.form-row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.form-row-3 .form-lbl { margin-top: 1.05rem; }

.input-with-help { position: relative; }
.input-with-help input { padding-right: 2.1rem; }
.merki-help {
    position: absolute;
    right: .45rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.3rem; height: 1.3rem;
    display: grid;
    place-items: center;
    border: 1px solid var(--phos-line);
    border-radius: 50%;
    background: rgba(157,255,192,.06);
    color: var(--phos-dim);
    font-family: var(--f-mono);
    font-size: .66rem;
    cursor: pointer;
    transition: color .2s, border-color .2s, background .2s;
}
.merki-help:hover, .merki-help:focus-visible {
    color: var(--phos);
    border-color: var(--phos);
    background: rgba(157,255,192,.12);
}

.email-foreign-warn {
    display: none;
    margin: .1rem 0 .3rem;
    font-size: .61rem;
    line-height: 1.5;
    letter-spacing: .04em;
    color: var(--ember);
}
.email-foreign-warn.visible { display: block; }

/* --- чекбоксы --- */
.form-checks { margin-top: 1.3rem; display: flex; flex-direction: column; gap: .55rem; }
.checkbox, .subscribe-agree {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    font-size: .66rem;
    line-height: 1.5;
    letter-spacing: .03em;
    color: var(--bone-dim);
    cursor: pointer;
}
.checkbox input[type="checkbox"],
.subscribe-agree input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    flex-shrink: 0;
    width: 14px; height: 14px;
    margin-top: .12rem;
    border: 1px solid var(--phos-line);
    background: rgba(0,0,0,.35);
    position: relative;
    cursor: pointer;
    transition: border-color .2s, background .2s, box-shadow .2s;
}
.checkbox input[type="checkbox"]:hover,
.subscribe-agree input[type="checkbox"]:hover { border-color: var(--phos-dim); }
.checkbox input[type="checkbox"]:checked,
.subscribe-agree input[type="checkbox"]:checked {
    background: var(--phos);
    border-color: var(--phos);
    box-shadow: 0 0 12px -2px rgba(157,255,192,.6);
}
.checkbox input[type="checkbox"]:checked::after,
.subscribe-agree input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 4px; top: 1px;
    width: 4px; height: 8px;
    border: solid var(--void);
    border-width: 0 2px 2px 0;
    transform: rotate(43deg);
}
.checkbox input:focus-visible,
.subscribe-agree input:focus-visible { outline: 2px solid var(--phos); outline-offset: 2px; }
.checkbox a, .subscribe-agree a { color: var(--phos-dim); text-decoration: underline; text-underline-offset: 2px; }
.checkbox a:hover, .subscribe-agree a:hover { color: var(--phos); }

/* ============================================================
   ПОЛЗУНОК-КАПЧА — механика прежняя, вид новый:
   рубильник на приборной панели, а не игрушка
   ============================================================ */

.neon-slider, .sub-slider-wrap {
    margin-top: 1.4rem;
    padding: .85rem .9rem .7rem;
    border: 1px solid var(--phos-line);
    background: rgba(0,0,0,.3);
    position: relative;
    overflow: hidden;
}
.neon-slider::before, .sub-slider-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(90deg, transparent 0 11px, var(--phos-line-2) 11px 12px);
    pointer-events: none;
}
.slider-label, .sub-slider-label {
    font-size: .61rem;
    letter-spacing: .16em;
    color: var(--slate);
    margin-bottom: .55rem;
    position: relative;
}

input[type=range]#captchaSlider,
input[type=range]#subSlider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 26px;
    background: transparent;
    cursor: grab;
    position: relative;
    outline: none;
}
input[type=range]#captchaSlider.grabbing { cursor: grabbing; }

input[type=range]#captchaSlider::-webkit-slider-runnable-track,
input[type=range]#subSlider::-webkit-slider-runnable-track {
    height: 26px;
    background: linear-gradient(90deg, rgba(157,255,192,.16), rgba(157,255,192,.03));
    border: 1px solid var(--phos-line);
}
input[type=range]#captchaSlider::-moz-range-track,
input[type=range]#subSlider::-moz-range-track {
    height: 26px;
    background: linear-gradient(90deg, rgba(157,255,192,.16), rgba(157,255,192,.03));
    border: 1px solid var(--phos-line);
}
input[type=range]#captchaSlider::-webkit-slider-thumb,
input[type=range]#subSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 40px; height: 26px;
    margin-top: -1px;
    background: linear-gradient(180deg, var(--phos), var(--phos-mid));
    border: none;
    box-shadow: 0 0 20px -3px rgba(157,255,192,.75);
    cursor: grab;
}
input[type=range]#captchaSlider::-moz-range-thumb,
input[type=range]#subSlider::-moz-range-thumb {
    width: 40px; height: 26px;
    border: none;
    border-radius: 0;
    background: linear-gradient(180deg, var(--phos), var(--phos-mid));
    box-shadow: 0 0 20px -3px rgba(157,255,192,.75);
    cursor: grab;
}
input[type=range]#captchaSlider::-webkit-slider-thumb:active { cursor: grabbing; }
input[type=range]#captchaSlider:disabled,
input[type=range]#subSlider:disabled { opacity: .4; cursor: not-allowed; }
input[type=range]:focus-visible { outline: 2px solid var(--phos); outline-offset: 3px; }

.slider-status, .sub-slider-status {
    margin-top: .45rem;
    min-height: .95rem;
    font-size: .61rem;
    letter-spacing: .1em;
    color: var(--slate);
    position: relative;
}
.slider-status.success, .sub-slider-status.ok { color: var(--phos); }

/* ============================================================
   КНОПКИ
   ============================================================ */

.btn-reserve, .btn-subscribe {
    width: 100%;
    margin-top: 1.35rem;
    padding: .95rem 1rem;
    background: var(--phos);
    border: 1px solid var(--phos);
    color: var(--void);
    font-family: var(--f-mono);
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .19em;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: box-shadow .3s var(--e-out), transform .18s var(--e-out), background .25s, color .25s;
}
.btn-reserve:not(:disabled):hover, .btn-subscribe:not(:disabled):hover {
    box-shadow: 0 0 34px -6px rgba(157,255,192,.85);
    transform: translateY(-1px);
}
.btn-reserve:not(:disabled):active, .btn-subscribe:not(:disabled):active { transform: translateY(0); }
.btn-reserve:disabled, .btn-subscribe:disabled {
    background: transparent;
    color: var(--slate);
    border-color: var(--phos-line);
    cursor: not-allowed;
    box-shadow: none;
}
.btn-reserve:focus-visible, .btn-subscribe:focus-visible { outline: 2px solid var(--phos); outline-offset: 3px; }

.btn-ghost,
.btn-cancel, .btn-status-ok, .btn-status-retry, .btn-passport,
.btn-confirm-yes, .btn-confirm-no {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .68rem 1.15rem;
    background: transparent;
    border: 1px solid var(--phos-line);
    color: var(--bone-dim);
    font-family: var(--f-mono);
    font-size: .68rem;
    font-weight: 500;
    letter-spacing: .14em;
    text-decoration: none;
    cursor: pointer;
    transition: color .22s, border-color .22s, background .22s;
}
.btn-ghost:hover, .btn-status-ok:hover, .btn-status-retry:hover,
.btn-passport:hover, .btn-confirm-no:hover {
    color: var(--phos);
    border-color: var(--phos);
    background: rgba(157,255,192,.07);
}
.btn-cancel, .btn-confirm-yes { color: var(--ember-dim); border-color: rgba(255,95,50,.28); }
.btn-cancel:hover, .btn-confirm-yes:hover {
    color: var(--ember);
    border-color: var(--ember);
    background: var(--ember-ghost);
}
.btn-passport { border-color: var(--phos); color: var(--phos); }
.btn-cancel { width: 100%; margin-top: 1rem; }

/* ============================================================
   ОПЛАТА
   ============================================================ */

.payment-block { padding: 0; }

.payment-timer {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--ember);
    text-align: center;
    font-variant-numeric: tabular-nums;
    padding: .8rem 0 1rem;
    border-bottom: 1px solid var(--phos-line);
    margin-bottom: 1.2rem;
    text-shadow: 0 0 26px rgba(255,95,50,.35);
}

.qr-code {
    display: block;
    width: 190px;
    max-width: 70%;
    margin: 0 auto 1.1rem;
    border: 1px solid var(--phos-line);
    padding: .5rem;
    background: rgba(230,227,217,.94);
}

.payment-instruction {
    text-align: center;
    font-size: .78rem;
    line-height: 1.6;
    letter-spacing: .04em;
    color: var(--bone);
}
.payment-instruction strong { color: var(--ember); font-weight: 700; }

.payment-note {
    text-align: center;
    margin-top: .6rem;
    font-family: var(--f-text);
    font-size: .76rem;
    line-height: 1.6;
    color: var(--bone-dim);
}

.payment-step-nav {
    display: flex;
    flex-direction: column;
    gap: .4rem;
    margin-top: 1.2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--phos-line);
}
.payment-step-link {
    font-size: .66rem;
    letter-spacing: .1em;
    color: var(--slate);
    text-decoration: none;
    transition: color .2s;
}
.payment-step-link:hover { color: var(--phos); }

.status-msg {
    text-align: center;
    font-size: .85rem;
    letter-spacing: .06em;
    color: var(--ember);
    padding: 1.6rem 0 1.2rem;
}

/* ============================================================
   ЗАКРЫТЫЙ ДРОП
   ============================================================ */

.main-closed {
    display: grid;
    place-items: center;
    min-height: 74svh;
    padding: 3rem 0 clamp(4rem, 9vw, 7rem);
}
.closed-panel { width: 100%; max-width: 620px; }

.closed-img-wrap {
    overflow: hidden;
    border-bottom: 1px solid var(--phos-line);
    background: #000;
}
.closed-img-wrap img {
    width: 100%;
    display: block;
    filter: saturate(.35) contrast(1.15) brightness(.75);
}

.closed-timer-block { padding: 1.5rem 1.35rem; text-align: center; }
.timer-label {
    font-size: .62rem;
    letter-spacing: .2em;
    color: var(--slate);
    margin-bottom: .55rem;
}
.big-timer {
    font-size: clamp(2.1rem, 7vw, 3.6rem);
    font-weight: 800;
    letter-spacing: -.045em;
    line-height: 1;
    color: var(--phos);
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 30px rgba(157,255,192,.38);
}

.subscribe-block { padding: 1.35rem; border-top: 1px solid var(--phos-line); }
.subscribe-label {
    font-size: .66rem;
    letter-spacing: .15em;
    color: var(--phos-dim);
    margin-bottom: .8rem;
}
.subscribe-fields { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.subscribe-agree { margin-top: 1rem; }
.subscribe-error {
    margin-top: .6rem;
    font-size: .64rem;
    letter-spacing: .05em;
    color: var(--ember);
}
.subscribe-success {
    text-align: center;
    padding: 1.6rem 0;
    font-size: .85rem;
    letter-spacing: .06em;
    color: var(--phos);
}

/* ============================================================
   КАК ЭТО РАБОТАЕТ
   ============================================================ */

.how-it-works { padding-bottom: clamp(4rem, 9vw, 7.5rem); }
.hiw-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    margin-top: 1.6rem;
    background: var(--phos-line);
    border: 1px solid var(--phos-line);
}
.hiw-item {
    background: var(--void-2);
    padding: 1.4rem 1.25rem 1.5rem;
    position: relative;
    overflow: hidden;
    transition: background .35s var(--e-out);
}
.hiw-item::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    height: 1px; width: 100%;
    background: var(--phos);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .5s var(--e-out);
}
.hiw-item:hover { background: var(--void-3); }
.hiw-item:hover::after { transform: scaleX(1); }
.hiw-title {
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .1em;
    color: var(--phos);
    margin-bottom: .5rem;
}
.hiw-text {
    font-family: var(--f-text);
    font-size: .8rem;
    line-height: 1.65;
    color: var(--bone-dim);
}

/* ============================================================
   ПРОТОКОЛ — здесь нумерация оправдана: это перечень правил,
   на которые ссылаются в письмах и паспорте вещи
   ============================================================ */

.protocol-section { padding-bottom: clamp(4rem, 9vw, 7rem); }
.protocol-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    margin-top: 1.6rem;
    border-top: 1px solid var(--phos-line);
}
.protocol-item {
    display: grid;
    grid-template-columns: 3.1rem 1fr;
    gap: .9rem;
    padding: 1.15rem 1.1rem 1.25rem 0;
    border-bottom: 1px solid var(--phos-line);
    position: relative;
}
.protocol-item:nth-child(odd) { border-right: 1px solid var(--phos-line); padding-right: 1.6rem; }
.protocol-item:nth-child(even) { padding-left: 1.6rem; }
.protocol-num {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .08em;
    color: var(--phos-dim);
    padding-top: .15rem;
    transition: color .3s var(--e-out);
}
.protocol-item:hover .protocol-num { color: var(--phos); }
.protocol-text {
    font-family: var(--f-text);
    font-size: .84rem;
    line-height: 1.66;
    color: var(--bone-dim);
}
.protocol-text strong {
    display: block;
    font-family: var(--f-mono);
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .07em;
    color: var(--bone);
    margin-bottom: .3rem;
}

/* ============================================================
   ПОДВАЛ
   ============================================================ */

.site-footer {
    border-top: 1px solid var(--phos-line);
    padding: 1.8rem 0 2.4rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .9rem;
    font-size: .64rem;
    letter-spacing: .1em;
    color: var(--slate);
}
.footer-links { display: flex; gap: 1.3rem; flex-wrap: wrap; }
.site-footer a { color: var(--slate); text-decoration: none; transition: color .22s; }
.site-footer a:hover { color: var(--phos); }

/* ============================================================
   МОДАЛЬНЫЕ
   ============================================================ */

.notification {
    position: fixed;
    left: 50%;
    bottom: 1.5rem;
    transform: translate(-50%, 130%);
    opacity: 0;
    pointer-events: none;
    z-index: 200;
    max-width: min(440px, calc(100vw - 2rem));
    background: var(--void-3);
    border: 1px solid var(--phos);
    box-shadow: 0 0 44px -10px rgba(157,255,192,.5), 0 18px 50px rgba(0,0,0,.7);
    transition: transform .5s var(--e-out), opacity .5s var(--e-out);
}
.notification.show { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.notification-content {
    display: flex;
    align-items: flex-start;
    gap: .8rem;
    padding: .85rem 1rem;
    font-size: .74rem;
    line-height: 1.5;
    letter-spacing: .04em;
    color: var(--bone);
}
.notification-close {
    background: none;
    border: none;
    color: var(--slate);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 .1rem;
    transition: color .2s;
}
.notification-close:hover { color: var(--phos); }

.merki-overlay, .success-overlay, .confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 210;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.2rem;
    background: rgba(2,4,7,.86);
    backdrop-filter: blur(8px);
}
.merki-overlay.is-open, .success-overlay.show, .confirm-overlay { display: flex; }

.merki-dialog, .success-modal, .confirm-modal {
    position: relative;
    background: var(--void-3);
    border: 1px solid var(--phos-line);
    box-shadow: 0 30px 90px rgba(0,0,0,.8);
    max-height: 92svh;
    overflow: auto;
}
.merki-dialog { max-width: 900px; width: 100%; }
.merki-dialog img { display: block; width: 100%; height: auto; }

.merki-close, .success-close {
    position: absolute;
    top: .5rem; right: .5rem;
    z-index: 2;
    width: 2rem; height: 2rem;
    display: grid;
    place-items: center;
    background: rgba(4,6,10,.8);
    border: 1px solid var(--phos-line);
    color: var(--bone-dim);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    transition: color .2s, border-color .2s;
}
.merki-close:hover, .success-close:hover { color: var(--phos); border-color: var(--phos); }

.success-modal { max-width: 520px; width: 100%; }
.success-modal-head {
    padding: 1.3rem 1.4rem 1rem;
    border-bottom: 1px solid var(--phos-line);
}
.success-modal-head h2 {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--phos);
    text-shadow: 0 0 24px rgba(157,255,192,.35);
}
.success-modal-body { padding: 1.3rem 1.4rem 1.5rem; }
.success-modal-body p {
    font-family: var(--f-text);
    font-size: .85rem;
    line-height: 1.65;
    color: var(--bone-dim);
}
.dynamic-info { margin-top: 1.1rem; display: flex; flex-direction: column; gap: .55rem; }
.dynamic-info p {
    font-family: var(--f-mono);
    font-size: .68rem;
    letter-spacing: .06em;
    color: var(--slate);
    word-break: break-all;
}
.dynamic-info strong { color: var(--bone); font-weight: 500; }
.dynamic-info .serial-disp {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--phos);
}

.confirm-modal { max-width: 380px; width: 100%; padding: 1.4rem; text-align: center; }
.confirm-modal p {
    font-family: var(--f-text);
    font-size: .87rem;
    line-height: 1.6;
    color: var(--bone);
}
.confirm-buttons { display: flex; gap: .6rem; justify-content: center; margin-top: 1.2rem; }
.confirm-buttons button { flex: 1; }

/* капча Яндекса — скрываем её собственный бейдж (Shield), но не трогаем iframe:
   принудительный display:none на iframe вешал виджет намертво, если Яндексу
   требовалась видимая проверка — спиннер крутился вечно, т.к. сама проверка
   пряталась внутри скрытого iframe и её нельзя было пройти. */
#smartcaptcha-container { position: fixed; left: -9999px; top: 0; }
.SmartCaptcha-Shield,
[class*="SmartCaptcha-Shield"],
[class*="smartcaptcha-shield"],
[class*="Shield-"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* ============================================================
   ПОЯВЛЕНИЕ ПРИ СКРОЛЛЕ (стартовые состояния для GSAP)
   ============================================================ */

.js .r-up   { opacity: 0; transform: translateY(26px); }
.js .r-fade { opacity: 0; }

/* ============================================================
   АДАПТИВ
   ============================================================ */

@media (max-width: 1100px) {
    :root { --rail-w: 0px; }

    .rail {
        position: sticky;
        top: 0; bottom: auto;
        width: 100%;
        height: auto;
        flex-direction: row;
        align-items: center;
        gap: .9rem;
        padding: .6rem var(--gut);
        border-right: none;
        border-bottom: 1px solid var(--phos-line);
    }
    .rail-logo { font-size: 1.6rem; }
    .rail-tag, .rail-rule, .rail-count, .tick-row, .hash-ticker,
    .rail-foot, .readout-row.opt, .readout-row:has(> .readout-k:only-child) { display: none; }
    .readout { flex-direction: row; align-items: center; gap: .9rem; margin-left: auto; }
    .readout-row { flex-direction: row; gap: .4rem; white-space: nowrap; }
    .readout-row .readout-k { display: none; }

    .rail-mini {
        display: flex;
        align-items: baseline;
        gap: .25rem;
        font-size: .78rem;
        font-weight: 700;
        letter-spacing: .02em;
        color: var(--phos);
        font-variant-numeric: tabular-nums;
        white-space: nowrap;
    }
    .rail-mini small { font-size: .62rem; font-weight: 400; color: var(--slate); letter-spacing: .1em; }

    .stage { margin-left: 0; }

    .hero {
        grid-template-columns: 1fr;
        min-height: auto;
        padding: 2.6rem 0 3rem;
        gap: 2rem;
    }
    .hero-visual { order: -1; }
    .reveal { max-width: 420px; margin: 0 auto; }

    .order { grid-template-columns: 1fr; }
    .protocol-grid { grid-template-columns: 1fr; }
    .protocol-item:nth-child(odd) { border-right: none; padding-right: 1.1rem; }
    .protocol-item:nth-child(even) { padding-left: 0; }
}

@media (max-width: 720px) {
    body { font-size: 14px; }
    .hiw-grid { grid-template-columns: 1fr; }
    .form-row-3 { grid-template-columns: 1fr; }
    .subscribe-fields { grid-template-columns: 1fr; }
    .site-footer { flex-direction: column; align-items: flex-start; }
    .crt-grain { opacity: .3; }
}

/* ============================================================
   ДОСТУПНОСТЬ: движение по требованию, а не по умолчанию.
   Многоуровнево — гасим то, что двигает пространство,
   оставляем то, что меняет цвет и прозрачность.
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .crt-grain { animation: none; opacity: .25; }
    #grid-canvas { display: none; }
    .js .r-up, .js .r-fade { opacity: 1 !important; transform: none !important; }
    .hero-title .ln > span { transform: none !important; }
    .reveal-img { opacity: 1 !important; }
    .reveal-ascii { display: none !important; }
    .hash-ticker span { animation: none !important; transform: none !important; }
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .12s !important;
        scroll-behavior: auto !important;
    }
}

/* печать: экран не печатают, но пусть будет читаемо */
@media print {
    .crt, .crt-glass, .crt-grain, #grid-canvas, .field, .rail { display: none; }
    body { background: #fff; color: #000; }
    .stage { margin-left: 0; }
}

/* ссылка-кнопка внутри абзаца (гид по меркам) */
.link-inline {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: var(--phos);
    cursor: pointer;
    text-decoration: underline;
    text-decoration-color: rgba(157,255,192,.4);
    text-underline-offset: 3px;
    transition: text-decoration-color .2s;
}
.link-inline:hover { text-decoration-color: var(--phos); }
.link-inline:focus-visible { outline: 2px solid var(--phos); outline-offset: 2px; }

.order-intro { max-width: 60ch; }
.hero-visual { position: relative; }

/* ============================================================
   ПРАВКИ ПОСЛЕ ПРОСМОТРА
   ============================================================ */

/* подпись на фото тонула в светлом кадре — усиливаем подложку и контраст */
.reveal-cap {
    padding: 1.6rem .85rem .6rem;
    color: rgba(200,255,220,.9);
    text-shadow: 0 1px 6px rgba(0,0,0,.9);
    background: linear-gradient(0deg, rgba(4,6,10,.94) 0%, rgba(4,6,10,.75) 45%, transparent 100%);
}

/* заголовки разделов: одна структура на все три — надглавие + заголовок */
.sec-head { margin-bottom: 1.7rem; }
.sec-head .h-sec { margin-top: .75rem; }

/* компактный счётчик — только в мобильной шапке */
@media (min-width: 1101px) { .rail-mini { display: none; } }

/* на телефоне кадр съедал весь первый экран — ужимаем, чтобы заголовок попал в поле зрения */
@media (max-width: 1100px) {
    .reveal { max-height: 52svh; }
}
