/* ===== Base ===== */
*,*::before,*::after { box-sizing: border-box; }
:root {
  --bg: #0b0d17;
  --bg-2: #11142a;
  --surface: #161a36;
  --surface-2: #1c2148;
  --text: #e8ecff;
  --muted: #9aa3c7;
  --primary: #6c5cff;
  --primary-2: #00d4ff;
  --accent: #ff5cae;
  --border: rgba(255,255,255,0.08);
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 20px 50px rgba(8, 10, 30, 0.45);
}
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1,h2,h3,h4,h5 { font-weight: 700; line-height: 1.2; margin: 0 0 .6em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.3rem; }
p  { margin: 0 0 1em; color: var(--muted); }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.grad { background: linear-gradient(90deg, var(--primary-2), var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 26px; border-radius: 999px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; transition: .25s ease;
  font-size: 15px; gap: 8px;
}
.btn--primary { background: linear-gradient(90deg, var(--primary), var(--primary-2)); color: #fff; box-shadow: 0 10px 30px rgba(108, 92, 255, .35); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 14px 40px rgba(108, 92, 255, .5); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn--ghost:hover { background: rgba(255,255,255,.05); }
.btn--sm { padding: 10px 18px; font-size: 14px; }
.btn--lg { padding: 16px 32px; font-size: 16px; }

.badge {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  background: rgba(108, 92, 255, .15); color: #b5acff;
  font-size: 13px; font-weight: 600; margin-bottom: 22px;
  border: 1px solid rgba(108, 92, 255, .3);
}
.eyebrow { display: inline-block; color: var(--primary-2); font-weight: 600; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 12px; }

/* ===== Header ===== */
.header {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(11, 13, 23, .7);
  border-bottom: 1px solid transparent;
  transition: .2s ease;
}
.header--scrolled { border-bottom-color: var(--border); background: rgba(11, 13, 23, .9); }
.header__inner { display: flex; align-items: center; gap: 24px; padding: 16px 24px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; }
.logo__mark { color: var(--primary-2); font-size: 22px; display: block; width: 44px; height: 44px; flex: 0 0 44px; }
img.logo__mark { object-fit: contain; }
.logo__text span { color: var(--muted); font-weight: 500; }
.nav { display: flex; gap: 28px; margin-left: auto; margin-right: 16px; }
.nav a { color: var(--muted); font-weight: 500; font-size: 15px; transition: .2s; }
.nav a:hover { color: var(--text); }

/* Language toggle */
.lang-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 76px; height: 34px;
  border-radius: 999px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  cursor: pointer;
  padding: 0;
  margin-right: 12px;
  transition: .2s ease;
}
.lang-toggle:hover { border-color: rgba(108, 92, 255, .5); }
.lang-toggle__opt {
  flex: 1; z-index: 2;
  text-align: center;
  font-size: 12px; font-weight: 700;
  color: var(--muted);
  transition: color .25s ease;
  letter-spacing: .04em;
}
.lang-toggle__thumb {
  position: absolute; top: 3px; left: 3px;
  width: calc(50% - 3px); height: calc(100% - 6px);
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  border-radius: 999px;
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  z-index: 1;
  box-shadow: 0 4px 12px rgba(108,92,255,.4);
}
.lang-toggle .lang-toggle__opt:nth-child(1) { color: #fff; }
.lang-toggle--en .lang-toggle__thumb { transform: translateX(100%); }
.lang-toggle--en .lang-toggle__opt:nth-child(1) { color: var(--muted); }
.lang-toggle--en .lang-toggle__opt:nth-child(2) { color: #fff; }

.burger { display: none; background: none; border: 0; cursor: pointer; flex-direction: column; gap: 5px; padding: 8px; }
.burger span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; }

/* ===== Hero ===== */
.hero { position: relative; padding: 80px 0 100px; overflow: hidden; }
.hero__bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(800px 500px at 80% 10%, rgba(0, 212, 255, .18), transparent 60%),
    radial-gradient(700px 500px at 10% 80%, rgba(255, 92, 174, .15), transparent 60%),
    radial-gradient(600px 400px at 50% 50%, rgba(108, 92, 255, .15), transparent 60%);
  pointer-events: none;
}
.hero__inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 60px; align-items: center; position: relative; }
.hero__lead { font-size: 1.15rem; max-width: 540px; margin-bottom: 32px; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 50px; }
.hero__stats { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.hero__stats li { display: flex; flex-direction: column; }
.hero__stats b { font-size: 1.6rem; color: #fff; font-weight: 700; }
.hero__stats span { color: var(--muted); font-size: 14px; }

.hero__visual { position: relative; min-height: 360px; }
.card {
  background: linear-gradient(160deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 24px; box-shadow: var(--shadow); position: relative; z-index: 2;
}
.card--float { animation: float 6s ease-in-out infinite; }
.card pre { margin: 16px 0 0; font-family: 'JetBrains Mono', Menlo, monospace; font-size: 14px; color: #cdd2ff; overflow-x: auto; }
.card__dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; }
.card__dot--r { background: #ff5f57; }
.card__dot--y { background: #febc2e; }
.card__dot--g { background: #28c840; }
.c-k { color: #ff5cae; }
.c-s { color: #00d4ff; }
.c-v { color: #ffd479; }

.orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; z-index: 1; }
.orb--1 { width: 280px; height: 280px; background: var(--primary); top: -40px; right: -40px; }
.orb--2 { width: 240px; height: 240px; background: var(--primary-2); bottom: -30px; left: -30px; }

@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* ===== Sections ===== */
.section { padding: 90px 0; position: relative; }
.section--alt { background: var(--bg-2); }
.section__head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.section__head p { font-size: 1.05rem; }

/* ===== Services ===== */
.grid { display: grid; gap: 24px; }
.grid--services { grid-template-columns: repeat(3, 1fr); }
.service {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px;
  transition: .3s ease;
}
.service:hover { transform: translateY(-6px); border-color: rgba(108, 92, 255, .4); box-shadow: var(--shadow); }
.service__icon { font-size: 36px; margin-bottom: 16px; }
.service ul { list-style: none; padding: 0; margin: 16px 0 0; }
.service li { padding: 6px 0 6px 22px; position: relative; color: var(--muted); font-size: 14px; }
.service li::before { content: '✓'; position: absolute; left: 0; color: var(--primary-2); font-weight: 700; }

.service--featured {
  position: relative;
  background: linear-gradient(160deg, rgba(108,92,255,.18), rgba(0,212,255,.08), var(--surface));
  border-color: rgba(108,92,255,.4);
}
.service__badge {
  position: absolute; top: 18px; right: 18px;
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  color: #fff;
}

/* AI Agents */
.agents__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  margin-bottom: 48px;
}
.agent-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px;
  transition: .3s ease; position: relative; overflow: hidden;
}
.agent-card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(108,92,255,.0), rgba(0,212,255,.0));
  transition: .3s ease; pointer-events: none;
}
.agent-card:hover { transform: translateY(-4px); border-color: rgba(0,212,255,.4); }
.agent-card:hover::before { background: linear-gradient(135deg, rgba(108,92,255,.08), rgba(0,212,255,.05)); }
.agent-card__icon { font-size: 30px; margin-bottom: 12px; }
.agent-card h4 { font-size: 1.05rem; margin-bottom: 6px; }
.agent-card p { font-size: 14px; margin: 0; }

.agents__features {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  padding: 28px;
  background: linear-gradient(135deg, rgba(108,92,255,.12), rgba(0,212,255,.06));
  border: 1px solid rgba(108,92,255,.2);
  border-radius: var(--radius-lg);
}
.agents__feature { display: flex; flex-direction: column; gap: 6px; }
.agents__feature b { font-size: 15px; color: var(--text); font-weight: 700; }
.agents__feature span { font-size: 13px; color: var(--muted); }

/* ===== Steps ===== */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; counter-reset: s; }
.steps li {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px 22px; position: relative;
}
.steps__num { font-size: 32px; font-weight: 800; color: transparent; -webkit-text-stroke: 1.5px var(--primary-2); display: block; margin-bottom: 8px; }
.steps h4 { font-size: 1.05rem; }
.steps p { font-size: 14px; margin: 0; }

/* ===== Cases ===== */
.grid--cases { grid-template-columns: repeat(2, 1fr); align-items: stretch; }
.case { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; transition: .3s; display: flex; flex-direction: column; height: 100%; }
.case:hover { transform: translateY(-6px); }
.case__cover { aspect-ratio: 16/9; background-size: cover; background-position: center; position: relative; overflow: hidden; flex-shrink: 0; }
.case__cover--shot { display: block; background: #f3f4ff; }
.case__cover--shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .5s ease; display: block; }
.case:hover .case__cover--shot img { transform: scale(1.04); }
.case__live {
  position: absolute; top: 14px; left: 14px;
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px;
  background: rgba(40, 200, 64, .15); color: #28c840;
  border: 1px solid rgba(40, 200, 64, .35);
  backdrop-filter: blur(6px);
}
.case--featured { grid-column: auto; }
.case__body { padding: 26px; flex: 1; display: flex; flex-direction: column; }
.case__link { display: inline-block; margin-top: auto; padding-top: 12px; color: var(--primary-2); font-weight: 600; font-size: 14px; }
.case__link:hover { color: var(--text); }
.case__cover--1 { background: linear-gradient(135deg, #6c5cff, #00d4ff); }
.case__cover--2 { background: linear-gradient(135deg, #ff5cae, #6c5cff); }
.case__cover--3 { background: linear-gradient(135deg, #00d4ff, #28c840); }
.case__cover--4 { background: linear-gradient(135deg, #febc2e, #ff5cae); }
.case__cover--5 {
  background:
    linear-gradient(135deg, rgba(108,92,255,.85), rgba(0,212,255,.6)),
    repeating-linear-gradient(45deg, rgba(255,255,255,.04) 0 12px, transparent 12px 24px);
  display: flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', Menlo, monospace;
  color: rgba(255,255,255,.85); font-size: 13px;
  position: relative;
}
.case__cover--5::before {
  content: '$ personal-server\Aapply --modules\Aprometheus, gitea,\Adrone, bitwarden';
  white-space: pre; line-height: 1.6;
  text-align: left;
  background: rgba(0,0,0,.4); padding: 14px 18px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,.15);
}
.case__live--gh {
  background: rgba(255,255,255,.18) !important;
  color: #fff !important;
  border-color: rgba(255,255,255,.3) !important;
}
.case__body { padding: 26px; flex: 1; display: flex; flex-direction: column; }
.tag { display: inline-block; font-size: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(0,212,255,.12); color: var(--primary-2); margin-bottom: 12px; font-weight: 600; }

/* ===== Stack ===== */
.stack { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.stack__group { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.stack__group h4 { color: var(--primary-2); font-size: 14px; text-transform: uppercase; letter-spacing: .1em; }
.stack__group span { display: inline-block; padding: 6px 12px; border-radius: 8px; background: rgba(255,255,255,.05); border: 1px solid var(--border); margin: 4px 4px 0 0; font-size: 14px; }

/* ===== CTA ===== */
.cta { padding: 70px 0; background: linear-gradient(135deg, var(--primary), var(--primary-2)); }
.cta__inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.cta h2 { color: #fff; margin-bottom: 6px; }
.cta p { color: rgba(255,255,255,.85); margin: 0; }
.cta .btn--primary { background: #fff; color: var(--primary); box-shadow: none; }
.cta .btn--primary:hover { background: #f0f0ff; }

/* ===== Contact ===== */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.contact__list { list-style: none; padding: 0; margin-top: 24px; }
.contact__list li { padding: 10px 0; border-bottom: 1px solid var(--border); color: var(--muted); }
.contact__list b { color: var(--text); display: inline-block; min-width: 100px; }
.contact__list a { color: var(--primary-2); }

.form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; display: grid; gap: 16px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); font-weight: 500; }
.form input, .form select, .form textarea {
  padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg-2); color: var(--text); font-family: inherit; font-size: 15px;
  outline: none; transition: .2s;
}
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--primary); }
.form__note { font-size: 12px; color: var(--muted); margin: 0; }
.form__ok { display: none; color: #28c840; margin: 0; font-weight: 600; }
.form__ok--error { color: #d84a4a; }
.form button:disabled { opacity: 0.7; cursor: wait; }

/* ===== Privacy banner ===== */
.privacy-banner {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}
.privacy-banner--hidden {
  opacity: 0;
  transform: translateY(16px);
  visibility: hidden;
  pointer-events: none;
}
.privacy-banner__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 22px;
  border-radius: 22px;
  border: 1px solid rgba(96, 116, 255, .28);
  background: rgba(13, 17, 31, .92);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
  backdrop-filter: blur(18px);
}
.privacy-banner__content {
  max-width: 820px;
}
.privacy-banner__content strong {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.privacy-banner__content p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.privacy-banner__button {
  flex-shrink: 0;
}

/* ===== Footer ===== */
.footer { background: #07080f; padding: 60px 0 24px; border-top: 1px solid var(--border); }
.footer__inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.footer h5 { font-size: 14px; text-transform: uppercase; letter-spacing: .08em; color: var(--text); margin-bottom: 16px; }
.footer a { display: block; color: var(--muted); padding: 4px 0; font-size: 14px; transition: .2s; }
.footer a:hover { color: var(--text); }
.footer__bottom { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; text-align: center; }

/* ===== Responsive ===== */
@media (max-width: 980px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__visual { min-height: 280px; }
  .grid--services { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .stack { grid-template-columns: repeat(2, 1fr); }
  .agents__grid { grid-template-columns: repeat(2, 1fr); }
  .agents__features { grid-template-columns: repeat(2, 1fr); }
  .contact { grid-template-columns: 1fr; gap: 32px; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .privacy-banner__inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 640px) {
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--bg-2); border-top: 1px solid var(--border);
    padding: 16px 24px; margin: 0;
    transform: translateY(-10px); opacity: 0; pointer-events: none;
    transition: .2s ease;
  }
  .nav--open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .burger { display: flex; }
  .header .btn { display: none; }

  .hero { padding: 50px 0 70px; }
  .hero__stats { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .grid--services { grid-template-columns: 1fr; }
  .grid--cases { grid-template-columns: 1fr; }
  .case--featured { grid-column: auto; }
  .steps { grid-template-columns: 1fr; }
  .stack { grid-template-columns: 1fr; }
  .agents__grid { grid-template-columns: 1fr; }
  .agents__features { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; gap: 28px; }
  .section { padding: 60px 0; }
  .cta__inner { flex-direction: column; text-align: center; }
  .privacy-banner { left: 12px; right: 12px; bottom: 12px; }
  .privacy-banner__inner { padding: 16px; border-radius: 18px; }
  .privacy-banner__content strong { font-size: 13px; }
  .privacy-banner__content p { font-size: 13px; }
  .privacy-banner__button { width: 100%; justify-content: center; }
}
