/* KDigital — design tokens */
:root {
  /* Corporate */
  --brand-deep: #13072F;
  --brand-deep-2: #1B0A3D;
  --brand-bg: #0A0318;
  --brand-surface: #140732;
  --brand-surface-2: #1E0D46;
  --brand-line: rgba(255,255,255,0.07);
  --brand-line-strong: rgba(255,255,255,0.14);

  --primary: #824EF9;
  --primary-2: #A74DCE;
  --primary-soft: rgba(130,78,249,0.18);
  --primary-glow: rgba(130,78,249,0.35);

  /* Product accents — used only as chips / tiny icons */
  --yd: #FFD912;    /* Яндекс Директ */
  --vk: #0077FF;    /* ВКонтакте */
  --av: #98CF26;    /* Авито */

  /* Text */
  --text: #F4EEFF;
  --text-mute: #B6A9D1;
  --text-dim: #7B6C9C;
  --text-faint: #4E4273;

  /* Feedback */
  --ok: #35D399;
  --warn: #F59E0B;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --ff-display: 'Manrope', system-ui, sans-serif;
  --ff-body: 'Inter', system-ui, sans-serif;

  --shadow-card: 0 1px 0 rgba(255,255,255,0.04) inset, 0 20px 60px rgba(0,0,0,0.45);
  --shadow-hero: 0 40px 120px rgba(130,78,249,0.25);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--ff-body);
  background: var(--brand-bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
  overflow-x: hidden;
  font-feature-settings: "kern" 1, "liga" 1;
}
h1, h2, h3, h4, h5, .display {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1, "liga" 1;
  font-synthesis: none;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

::selection { background: var(--primary); color: white; }

/* Ambient background — subtle, cinematic */
.ambient {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(1200px 700px at 80% -10%, rgba(167,77,206,0.18), transparent 60%),
    radial-gradient(1000px 600px at -10% 30%, rgba(130,78,249,0.15), transparent 60%),
    radial-gradient(900px 700px at 50% 110%, rgba(130,78,249,0.08), transparent 60%);
}
.ambient::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,0.04) 1px, transparent 0);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, transparent, black 25%, black 75%, transparent);
  opacity: 0.6;
}

/* Typography utilities */
.display {
  font-family: var(--ff-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.02;
}
.eyebrow {
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary-2);
}

/* Layout */
.shell { position: relative; z-index: 1; }
.container { width: min(1240px, 92vw); margin: 0 auto; }
.section { padding: 120px 0; position: relative; }
.section.tight { padding: 80px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 56px; }
.section-head h2 {
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: clamp(32px, 4vw, 56px);
  letter-spacing: -0.02em;
  line-height: 1.02;
  max-width: 18ch;
}
.section-head p { color: var(--text-mute); max-width: 42ch; font-size: 16px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 26px;
  border-radius: 999px;
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
  border: none;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .3s ease, background .2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  color: white;
  box-shadow: 0 10px 40px rgba(130,78,249,0.4), inset 0 1px 0 rgba(255,255,255,0.25);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 16px 50px rgba(130,78,249,0.55), inset 0 1px 0 rgba(255,255,255,0.25); }
.btn-ghost {
  background: rgba(255,255,255,0.04);
  color: var(--text);
  border: 1px solid var(--brand-line-strong);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { background: rgba(255,255,255,0.08); }
.btn-lg { padding: 20px 34px; font-size: 16px; }
.btn-sm { padding: 10px 16px; font-size: 13px; }

/* Chips */
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.02em;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--brand-line);
  color: var(--text-mute);
}
.chip .dot { width: 6px; height: 6px; border-radius: 999px; background: var(--primary); }
.chip.yd  .dot { background: var(--yd); }
.chip.vk  .dot { background: var(--vk); }
.chip.av  .dot { background: var(--av); }
.chip.yd  { color: #FFE884; border-color: rgba(255,217,18,0.25); background: rgba(255,217,18,0.06); }
.chip.vk  { color: #6EB0FF; border-color: rgba(0,119,255,0.28); background: rgba(0,119,255,0.08); }
.chip.av  { color: #C3EE74; border-color: rgba(152,207,38,0.25); background: rgba(152,207,38,0.06); }
.chip.vip { color: #E4B8F6; border-color: rgba(167,77,206,0.35); background: rgba(167,77,206,0.1); }

/* Cards */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.01));
  border: 1px solid var(--brand-line);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
  overflow: hidden;
}

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10,3,24,0.72);
  backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid var(--brand-line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0;
}
.nav-logo {
  display: inline-flex; align-items: baseline; gap: 2px;
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.03em;
}
.nav-logo .k {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.nav-logo .dot { color: var(--primary-2); margin-left: 4px; }

.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  color: var(--text-mute);
  font-size: 14px;
  font-weight: 500;
  transition: color .2s;
  position: relative;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -22px;
  height: 2px; background: linear-gradient(90deg, var(--primary), var(--primary-2));
  border-radius: 2px;
}

/* Footer */
.footer {
  border-top: 1px solid var(--brand-line);
  padding: 80px 0 40px;
  background: linear-gradient(180deg, transparent, rgba(130,78,249,0.04));
  position: relative; z-index: 1;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.footer h4 { font-family: var(--ff-display); font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 16px; color: var(--text); }
.footer a { display: block; color: var(--text-mute); font-size: 14px; padding: 6px 0; }
.footer a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; padding-top: 24px; border-top: 1px solid var(--brand-line); color: var(--text-dim); font-size: 13px; }

/* Placeholder imagery */
.ph {
  background:
    repeating-linear-gradient(135deg, rgba(130,78,249,0.08) 0 10px, transparent 10px 22px),
    linear-gradient(180deg, rgba(130,78,249,0.15), rgba(167,77,206,0.1));
  border: 1px solid var(--brand-line);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Reveals */
.reveal { opacity: 0; transform: translateY(18px); transition: all .7s cubic-bezier(0.16,1,0.3,1); }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .section { padding: 72px 0; }
  .section-head { flex-direction: column; align-items: start; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
}
