/* =============================================
   АКМЕС — фирменная стилевая система
   Палитра: Оранжевый #ff6a00 / Чёрный #111214 / Белый #f8f8f8
   ============================================= */

/* --- Шрифты --- */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800;900&display=swap');

/* --- Переменные (Light mode) --- */
:root, [data-theme="light"] {
  /* Цвета палитры логотипа */
  --orange:          #ff6a00;
  --orange-hover:    #e85f00;
  --orange-active:   #c54e00;
  --orange-glow:     rgba(255, 106, 0, 0.18);
  --orange-subtle:   rgba(255, 106, 0, 0.10);
  --black-brand:     #111214;
  --black-card:      #18191d;

  /* Поверхности */
  --bg:              #f5f3ef;
  --surface:         #ffffff;
  --surface-2:       #faf9f7;
  --surface-offset:  #ece9e3;
  --divider:         rgba(17,18,20,0.08);
  --border:          rgba(17,18,20,0.11);

  /* Текст */
  --text:            #111214;
  --text-muted:      #3d4046;
  --text-faint:      #606368;
  --text-inverse:    #f8f8f8;

  /* Тени */
  --shadow-xs:  0 1px 3px rgba(17,18,20,0.06);
  --shadow-sm:  0 4px 14px rgba(17,18,20,0.08);
  --shadow-md:  0 16px 40px rgba(17,18,20,0.12);
  --shadow-lg:  0 32px 64px rgba(17,18,20,0.18);
  --shadow-orange: 0 16px 40px rgba(255,106,0,0.28);

  /* Скругления */
  --r-sm:  6px;
  --r-md:  12px;
  --r-lg:  20px;
  --r-xl:  28px;
  --r-2xl: 40px;
  --r-full: 9999px;

  /* Шрифты */
  --font: 'Manrope', -apple-system, Arial, sans-serif;

  /* Типографика */
  --text-xs:   clamp(0.75rem, 0.7rem + 0.2vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem + 0.3vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.2vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem + 0.6vw, 1.5rem);
  --text-xl:   clamp(1.5rem, 1.2rem + 1.2vw, 2.25rem);
  --text-2xl:  clamp(2.2rem, 1.4rem + 2.8vw, 4.5rem);

  /* Переходы */
  --ease: 200ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Контент */
  --content: 1200px;
}

/* --- Dark mode --- */
[data-theme="dark"] {
  --bg:              #0d0e10;
  --surface:         #15171b;
  --surface-2:       #1c1f24;
  --surface-offset:  #111315;
  --divider:         rgba(255,255,255,0.07);
  --border:          rgba(255,255,255,0.10);
  --text:            #f0f1f3;
  --text-muted:      #c8cbd2;
  --text-faint:      #9da0a6;
  --text-inverse:    #0d0e10;
  --shadow-xs:  0 1px 3px rgba(0,0,0,0.22);
  --shadow-sm:  0 4px 14px rgba(0,0,0,0.30);
  --shadow-md:  0 16px 40px rgba(0,0,0,0.38);
  --shadow-lg:  0 32px 64px rgba(0,0,0,0.50);
  --orange-glow: rgba(255,106,0,0.22);
  --orange-subtle: rgba(255,106,0,0.12);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg:              #0d0e10; --surface: #15171b; --surface-2: #1c1f24;
    --surface-offset:  #111315; --divider: rgba(255,255,255,0.07); --border: rgba(255,255,255,0.10);
    --text: #f0f1f3; --text-muted: #c8cbd2; --text-faint: #9da0a6; --text-inverse: #0d0e10;
    --shadow-xs: 0 1px 3px rgba(0,0,0,.22); --shadow-sm: 0 4px 14px rgba(0,0,0,.30);
    --shadow-md: 0 16px 40px rgba(0,0,0,.38); --shadow-lg: 0 32px 64px rgba(0,0,0,.50);
    --orange-glow: rgba(255,106,0,.22); --orange-subtle: rgba(255,106,0,.12);
  }
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body { font-family: var(--font); font-size: var(--text-base); color: var(--text); background: var(--bg); min-height: 100dvh; line-height: 1.65; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; border: none; background: none; color: inherit; cursor: pointer; }
ul { list-style: none; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: var(--r-sm); }
::selection { background: var(--orange-subtle); color: var(--text); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

/* =============================================
   УТИЛИТЫ
   ============================================= */
.container { width: min(calc(100% - 2.5rem), var(--content)); margin: 0 auto; }
.section { padding: clamp(5rem, 8vw, 8rem) 0; }
.section--dark { background: var(--black-brand); color: var(--text-inverse); }
.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .45rem .9rem; border-radius: var(--r-full);
  background: var(--orange-subtle); color: var(--orange);
  font-size: var(--text-xs); font-weight: 800; letter-spacing: .15em; text-transform: uppercase;
}
.eyebrow::before { content: ''; width: .45rem; height: .45rem; border-radius: 50%; background: var(--orange); }
.section-head { max-width: 760px; margin-bottom: clamp(2.5rem, 4vw, 4rem); display: grid; gap: 1rem; }
.section-head h2 { font-size: var(--text-xl); font-weight: 900; line-height: 1.06; }
.section-head p { color: var(--text-muted); max-width: 64ch; }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .65rem;
  min-height: 52px; padding: 0 1.75rem; border-radius: var(--r-full);
  font-size: var(--text-sm); font-weight: 800; transition: var(--ease); white-space: nowrap;
}
.btn-primary { background: var(--orange); color: #fff; box-shadow: var(--shadow-orange); }
.btn-primary:hover { background: var(--orange-hover); transform: translateY(-2px); box-shadow: 0 20px 48px rgba(255,106,0,0.36); }
.btn-primary:active { transform: translateY(0); background: var(--orange-active); }
.btn-outline { border: 1.5px solid var(--border); background: var(--surface); }
.btn-outline:hover { border-color: var(--orange); color: var(--orange); background: var(--orange-subtle); }
.btn-ghost { color: var(--text-muted); }
.btn-ghost:hover { color: var(--orange); }
.btn-dark { background: var(--surface); color: var(--text-inverse); }
[data-theme="dark"] .btn-dark, [data-theme="light"] .section--dark .btn-dark { background: rgba(255,255,255,0.12); color: #fff; border: 1px solid rgba(255,255,255,0.18); }
[data-theme="dark"] .btn-dark:hover, .section--dark .btn-dark:hover { background: rgba(255,255,255,0.20); }

/* =============================================
   HEADER
   ============================================= */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(20px) saturate(160%);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--divider);
  transition: background var(--ease);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; min-height: 84px;
}
.brand { display: flex; align-items: center; gap: .8rem; font-weight: 900; font-size: 1.15rem; letter-spacing: .06em; }
.brand-logo { width: 52px; height: 52px; border-radius: 14px; overflow: hidden; background: var(--black-brand); display: grid; place-items: center; }
.brand-logo img { width: 100%; height: 100%; object-fit: contain; }
.brand-name small { display: block; color: var(--text-faint); font-size: .68rem; letter-spacing: .22em; text-transform: uppercase; font-weight: 700; }
.main-nav { display: flex; align-items: center; gap: 1.8rem; }
.main-nav a { font-size: var(--text-sm); color: var(--text-muted); font-weight: 600; transition: color var(--ease); }
.main-nav a:hover { color: var(--orange); }
.header-right { display: flex; align-items: center; gap: .75rem; }
.theme-btn {
  min-width: 44px; min-height: 44px; border-radius: var(--r-md);
  border: 1px solid var(--border); background: var(--surface);
  display: grid; place-items: center; transition: var(--ease);
}
.theme-btn:hover { border-color: var(--orange); color: var(--orange); }
.menu-btn { display: none; min-width: 44px; min-height: 44px; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface); place-items: center; }

/* Мобильное меню */
.mobile-nav {
  display: none; flex-direction: column; gap: .25rem;
  padding: 1rem; background: var(--surface); border-radius: var(--r-xl);
  border: 1px solid var(--border); box-shadow: var(--shadow-md);
  position: fixed; inset: 94px 1rem auto;
}
.mobile-nav.is-open { display: flex; }
.mobile-nav a {
  padding: .9rem 1rem; border-radius: var(--r-md); font-weight: 700;
  color: var(--text-muted); transition: var(--ease);
}
.mobile-nav a:hover { background: var(--orange-subtle); color: var(--orange); }
.mobile-nav .btn { margin-top: .5rem; justify-content: center; }

/* =============================================
   HERO
   ============================================= */
.hero { padding: clamp(4rem, 9vw, 8rem) 0 clamp(4rem, 7vw, 7rem); overflow: hidden; }
.hero-grid {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 5vw, 5rem); align-items: center;
}
.hero-eyebrow { margin-bottom: 1.5rem; }
.hero h1 {
  font-size: var(--text-2xl); font-weight: 900; line-height: 1.0;
  letter-spacing: -.03em; margin-bottom: 1.5rem;
}
.hero h1 span { color: var(--orange); }
.hero-desc { color: var(--text-muted); max-width: 56ch; font-size: var(--text-lg); margin-bottom: 2.5rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 3rem; }
.hero-tags { display: flex; flex-wrap: wrap; gap: .65rem; }
.hero-tag {
  padding: .55rem 1rem; border-radius: var(--r-full);
  border: 1.5px solid var(--border); font-size: var(--text-xs); font-weight: 700; color: var(--text-muted);
  transition: var(--ease);
}
.hero-tag:hover { border-color: var(--orange); color: var(--orange); }

/* Hero карточка */
.hero-card {
  border-radius: var(--r-2xl); background: var(--black-brand); color: var(--text-inverse);
  padding: clamp(1.8rem, 4vw, 2.8rem); box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
.hero-card::after {
  content: ''; position: absolute; bottom: -40px; right: -40px;
  width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, var(--orange-glow), transparent 70%);
}
.hcard-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; }
.hcard-badge { padding: .4rem .8rem; border-radius: var(--r-full); background: rgba(255,255,255,0.08); font-size: var(--text-xs); letter-spacing: .1em; text-transform: uppercase; }
.hcard-logo { width: 52px; height: 52px; border-radius: 14px; overflow: hidden; background: rgba(255,255,255,0.06); display: grid; place-items: center; }
.hcard-logo img { width: 100%; height: 100%; object-fit: contain; }
.hcard-stats { display: grid; gap: .1rem; }
.hcard-stat {
  display: grid; grid-template-columns: 80px 1fr; gap: 1rem; align-items: start;
  padding: 1.1rem 0; border-top: 1px solid rgba(255,255,255,0.1);
}
.hcard-stat strong { font-size: 1.5rem; font-weight: 900; color: var(--orange); }
.hcard-stat p { font-size: var(--text-sm); color: rgba(255,255,255,0.90); line-height: 1.4; }

/* =============================================
   TECH STACK
   ============================================= */
.tech-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1.25rem;
}
.tech-card {
  padding: 2rem 1.75rem; border-radius: var(--r-xl);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-xs);
  display: flex; flex-direction: column; gap: 1rem;
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}
.tech-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--orange); }
.tech-card-icon { width: 52px; height: 52px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); display: grid; place-items: center; padding: 6px; }
.tech-card h3 { font-size: var(--text-lg); font-weight: 800; }
.tech-card .version { display: inline-block; font-size: var(--text-xs); font-weight: 800; color: var(--orange); background: var(--orange-subtle); padding: .2rem .55rem; border-radius: var(--r-full); margin-left: .5rem; }
.tech-card p { color: var(--text-muted); font-size: var(--text-sm); }
.tech-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: auto; }
.tech-tags span {
  padding: .3rem .6rem; border-radius: var(--r-full);
  border: 1px solid var(--border); font-size: var(--text-xs); font-weight: 600; color: var(--text-muted);
}

/* =============================================
   УСЛУГИ
   ============================================= */
.services-bento {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 1.25rem;
}
.svc { grid-column: span 4; }
.svc-wide { grid-column: span 8; }
.svc-full { grid-column: span 12; }
.svc-card {
  height: 100%; padding: 2.2rem; border-radius: var(--r-xl);
  background: var(--surface); border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 1rem;
  transition: box-shadow var(--ease), transform var(--ease), border-color var(--ease);
}
.svc-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.svc-card.accent { background: linear-gradient(145deg, color-mix(in srgb, var(--orange) 9%, var(--surface)), var(--surface)); border-color: color-mix(in srgb, var(--orange) 22%, var(--border)); }
.svc-num { color: var(--orange); font-size: var(--text-xs); font-weight: 800; letter-spacing: .2em; }
.svc-card h3 { font-size: clamp(1.3rem,1.1rem + .7vw, 1.85rem); font-weight: 800; line-height: 1.1; }
.svc-card p { color: var(--text-muted); font-size: var(--text-sm); flex: 1; }
.svc-list { display: grid; gap: .6rem; margin-top: .5rem; }
.svc-list li { font-size: var(--text-sm); color: var(--text-muted); display: flex; align-items: flex-start; gap: .5rem; }
.svc-list li::before { content: ''; width: 6px; height: 6px; min-width: 6px; border-radius: 50%; background: var(--orange); margin-top: .55rem; }

/* =============================================
   ПРОЦЕСС
   ============================================= */
.process-steps {
  display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 1.25rem;
  counter-reset: step;
}
.step-card {
  padding: 2rem 1.75rem; border-radius: var(--r-xl);
  background: var(--surface); border: 1px solid var(--border);
  position: relative; counter-increment: step;
  transition: box-shadow var(--ease);
}
.step-card:hover { box-shadow: var(--shadow-md); }
.step-num {
  font-size: 3.5rem; font-weight: 900; line-height: 1;
  color: var(--orange-subtle); position: absolute; top: 1rem; right: 1.25rem;
}
.step-card h3 { font-size: 1.1rem; font-weight: 800; margin-bottom: .75rem; }
.step-card p { color: var(--text-muted); font-size: var(--text-sm); }

/* Линии между шагами */
.step-card:not(:last-child)::after {
  content: '';
  position: absolute; top: 50%; right: calc(-1.25rem / 2 - 10px);
  width: 20px; height: 2px;
  background: linear-gradient(to right, var(--orange), transparent);
}

/* =============================================
   CTA
   ============================================= */
.cta-section { padding: clamp(4rem, 8vw, 8rem) 0; }
.cta-inner {
  position: relative; overflow: hidden; border-radius: var(--r-2xl);
  padding: clamp(3rem, 6vw, 6rem);
  background: linear-gradient(135deg, #111214 0%, #1e2128 60%, #111214 100%);
  color: var(--text-inverse);
}
.cta-inner::before {
  content: '';
  position: absolute; left: -5%; bottom: -30%;
  width: 340px; height: 340px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,106,0,.22), transparent 65%);
  filter: blur(10px);
}
.cta-inner::after {
  content: '';
  position: absolute; right: 8%; top: -20%;
  width: 240px; height: 240px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,106,0,.12), transparent 65%);
}
.cta-grid {
  position: relative; display: grid;
  grid-template-columns: 1fr auto; gap: 3rem; align-items: center;
}
.cta-inner h2 { font-size: clamp(2rem,1.5rem + 2vw, 3.5rem); font-weight: 900; line-height: 1.04; max-width: 12ch; margin-bottom: 1rem; }
.cta-inner h2 span { color: var(--orange); }
.cta-inner p { color: rgba(255,255,255,.90); max-width: 52ch; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }
.cta-contacts { display: grid; gap: 1.25rem; min-width: 240px; }
.cta-contact-item { display: flex; flex-direction: column; gap: .25rem; }
.cta-contact-item span { font-size: var(--text-xs); color: rgba(255,255,255,.78); letter-spacing: .1em; text-transform: uppercase; font-weight: 700; }
.cta-contact-item a { font-size: 1.05rem; font-weight: 700; color: #fff; transition: color var(--ease); }
.cta-contact-item a:hover { color: var(--orange); }

/* =============================================
   FOOTER
   ============================================= */
.site-footer { background: var(--black-brand); color: rgba(255,255,255,0.85); }
.footer-top {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2.5rem;
  padding: clamp(3rem, 5vw, 5rem) 0;
  border-bottom: 1px solid rgba(255,255,255,0.16);
}
.footer-brand { display: flex; flex-direction: column; gap: 1rem; }
.footer-brand .brand { color: #fff; }
.footer-brand p { font-size: var(--text-sm); color: rgba(255,255,255,.82); max-width: 32ch; }
.footer-col h4 { color: #fff; font-weight: 800; margin-bottom: 1.2rem; font-size: var(--text-sm); }
.footer-col ul { display: grid; gap: .65rem; }
.footer-col li a { font-size: var(--text-sm); color: rgba(255,255,255,.82); transition: color var(--ease); }
.footer-col li a:hover { color: var(--orange); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.5rem 0; font-size: var(--text-xs); color: rgba(255,255,255,.65);
}
.footer-social { display: flex; gap: .75rem; }
.footer-social a {
  width: 40px; height: 40px; border-radius: var(--r-md);
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  display: grid; place-items: center; transition: var(--ease);
}
.footer-social a:hover { background: var(--orange); border-color: var(--orange); color: #fff; }

/* =============================================
   АНИМАЦИИ — reveal
   ============================================= */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }
.reveal-delay-4 { transition-delay: .4s; }

/* =============================================
   SKIP LINK
   ============================================= */
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 200;
  padding: .75rem 1rem; border-radius: var(--r-md);
  background: var(--orange); color: #fff; font-weight: 700;
}
.skip-link:focus { top: 1rem; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
  .tech-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .svc { grid-column: span 6; }
  .svc-wide { grid-column: span 12; }
  .process-steps { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .step-card:not(:last-child)::after { display: none; }
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-card { display: none; }
  .main-nav { display: none; }
  .header-right .btn { display: none; }
  .menu-btn { display: grid; }
  .cta-grid { grid-template-columns: 1fr; }
  .cta-contacts { flex-direction: row; display: flex; flex-wrap: wrap; gap: 2rem; }
}
@media (max-width: 640px) {
  .svc { grid-column: span 12; }
  .svc-wide { grid-column: span 12; }
  .tech-grid { grid-template-columns: 1fr; }
  .process-steps { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: .75rem; }
  .container { width: calc(100% - 1.5rem); }
}

/* ── Дополнительные правки контраста ─────────────── */
/* Светлая тема: muted-текст должен быть достаточно тёмным */
[data-theme="light"] .tech-tags span,
[data-theme="light"] .hero-tag { color: #3d4046; border-color: rgba(17,18,20,0.18); }

/* Тёмная тема: muted-текст должен быть достаточно светлым */
[data-theme="dark"] .tech-tags span,
[data-theme="dark"] .hero-tag { color: #c8cbd2; border-color: rgba(255,255,255,0.22); }

[data-theme="dark"] .svc-list li,
[data-theme="dark"] .svc-card p,
[data-theme="dark"] .step-card p,
[data-theme="dark"] .section-head p,
[data-theme="dark"] .tech-card p { color: #c8cbd2; }

[data-theme="dark"] .eyebrow { background: rgba(255,106,0,0.18); }

/* hcard-badge в hero-card */
.hcard-badge { color: rgba(255,255,255,0.88); }

/* CTA contacts link */
.cta-contact-item a { color: #ffffff; }

/* Nav active link */
.main-nav a.active { color: var(--orange) !important; }

/* Footer h4 headings */
.footer-col h4 { letter-spacing: .04em; }

/* Ensure process step number doesn't obscure text */
.step-num { pointer-events: none; user-select: none; }

/* ── CTA заголовок всегда белый ──────────────────── */
.cta-inner h2 { color: #ffffff !important; }
.cta-inner h2 span { color: var(--orange) !important; }

/* ── Кнопка Telegram — всегда тёмно-стеклянная ───── */
.btn-tg {
  background: rgba(255,255,255,0.12);
  color: #ffffff;
  border: 1px solid rgba(255,255,255,0.22);
}
.btn-tg:hover {
  background: rgba(255,255,255,0.22);
  color: #ffffff;
}
