/* Общие стили сайта: токены, шапка, заставка и переходы, формы, терминал, режимы готовности */
:root {
  --wall: #060404; --onwall: #ECECE8; --asphalt: #0d0808; --ink: #060404; --paper: #ECECE8; --spray: #9E1D2A; --gold: #C9A24B;
  --violet: #9B7BFF; --blue: #4D86FF; --accent: var(--violet);
  --classic: 'Forum', 'Times New Roman', serif; --street: 'Rubik Spray Paint', 'Impact', sans-serif; --hand: 'Caveat', cursive;
  --sans: 'Hanken Grotesk', system-ui, sans-serif; --mono: 'JetBrains Mono', ui-monospace, monospace;
  --gutter: clamp(18px, 4vw, 64px); --ease: cubic-bezier(.2, .8, .2, 1);
  --key-dark: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='28' height='20' viewBox='0 0 28 20'><path d='M0 19V2h22v14H6V6h10v6' fill='none' stroke='%23121212' stroke-width='2.4' stroke-linecap='square'/></svg>");
  --key-light: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='28' height='20' viewBox='0 0 28 20'><path d='M0 19V2h22v14H6V6h10v6' fill='none' stroke='%23ECECE8' stroke-width='2.4' stroke-linecap='square'/></svg>");
}
[data-mode="watch"] { --wall: #0f0a06; --spray: #E08A12; }
[data-mode="alarm"] { --wall: #130808; }
[data-mode="red"]   { --wall: #1a0508; --spray: #C0303C; }
* { box-sizing: border-box; margin: 0; padding: 0; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body { font-family: var(--sans); background: var(--wall); color: var(--onwall); line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden; position: relative; transition: background .7s ease, color .7s ease; }
body.loading { overflow: hidden; }
body::before { content: ''; position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .09; mix-blend-mode: screen;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='260' height='260'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--spray); outline-offset: 3px; }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.key { height: 20px; background: var(--key-dark) repeat-x left center; }
.key.light { background-image: var(--key-light); }
main { position: relative; z-index: 2; }

/* кольцо курсора */
.ring { position: fixed; left: 0; top: 0; z-index: 120; width: 30px; height: 30px; margin: -15px 0 0 -15px; border: 1.5px solid #fff; border-radius: 50%; pointer-events: none; mix-blend-mode: difference; transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), background .3s; display: none; }
.ring.big { width: 76px; height: 76px; margin: -38px 0 0 -38px; background: #fff; }
@media (pointer: fine) { .ring { display: block; } body.has-ring, body.has-ring a, body.has-ring button { cursor: none; } }

/* заставка и переходы между страницами: афиша рвётся пополам */
#pre { position: fixed; inset: 0; z-index: 110; pointer-events: none; }
#pre .half { position: absolute; top: 0; bottom: 0; width: 50.4%; background: #040202; will-change: transform; }
#pre .l { left: 0; } #pre .r { right: 0; }
#pre .count { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 3; text-align: center; color: var(--paper); }
#pre .count b { display: block; font-family: var(--classic); font-weight: 400; font-size: clamp(5rem, 18vw, 16rem); line-height: .9; letter-spacing: .02em; }
#pre .count .key { width: min(60vw, 520px); margin: 18px auto 14px; opacity: .8; background-image: var(--key-light); clip-path: inset(0 100% 0 0); }
#pre .count span { color: #8d8d92; }

/* шапка */
.bar { position: fixed; inset: 0 0 auto 0; z-index: 100; display: flex; justify-content: space-between; align-items: center; padding: 20px var(--gutter); color: #fff; mix-blend-mode: difference; pointer-events: none; }
.bar > * { pointer-events: auto; }
.bar nav { display: flex; gap: clamp(14px, 3vw, 38px); align-items: center; }
.bar a, .bar button { position: relative; background: none; border: 0; cursor: pointer; }
.bar nav a::after { content: ''; position: absolute; left: 0; right: 100%; bottom: -4px; height: 1px; background: currentColor; transition: right .4s var(--ease); }
.bar nav a:hover::after, .bar nav a.on::after { right: 0; }
.mark { font-family: var(--classic); font-size: 24px; letter-spacing: .06em; text-transform: none; }
#modeBtn { border: 1px solid currentColor !important; padding: 6px 10px; }

/* типографика и маски */
.ml { display: block; overflow: hidden; padding-bottom: .1em; margin-bottom: -.1em; }
.ml > span { display: block; will-change: transform; }
.torn { position: relative; }
.btn { display: inline-flex; align-items: center; gap: 14px; background: #1d1d20; color: var(--paper); border: 1px solid #34343a; padding: 16px 26px; cursor: pointer; letter-spacing: .1em; text-transform: uppercase; font-size: 12px; font-family: var(--mono); transition: background .35s, transform .35s var(--ease); will-change: transform; }
.btn:hover { background: var(--spray); }
.btn.red { background: var(--spray); border-color: var(--spray); } .btn.red:hover { background: var(--paper); color: var(--asphalt); }
.btn.line { background: none; border: 1px solid currentColor; color: inherit; } .btn.line:hover { background: var(--paper); color: var(--asphalt); }
.tag { display: inline-block; background: #1d1d20; color: var(--paper); padding: 6px 10px; transform: rotate(-1.5deg); }
.tag.red { background: var(--spray); }
.wipe { clip-path: inset(0 0 100% 0); will-change: clip-path; }
.halftone { position: relative; background: var(--paper); overflow: hidden; }
.halftone img { display: block; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.45) brightness(1.08); mix-blend-mode: multiply; }
.halftone::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at center, rgba(0,0,0,.7) 0 1.1px, transparent 1.5px) 0 0 / 5px 5px; mix-blend-mode: multiply; opacity: .5; pointer-events: none; }
.halftone.color img { filter: none; mix-blend-mode: normal; }
.halftone.color::after { opacity: .18; }

/* терминал-модуль (главная и Faust) */
.mod { border: 1px solid #34343a; background: #070404; padding: 20px; position: relative; overflow: hidden; transition: border-color .4s; color: var(--paper); }
.mod:hover { border-color: var(--accent); }
.mod .cap { color: #8d8d92; margin-bottom: 14px; display: flex; justify-content: space-between; }
.m-term { padding: 0; min-height: 440px; font-family: var(--mono); font-size: 13px; line-height: 1.7; }
.term-head { display: flex; justify-content: space-between; padding: 12px 18px; border-bottom: 1px solid #34343a; color: #8d8d92; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.chip { color: var(--accent); }
.term-body { padding: 20px 18px 26px; white-space: pre-wrap; word-break: break-word; }
.term-body .cmd { color: var(--paper); } .term-body .cmd::before { content: '▸ '; color: var(--accent); }
.term-body .dim { color: #75757a; } .term-body .hl { color: var(--accent); }
.term-body .out { opacity: 0; transform: translateY(6px); animation: show .5s forwards; }
.caret { display: inline-block; width: .55em; height: 1.05em; background: var(--accent); vertical-align: -2px; animation: blink 1s steps(1) infinite; }
@keyframes show { to { opacity: 1; transform: none; } } @keyframes blink { 50% { opacity: 0; } }
.bars { display: grid; grid-template-columns: 13em 1fr 3.8em; gap: 4px 12px; align-items: center; margin-top: 4px; }
.bars > span:nth-child(3n+1) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bars .bt { height: 5px; background: #222226; position: relative; }
.bars .bt i { position: absolute; inset: 0 auto 0 0; background: var(--accent); width: 0; transition: width 1.2s var(--ease); }
.bars .bt i.low { background: #c84452; } .bars em { font-style: normal; text-align: right; }
.tabs { display: grid; border: 1px solid #34343a; }
.tab { background: none; border: 0; color: #8d8d92; padding: 16px 18px; text-align: left; cursor: pointer; transition: color .3s, background .3s, padding .3s var(--ease); display: flex; justify-content: space-between; }
.tab + .tab { border-top: 1px solid #34343a; }
.tab[aria-selected="true"] { color: var(--asphalt); background: var(--accent); padding-left: 26px; }
.tab:hover:not([aria-selected="true"]) { color: var(--paper); }
.nums { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 12px; }
.nums b { display: block; font-family: var(--classic); font-weight: 400; font-size: clamp(2.2rem, 4vw, 3.6rem); line-height: 1; color: var(--paper); }
.nums span { color: #8d8d92; font-size: 11px; }
.modes { display: flex; flex-wrap: wrap; gap: 8px; }
.modes button { background: none; border: 1px solid #34343a; padding: 10px 14px; cursor: pointer; color: #b9b9b4; transition: all .3s; }
.modes button[aria-pressed="true"] { background: var(--paper); color: var(--asphalt); border-color: var(--paper); }

/* допуск и подвал (общие для всех страниц) */
.access { padding: clamp(70px, 12vh, 150px) var(--gutter); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); position: relative; z-index: 2; border-top: 2px solid var(--onwall); }
.access h2 { font-family: var(--classic); font-weight: 400; font-size: clamp(2.6rem, 6.4vw, 6.4rem); line-height: .94; text-transform: uppercase; letter-spacing: .02em; }
.access .sub { margin-top: 18px; max-width: 26em; opacity: .85; }
.stamp { display: inline-block; margin-top: 26px; font-family: var(--street); font-size: clamp(1.6rem, 3vw, 2.6rem); color: var(--spray); border: 4px solid var(--spray); padding: 4px 16px; transform: rotate(-6deg); }
.access form { display: grid; gap: 22px; align-content: start; background: var(--paper); color: var(--asphalt); padding: clamp(22px, 3vw, 40px); transform: rotate(-.6deg); box-shadow: 0 20px 50px rgba(0,0,0,.28); }
.access label { display: grid; gap: 8px; color: #55554f; }
.access input, .access textarea { font: inherit; font-size: 17px; background: transparent; border: 0; border-bottom: 2px solid var(--asphalt); padding: 8px 0 10px; color: var(--asphalt); border-radius: 0; resize: vertical; }
.access input:focus, .access textarea:focus { outline: none; border-bottom-color: var(--spray); }
.formnote { color: #55554f; font-size: 13px; min-height: 1.4em; }
footer { background: #040202; color: #9c9c97; border-top: 1px solid #1d1d20; padding: 0 var(--gutter) 46px; font-size: 12px; display: grid; gap: 10px; position: relative; z-index: 2; }
footer .key { margin: 0 calc(var(--gutter) * -1) 30px; background-image: var(--key-light); opacity: .55; }
footer p { max-width: 74em; }
footer nav { display: flex; gap: 22px; flex-wrap: wrap; margin-bottom: 14px; color: var(--paper); }

@media (max-width: 860px) {
  .bar nav a { display: none; }
  .access { grid-template-columns: 1fr; }
  .bars { grid-template-columns: 8.4em 1fr 3.4em; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .term-body .out { animation: none; opacity: 1; transform: none; } .caret { animation: none; } .ring { display: none !important; }
  .wipe { clip-path: none; }
}

/* картины вплетены в оформление */
.lens .col { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .45s; -webkit-mask-image: radial-gradient(circle var(--lr, 150px) at var(--mx, 50%) var(--my, 50%), #000 0, rgba(0,0,0,.65) 55%, transparent 100%); mask-image: radial-gradient(circle var(--lr, 150px) at var(--mx, 50%) var(--my, 50%), #000 0, rgba(0,0,0,.65) 55%, transparent 100%); }
.halftone .col { filter: none; mix-blend-mode: normal; }
.lens.on .col { opacity: 1; }
.imgfill { background-image: linear-gradient(rgba(255,255,255,.30), rgba(255,255,255,.30)), var(--bg); background-size: cover, 150% auto; background-position: center, center var(--by, 50%); -webkit-background-clip: text; background-clip: text; color: transparent !important; -webkit-text-stroke: 1.2px rgba(236,236,232,.55); }
.hov { position: relative; overflow: hidden; }
.hov > *:not(.im) { position: relative; z-index: 1; }
.hov .im { position: absolute; right: 0; top: 0; bottom: 0; width: 32%; clip-path: inset(0 0 0 100%); transition: clip-path .95s var(--ease); z-index: 0; background: var(--paper); }
.hov .im img { width: 120%; height: 100%; object-fit: cover; display: block; filter: grayscale(1) contrast(1.4); transform: translateX(-10%) scale(1.1); transition: filter .7s, transform 1.3s var(--ease); }
.hov:hover .im { clip-path: inset(0 0 0 0); }
.hov:hover .im img { filter: none; transform: translateX(0) scale(1); }
.hov .go, .hov span.r { text-shadow: 0 2px 10px rgba(0,0,0,.55); }
.mq-tile { display: inline-block; flex: none; width: clamp(190px, 22vw, 330px); height: clamp(100px, 11.5vw, 170px); overflow: hidden; position: relative; margin-right: .6em; background: var(--paper); clip-path: polygon(0 4%, 6% 0, 14% 5%, 24% 0, 38% 4%, 52% 0, 66% 5%, 80% 0, 92% 4%, 100% 1%, 100% 96%, 94% 100%, 82% 95%, 66% 100%, 50% 96%, 34% 100%, 20% 95%, 8% 100%, 0 97%); }
.mq-tile img { width: 100%; height: 100%; object-fit: cover; display: block; filter: grayscale(1) contrast(1.5) brightness(1.1); mix-blend-mode: multiply; transition: filter .5s; }
.mq-tile::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at center, rgba(0,0,0,.7) 0 1.1px, transparent 1.5px) 0 0 / 5px 5px; mix-blend-mode: multiply; opacity: .45; pointer-events: none; }
.mq:hover .mq-tile img { filter: none; mix-blend-mode: normal; }
@media (max-width: 860px) { .hov .im { display: none; } }

body { background-image: radial-gradient(120% 80% at 12% 0%, #110607 0%, transparent 60%), radial-gradient(90% 60% at 100% 100%, #0e0805 0%, transparent 55%); background-attachment: fixed; }
