/* Socio-Nik · база: сброс, типографика, кнопки, ритм секций, шапка, меню, подвал */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 16px); background: var(--ink); }
body {
  margin: 0; min-height: 100vh; overflow-x: clip;
  background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: clamp(1rem, 0.96rem + 0.25vw, 1.125rem); line-height: 1.6; font-weight: 400;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-optical-sizing: auto;
}
h1, h2, h3, h4 { margin: 0; font-weight: 900; line-height: 1.1; }
p { margin: 0 0 1em; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
button, input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
ul, ol { margin: 0; padding: 0; }
::selection { background: #b600a8; color: #fff; }
:focus-visible { outline: 2px solid var(--line); outline-offset: 3px; }
main:focus, main:focus-visible { outline: none; }
/* декор (тени карты, персонажи сцены, свечения) не раздвигает страницу вбок: на телефоне body { overflow-x: clip } этого не держит */
main { overflow-x: clip; }
/* пока скрипты не нарисовали страницу, main пустой — держим под ним экран, иначе первым кадром виден подвал,
   а потом всё прыгает вниз (CLS 0,53 на мобильной сети) */
.js #app:empty { min-height: 100vh; min-height: 100svh; }

.skip { position: absolute; left: -9999px; top: 10px; z-index: 100; padding: 10px 18px; border-radius: var(--r-pill); background: var(--paper); color: var(--ink); font-weight: 600; }
.skip:focus { left: 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* ---------- сетка ---------- */
.wrap { width: min(100% - 2 * var(--gutter), 1344px); margin-inline: auto; }
.wrap.narrow { width: min(100% - 2 * var(--gutter), 860px); }
.center { text-align: center; }
.center .body, .center .lead { margin-inline: auto; }
.grid2 { display: grid; grid-template-columns: 1fr; gap: 20px; }
.grid2 > * { min-width: 0; }
@media (min-width: 768px) { .grid2 { grid-template-columns: 1fr 1fr; gap: 24px; } }
.gap-top { margin-top: clamp(48px, 7vw, 96px); }

/* ---------- секции: тёмная → белая со скруглением → тёмная наезжает на белую ---------- */
.sec { position: relative; padding-block: clamp(72px, 11vw, 150px); }
.sec-white { border-radius: var(--r-card) var(--r-card) 0 0; padding-bottom: calc(clamp(72px, 11vw, 150px) + var(--overlap)); }
.sec-white + .sec:not(.sec-white) { margin-top: calc(-1 * var(--overlap)); border-radius: var(--r-card) var(--r-card) 0 0; background: var(--ink); z-index: 1; }
main:has(> .sec-white:last-child) + .footer { position: relative; margin-top: calc(-1 * var(--overlap)); border-radius: var(--r-card) var(--r-card) 0 0; z-index: 1; }
.sec-head { margin-bottom: clamp(36px, 5vw, 72px); }
.sec-head .lead { margin-top: 18px; }
.page-top { padding-top: calc(var(--nav-h) + clamp(40px, 7vw, 96px)); }

/* ---------- типографика ---------- */
.display, .h2 { font-weight: 900; text-transform: uppercase; letter-spacing: -0.02em; overflow-wrap: break-word; }
.display { line-height: 0.88; }
.h2 { font-size: clamp(2rem, 10vw, 150px); line-height: 1; }
.h2.h2-md { font-size: clamp(1.9rem, 7vw, 108px); }
.h2.h2-sm { font-size: clamp(1.7rem, 5.4vw, 80px); }
/* серебро по маске; clone — у каждой строки свой градиент */
.sv { background: var(--silver); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.on-white .sv, .sec-white .sv { background: none; color: var(--text); }
.h3 { font-size: clamp(1rem, 2.2vw, 2.1rem); font-weight: 500; line-height: 1.2; letter-spacing: 0.02em; text-transform: uppercase; }
.h4 { font-size: clamp(1.05rem, 1.5vw, 1.3rem); font-weight: 700; line-height: 1.3; letter-spacing: -0.005em; }
.body { max-width: 34em; font-size: clamp(1rem, 1.6vw, 1.25rem); line-height: 1.6; }
.body + .body { margin-top: -0.2em; }
.lead { max-width: 32em; font-size: clamp(1.1rem, 1.9vw, 1.5rem); line-height: 1.5; font-weight: 400; color: var(--muted); }
.caption, .eyebrow { font-size: clamp(12px, 1vw, 14px); font-weight: 500; line-height: 1.5; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.eyebrow { display: flex; width: fit-content; align-items: center; gap: 10px; margin: 0 0 18px; }
.center .eyebrow { margin-inline: auto; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- кнопки ---------- */
.btn {
  position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 14px 32px; border: 0; border-radius: var(--r-pill);
  background: var(--grad); color: #fff; font-size: 14px; font-weight: 500; line-height: 1.2; letter-spacing: 0.1em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  box-shadow: 0 4px 4px rgba(181, 1, 167, 0.25), inset 4px 4px 12px #7721b1;
  transition: transform 0.2s var(--ease), filter 0.25s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
/* белая обводка внутри: 2 px со смещением −3 px */
.btn::after { content: ""; position: absolute; inset: 1px; border: 2px solid #fff; border-radius: inherit; pointer-events: none; }
.btn:active { transform: scale(0.97); }
/* узкий экран: длинная подпись переносится, а не раздвигает страницу */
@media (max-width: 479px) { .btn { max-width: 100%; white-space: normal; text-align: center; } }
@media (hover: hover) and (pointer: fine) { .btn:hover { filter: brightness(1.14) saturate(1.05); } }
.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 13px 30px; border: 2px solid var(--line); border-radius: var(--r-pill);
  background: transparent; color: var(--text); font-size: 14px; font-weight: 500; line-height: 1.2; letter-spacing: 0.1em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap; cursor: pointer; transition: background 0.2s, transform 0.2s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn-ghost:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .btn-ghost:hover { background: var(--chip-hover); } }
.btn-sm { min-height: 44px; padding: 10px 22px; font-size: 12px; }
.btn-sm.btn-ghost { padding: 9px 20px; }
.btn[disabled], .btn-ghost[disabled] { opacity: 0.4; cursor: default; }
.ico { width: 1.15em; height: 1.15em; flex: none; }

.link { display: inline-flex; align-items: center; gap: 0.45em; color: var(--text); font-weight: 600; text-decoration: underline; text-decoration-color: var(--faint); transition: text-decoration-color 0.2s, gap 0.25s var(--out); }
.link::after { content: ""; width: 0.9em; height: 0.9em; flex: none; background: currentColor; -webkit-mask: var(--arrow) center / contain no-repeat; mask: var(--arrow) center / contain no-repeat; }
.link:hover { text-decoration-color: currentColor; gap: 0.65em; }
:root { --arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h15M13 6l6 6-6 6'/%3E%3C/svg%3E"); }
.ghost-btn { padding: 8px 2px; border: 0; background: none; color: var(--muted); font-size: 13px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; }
.ghost-btn:hover:not(:disabled) { color: var(--text); }
.ghost-btn:disabled { opacity: 0.35; cursor: default; }

.chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border: 1.5px solid var(--hair); border-radius: var(--r-pill); font-size: 12px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; }
.qdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--q, var(--text)); flex: none; }

/* большая карточка с рамкой и вложенная плашка */
.card { padding: clamp(24px, 3.4vw, 44px); border: 2px solid var(--line); border-radius: var(--r-card); }
.card-title { margin: 0 0 14px; font-size: clamp(1rem, 1.6vw, 1.35rem); font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; line-height: 1.3; }
.card p { margin: 0 0 10px; }
.card p:last-child { margin-bottom: 0; }
.plate { padding: clamp(18px, 2.4vw, 28px); border-radius: var(--r-in); background: var(--card); }

/* ---------- шапка ---------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; height: var(--nav-h); border-bottom: 1px solid transparent; transition: transform 0.45s var(--out), background 0.3s, border-color 0.3s; }
.scrolled .nav { background: var(--ink); border-bottom-color: var(--hair); }
.nav-in { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); font-size: 15px; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; white-space: nowrap; -webkit-tap-highlight-color: transparent; }
/* знак: четыре глянцевых 3D-шара в цветах квадр; при наведении поворачиваются на четверть, шары подпрыгивают по очереди */
.brand-mark { position: relative; flex: none; width: 34px; height: 34px; transition: transform 0.7s var(--spring); }
.brand-mark::before { content: ""; position: absolute; inset: -35%; border-radius: 50%; background: radial-gradient(closest-side, rgba(182, 0, 168, 0.3), rgba(118, 33, 176, 0.12) 55%, transparent 75%); opacity: 0.8; transition: opacity 0.4s; pointer-events: none; }
.bm { position: absolute; width: 58%; height: 58%; max-width: none; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.5)); }
.bm-1 { left: -4%; top: -4%; }
.bm-2 { right: -4%; top: -4%; }
.bm-3 { right: -4%; bottom: -4%; }
.bm-4 { left: -4%; bottom: -4%; }
.brand-word { background: linear-gradient(180deg, #ffffff 15%, #aebdc8 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (hover: hover) and (pointer: fine) {
  .brand:hover .brand-mark { transform: rotate(90deg); }
  .brand:hover .brand-mark::before { opacity: 1; }
  .brand:hover .bm { animation: bm-hop 0.55s var(--spring) both; }
  .brand:hover .bm-2 { animation-delay: 0.07s; }
  .brand:hover .bm-3 { animation-delay: 0.14s; }
  .brand:hover .bm-4 { animation-delay: 0.21s; }
}
.brand:active .brand-mark { transform: scale(0.92); }
@keyframes bm-hop { 0%, 100% { scale: 1; } 45% { scale: 1.22; } }
.nav-links { display: none; gap: clamp(18px, 2.2vw, 36px); }
.nav-links a { color: var(--muted); font-size: 13px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; white-space: nowrap; transition: color 0.2s; }
.nav-links a:hover, .nav-links a.on { color: var(--text); }
.nav-links a.on { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px; }
.menu-btn { display: grid; place-items: center; width: 44px; height: 44px; margin-right: -10px; padding: 0; border: 0; background: none; cursor: pointer; }
.burger { position: relative; width: 22px; height: 12px; }
.burger i { position: absolute; left: 0; right: 0; height: 2px; border-radius: 1px; background: var(--text); transition: transform 0.35s var(--out), top 0.35s var(--out); }
.burger i:first-child { top: 0; }
.burger i:last-child { top: 10px; }
.menu-open .burger i:first-child { top: 5px; transform: rotate(45deg); }
.menu-open .burger i:last-child { top: 5px; transform: rotate(-45deg); }
@media (min-width: 960px) {
  .nav-links { display: flex; }
  .menu-btn { display: none; }
}

/* меню на телефоне — отдельный слой поверх страницы */
.menu { position: fixed; inset: 0; z-index: 45; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: calc(var(--nav-h) + 20px) var(--gutter) 40px; background: var(--ink); opacity: 0; visibility: hidden; transition: opacity 0.3s var(--ease), visibility 0.3s; }
.menu-open .menu { opacity: 1; visibility: visible; }
.menu a { width: fit-content; color: var(--text); font-size: clamp(30px, 9.4vw, 60px); font-weight: 900; line-height: 1.12; letter-spacing: -0.01em; text-transform: uppercase; text-decoration: none; }
.menu a.on { color: var(--muted); }
.menu-open { overflow: hidden; }
.menu-open .nav { background: var(--ink); }
@media (min-width: 960px) { .menu { display: none; } }

/* ---------- подвал ---------- */
.footer { position: relative; padding: clamp(48px, 6vw, 72px) 0 28px; background: var(--ink); overflow: hidden; }
.footer::before { content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); height: 1px; background: var(--hair); }
main:has(> .sec-white:last-child) + .footer::before { display: none; }
.footer-links { display: flex; flex-wrap: wrap; gap: 14px 30px; margin-bottom: 28px; }
.footer-links a { color: var(--text); font-size: 13px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-note { max-width: 46em; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.footer-mark { margin: clamp(40px, 6vw, 80px) 0 0; font-weight: 900; line-height: 0.8; letter-spacing: -0.02em; text-transform: uppercase; white-space: nowrap; user-select: none; }
.footer-fine { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; margin: 22px 0 0; color: var(--muted); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }
