/* САПСАН — unified design system */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500;12..96,700;12..96,800&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --bg: #06101A;
  --bg-2: #0A1726;
  --surface: rgba(18, 30, 46, 0.78);
  --surface-2: rgba(24, 38, 58, 0.82);
  --surface-elev: rgba(30, 46, 70, 0.86);
  --text: #E8EFF8;
  --text-2: #A6B4C8;
  --text-3: #6B7A91;
  --primary: #2E7BFF;
  --primary-2: #4A92FF;
  --cyan: #5AD6FF;
  --amber: #FFB547;
  --green: #6FE5A1;
  --red: #FF6E7A;
  --line: rgba(255,255,255,0.08);
  --line-2: rgba(46, 123, 255, 0.22);
  --shadow: 0 18px 50px rgba(0,0,0,.36);
  --shadow-strong: 0 28px 80px rgba(0,0,0,.5);
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 24px;
  --r-xl: 32px;
  --container: 1240px;
  --display: 'Bricolage Grotesque', 'Manrope', sans-serif;
  --sans: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  position: relative;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(60rem 40rem at 12% -8%, rgba(46,123,255,.18), transparent 55%),
    radial-gradient(50rem 36rem at 92% 18%, rgba(90,214,255,.10), transparent 55%),
    radial-gradient(40rem 30rem at 50% 110%, rgba(46,123,255,.08), transparent 55%),
    linear-gradient(180deg, #050D16 0%, #07121E 50%, #060F19 100%);
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .4;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.18 0 0 0 0 0.45 0 0 0 0 1 0 0 0 0.04 0'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>");
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }

.container { width: min(calc(100% - 32px), var(--container)); margin: 0 auto; }

/* ─── Type ─── */
h1, h2, h3, h4 { font-family: var(--display); margin: 0; letter-spacing: -0.025em; line-height: 1.05; }
h1 { font-weight: 800; font-size: clamp(40px, 5.6vw, 76px); }
h2 { font-weight: 800; font-size: clamp(30px, 3.8vw, 52px); }
h3 { font-weight: 700; font-size: clamp(20px, 1.8vw, 26px); line-height: 1.15; }
p { margin: 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--cyan); padding: 8px 14px;
  border-radius: 999px; background: rgba(90,214,255,.06); border: 1px solid rgba(90,214,255,.18);
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }
.eyebrow.amber { color: var(--amber); background: rgba(255,181,71,.06); border-color: rgba(255,181,71,.22); }
.eyebrow.amber::before { background: var(--amber); box-shadow: 0 0 12px var(--amber); }

.gradient-text {
  background: linear-gradient(135deg, #FFFFFF 0%, #B7CFEE 60%, #5AD6FF 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.accent-text { color: var(--primary-2); }

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 22px; border-radius: 14px; border: 1px solid transparent;
  font-weight: 600; font-size: 15px; cursor: pointer; transition: all .25s ease;
  position: relative; overflow: hidden; text-decoration: none;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary {
  background: linear-gradient(135deg, #2E7BFF 0%, #1A5FE8 100%);
  color: #fff; border-color: rgba(255,255,255,.15);
  box-shadow: 0 10px 30px rgba(46,123,255,.32), inset 0 1px 0 rgba(255,255,255,.18);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(46,123,255,.42), inset 0 1px 0 rgba(255,255,255,.24); }
.btn:disabled { opacity: .58; cursor: wait; transform: none; box-shadow: none; }
.btn-secondary {
  background: rgba(255,255,255,.04); color: var(--text); border-color: rgba(255,255,255,.12); backdrop-filter: blur(8px);
}
.btn-secondary:hover { border-color: var(--line-2); background: rgba(46,123,255,.06); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--text); border-color: transparent; height: 44px; padding: 0 14px; }
.btn-ghost:hover { color: var(--cyan); }
.btn-ghost::after { content: "→"; transition: transform .25s ease; }
.btn-ghost:hover::after { transform: translateX(4px); }
.btn::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.18) 50%, transparent 70%);
  transform: translateX(-110%); transition: transform .6s ease;
}
.btn:hover::before { transform: translateX(110%); }

/* ─── Header ─── */
.site-header {
  position: sticky; top: 0; z-index: 80;
  background: rgba(6, 16, 26, 0.7); backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.site-header.scrolled { background: rgba(6, 16, 26, 0.92); }
.header-row { display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand img { width: 42px; height: 42px; filter: drop-shadow(0 8px 22px rgba(46,123,255,.45)); transition: transform .4s ease; }
.brand:hover img { transform: rotate(-8deg) scale(1.08); }
.brand-name { font-family: var(--display); font-weight: 800; font-size: 19px; letter-spacing: .04em; color: var(--text); display: block; }
.brand-tag { display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); margin-top: 2px; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav a {
  position: relative; padding: 10px 14px; font-size: 14.5px; color: var(--text-2); border-radius: 10px;
  transition: all .2s ease;
}
.nav a:hover { color: var(--text); background: rgba(255,255,255,.04); }
.nav a.active { color: var(--text); }
.nav a.active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--primary), var(--cyan));
  box-shadow: 0 0 12px var(--primary);
}
.header-actions { display: flex; align-items: center; gap: 10px; }
.mobile-toggle {
  display: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(255,255,255,.03); cursor: pointer; align-items: center; justify-content: center;
}
.mobile-toggle svg { width: 22px; height: 22px; }
.mobile-toggle .bar { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px auto; transition: all .3s ease; border-radius: 2px; }
.mobile-toggle[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.mobile-toggle[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-panel {
  position: fixed; inset: 76px 0 0 0; z-index: 70; background: rgba(6,12,20,.96); backdrop-filter: blur(20px);
  padding: 24px; transform: translateY(-12px); opacity: 0; pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
}
.mobile-panel.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
.mobile-panel a {
  display: block; padding: 18px 20px; border-radius: 16px; margin-bottom: 10px;
  background: rgba(255,255,255,.03); border: 1px solid var(--line); font-size: 18px; font-weight: 600;
  font-family: var(--display);
}
.mobile-panel a:hover { background: rgba(46,123,255,.1); border-color: var(--line-2); }
.mobile-panel .btn-primary { width: 100%; margin-top: 8px; }

/* ─── Sections ─── */
.section { padding: clamp(64px, 10vw, 120px) 0; position: relative; }
.section-head { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: end; margin-bottom: 48px; }
.section-head h2 { margin-top: 18px; }
.section-head p { color: var(--text-2); font-size: 17px; }
@media (max-width: 800px) { .section-head { grid-template-columns: 1fr; } }

/* ─── Cards ─── */
.card {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow); padding: 28px; overflow: hidden; transition: all .35s cubic-bezier(.2,.7,.2,1);
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.04), transparent 30%);
}
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(90,214,255,.18), transparent 50%);
  transition: opacity .3s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--line-2); box-shadow: var(--shadow-strong); }
.card:hover::after { opacity: 1; }
.card > * { position: relative; z-index: 1; }

/* ─── Reveal ─── */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.22,.61,.36,1), transform .7s cubic-bezier(.22,.61,.36,1); }
[data-reveal="left"] { transform: translateX(-22px); }
[data-reveal="right"] { transform: translateX(22px); }
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ─── Footer ─── */
.footer {
  margin-top: 64px; padding: 64px 0 32px; border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(6,12,20,.6));
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; }
.footer h4 { font-family: var(--display); font-size: 14px; font-weight: 700; margin-bottom: 18px; color: var(--text); letter-spacing: .04em; text-transform: uppercase; }
.footer a, .footer p, .footer span { color: var(--text-2); font-size: 14.5px; }
.footer a { display: block; padding: 6px 0; transition: color .2s ease; }
.footer a:hover { color: var(--cyan); }
.footer .brand { margin-bottom: 18px; }
.footer p { line-height: 1.6; margin-bottom: 16px; max-width: 360px; }
.footer-bottom {
  margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  color: var(--text-3); font-size: 13px; font-family: var(--mono);
}
.social-row { display: flex; gap: 10px; margin-top: 14px; }
.social-row a {
  width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.03); border: 1px solid var(--line); padding: 0;
}
.social-row a:hover { background: rgba(46,123,255,.1); border-color: var(--line-2); transform: translateY(-2px); }
.social-row svg { width: 18px; height: 18px; }

/* ─── Scroll progress ─── */
.scroll-progress {
  position: fixed; left: 0; right: 0; top: 0; height: 2px; z-index: 90; background: transparent;
}
.scroll-progress span {
  display: block; width: 100%; height: 100%; transform-origin: left; transform: scaleX(0);
  background: linear-gradient(90deg, var(--primary), var(--cyan));
  box-shadow: 0 0 16px var(--primary);
}

/* ─── Forms ─── */
.field { display: grid; gap: 8px; }
.field label { font-size: 13px; font-weight: 500; color: var(--text-2); font-family: var(--mono); letter-spacing: .04em; text-transform: uppercase; }
.input, .textarea, .select {
  width: 100%; min-height: 52px; padding: 0 18px; border-radius: 14px;
  background: rgba(255,255,255,.03); border: 1px solid var(--line); color: var(--text); outline: none;
  transition: all .25s ease;
}
.textarea { min-height: 130px; padding: 14px 18px; resize: vertical; font-family: var(--sans); }
.input:hover, .textarea:hover, .select:hover { border-color: rgba(255,255,255,.16); }
.input:focus, .textarea:focus, .select:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(46,123,255,.16); background: rgba(46,123,255,.04); }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.captcha-row { display: grid; grid-template-columns: minmax(0, 160px) 48px 1fr; gap: 12px; align-items: end; }
.captcha-image {
  height: 52px; width: 100%; border-radius: 14px; border: 1px solid var(--line);
  background: rgba(255,255,255,.03); object-fit: cover;
}
.captcha-refresh {
  width: 48px; height: 52px; border-radius: 14px; border: 1px solid var(--line);
  background: rgba(255,255,255,.03); color: var(--text); cursor: pointer;
}
.captcha-refresh:hover { border-color: var(--line-2); background: rgba(46,123,255,.08); }
.form-status { padding: 12px 16px; border-radius: 12px; font-size: 14px; display: none; }
.form-status.show { display: block; background: rgba(90,214,255,.08); border: 1px solid rgba(90,214,255,.24); color: var(--cyan); }
.form-status.success { background: rgba(111,229,161,.08); border: 1px solid rgba(111,229,161,.3); color: var(--green); }
.form-status.error { background: rgba(255,110,122,.08); border: 1px solid rgba(255,110,122,.3); color: var(--red); }
@media (max-width: 600px) { .form-row-2 { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .captcha-row { grid-template-columns: minmax(0, 1fr) 48px; } .captcha-row .field { grid-column: 1 / -1; } }

/* ─── Mobile responsive ─── */
@media (max-width: 960px) {
  .nav { display: none; }
  .header-actions .btn-primary { display: none; }
  .mobile-toggle { display: inline-flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
  .brand-tag { display: none; }
}

/* ─── Utility ─── */
.kbd {
  font-family: var(--mono); font-size: 11px; padding: 2px 6px; border-radius: 4px;
  background: rgba(255,255,255,.06); border: 1px solid var(--line); color: var(--text-2);
}
.dot-grid {
  position: absolute; inset: 0; pointer-events: none; opacity: .3;
  background-image: radial-gradient(circle, rgba(255,255,255,.18) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}
