/* ============================================================
   mimax dev — Minimalist Dark
   Слоистый сланец: #0A0A0F → #12121A → #1A1A24
   Акцент: янтарный #F59E0B (единственный цвет)
   Шрифты: Space Grotesk + Manrope (дисплей, кириллица) ·
           Inter (текст) · JetBrains Mono (служебный)
   ============================================================ */

:root {
  --background: #0a0a0f;
  --background-alt: #12121a;
  --foreground: #fafafa;
  --muted: #1a1a24;
  --muted-foreground: #71717a;
  --accent: #f59e0b;
  --accent-foreground: #0a0a0f;
  --accent-muted: rgba(245, 158, 11, 0.15);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  --card: rgba(26, 26, 36, 0.6);
  --card-hover: rgba(26, 26, 36, 0.8);

  --glow-sm: 0 0 20px rgba(245, 158, 11, 0.15);
  --glow-md: 0 0 40px rgba(245, 158, 11, 0.2);
  --border-glow: 0 0 0 1px rgba(245, 158, 11, 0.2), 0 0 30px rgba(245, 158, 11, 0.15);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.3);

  --font-display: "Space Grotesk", "Manrope", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --container: 72rem;
}

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

html { scroll-behavior: smooth; }

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

img { display: block; max-width: 100%; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Атмосфера: орбы и шум ---------- */

.ambient {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
}

.orb-top {
  width: 900px; height: 600px;
  top: -280px; left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(245, 158, 11, 0.05), transparent 70%);
}

.orb-bottom {
  width: 700px; height: 500px;
  right: -220px; bottom: -200px;
  background: radial-gradient(closest-side, rgba(245, 158, 11, 0.035), transparent 70%);
}

.noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.015;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Типографика ---------- */

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  text-wrap: balance;
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: 1.25rem; line-height: 1.3; }

.hero-strong { font-weight: 800; }

p { color: var(--muted-foreground); }

/* ---------- Стеклянные карточки ---------- */

.glass {
  background: var(--card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 300ms ease-out, background 300ms ease-out,
              transform 300ms ease-out, box-shadow 300ms ease-out;
}

/* ---------- Кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 24px;
  border-radius: var(--radius-lg);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 200ms ease-out;
}
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--accent);
  color: var(--accent-foreground);
}
.btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--foreground);
  border: 1px solid var(--border-hover);
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-small { height: 38px; padding: 0 18px; font-size: 0.875rem; }
.btn-lg { height: 48px; padding: 0 28px; }

/* ---------- Шапка ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 15, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 68px;
}

.logo {
  display: inline-flex;
  align-items: center;
}

.logo img { height: 36px; width: auto; }

.nav {
  display: flex;
  gap: 28px;
  margin-left: auto;
}

.nav a {
  color: var(--muted-foreground);
  text-decoration: none;
  font-size: 0.92rem;
  transition: color 200ms ease-out;
}
.nav a:hover { color: var(--foreground); }

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.burger span {
  width: 22px;
  height: 2px;
  background: var(--foreground);
  border-radius: 2px;
  transition: transform 300ms ease-out, opacity 300ms ease-out;
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Герой ---------- */

.hero {
  position: relative;
  padding: 120px 0 0;
  background:
    radial-gradient(ellipse at top, rgba(245, 158, 11, 0.03) 0%, transparent 50%);
}

/* едва заметная сетка, растворяющаяся книзу */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.8), transparent 75%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.8), transparent 75%);
}

.hero-inner {
  position: relative;
  text-align: center;
  max-width: 860px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.025em;
  color: var(--muted-foreground);
  background: var(--card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 18px;
  margin-bottom: 32px;
  box-shadow: var(--glow-sm);
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.8);
  animation: pulse 2.2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.hero-sub {
  max-width: 620px;
  margin: 28px auto 0;
  font-size: 1.08rem;
}

.hero-actions {
  margin-top: 40px;
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* «Палуба» карточек */
.deck {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 24px;
  max-width: 1100px;
  margin: 88px auto 0;
  padding: 0 24px 96px;
}

.deck-card {
  padding: 20px;
  flex: 1;
  min-width: 0;
  box-shadow: 0 20px 25px rgba(0, 0, 0, 0.4);
}

.deck-chat { max-width: 320px; transform: translateY(8px); }
.deck-chart { max-width: 330px; transform: translateY(-10px); }
.deck-stats { max-width: 330px; transform: translateY(8px); }

.deck-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  margin-bottom: 14px;
}

.bubble {
  font-size: 0.82rem;
  line-height: 1.45;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  max-width: 88%;
  color: var(--foreground);
}
.bubble-in {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-bottom-left-radius: 3px;
}
.bubble-out {
  background: var(--accent-muted);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-bottom-right-radius: 3px;
  margin-left: auto;
}

.deck-legend { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }

.legend-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--muted-foreground);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
}
.dot { width: 7px; height: 7px; border-radius: 50%; }
.dot-amber { background: var(--accent); box-shadow: 0 0 8px rgba(245, 158, 11, 0.6); }
.dot-white { background: var(--foreground); }

.deck-svg { width: 100%; height: auto; }

.stat-row { display: flex; gap: 18px; margin-bottom: 14px; }
.stat { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stat-label { font-size: 0.72rem; color: var(--muted-foreground); }
.stat-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}
.stat-note { font-size: 0.7rem; color: var(--muted-foreground); }
.stat-note.up { color: var(--accent); }

.stat-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 56px;
}
.stat-bars i {
  flex: 1;
  height: var(--h);
  border-radius: 3px 3px 2px 2px;
  background: linear-gradient(180deg, var(--accent), rgba(245, 158, 11, 0.25));
}

/* ---------- Интро с чипами ---------- */

.intro { padding: 96px 0 0; }

.intro-head {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: end;
}

.intro-sub { font-size: 0.95rem; max-width: 420px; justify-self: end; }

/* ---------- Заголовки секций ---------- */

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 64px;
}

.section-sub {
  margin-top: 14px;
  font-size: 0.95rem;
}

/* ---------- Услуги ---------- */

.services { padding: clamp(96px, 12vw, 160px) 0; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* GlowCard: рамка и внутренний свет реагируют на курсор.
   --mx/--my — позиция курсора, --glow — близость курсора (0..1), задаются из JS. */
.card {
  position: relative;
  padding: 36px 28px;
  border-radius: 18px;
  --mx: 50%;
  --my: 50%;
  --glow: 0;
  transition: transform 400ms ease-out, box-shadow 400ms ease-out,
              background 400ms ease-out;
}

.card:hover {
  transform: scale(1.015);
  background: var(--card-hover);
  box-shadow:
    0 0 30px rgba(245, 158, 11, 0.08),
    0 12px 40px rgba(0, 0, 0, 0.45);
}

/* кольцо поверх собственной рамки: ярче всего у курсора, затухает вдоль периметра */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(
    200px circle at var(--mx) var(--my),
    rgba(255, 182, 41, 0.85),
    rgba(245, 158, 11, 0.3) 45%,
    transparent 75%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: var(--glow);
  transition: opacity 400ms ease-out;
  pointer-events: none;
}

/* едва заметный тёплый свет внутри карточки под курсором */
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    260px circle at var(--mx) var(--my),
    rgba(245, 158, 11, 0.06),
    transparent 65%
  );
  opacity: var(--glow);
  transition: opacity 400ms ease-out;
  pointer-events: none;
}

.card-icon {
  width: 46px;
  height: 46px;
  margin-bottom: 22px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: var(--accent-muted);
}
.card-icon svg { width: 22px; height: 22px; }

.card h3 { margin-bottom: 10px; }
.card p { font-size: 0.9rem; }

/* ---------- Портфолио ---------- */

.portfolio { padding: 0 0 clamp(96px, 12vw, 160px); }

.portfolio-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.pcard {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  overflow: hidden;
}

.pcard-visual {
  position: relative;
  min-height: 320px;
}

/* тёплое свечение за скриншотами */
.pcard-visual::before {
  content: "";
  position: absolute;
  inset: 15% 25% 15% 5%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(245, 158, 11, 0.12), transparent);
  filter: blur(60px);
}

.shot {
  position: absolute;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-hover);
  background: var(--muted);
  box-shadow: 0 20px 25px rgba(0, 0, 0, 0.4);
}

.shot-main {
  width: 72%;
  left: 36px;
  top: 64px;
}
.shot-secondary {
  width: 58%;
  right: 20px;
  top: 28px;
  opacity: 0.8;
}

.mock-browser-bar {
  display: flex;
  gap: 5px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--border);
}
.mock-browser-bar span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
}

.pcard-body {
  padding: 44px 40px 44px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}

.pcard-tags { display: flex; flex-wrap: wrap; gap: 8px; }

.tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.025em;
  color: var(--muted-foreground);
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.tag-status {
  border-color: rgba(245, 158, 11, 0.35);
  color: var(--accent);
  box-shadow: var(--glow-sm);
}

.pcard-body p { font-size: 0.92rem; }

.pcard-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-weight: 500;
  font-size: 0.92rem;
  text-decoration: none;
  width: fit-content;
  transition: filter 200ms ease-out;
}
.pcard-link:hover { filter: brightness(1.15); }

/* ---------- Процесс ---------- */

.process { padding: 0 0 clamp(96px, 12vw, 160px); }

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.step { padding: 32px 24px; }

.step:hover {
  border-color: var(--border-hover);
  background: var(--card-hover);
}

.step-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.025em;
  margin-bottom: 18px;
  color: var(--accent);
}

.step h3 { font-size: 1.05rem; margin-bottom: 10px; }
.step p { font-size: 0.85rem; }

/* ---------- Контакты ---------- */

.contacts { padding: 0 0 clamp(96px, 12vw, 160px); }

/* выделенная карточка с янтарной подсветкой */
.contacts-card {
  position: relative;
  text-align: center;
  padding: 88px 40px;
  border-color: rgba(245, 158, 11, 0.2);
  box-shadow: var(--border-glow);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.contacts-card::before {
  content: "";
  position: absolute;
  inset: auto 20% -120px;
  height: 220px;
  background: radial-gradient(closest-side, rgba(245, 158, 11, 0.12), transparent);
  filter: blur(40px);
  pointer-events: none;
}

.contacts-sub {
  max-width: 460px;
  margin: 16px auto 0;
  font-size: 0.95rem;
}

.contacts-actions {
  margin-top: 40px;
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---------- Футер ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--muted-foreground);
}

.footer-dim { color: #52525b; }

/* ---------- Появление при скролле ---------- */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 600ms ease-out, transform 600ms ease-out;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
.deck.visible .deck-chat, .deck.visible .deck-stats { transform: translateY(8px); }
.deck.visible .deck-chart { transform: translateY(-10px); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .badge-dot { animation: none; }
  .btn, .glass, .card, .card::before, .card::after { transition: none; }
  .card:hover { transform: none; }
}

/* ---------- Адаптив ---------- */

@media (max-width: 1000px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .deck { flex-wrap: wrap; align-items: stretch; }
  .deck-chat, .deck-chart, .deck-stats { transform: none; max-width: 46%; }
  .deck.visible .deck-chat, .deck.visible .deck-stats,
  .deck.visible .deck-chart { transform: none; }
  .pcard { grid-template-columns: 1fr; gap: 0; }
  .pcard-visual { min-height: 300px; margin: 24px 24px 0; }
  .shot-main { left: 0; }
  .shot-secondary { right: 0; }
  .pcard-body { padding: 28px 28px 36px; }
  .intro-head { grid-template-columns: 1fr; gap: 16px; }
  .intro-sub { justify-self: start; }
  .orb-top { width: 600px; height: 400px; }
  .orb-bottom { width: 440px; height: 320px; }
}

@media (max-width: 720px) {
  .nav {
    position: fixed;
    top: 68px;
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(10, 10, 15, 0.97);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px 20px;
    transform: translateY(-130%);
    transition: transform 300ms ease-out;
    z-index: 40;
  }
  .nav.open { transform: translateY(0); }
  .nav a { padding: 12px 0; font-size: 1rem; }
  .burger { display: flex; margin-left: auto; }
  .header-cta { display: none; }

  .hero { padding-top: 88px; }
  .deck { gap: 16px; margin-top: 64px; padding-bottom: 72px; }
  .deck-chat, .deck-chart, .deck-stats { max-width: 100%; }
  .deck-chart { display: none; }

  .card { padding: 30px 22px; }
  .services-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }

  .pcard-visual { min-height: 220px; }
  .contacts-card { padding: 60px 24px 68px; }
}

@media (max-width: 560px) {
  .deck { flex-direction: column; align-items: stretch; }
}

/* ---------- Фокус с клавиатуры ---------- */

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-md);
}
.nav a:focus-visible {
  outline: none;
  color: var(--accent);
}
