/* ============================================================
   Головна: «Хаос на вході — порядок на виході»
   Підключається після css/style.css.
   ============================================================ */

.mono {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ---------- Hero ---------- */
.hero {
    padding-top: calc(var(--nav-h) + clamp(2.5rem, 6vw, 5.5rem));
    padding-bottom: 1.75rem;
    display: grid;
    gap: 1.75rem;
}
.hero__kicker { color: var(--ink-3); }
.hero__title {
    font-family: var(--font-display);
    font-weight: 850;
    font-variation-settings: "wdth" 75;
    text-transform: uppercase;
    font-size: clamp(2.9rem, 9.4vw, 8.6rem);
    line-height: 0.9;
    letter-spacing: -0.01em;
    cursor: pointer;
}
.hero__title .row { display: block; }
.hero__title .row + .row { margin-top: 0.06em; }
.hero__title { margin-bottom: 0.4rem; }
.hero__title .ch {
    display: inline-block;
    transform: translate(0, var(--y)) rotate(var(--r));
    transition: transform 0.5s cubic-bezier(.2, .9, .25, 1.25);
    animation: jit 2.4s ease-in-out infinite alternate;
    animation-delay: var(--d);
}
.hero__title em { font-style: normal; display: inline-block; background: var(--ink); color: var(--signal); padding: 0.04em 0.08em 0; line-height: 0.92; }
.hero__title:hover .ch, .hero__title.tidy .ch { transform: none; animation: none; }
@keyframes jit { to { transform: translate(0, calc(var(--y) * -1)) rotate(calc(var(--r) * -0.7)); } }

.hero__row {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 2rem;
    align-items: end;
}
.hero__lead { max-width: 58ch; font-size: clamp(1.05rem, 1.5vw, 1.25rem); color: var(--ink-2); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: flex-end; }
.hero__actions .btn { min-height: 52px; }

/* ---------- 3D-сцена ---------- */
.stage { position: relative; border-block: 2px solid var(--ink); background: var(--bg); }
.stage canvas { display: block; width: 100%; height: clamp(360px, 38vw, 560px); touch-action: pan-y; cursor: grab; }
.stage__hint { position: absolute; left: var(--gut); bottom: 0.75rem; color: var(--ink-3); font-size: 0.7rem; }
.stage.no3d canvas { display: none; }
.stage.no3d .stage__fallback { display: block; }
.stage__fallback { display: none; padding: 5rem var(--gut); color: var(--ink-3); }

/* ---------- Секції ---------- */
.anchor { position: relative; top: calc(-1 * var(--nav-h)); display: block; height: 0; }
.sec { padding-top: clamp(4rem, 9vw, 7.5rem); }
.sec__head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: end;
    gap: 1rem 2.5rem;
    margin-bottom: 2.25rem;
}
.sec__title {
    font-family: var(--font-display);
    font-weight: 800;
    font-variation-settings: "wdth" 80;
    text-transform: uppercase;
    font-size: clamp(2.25rem, 5vw, 4.25rem);
    line-height: 0.95;
    text-wrap: balance;
}
.sec__note { max-width: 46ch; color: var(--ink-3); }

/* ---------- Станції ---------- */
.stations { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 2px solid var(--ink); }
.st {
    padding: 1.5rem 1.5rem 1.75rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    border-right: 1px solid var(--line);
    transition: background 0.2s var(--ease);
}
.st + .st { padding-left: 1.5rem; }
.st:last-child { border-right: 0; }
.st.is-on { background: var(--bg-alt); }
.st__plate {
    display: inline-flex;
    align-self: flex-start;
    gap: 0.6rem;
    align-items: center;
    background: var(--ink);
    color: var(--signal);
    padding: 0.4rem 0.65rem;
    font-weight: 600;
}
.st__plate i { width: 8px; height: 8px; border-radius: 50%; background: #4A5052; }
.st.is-on .st__plate i { background: var(--signal); box-shadow: 0 0 8px var(--signal); }
.st h3 {
    font-family: var(--font-display);
    font-weight: 750;
    font-variation-settings: "wdth" 85;
    font-size: 1.65rem;
    line-height: 1.05;
    text-transform: uppercase;
}
.st p { color: var(--ink-2); font-size: 1rem; }
.st .st__svc { color: var(--ink-3); font-size: 0.9rem; }
.st .st__stack { margin-top: auto; color: var(--ink-3); font-size: 0.7rem; }

/* ---------- Етикетки кейсів ---------- */
.tickets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.tk {
    position: relative;
    background: var(--surface);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.5rem 1.5rem;
    padding: 1.6rem 1.75rem 1.5rem 2.5rem;
    border: 1px solid var(--line);
    transition: transform 0.2s var(--ease);
}
.tk::before { content: ""; position: absolute; left: 14px; top: 12px; bottom: 12px; border-left: 2px dashed var(--line); }
.tk:hover { transform: translateY(-4px) rotate(-0.4deg); }
.tk__meta { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 0.75rem; color: var(--ink-3); font-size: 0.7rem; }
.tk__num {
    font-family: var(--font-display);
    font-weight: 850;
    font-variation-settings: "wdth" 75;
    font-size: clamp(3.5rem, 6vw, 5.75rem);
    line-height: 0.9;
}
.tk__unit { align-self: end; color: var(--ink-3); text-align: right; padding-bottom: 0.4rem; }
.tk h3 { grid-column: 1 / -1; margin-top: 0.6rem; font-size: 1.25rem; font-weight: 600; line-height: 1.3; }
.tk p { grid-column: 1 / -1; color: var(--ink-2); font-size: 0.95rem; }
.tk__code { grid-column: 1 / -1; display: flex; gap: 2px; height: 30px; margin-top: 0.9rem; overflow: hidden; position: relative; }
.tk__code span { background: var(--ink); flex: none; }
.tk__code::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--signal); opacity: 0; }
.tk:hover .tk__code::after { animation: scan 0.9s linear; opacity: 1; }
@keyframes scan { from { left: 0; } to { left: 100%; } }
.more { margin-top: 1.5rem; font-size: 0.95rem; }
.more a { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.more a:hover { color: var(--accent); }

/* ---------- ВТК ---------- */
.qc { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.q {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--line);
    padding: 1.75rem 1.75rem 7.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}
.q blockquote { font-size: 1.1rem; line-height: 1.5; }
.q figcaption { color: var(--ink-3); font-size: 0.9rem; }
.stamp {
    position: absolute;
    right: 1.4rem; bottom: 1.1rem;
    width: 104px; height: 104px;
    border-radius: 50%;
    border: 3px solid var(--violet);
    outline: 1px solid var(--violet);
    outline-offset: -9px;
    color: var(--violet);
    display: grid;
    place-content: center;
    text-align: center;
    font: 600 10px/1.25 var(--font-mono);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transform: rotate(var(--sr, -14deg));
    opacity: 0.85;
    mix-blend-mode: multiply;
}
.stamp b { display: block; font-family: var(--font-display); font-size: 24px; letter-spacing: 0; font-weight: 800; }
.stamp.thunk { animation: thunk 0.45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes thunk { from { transform: rotate(calc(var(--sr, -14deg) - 10deg)) scale(1.35); } to { transform: rotate(var(--sr, -14deg)) scale(1); } }

/* ---------- Контакт ---------- */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(1.5rem, 5vw, 4.5rem); align-items: start; }
.passport { border: 2px solid var(--ink); background: var(--bg-alt); padding: 1.4rem 1.5rem; }
.passport h3 { margin-bottom: 0.9rem; font-weight: 600; }
.passport dl { display: grid; gap: 0.6rem; }
.passport dl div { display: flex; align-items: baseline; gap: 0.5rem; }
.passport dt { color: var(--ink-3); font-size: 0.95rem; white-space: nowrap; }
.passport dl div::after { content: ""; order: 1; flex: 1; border-bottom: 2px dotted var(--line); }
.passport dd { order: 2; font-family: var(--font-display); font-weight: 750; font-size: 1.35rem; white-space: nowrap; }
.cta__lead { margin: 1.1rem 0 1.75rem; color: var(--ink-2); max-width: 52ch; }
.lines { display: grid; }
.ln { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; padding: 0.85rem 0; border-top: 1px solid var(--line); }
.ln .mono { width: 5.5rem; color: var(--ink-3); }
.ln .v { font-size: 1.2rem; font-weight: 600; user-select: all; }
.ln a.v:hover { color: var(--accent); }
.copy {
    margin-left: auto;
    min-height: 44px;
    padding: 0 0.9rem;
    border: 1px solid var(--ink);
    background: transparent;
    font: 500 0.8rem var(--font-sans);
    cursor: pointer;
    border-radius: var(--radius);
}
.copy:hover { background: var(--signal); }

/* ---------- Адаптив ---------- */
@media (max-width: 980px) {
    .stations { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .st:nth-child(2) { border-right: 0; }
    .st:nth-child(3) { padding-left: 0; }
    .st:nth-child(n+3) { border-top: 1px solid var(--line); }
    .qc { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
    .hero__row, .contact, .tickets { grid-template-columns: minmax(0, 1fr); }
    .hero__actions { justify-content: flex-start; }
}
@media (max-width: 520px) {
    .stations { grid-template-columns: minmax(0, 1fr); }
    .st, .st + .st { padding-left: 0; border-right: 0; }
    .st + .st { border-top: 1px solid var(--line); }
    .tk { padding-left: 2.1rem; }
    .ln .mono { width: auto; }
    .copy { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .hero__title .ch { animation: none; }
}
