:root {
  --bg: #0b1020;
  --bg-2: #10182c;
  --panel: #151e33;
  --panel-2: #1b2740;
  --line: rgba(221, 230, 255, .12);
  --text: #f7f8ff;
  --muted: #aeb8d0;
  --soft: #dbe4ff;
  --accent: #5568ff;
  --accent-2: #33d6c6;
  --warn: #ffb86b;
  --max: 1180px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 70% 12%, rgba(85,104,255,.24), transparent 30%),
    linear-gradient(135deg, #0b1020 0%, #10182c 48%, #0b1020 100%);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 4px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 78px;
  padding: 14px clamp(16px, 4vw, 52px);
  background: rgba(11,16,32,.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}
.brand img { width: 148px; height: auto; }
.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 15px;
}
.site-nav a { white-space: nowrap; }
.site-nav a:hover { color: var(--text); }
.nav-cta {
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  color: var(--text) !important;
}
.menu-button { display: none; }

.hero-main {
  max-width: calc(var(--max) + 104px);
  min-height: calc(100vh - 78px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
  align-items: center;
  gap: clamp(36px, 6vw, 88px);
  margin: 0 auto;
  padding: clamp(58px, 8vw, 112px) clamp(16px, 4vw, 52px);
}
.kicker {
  margin: 0 0 14px;
  color: var(--accent-2);
  font: 800 13px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-transform: uppercase;
  letter-spacing: .08em;
}
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(46px, 6.4vw, 76px);
  line-height: .98;
  letter-spacing: 0;
}
h2 {
  margin: 0;
  font-size: clamp(32px, 4.3vw, 52px);
  line-height: 1.05;
  letter-spacing: 0;
}
h3 { letter-spacing: 0; }
.hero-lead {
  max-width: 720px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 21px);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.18);
  font-weight: 800;
}
.button.primary { background: var(--accent); color: var(--text); border-color: var(--accent); }
.button.secondary { color: var(--text); background: rgba(255,255,255,.04); }
.trust-row {
  margin-top: 26px;
  color: var(--soft);
  font: 700 14px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.hero-visual {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  padding: 12px;
}
.mock-window {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(21,30,51,.94);
  box-shadow: 0 24px 90px rgba(0,0,0,.28);
}
.mock-window.wide { padding: 18px; }
.mock-window.small {
  position: absolute;
  right: 12px;
  bottom: 14px;
  width: min(260px, calc(100% - 24px));
  padding: 16px;
  background: #10182c;
}
.mock-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
}
.mock-head span { width: 11px; height: 11px; border-radius: 50%; background: var(--warn); }
.mock-head span:nth-child(2) { background: var(--accent-2); }
.mock-head span:nth-child(3) { background: var(--accent); }
.mock-head b { margin-left: auto; font-size: 13px; }
.mock-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mock-grid div {
  min-height: 112px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.04);
}
.mock-grid small { color: var(--muted); }
.mock-grid strong { display: block; margin-top: 8px; font-size: 38px; line-height: 1; }
.mock-row {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.04);
}
.mock-row i { width: 10px; height: 10px; border-radius: 50%; background: var(--accent-2); }
.mock-row p { margin: 0; color: var(--soft); }
.mock-row em { color: var(--accent-2); font-style: normal; font-weight: 800; }
.bot-bubble { width: fit-content; max-width: 100%; margin-bottom: 10px; padding: 10px 12px; border-radius: 8px; background: rgba(255,255,255,.08); }
.bot-bubble.answer { margin-left: auto; background: var(--accent); }
.bot-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bot-buttons span { padding: 9px; border: 1px solid var(--line); border-radius: 8px; text-align: center; color: var(--muted); }

.featured, .services-editorial, .process-section, .tech-profile, .final-cta, .page-hero, .page-section {
  max-width: calc(var(--max) + 104px);
  margin: 0 auto;
  padding: clamp(64px, 8vw, 104px) clamp(16px, 4vw, 52px);
}
.section-heading { max-width: 860px; margin-bottom: 32px; }
.section-heading p:not(.kicker), .page-hero p { color: var(--muted); font-size: 18px; }
.project-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 16px; }
.project-card {
  min-height: 330px;
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(155deg, rgba(27,39,64,.96), rgba(21,30,51,.86));
}
.project-card.tall { grid-row: span 2; min-height: 676px; }
.project-card.dark { background: #10182c; }
.project-card span, .stack { color: var(--accent-2); font: 700 13px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }
.project-card h3 { margin: auto 0 12px; font-size: clamp(30px, 4vw, 48px); line-height: 1; }
.project-card p { max-width: 560px; color: var(--muted); font-size: 17px; }
.stack { margin-top: 18px; color: var(--soft); }
.text-link { display: inline-flex; margin-top: 20px; color: var(--accent-2); font-weight: 900; }

.service-lines { display: grid; gap: 0; border-top: 1px solid var(--line); }
.service-lines article {
  display: grid;
  grid-template-columns: 90px minmax(220px, .7fr) minmax(0, 1fr);
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.service-lines b { color: var(--accent); font: 800 18px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.service-lines h3 { margin: 0; font-size: 27px; line-height: 1.08; }
.service-lines p { margin: 0; color: var(--muted); font-size: 17px; }

.process-grid, .tech-grid, .catalog-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.process-grid div, .tech-grid p, .info-card {
  margin: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.04);
}
.process-grid span { color: var(--accent-2); font: 800 14px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.process-grid h3 { margin: 18px 0 8px; font-size: 24px; }
.process-grid p, .tech-grid p, .info-card p { color: var(--muted); }
.tech-grid { grid-template-columns: repeat(5, 1fr); }
.tech-grid b { display: block; margin-bottom: 10px; color: var(--text); }
.final-cta {
  margin-bottom: 42px;
  border-block: 1px solid var(--line);
}
.final-cta p:not(.kicker) { max-width: 760px; color: var(--muted); font-size: 18px; }

.site-footer {
  max-width: calc(var(--max) + 104px);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  margin: 0 auto;
  padding: 44px clamp(16px, 4vw, 52px);
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.site-footer img { width: 142px; margin-bottom: 14px; }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer a { color: var(--soft); }
.site-footer span { grid-column: 1 / -1; color: rgba(247,248,255,.48); }

.page-hero { padding-top: clamp(52px, 7vw, 92px); padding-bottom: 32px; }
.page-hero h1 { font-size: clamp(42px, 6vw, 68px); }
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.filter-bar button {
  min-height: 42px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.04);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.filter-bar button.active { background: var(--accent); border-color: var(--accent); }
.catalog-grid { grid-template-columns: repeat(3, 1fr); }
.case-article { max-width: 940px; margin: 0 auto; padding: 46px 16px 96px; }
.case-article h1 { font-size: clamp(42px, 6vw, 70px); }
.case-article section { margin-top: 42px; padding-top: 24px; border-top: 1px solid var(--line); }
.case-article p, .case-article li { color: var(--muted); font-size: 18px; }
.case-article h2 { font-size: clamp(28px, 4vw, 42px); }
.case-visual {
  min-height: 340px;
  margin: 34px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(85,104,255,.2), rgba(51,214,198,.08));
}
.contact-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.contact-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.04);
}
.contact-card p { color: var(--muted); }

.admin-body { background: #eef3f8; color: #111318; }
.admin-body::before { display: none; }
.admin-shell { min-height: 100vh; }
.admin-login {
  max-width: 520px;
  margin: 9vh auto;
  padding: 34px;
  border-radius: 10px;
  background: #151e33;
  color: #f7f8ff;
  box-shadow: 18px 18px 0 #5568ff;
}
.admin-login h1 { margin: 20px 0 8px; font-size: 48px; line-height: 1; }
.admin-login p { color: #aeb8d0; }
.admin-login label { display: grid; gap: 8px; font-weight: 800; }
.admin-login input, .admin-body input, .admin-body select, .admin-body textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px;
  border: 1px solid #dbe1e8;
  border-radius: 8px;
  background: #fff;
  color: #111318;
  font: inherit;
}
.admin-login .btn, .admin-body .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid #111318;
  border-radius: 8px;
  background: #5568ff;
  color: #fff;
  font: inherit;
  font-weight: 800;
}
.admin-panel { min-height: 100vh; display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.hidden { display: none !important; }
.admin-sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 20px; padding: 22px; background: #151e33; color: #fff; }
.admin-sidebar .brand img { width: 132px; }
.side-nav { display: grid; gap: 8px; }
.side-nav a { padding: 11px; border-radius: 8px; color: #aeb8d0; font-weight: 800; }
.side-nav a.active, .side-nav a:hover { background: rgba(85,104,255,.2); color: #fff; }
.admin-sidebar .btn { margin-top: auto; background: transparent; border-color: rgba(255,255,255,.25); }
.admin-workspace { padding: clamp(22px, 3vw, 38px); overflow: hidden; }
.admin-head, .table-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.admin-head h1 { margin: 0; font-size: clamp(42px, 5vw, 62px); line-height: 1; }
.admin-actions { display: flex; gap: 10px; }
.search-input { width: min(42vw, 520px); }
.stats, .analytics-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 18px; }
.stat, .lead-card, .analytics-section, .table-section {
  border: 1px solid #dbe1e8;
  border-radius: 10px;
  background: #fff;
}
.stat { min-height: 112px; padding: 16px; }
.stat span, .stat small { color: #626b78; }
.stat b { display: block; margin: 4px 0; font-size: 38px; line-height: 1; }
.analytics-section, .table-section { padding: 18px; margin-bottom: 22px; }
.analytics-grid { grid-template-columns: repeat(4, 1fr); }
.analytics-card { min-height: 100px; padding: 16px; border-radius: 8px; background: #151e33; color: #fff; }
.analytics-card span { color: #aeb8d0; }
.analytics-card b { display: block; margin-top: 8px; font-size: 36px; }
.analytics-details { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 12px; }
.analytics-details > div { padding: 14px; border-radius: 8px; background: #eef3f8; }
.mini-row, .visit-row { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid #dbe1e8; color: #626b78; }
.visit-row { display: grid; }
.kanban { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 12px; }
.column { min-height: 440px; min-width: 0; padding: 12px; border: 1px solid #dbe1e8; border-radius: 10px; background: rgba(255,255,255,.58); }
.column-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.column-head h2 { font-size: 19px; }
.column-head span { min-width: 30px; min-height: 28px; display: grid; place-items: center; border-radius: 8px; background: #151e33; color: #fff; font-weight: 900; }
.lead-card { padding: 14px; margin-bottom: 10px; }
.lead-card h3 { margin: 0; font-size: 20px; }
.lead-card p, .lead-card time { color: #626b78; }
.lead-service { display: inline-flex; padding: 5px 8px; border-radius: 8px; background: rgba(85,104,255,.12); color: #5568ff !important; font-weight: 800; }
.lead-message { color: #111318 !important; }
.lead-contact { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid #dbe1e8; border-bottom: 1px solid #dbe1e8; }
.lead-contact a, .lead-table a { color: #5568ff; font-weight: 800; }
.empty-state { min-height: 100px; display: grid; place-items: center; border: 1px dashed #dbe1e8; border-radius: 8px; color: #626b78; }
.lead-table { overflow-x: auto; }
.lead-table table { width: 100%; min-width: 920px; border-collapse: collapse; }
.lead-table th, .lead-table td { padding: 12px; border-bottom: 1px solid #dbe1e8; text-align: left; vertical-align: top; }
.status-pill { display: inline-flex; padding: 6px 9px; border-radius: 8px; background: rgba(85,104,255,.12); color: #5568ff !important; font-weight: 800; }

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

@media (max-width: 980px) {
  .hero-main { grid-template-columns: 1fr; min-height: auto; }
  .hero-visual { min-height: auto; }
  .mock-window.small { position: static; width: 100%; margin-top: 14px; }
  .project-grid, .catalog-grid, .contact-panel { grid-template-columns: 1fr; }
  .project-card.tall { min-height: 420px; }
  .service-lines article { grid-template-columns: 60px 1fr; }
  .service-lines p { grid-column: 2; }
  .process-grid, .tech-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-panel { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; height: auto; }
  .side-nav { display: flex; overflow-x: auto; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .analytics-grid { grid-template-columns: repeat(2, 1fr); }
  .analytics-details { grid-template-columns: 1fr; }
  .kanban { grid-template-columns: repeat(5, minmax(250px, 1fr)); }
}

@media (max-width: 720px) {
  .site-header { align-items: flex-start; min-height: auto; padding: 12px 14px; }
  .brand img { width: 132px; }
  .menu-button {
    display: inline-flex;
    margin-left: auto;
    min-height: 38px;
    padding: 8px 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255,255,255,.04);
    color: var(--text);
    font: inherit;
    font-weight: 800;
  }
  .site-nav {
    position: absolute;
    left: 14px;
    right: 14px;
    top: 64px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(11,16,32,.98);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 10px; }
  .hero-main { padding: 40px 14px 56px; }
  h1 { font-size: clamp(38px, 12vw, 46px); }
  h2 { font-size: clamp(28px, 9vw, 34px); }
  .hero-lead, .section-heading p:not(.kicker), .page-hero p, .case-article p, .case-article li { font-size: 16px; }
  .hero-actions { display: grid; grid-template-columns: 1fr; }
  .button { width: 100%; }
  .mock-grid, .process-grid, .tech-grid { grid-template-columns: 1fr; }
  .mock-row { grid-template-columns: 10px 1fr; }
  .mock-row em { grid-column: 2; width: fit-content; }
  .featured, .services-editorial, .process-section, .tech-profile, .final-cta, .page-hero, .page-section { padding: 48px 14px; }
  .project-card, .project-card.tall { min-height: auto; padding: 18px; }
  .service-lines article { grid-template-columns: 1fr; gap: 10px; padding: 22px 0; }
  .service-lines p { grid-column: auto; }
  .site-footer { grid-template-columns: 1fr; padding: 34px 14px; }
  .site-footer nav { display: grid; gap: 10px; }
  .admin-login { width: calc(100% - 28px); margin: 34px auto; padding: 24px; box-shadow: 8px 8px 0 #5568ff; }
  .admin-login h1 { font-size: 38px; }
  .admin-workspace { padding: 22px 14px; overflow: visible; }
  .admin-head, .admin-actions { align-items: stretch; flex-direction: column; width: 100%; }
  .search-input { width: 100%; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .stat { min-height: 104px; padding: 13px; }
  .analytics-section, .table-section { padding: 14px; }
  .kanban { margin-inline: -14px; padding-inline: 14px; grid-template-columns: repeat(5, minmax(250px, 82vw)); scroll-snap-type: x proximity; }
  .column { min-height: 390px; scroll-snap-align: start; }
}

@media (max-width: 360px) {
  .stats, .analytics-grid { grid-template-columns: 1fr; }
}
