/* cluster.foundation — одна сцена.
   Фон и знак рисует canvas (site.js); разделы прокручиваются поверх. Текст стоит «в пасти» знака C:
   отступ --mouth считает скрипт по положению узлов, без скрипта — 34vw. */

:root {
  --bg: #0c0d10;
  --text: #ecebe6;
  --text-2: #a9acb4;
  --line: rgba(236, 235, 230, .12);

  --c1: #a6e635; --c2: #4fd4e8; --c3: #6c9cff; --c4: #b98cff; --c5: #ffb347;

  --display: 'Tektur', 'Bahnschrift', 'Segoe UI', system-ui, sans-serif;
  --sans: 'Golos Text', 'Segoe UI', system-ui, sans-serif;

  --gutter: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--bg); scrollbar-color: #3a3d45 var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  caret-color: var(--c1);
}
::selection { background: var(--c1); color: var(--bg); }
h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .22em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--c1); outline-offset: 3px; border-radius: 2px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 10; background: var(--c1); color: var(--bg); padding: 8px 14px; font-weight: 600; }
.skip:focus { top: 12px; }

.n1 { --c: var(--c1); } .n2 { --c: var(--c2); } .n3 { --c: var(--c3); } .n4 { --c: var(--c4); } .n5 { --c: var(--c5); }

.stage { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; pointer-events: none; }
main, .foot { position: relative; z-index: 1; }

/* шапка — поверх первого экрана, уезжает вместе с ним */
.bar { position: absolute; top: 0; left: 0; right: 0; z-index: 3; display: flex; align-items: center; gap: 32px; padding: 22px var(--gutter); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.brand-mark { width: 28px; height: 28px; flex: none; }
.wordmark { font: 600 1.25rem/1 var(--display); letter-spacing: .12em; }
.nav { display: flex; gap: 28px; font-size: .9375rem; }
.nav a, .langs a { text-decoration: none; color: var(--text-2); transition: color .2s; }
.nav a:hover, .langs a:hover { color: var(--text); }
.langs { display: flex; gap: 4px; font-size: .875rem; letter-spacing: .02em; }
.langs a { padding: 4px 6px; }
.langs a[aria-current] { color: var(--text); text-decoration: underline; text-decoration-color: var(--c1); text-decoration-thickness: 2px; }

/* ---------- экраны ---------- */

.step { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: 12vh var(--gutter); }
.copy { margin-left: var(--mouth, 34vw); width: 100%; max-width: min(660px, calc(100vw - var(--mouth, 34vw) - var(--gutter))); }

.intro .copy { margin-left: 0; max-width: min(1120px, 100%); }
.intro h1 {
  font: 700 clamp(2.6rem, .9rem + 5.4vw, 6.8rem)/.98 var(--display);
  letter-spacing: -.012em; text-wrap: balance;
}
.h1-brand { display: block; color: var(--c1); }
.actions { margin-top: 48px; }

.dir .copy { max-width: min(800px, calc(100vw - var(--mouth, 34vw) - var(--gutter))); }
.step h2 {
  font: 650 min(clamp(2.3rem, 1.1rem + 3.8vw, 5.2rem), 9.5vh)/1.02 var(--display);
  letter-spacing: -.01em; color: var(--c, var(--text)); text-wrap: balance;
}
.sub { margin-top: 24px; max-width: 46ch; font-size: clamp(1.0625rem, .95rem + .4vw, 1.3125rem); line-height: 1.55; color: var(--text-2); text-wrap: pretty; }
.fact {
  margin-top: 30px; display: flex; align-items: baseline; gap: .6em;
  font: 500 clamp(1.15rem, .9rem + .8vw, 1.65rem)/1.3 var(--display); color: var(--text);
  font-variant-numeric: lining-nums;
}
.fact::before { content: ""; flex: none; width: .5em; height: .5em; border-radius: 50%; background: var(--c, var(--text)); transform: translateY(-.05em); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px;
  background: var(--c1); color: var(--bg);
  font: 600 1rem/1 var(--sans); text-decoration: none;
  border: 0; border-radius: 3px; cursor: pointer;
  transition: background-color .2s, transform .2s var(--ease);
}
.btn:hover { background: #bdf552; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .6; cursor: progress; }

/* проекты: знак уходит в угол, проект занимает экран */
.proj { align-items: center; }
.pcopy { width: 100%; max-width: 1180px; margin: 0 auto; }
/* логотипы проектов — в стиле самих проектов, размеры в em от кегля слова */
.pname { font-size: clamp(2.3rem, .9rem + 4.4vw, 5.4rem); line-height: 1; font-weight: 400; }
.logo { display: inline-flex; align-items: center; color: inherit; text-decoration: none; transition: opacity .2s; }
a.logo:hover { opacity: .82; }
.logo-dec { gap: .57em; color: #e6e2d8; }
.dec-mark { display: grid; place-items: center; width: 1.71em; height: 1.71em; border: .05em solid rgba(230, 226, 216, .3); border-radius: .19em; }
.dec-mark svg { width: .9em; height: .9em; }
.dec-word { font: 700 1em/1 'PT Serif Logo', 'PT Serif', Georgia, serif; letter-spacing: -.04em; }
.logo-sor { gap: .53em; color: #f2f3f5; }
.sor-mark { width: 3.07em; height: 1.6em; flex: none; }
.sor-word { font: 600 1em/1 'Geologica Logo', 'Geologica', sans-serif; letter-spacing: .09em; }
.logo-loc { gap: .56em; color: #e9ecf5; }
.loc-mark { display: grid; place-items: center; flex: none; width: 1.78em; height: 1.78em; border-radius: .5em; background: linear-gradient(120deg, #a3e635, #84cc16); }
.loc-mark svg { width: 1.11em; height: 1.11em; }
.loc-word { font: 800 1em/1 'Inter Logo', 'Inter', sans-serif; letter-spacing: -.02em; }
.loc-tag { font: 600 .42em/1 'Inter Logo', 'Inter', sans-serif; letter-spacing: .04em; color: #5d6377; text-transform: lowercase; border-left: 1px solid rgba(255, 255, 255, .14); padding: .3em 0 .3em .9em; }
.pmeta { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 4px 18px; color: var(--text-2); }
.pmeta a { color: var(--text); }
.pmeta span::before { content: "— "; }
.proj .sub { max-width: 54ch; }
.proj .actions { margin-top: 36px; }
.projhead { min-height: 70vh; min-height: 70svh; }
.projhead h2 { color: var(--text); }
.form-ctx { grid-column: 1 / -1; font: 500 1.05rem/1.4 var(--display); color: var(--c1); }
.shot { display: block; margin-top: 48px; max-width: 1080px; will-change: transform; }
.shot img {
  width: 100%; border-radius: 8px; border: 1px solid rgba(236, 235, 230, .1);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .75);
}

/* принципы */
.creed { margin-top: 32px; }
.creed li {
  position: relative; padding: 18px 0 18px 34px; border-top: 1px solid var(--line);
  font: 500 clamp(1.25rem, .95rem + 1vw, 1.9rem)/1.3 var(--display); color: var(--text); text-wrap: pretty;
}
.creed li:first-child { border-top: 0; }
.creed li::before { content: ""; position: absolute; left: 0; top: calc(18px + .42em); width: 12px; height: 12px; border-radius: 50%; background: var(--c); }

/* связь */
.contact .copy { max-width: min(640px, calc(100vw - var(--mouth, 34vw) - var(--gutter))); }
.form { margin-top: 36px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px 18px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.wide { grid-column: 1 / -1; }
.field label { font-size: .9375rem; color: var(--text-2); }
.field label i { font-style: normal; opacity: .7; }
.field label i::before { content: "· "; }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--text);
  background: rgba(236, 235, 230, .04); border: 1px solid rgba(236, 235, 230, .14); border-radius: 4px;
  padding: 12px 14px; transition: border-color .2s, background-color .2s;
}
.field textarea { min-height: 128px; resize: vertical; line-height: 1.5; }
.field input:hover, .field textarea:hover { border-color: rgba(236, 235, 230, .28); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--c1); background: rgba(236, 235, 230, .07); }
.field input::placeholder, .field textarea::placeholder { color: #80838b; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 6px; }
.note { font-size: .875rem; color: var(--text-2); max-width: 40ch; }
.status { grid-column: 1 / -1; min-height: 1.6em; font-weight: 500; }
.status.ok { color: var(--c1); }
.status.err { color: #ff9b8a; }

.foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; padding: 28px var(--gutter) 40px; border-top: 1px solid var(--line); color: var(--text-2); font-size: .875rem; }
.foot .brand-mark { width: 22px; height: 22px; }
.foot .wordmark { font-size: 1rem; color: var(--text); }

/* страница после отправки формы без JS */
.sent-body { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 0 var(--gutter); }
.sent-body h1 { font: 650 clamp(2.4rem, 1.1rem + 4.2vw, 5.8rem)/1 var(--display); color: var(--c1); }

/* ---------- адаптив ---------- */

@media (max-width: 1100px) { .nav { gap: 20px; } }

@media (max-width: 899px) {
  .nav { display: none; }
  .bar { padding-top: 16px; padding-bottom: 16px; }
  .brand-mark { width: 24px; height: 24px; }
  .wordmark { font-size: 1.1rem; }
  /* знак — в верхней части экрана, текст под ним */
  .step.dir, .step.appr, .step.contact { align-items: flex-end; padding-top: 46svh; padding-bottom: 9svh; }
  .copy, .contact .copy { margin-left: 0; max-width: 100%; }
  .step h2 { font-size: clamp(1.85rem, 1rem + 4vw, 3rem); }
  .shot { margin-top: 32px; }
  .form { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
