/* ============================================================
   NotEvil.AI — landing page styles
   Палитра: глубокий чёрный, белый, тёплый янтарь, холодный пурпур
   Типографика: Chakra Petch / Manrope / JetBrains Mono
   ============================================================ */

:root {
  --bg-0:        #07070a;
  --bg-1:        #0e0e12;
  --bg-2:        #15151b;
  --surface:     rgba(255, 255, 255, 0.025);
  --surface-hi:  rgba(255, 255, 255, 0.05);
  --line:        rgba(255, 255, 255, 0.08);
  --line-hi:     rgba(255, 255, 255, 0.16);
  --line-dash:   rgba(255, 255, 255, 0.12);
  --fg-0:        #f5f5f7;
  --fg-1:        rgba(245, 245, 247, 0.78);
  --fg-2:        rgba(245, 245, 247, 0.55);
  --fg-3:        rgba(245, 245, 247, 0.32);

  /* Акцент: тёплый янтарь (по умолчанию) */
  --accent:      oklch(0.74 0.16 50);
  --accent-soft: oklch(0.74 0.16 50 / 0.18);
  --accent-line: oklch(0.74 0.16 50 / 0.35);

  --neb-opacity: 0.5;

  --font-display: "Chakra Petch", "Segoe UI", system-ui, sans-serif;
  --font-body:    "Manrope", "Segoe UI", system-ui, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, monospace;

  --maxw: 1280px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

html {
  background: var(--bg-0);
  color: var(--fg-0);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(60% 50% at 50% 35%, rgba(255, 140, 60, 0.05), transparent 70%),
    var(--bg-0);
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ── Type ───────────────────────────────────────────────── */

.display, h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(48px, 7vw, 96px); font-weight: 600; letter-spacing: -0.02em; }
h2 { font-size: clamp(34px, 4.4vw, 56px); font-weight: 500; }
h3 { font-size: clamp(20px, 1.6vw, 26px); font-weight: 500; }

p  { margin: 0; color: var(--fg-1); text-wrap: pretty; }

.mono {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-2);
}
.mono-sm { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-3); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--accent);
  display: inline-block;
}

/* ── Layout ─────────────────────────────────────────────── */

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 32px; position: relative; }

section { position: relative; padding: 140px 0; }
section + section { border-top: 1px solid var(--line); }

/* ── Nav ────────────────────────────────────────────────── */

.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: linear-gradient(180deg, rgba(7,7,10,0.78), rgba(7,7,10,0.45));
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 80px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
}
.nav-brand {
  display: flex; align-items: center; gap: 12px;
  height: 100%;
}
.nav-logo {
  height: 44px;
  width: auto;
  display: block;
}
.nav-brand .logo-mark { width: 26px; height: 26px; color: var(--fg-0); }
.nav-brand .dot {
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  margin-left: 2px;
}
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--fg-2);
  transition: color .2s;
  position: relative;
}
.nav-links a:hover { color: var(--fg-0); }

.nav-cta {
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 10px 18px;
  border: 1px solid var(--line-hi);
  border-radius: 999px;
  display: inline-flex; align-items: center; gap: 8px;
  transition: border-color .2s, background .2s;
}
.nav-cta:hover { border-color: var(--accent-line); background: var(--accent-soft); color: var(--fg-0); }
.nav-cta::after {
  content: ""; width: 6px; height: 6px;
  border-right: 1px solid currentColor; border-top: 1px solid currentColor;
  transform: rotate(45deg);
}

/* ── Hero ───────────────────────────────────────────────── */

.hero {
  min-height: 100vh;
  padding: 160px 0 80px;
  display: flex; align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute; inset: -10%;
  background: url("assets/cosmos.jpg") center/cover no-repeat;
  opacity: var(--neb-opacity);
  filter: hue-rotate(0deg) saturate(0.7) contrast(1.1);
  mix-blend-mode: screen;
  pointer-events: none;
  mask-image: radial-gradient(60% 50% at 50% 45%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(60% 50% at 50% 45%, #000 30%, transparent 75%);
}
.hero-vignette {
  position: absolute; inset: 0;
  background:
    radial-gradient(50% 60% at 50% 50%, transparent 0%, var(--bg-0) 85%),
    linear-gradient(180deg, transparent 60%, var(--bg-0) 100%);
  pointer-events: none;
}

.orbits {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  pointer-events: none;
}
.orbit {
  position: absolute;
  border: 1px dashed var(--line-dash);
  border-radius: 50%;
  animation: spin 240s linear infinite;
}
.orbit.solid { border-style: solid; }
.orbit.o1 { width: 420px;  height: 420px;  animation-duration: 200s; }
.orbit.o2 { width: 720px;  height: 720px;  animation-duration: 340s; animation-direction: reverse; }
.orbit.o3 { width: 1080px; height: 1080px; animation-duration: 500s; }
.orbit.o4 { width: 1480px; height: 1480px; animation-duration: 700s; animation-direction: reverse; opacity: .6;}

.orbit-marker {
  position: absolute;
  width: 8px; height: 8px;
  background: var(--fg-0);
  border-radius: 50%;
  top: -4px; left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 16px var(--accent);
}
.orbit-marker.small {
  width: 5px; height: 5px;
  top: -2.5px;
  background: rgba(255,255,255,0.7);
  box-shadow: 0 0 8px rgba(255,255,255,0.5);
}
.orbit-cross {
  position: absolute;
  width: 14px; height: 14px;
  top: -7px; left: 50%;
  transform: translateX(-50%);
  color: var(--fg-3);
}

@keyframes spin { to { transform: rotate(360deg); } }

.hero-inner {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: 1fr;
  gap: 56px;
  width: 100%;
}

.hero-mark {
  width: 280px; height: 280px;
  filter: drop-shadow(0 0 60px rgba(255, 170, 90, 0.35));
  animation: float 8s ease-in-out infinite;
  margin: 0 auto;
  position: relative;
  display: flex; align-items: center; justify-content: center;
}
.hero-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* Glitch: лёгкий хроматический сдвиг + пробегающие полосы */
.hero-mark.glitch .gl-base,
.hero-mark.glitch .gl-r,
.hero-mark.glitch .gl-b {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  width: 100%; height: 100%; object-fit: contain;
}
.hero-mark.glitch .gl-r {
  mix-blend-mode: screen;
  filter: drop-shadow(2px 0 0 rgba(255, 60, 80, 0.55));
  opacity: 0.55;
  animation: glitch-r 7s steps(1, end) infinite;
}
.hero-mark.glitch .gl-b {
  mix-blend-mode: screen;
  filter: drop-shadow(-2px 0 0 rgba(80, 150, 255, 0.55));
  opacity: 0.55;
  animation: glitch-b 7s steps(1, end) infinite;
}
.hero-mark.glitch .gl-base {
  animation: glitch-base 7s steps(1, end) infinite;
}
.hero-mark.glitch::after {
  content: "";
  position: absolute; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
  pointer-events: none;
  opacity: 0;
  animation: glitch-scan 7s linear infinite;
}

/* лёгкая пульсация хроматики — вспышки раз в 7с */
@keyframes glitch-r {
  0%,   95%, 100% { transform: translate(0,0);  opacity: 0; }
  95.5%, 96.5%    { transform: translate(2px, -1px); opacity: 0.6; }
  97%,  97.5%     { transform: translate(-3px, 1px); opacity: 0.55; }
  98%             { transform: translate(1px, 0);    opacity: 0.5; }
  43%, 43.5%      { transform: translate(2px, 0);    opacity: 0.5; }
}
@keyframes glitch-b {
  0%,   95%, 100% { transform: translate(0,0);  opacity: 0; }
  95.5%, 96.5%    { transform: translate(-2px, 1px); opacity: 0.6; }
  97%,  97.5%     { transform: translate(3px, -1px); opacity: 0.55; }
  98%             { transform: translate(-1px, 0);   opacity: 0.5; }
  43%, 43.5%      { transform: translate(-2px, 0);   opacity: 0.5; }
}
@keyframes glitch-base {
  0%, 95%, 100%     { clip-path: inset(0 0 0 0); transform: translate(0,0); }
  95.5%             { clip-path: inset(40% 0 30% 0); transform: translate(-2px, 0); }
  96%               { clip-path: inset(15% 0 65% 0); transform: translate(2px, 0); }
  96.5%             { clip-path: inset(70% 0 5% 0);  transform: translate(-1px, 0); }
  97%               { clip-path: inset(0 0 0 0);     transform: translate(0,0); }
  43%, 43.5%        { clip-path: inset(35% 0 55% 0); transform: translate(1px, 0); }
  44%               { clip-path: inset(0 0 0 0);     transform: translate(0,0); }
}
@keyframes glitch-scan {
  0%, 40%, 100%   { top: -4px; opacity: 0; }
  43%             { top: 30%; opacity: 0.55; }
  46%             { top: 70%; opacity: 0; }
  95%             { top: 20%; opacity: 0.6; }
  97%             { top: 80%; opacity: 0; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

.hero-text { text-align: center; }
.hero-tagline { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.32em; text-transform: uppercase; color: var(--fg-2); margin-bottom: 28px; }
.hero h1 { margin-bottom: 28px; }
.hero h1 .accent { color: var(--accent); }

.hero-sub {
  max-width: 640px; margin: 0 auto 40px;
  font-size: clamp(16px, 1.3vw, 18px);
  color: var(--fg-1);
}

.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 26px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
  border: 1px solid transparent;
  transition: transform .15s, background .2s, border-color .2s, color .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--fg-0); color: var(--bg-0); }
.btn-primary:hover { background: var(--accent); color: var(--bg-0); }
.btn-ghost  { border-color: var(--line-hi); color: var(--fg-0); }
.btn-ghost:hover { border-color: var(--accent-line); background: var(--accent-soft); }

.btn .arrow {
  width: 6px; height: 6px;
  border-right: 1.5px solid currentColor; border-top: 1.5px solid currentColor;
  transform: rotate(45deg);
}

/* Hero stats row */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 96px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.hero-stat {
  padding: 24px 24px;
  border-right: 1px solid var(--line);
  position: relative;
}
.hero-stat:last-child { border-right: 0; }
.hero-stat .num {
  font-family: var(--font-display);
  font-size: 36px; font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--fg-0);
  margin-bottom: 6px;
  display: flex; align-items: baseline; gap: 4px;
}
.hero-stat .num .unit { font-size: 18px; color: var(--accent); }
.hero-stat .lbl { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-2); }

@media (max-width: 800px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .hero-stat:nth-child(2) { border-right: 0; }
  .hero-stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

/* ── Section heading ────────────────────────────────────── */

.section-head {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 64px;
  margin-bottom: 72px;
  align-items: end;
}
.section-head .label .eyebrow { margin-bottom: 16px; }
.section-head .label .code { font-family: var(--font-mono); font-size: 11px; color: var(--fg-3); letter-spacing: 0.1em; }
.section-head h2 { max-width: 800px; }
.section-head .lede { color: var(--fg-1); max-width: 640px; margin-top: 20px; font-size: 17px; }

@media (max-width: 800px) {
  .section-head { grid-template-columns: 1fr; gap: 28px; }
}

/* ── Mission section ────────────────────────────────────── */

.mission { padding: 160px 0; }
.mission-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.mission-text h2 { margin-bottom: 28px; }
.mission-text p + p { margin-top: 18px; }
.mission-text p { font-size: 17px; }
.mission-text .accent { color: var(--accent); }

.mission-visual {
  position: relative;
  aspect-ratio: 1/1;
  display: grid; place-items: center;
}
.mission-visual .ring {
  position: absolute; inset: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
}
.mission-visual .ring.r2 { inset: 12%; border-style: dashed; border-color: var(--line-dash); }
.mission-visual .ring.r3 { inset: 24%; border-color: var(--line-hi); }
.mission-visual .ring.r4 { inset: 36%; border-style: dashed; border-color: var(--accent-line); }
.mission-visual .ring { transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.mission-visual .satellite { transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.mission-visual .core { transition: transform .35s cubic-bezier(.2,.7,.2,1); }

.mission-visual .core {
  width: 28%;
  color: var(--fg-0);
  filter: drop-shadow(0 0 40px rgba(255, 170, 90, 0.45));
}

.mission-visual .satellite {
  position: absolute;
  width: 12px; height: 12px;
  border: 1px solid var(--accent);
  background: var(--bg-0);
  border-radius: 50%;
}
.mission-visual .satellite::after {
  content: ""; position: absolute; inset: 3px;
  background: var(--accent); border-radius: 50%;
}
.mission-visual .s1 { top: 8%;  left: 50%; transform: translateX(-50%); }
.mission-visual .s2 { top: 50%; right: 4%; transform: translateY(-50%); }
.mission-visual .s3 { bottom: 12%; left: 16%; }

@media (max-width: 900px) {
  .mission-grid { grid-template-columns: 1fr; }
  .mission-visual { max-width: 480px; margin: 0 auto; }
}

/* ── Services grid ──────────────────────────────────────── */

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.service {
  padding: 40px 36px 44px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: relative;
  min-height: 320px;
  transition: background .25s;
}
.service:hover { background: var(--surface); }
.service .num { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; color: var(--fg-3); }
.service h3 { margin: 28px 0 16px; max-width: 280px; }
.service p  { color: var(--fg-1); font-size: 15px; }
.service .icon {
  width: 36px; height: 36px;
  position: absolute; top: 40px; right: 36px;
  color: var(--accent);
  opacity: 0.85;
}
.service .tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 24px; }
.service .tag {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 5px 9px;
  border: 1px solid var(--line-hi);
  border-radius: 4px;
  color: var(--fg-2);
}

@media (max-width: 900px) { .services-grid { grid-template-columns: 1fr; } }

/* ── AIChief product ────────────────────────────────────── */

.product { background: var(--bg-1); }
.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.product-info .badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  border-radius: 999px;
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
}
.product-info .badge::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}
.product-info h2 { margin-bottom: 24px; }
.product-info p.lede { font-size: 17px; max-width: 540px; margin-bottom: 36px; }

.product-features { display: flex; flex-direction: column; gap: 18px; margin-bottom: 36px; }
.product-feature { display: grid; grid-template-columns: 36px 1fr; gap: 18px; align-items: start; }
.product-feature .pf-icon {
  width: 28px; height: 28px; border-radius: 4px;
  border: 1px solid var(--line-hi);
  display: grid; place-items: center;
  color: var(--accent);
  margin-top: 2px;
}
.product-feature .pf-icon svg { width: 14px; height: 14px; }
.product-feature h4 { font-family: var(--font-display); font-weight: 500; font-size: 16px; margin: 0 0 4px; letter-spacing: 0.01em; }
.product-feature p  { font-size: 14px; color: var(--fg-1); }

/* Chat demo */
.chat {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.04) inset,
    0 30px 60px -20px rgba(0,0,0,0.6);
}
.chat-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.02);
}
.chat-head .ch-left { display: flex; align-items: center; gap: 12px; }
.chat-head .ch-mark {
  width: 26px; height: 26px;
  background: var(--fg-0); color: var(--bg-0);
  border-radius: 6px;
  display: grid; place-items: center;
}
.chat-head .ch-mark svg { width: 16px; height: 16px; color: var(--bg-0); }
.chat-head .ch-title { font-family: var(--font-display); font-weight: 500; font-size: 14px; letter-spacing: 0.02em; }
.chat-head .ch-sub { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-3); }
.chat-head .ch-status {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--fg-2);
}
.chat-head .ch-status .dot { width: 6px; height: 6px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 8px #4ade80; }
.chat-head .ch-status.op .dot { background: var(--accent); box-shadow: 0 0 8px var(--accent); }

.chat-body {
  padding: 22px 22px 12px;
  min-height: 360px;
  display: flex; flex-direction: column; gap: 14px;
}

.msg { display: flex; gap: 10px; max-width: 86%; opacity: 0; transform: translateY(8px); animation: msg-in .35s ease-out forwards; }
@keyframes msg-in { to { opacity: 1; transform: translateY(0); } }
.msg.user { align-self: flex-end; flex-direction: row-reverse; }
.msg .avatar {
  width: 24px; height: 24px; border-radius: 50%;
  flex-shrink: 0;
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 10px;
  border: 1px solid var(--line-hi);
  color: var(--fg-2);
}
.msg.bot .avatar { background: var(--fg-0); color: var(--bg-0); border-color: transparent; }
.msg.bot .avatar svg { width: 13px; height: 13px; }
.msg.op .avatar { background: var(--accent); color: var(--bg-0); border-color: transparent; }

.msg .bubble {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.5;
  background: var(--surface-hi);
  color: var(--fg-0);
}
.msg.user .bubble { background: var(--fg-0); color: var(--bg-0); }
.msg.bot .bubble { border: 1px solid var(--line); }
.msg.op .bubble  { border: 1px solid var(--accent-line); background: var(--accent-soft); color: var(--fg-0); }

.msg .meta {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.1em;
  color: var(--fg-3); text-transform: uppercase;
  margin-top: 6px;
}
.msg .bubble .cite {
  display: block;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line-hi);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  color: var(--fg-3);
}

.typing { display: inline-flex; gap: 4px; padding: 6px 0; }
.typing span {
  width: 6px; height: 6px; border-radius: 50%; background: var(--fg-2);
  animation: typing 1.4s infinite ease-in-out;
}
.typing span:nth-child(2) { animation-delay: 0.18s; }
.typing span:nth-child(3) { animation-delay: 0.36s; }
@keyframes typing {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30%           { opacity: 1;   transform: translateY(-3px); }
}

.chat-input {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  background: rgba(0,0,0,0.25);
}
.chat-input .ci-input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--fg-1);
  font-family: var(--font-body);
  font-size: 14px;
}
.chat-input .ci-input::placeholder { color: var(--fg-3); }
.chat-input .ci-send {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--fg-0); color: var(--bg-0);
  display: grid; place-items: center;
}
.chat-input .ci-send svg { width: 14px; height: 14px; }

.chat-suggestions {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding: 0 22px 18px;
}
.chat-suggestion {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 7px 12px;
  border: 1px solid var(--line-hi);
  border-radius: 999px;
  color: var(--fg-2);
  transition: border-color .2s, color .2s, background .2s;
}
.chat-suggestion:hover { border-color: var(--accent-line); color: var(--fg-0); background: var(--accent-soft); }

@media (max-width: 1000px) { .product-grid { grid-template-columns: 1fr; } }

/* ── Stack / capabilities row ───────────────────────────── */

.stack {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 64px;
  border-top: 1px solid var(--line);
}
.stack-item { padding: 28px 24px; border-right: 1px solid var(--line); }
.stack-item:last-child { border-right: 0; }
.stack-item .si-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; color: var(--fg-3); text-transform: uppercase; margin-bottom: 12px; }
.stack-item .si-value { font-family: var(--font-display); font-size: 22px; font-weight: 500; }

@media (max-width: 900px) {
  .stack { grid-template-columns: repeat(2, 1fr); }
  .stack-item:nth-child(2) { border-right: 0; }
  .stack-item:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

/* ── Process timeline ───────────────────────────────────── */

.process { background: var(--bg-0); }
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.tl-step {
  padding: 36px 28px 40px;
  position: relative;
  border-right: 1px solid var(--line);
}
.tl-step:last-child { border-right: 0; }
.tl-step::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--line);
}
.tl-step.active::before { background: var(--accent); box-shadow: 0 0 14px var(--accent); }
.tl-step .step-num {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.2em;
  color: var(--fg-3);
  margin-bottom: 28px;
}
.tl-step .step-title { font-family: var(--font-display); font-weight: 500; font-size: 20px; margin-bottom: 12px; letter-spacing: 0.01em; }
.tl-step p { font-size: 14px; color: var(--fg-1); }

@media (max-width: 900px) {
  .timeline { grid-template-columns: 1fr; }
  .tl-step { border-right: 0; border-bottom: 1px solid var(--line); }
  .tl-step:last-child { border-bottom: 0; }
}

/* ── Contact / footer ───────────────────────────────────── */

.contact {
  padding: 160px 0 80px;
  position: relative;
  overflow: hidden;
}
.contact-bg {
  position: absolute; inset: 0;
  background: url("assets/cosmos.jpg") center 60% / cover no-repeat;
  opacity: 0.18;
  filter: saturate(0.6);
  mask-image: radial-gradient(60% 80% at 50% 30%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(60% 80% at 50% 30%, #000 0%, transparent 70%);
  pointer-events: none;
}
.contact-inner { position: relative; z-index: 2; }

.contact-cta { text-align: center; max-width: 800px; margin: 0 auto 100px; }
.contact-cta h2 { margin-bottom: 28px; }
.contact-cta p  { font-size: 18px; margin-bottom: 36px; }
.contact-cta .actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.legal-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  padding-top: 48px;
}
.legal-col { padding-right: 24px; }
.legal-col .lc-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em; color: var(--fg-3); text-transform: uppercase; margin-bottom: 16px; }
.legal-col .lc-value { font-size: 14px; color: var(--fg-0); line-height: 1.6; }
.legal-col a:hover { color: var(--accent); }

@media (max-width: 900px) { .legal-grid { grid-template-columns: 1fr 1fr; gap: 32px 24px; } }
@media (max-width: 560px) { .legal-grid { grid-template-columns: 1fr; } }

.footer {
  border-top: 1px solid var(--line);
  padding: 32px 0;
  margin-top: 80px;
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
}
.footer .copyright { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; color: var(--fg-3); text-transform: uppercase; }
.footer-logo {
  height: 56px;
  width: auto;
  display: block;
}
.footer .brand { display: flex; align-items: center; gap: 14px; }

/* ── Starfield (contact) ────────────────────────────────── */

.starfield {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}
.contact-inner { z-index: 1; }

/* ── Logo mark (inline svg) ─────────────────────────────── */

.logo-mark {
  display: inline-block;
  color: currentColor;
}
.logo-mark svg { width: 100%; height: 100%; display: block; }

/* ============================================================
   RESPONSIVE
   Breakpoints: 1100 / 880 / 640 / 420
   ============================================================ */

@media (max-width: 1100px) {
  section { padding: 110px 0; }
  .hero { padding: 130px 0 70px; }
  .hero-stats { margin-top: 72px; }
  .section-head { gap: 40px; margin-bottom: 56px; }
  .wrap { padding: 0 28px; }
  .nav-inner { padding: 0 28px; }
}

@media (max-width: 880px) {
  :root { --maxw: 880px; }
  section { padding: 88px 0; }
  .hero { padding: 110px 0 60px; min-height: auto; }
  .wrap { padding: 0 22px; }
  .nav-inner { padding: 0 22px; height: 60px; }

  /* Nav — скрываем линки, оставляем лого и CTA */
  .nav-links { display: none; }
  .nav-cta { padding: 9px 14px; font-size: 11px; }
  .nav-inner { height: 68px; }
  .nav-logo { height: 36px; }
  .footer-logo { height: 44px; }

  /* Hero */
  .hero-inner { gap: 36px; }
  .hero-mark { width: 200px; height: 200px; }
  .hero-tagline { letter-spacing: 0.24em; margin-bottom: 20px; }
  .hero h1 { font-size: clamp(34px, 7.5vw, 56px); }
  .hero-sub { font-size: 16px; margin-bottom: 32px; }
  .hero-actions { gap: 12px; }
  .btn { padding: 14px 22px; font-size: 11px; }

  .hero-stats { margin-top: 56px; }
  .hero-stat { padding: 20px 18px; }
  .hero-stat .num { font-size: 28px; }
  .hero-stat .lbl { font-size: 10px; }

  /* Headings */
  h2 { font-size: clamp(28px, 5vw, 40px); }
  h3 { font-size: clamp(18px, 2.4vw, 22px); }

  .section-head { grid-template-columns: 1fr; gap: 24px; margin-bottom: 48px; }
  .section-head .lede { font-size: 16px; }

  /* Mission */
  .mission { padding: 100px 0; }
  .mission-grid { grid-template-columns: 1fr; gap: 48px; }
  .mission-text p { font-size: 16px; }
  .mission-visual { max-width: 360px; margin: 0 auto; }

  /* Product / chat */
  .product-grid { grid-template-columns: 1fr; gap: 40px; }
  .product-info .lede { font-size: 16px; }
  .chat-body { min-height: 320px; padding: 18px 16px 10px; }
  .chat-head { padding: 12px 14px; }
  .msg { max-width: 92%; }
  .msg .bubble { font-size: 13.5px; padding: 9px 12px; }

  /* Services */
  .services-grid { grid-template-columns: 1fr 1fr; }
  .service { padding: 32px 24px 36px; min-height: 280px; }
  .service .icon { width: 28px; height: 28px; top: 32px; right: 24px; }

  /* Stack */
  .stack { grid-template-columns: repeat(2, 1fr); margin-top: 48px; }
  .stack-item:nth-child(2) { border-right: 0; }
  .stack-item:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .stack-item { padding: 22px 20px; }
  .stack-item .si-value { font-size: 17px; }

  /* Process */
  .timeline { grid-template-columns: 1fr; }
  .tl-step { border-right: 0; border-bottom: 1px solid var(--line); padding: 28px 22px 32px; }
  .tl-step:last-child { border-bottom: 0; }
  .tl-step::before { right: auto; width: 40%; }

  /* Contact */
  .contact { padding: 100px 0 60px; }
  .contact-cta { margin-bottom: 64px; }
  .contact-cta p { font-size: 16px; margin-bottom: 28px; }
  .legal-grid { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
  .legal-col { padding-right: 0; }

  .footer { margin-top: 56px; padding: 24px 0; }
  .footer-inner { gap: 12px; }
}

@media (max-width: 640px) {
  :root { --maxw: 640px; }
  section { padding: 72px 0; }
  .hero { padding: 96px 0 48px; }
  .wrap { padding: 0 18px; }
  .nav-inner { padding: 0 18px; height: 56px; }
  .nav-logo { height: 24px; }

  /* Hero */
  .hero-mark { width: 160px; height: 160px; }
  .hero h1 { font-size: clamp(28px, 8.5vw, 40px); letter-spacing: -0.01em; }
  .hero-tagline { font-size: 10px; letter-spacing: 0.2em; }
  .hero-sub { font-size: 15px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { justify-content: center; }

  /* Hero stats — 2x2 */
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .hero-stat { padding: 18px 14px; }
  .hero-stat .num { font-size: 24px; }
  .hero-stat:nth-child(2) { border-right: 0; }
  .hero-stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }

  /* Mission */
  .mission-visual { max-width: 280px; }
  .mission-text p { font-size: 15.5px; }

  /* Product */
  .product-info .badge { font-size: 9px; padding: 5px 10px; letter-spacing: 0.14em; }
  .product-feature { grid-template-columns: 28px 1fr; gap: 14px; }
  .chat-head .ch-sub { display: none; }
  .chat-head .ch-status { font-size: 9px; }
  .chat-suggestions { padding: 0 16px 14px; }
  .chat-suggestion { font-size: 9px; padding: 6px 10px; letter-spacing: 0.08em; }

  /* Services — одна колонка, иконки вверху-справа */
  .services-grid { grid-template-columns: 1fr; border-left: 0; }
  .service {
    border-right: 0;
    padding: 28px 24px 32px;
    min-height: auto;
    position: relative;
  }
  .service .icon {
    position: absolute;
    top: 28px;
    right: 24px;
    width: 26px;
    height: 26px;
    margin: 0;
  }
  .service h3 { margin-top: 24px; padding-right: 40px; }
  .service .num { display: block; }

  /* Stack — 1 колонка */
  .stack { grid-template-columns: 1fr; }
  .stack-item { border-right: 0; border-bottom: 1px solid var(--line); }
  .stack-item:last-child { border-bottom: 0; }

  /* Contact */
  .contact-cta h2 br { display: none; }
  .contact-cta .actions { flex-direction: column; }
  .contact-cta .actions .btn { justify-content: center; }
  .legal-grid { grid-template-columns: 1fr; gap: 24px; }
  .legal-grid .legal-col { border-top: 1px solid var(--line); padding-top: 20px; }
  .legal-grid .legal-col:first-child { border-top: 0; padding-top: 0; }

  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 420px) {
  .wrap { padding: 0 14px; }
  .nav-inner { padding: 0 14px; }
  .nav-logo { height: 22px; }
  .nav-cta { padding: 8px 12px; font-size: 10px; }

  .hero { padding: 84px 0 40px; }
  .hero-mark { width: 132px; height: 132px; }
  .hero h1 { font-size: clamp(26px, 9vw, 36px); }
  .hero-sub { font-size: 14.5px; }

  .nav-logo { height: 32px; }
  .footer-logo { height: 38px; }

  section { padding: 60px 0; }
  .section-head { gap: 20px; margin-bottom: 36px; }
  .section-head .lede { font-size: 15px; }

  h2 { font-size: clamp(24px, 7vw, 32px); }
  .hero-stat .num { font-size: 22px; }

  .service h3 { font-size: 19px; max-width: none; }
  .chat-body { min-height: 280px; }
}

/* Совсем узкие — гарантия отсутствия горизонтального скролла */
@media (max-width: 360px) {
  .wrap { padding: 0 12px; }
  .nav-inner { padding: 0 12px; }
  .hero h1 { font-size: 24px; }
}

/* Универсальная защита: запрещаем горизонтальное переполнение */
img, svg, canvas, video { max-width: 100%; }
.hero h1, .section-head h2, .mission-text h3, .product-info h3, .contact-cta h2 { overflow-wrap: anywhere; }
