/* ═══════════════════════════════════════════════
   LA·DIGITAL — инженерное бюро ИИ-систем
   Палитра: графит + сигнальный оранжевый
   ═══════════════════════════════════════════════ */

:root {
  --bg: #0a0a0b;
  --bg-elevated: #111113;
  --surface: #16161a;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #ececec;
  --text-muted: #8d8d96;
  --text-dim: #55555e;
  --accent: #ff4d00;
  --accent-soft: rgba(255, 77, 0, 0.12);
  --font-display: "Unbounded", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --nav-h: 72px;
  --pad: clamp(20px, 5vw, 80px);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: #fff; }

.mono {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* фоновая чертёжная сетка */
.grid-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.35;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 20%, transparent 75%);
}

main { position: relative; z-index: 1; }

/* ═══════════════ NAV ═══════════════ */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--pad);
  z-index: 100;
  transition: background 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}

.nav.is-scrolled {
  background: rgba(10, 10, 11, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--line);
}

.nav__logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  color: var(--text);
  letter-spacing: 0.02em;
}
.nav__logo-mark { color: var(--accent); }
.nav__logo-rest { color: var(--text); font-weight: 300; }

.nav__links { display: flex; gap: 32px; }
.nav__links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav__links a:hover { color: var(--text); }

.nav__cta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--line-strong);
  padding: 10px 20px;
  border-radius: 100px;
  transition: border-color 0.25s, background 0.25s, color 0.25s;
}
.nav__cta:hover { border-color: var(--accent); background: var(--accent-soft); }

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav__burger span {
  display: block;
  width: 26px; height: 2px;
  background: var(--text);
  transition: transform 0.3s, opacity 0.3s;
}
.nav__burger.is-open span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: var(--nav-h) 0 auto 0;
  background: rgba(10, 10, 11, 0.97);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
  display: none;
  flex-direction: column;
  padding: 16px var(--pad) 32px;
  z-index: 99;
}
.mobile-menu.is-open { display: flex; }
.mobile-menu a {
  color: var(--text);
  text-decoration: none;
  font-size: 1.2rem;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.mobile-menu__cta { color: var(--accent) !important; border-bottom: none !important; }

/* ═══════════════ HERO ═══════════════ */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--nav-h) + 40px) var(--pad) 0;
}

#heroCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.hero__inner { max-width: 1400px; margin: 0 auto; width: 100%; }

.hero__label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: clamp(24px, 4vh, 48px);
}
.tick {
  width: 10px; height: 10px;
  background: var(--accent);
  display: inline-block;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.2rem, 6.2vw, 5.6rem);
  line-height: 1.06;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.hero__line { display: block; }
.hero__line--accent { color: var(--accent); }

.hero__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-top: clamp(32px, 5vh, 64px);
}

.hero__sub {
  max-width: 560px;
  color: var(--text-muted);
  font-size: clamp(0.95rem, 1.2vw, 1.08rem);
}

.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  padding: 15px 28px;
  border-radius: 100px;
  transition: transform 0.25s, background 0.25s, border-color 0.25s, color 0.25s;
}
.btn--primary {
  background: var(--accent);
  color: #fff;
}
.btn--primary:hover { transform: translateY(-2px); background: #ff6320; }
.btn--ghost {
  color: var(--text);
  border: 1px solid var(--line-strong);
}
.btn--ghost:hover { border-color: var(--text); }
.btn__arrow { transition: transform 0.25s; }
.btn:hover .btn__arrow { transform: translateX(4px); }

.hero__meta {
  max-width: 1400px;
  margin: clamp(40px, 7vh, 80px) auto 0;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px 48px;
  border-top: 1px solid var(--line);
  padding: 22px 0 28px;
}
.hero__meta-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}
.hero__meta-item::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--accent);
  flex: none;
}

/* ═══════════════ MARQUEE ═══════════════ */

.marquee {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
  background: var(--bg-elevated);
}
.marquee__track {
  display: flex;
  align-items: center;
  gap: 40px;
  width: max-content;
  animation: marquee 30s linear infinite;
}
.marquee__track span {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 0.95rem;
  white-space: nowrap;
  color: var(--text-muted);
}
.marquee__track i {
  color: var(--accent);
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ═══════════════ SECTIONS ═══════════════ */

.section {
  max-width: 1400px;
  margin: 0 auto;
  padding: clamp(80px, 12vh, 160px) var(--pad) 0;
}

.section__head {
  display: flex;
  align-items: baseline;
  gap: 24px;
  margin-bottom: clamp(28px, 4vh, 48px);
}

.section__num {
  color: var(--accent);
  font-size: 0.85rem;
}

.section__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.9rem, 4.2vw, 3.6rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.section__title em {
  font-style: normal;
  color: var(--accent);
}
.section__title--sm { font-size: clamp(1.5rem, 3vw, 2.4rem); margin-bottom: 20px; }

.section__lede {
  max-width: 720px;
  color: var(--text-muted);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  margin-bottom: clamp(40px, 6vh, 72px);
}

/* ═══════════════ PRINCIPLES ═══════════════ */

.principles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.principle {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 32px 28px 40px;
  position: relative;
  transition: background 0.3s;
}
.principle:hover { background: var(--bg-elevated); }
.principle:hover .principle__num { color: var(--accent); }

.principle__num {
  display: block;
  margin-bottom: 40px;
  transition: color 0.3s;
}
.principle h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.05rem;
  margin-bottom: 12px;
}
.principle p { color: var(--text-muted); font-size: 0.92rem; }

/* ═══════════════ SERVICES ═══════════════ */

.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.service {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.3s, transform 0.3s;
}
.service:hover {
  border-color: var(--line-strong);
  transform: translateY(-4px);
}

.service__index {
  color: var(--accent);
  margin-bottom: 32px;
}
.service h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.15rem;
  margin-bottom: 14px;
  line-height: 1.3;
}
.service p { color: var(--text-muted); font-size: 0.93rem; flex: 1; }

.service__tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}
.service__tags li {
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 5px 12px;
  font-size: 0.68rem;
  color: var(--text-dim);
}

.service--cta {
  background: var(--accent-soft);
  border-color: rgba(255, 77, 0, 0.3);
  justify-content: center;
  align-items: flex-start;
  gap: 16px;
}
.service--cta p { flex: 0; }
.service--cta:hover { border-color: var(--accent); }

/* ═══════════════ CASES ═══════════════ */

.cases { display: flex; flex-direction: column; gap: 16px; }

.case {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(28px, 3.5vw, 48px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(240px, 26vw, 360px);
  column-gap: clamp(28px, 4vw, 64px);
  row-gap: 16px;
  transition: border-color 0.3s;
}
.case:hover { border-color: var(--line-strong); }
.case > * { grid-column: 1; }

.case__fig {
  grid-column: 2;
  grid-row: 1 / span 5;
  align-self: start;
  margin: 0;
  position: sticky;
  top: calc(var(--nav-h) + 24px);
}
.case__fig img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.case__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.case__domain { color: var(--accent); }

.case h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.2rem, 2.2vw, 1.7rem);
  line-height: 1.25;
  max-width: 720px;
}
.case > p { color: var(--text-muted); max-width: 780px; }

.case__solution {
  margin-top: 12px;
  max-width: 780px;
}
.case__solution > .mono { color: var(--text-dim); display: block; margin-bottom: 12px; }
.case__solution ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.case__solution li {
  color: var(--text-muted);
  font-size: 0.95rem;
  padding-left: 22px;
  position: relative;
}
.case__solution li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.case__result {
  margin-top: 12px;
  padding: 20px 24px;
  border-left: 2px solid var(--accent);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 0 12px 12px 0;
  max-width: 780px;
}
.case__result .mono { color: var(--accent); display: block; margin-bottom: 6px; }
.case__result p { color: var(--text); font-size: 0.95rem; }

/* ═══════════════ PROCESS ═══════════════ */

.process { border-top: 1px solid var(--line); }

.process__step {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 24px;
  padding: 36px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
  transition: background 0.3s, padding-left 0.3s;
}
.process__step:hover { background: var(--bg-elevated); padding-left: 16px; }

.process__num {
  font-size: 1.6rem;
  color: var(--text-dim);
  font-weight: 500;
  line-height: 1.2;
  transition: color 0.3s;
}
.process__step:hover .process__num { color: var(--accent); }

.process__step h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.2rem;
  margin-bottom: 8px;
}
.process__step p { color: var(--text-muted); max-width: 640px; font-size: 0.95rem; }

/* ═══════════════ STACK ═══════════════ */

.section--stack { padding-bottom: 0; }

.stack__label { display: block; margin-bottom: 24px; color: var(--accent); }

.stack__text {
  max-width: 720px;
  color: var(--text-muted);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
}

/* ═══════════════ FOUNDER ═══════════════ */

.founder {
  display: grid;
  grid-template-columns: minmax(200px, 380px) 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(32px, 4.5vw, 64px);
}

.founder__mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(5rem, 12vw, 11rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  display: flex;
  user-select: none;
}
.founder__mark-a { color: var(--accent); }

.founder__text p { color: var(--text-muted); margin-bottom: 18px; max-width: 640px; }

.founder__quote {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 1.05rem;
  color: var(--text) !important;
  border-left: 2px solid var(--accent);
  padding-left: 20px;
  margin-top: 28px;
}

/* ═══════════════ CONTACT ═══════════════ */

.section--contact { padding-bottom: clamp(80px, 12vh, 160px); }

.contact {
  text-align: center;
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.contact__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.1;
}
.contact__title em { font-style: normal; color: var(--accent); }

.contact__sub { color: var(--text-muted); max-width: 520px; }

.contact__channels {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 12px;
}

.contact__channel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-decoration: none;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  padding: 20px 32px;
  transition: border-color 0.25s, background 0.25s, transform 0.25s;
}
.contact__channel:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-3px);
}
.contact__channel strong {
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 600;
}

/* ═══════════════ FOOTER ═══════════════ */

.footer {
  border-top: 1px solid var(--line);
  padding: 28px var(--pad);
}
.footer__inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.footer__logo { color: var(--text); }
.footer__note { color: var(--text-dim); font-size: 0.85rem; }
.footer__year { color: var(--text-dim); }

/* ═══════════════ REVEAL ═══════════════ */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--d, 0s);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .marquee__track { animation-duration: 60s; }
  html { scroll-behavior: auto; }
}

/* ═══════════════ RESPONSIVE ═══════════════ */

@media (max-width: 900px) {
  .nav__links, .nav__cta { display: none; }
  .nav__burger { display: flex; }
  .founder { grid-template-columns: 1fr; }
  .founder__mark { font-size: 5rem; }
  .process__step { grid-template-columns: 64px 1fr; }
  .case { grid-template-columns: 1fr; }
  .case__fig { grid-column: 1; grid-row: auto; position: static; }
  .case__fig img { aspect-ratio: 16 / 9; }
}

@media (max-width: 560px) {
  .contact__channels { flex-direction: column; width: 100%; }
  .contact__channel { width: 100%; align-items: center; }
}
