/* ==========================================================================
   Ads Pro — style.css
   Design tokens: see design_system/DESIGN.md
   ========================================================================== */

:root {
  /* Surfaces */
  --bg:            #150429;
  --bg-alt:        #1B0638;
  --surface:       #220A44;
  --surface-hover: #2A0E55;
  --border:        #3A1A6E;
  --scrim:         linear-gradient(180deg, rgba(21,4,41,.55) 0%, rgba(21,4,41,.85) 100%);

  /* Text */
  --text:       #FFFFFF;
  --text-muted: #C4BCE4;
  --text-dim:   #A79DD1;

  /* Brand */
  --brand-blue:  #2E7CF6;
  --brand-teal:  #1FB6A6;
  --brand-green: #3DD68C;
  --gradient-brand: linear-gradient(135deg, #2E7CF6 0%, #1FB6A6 55%, #3DD68C 100%);
  --accent:     #3DD68C;
  --accent-ink: #06160E;

  /* Type */
  --font: "Roboto", system-ui, -apple-system, sans-serif;

  /* Radius / shadow / motion */
  --radius-lg: 16px;
  --radius-sm: 8px;
  --shadow-card: 0 8px 32px rgba(0, 0, 0, .35);
  --shadow-glow: 0 0 24px rgba(61, 214, 140, .25);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --header-h: 72px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  overflow-x: clip;
}

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

img, video, svg { display: block; max-width: 100%; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; background: none; border: 0; cursor: pointer; }

.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 24px;
}

/* ---------- Type helpers ---------- */
.eyebrow {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.section__title {
  font-size: clamp(28px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 20ch;
}

.section__title::after {
  content: "";
  display: block;
  width: 64px;
  height: 4px;
  margin-top: 24px;
  background: var(--gradient-brand);
  border-radius: 2px;
}

.section__lead {
  margin-top: 24px;
  max-width: 62ch;
  font-size: 18px;
  color: var(--text-muted);
}

.lead {
  font-size: 18px;
  color: var(--text);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 16px;
  line-height: 1;
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease),
              background-color 200ms var(--ease), border-color 200ms var(--ease),
              color 200ms var(--ease);
}

.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn--primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-glow); }
.btn--primary:active { transform: translateY(0); }

.btn--ghost {
  border: 1px solid var(--border);
  color: var(--text);
}

.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ---------- Skip link ---------- */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 200;
  padding: 12px 20px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  border-radius: var(--radius-sm);
  transform: translateY(-200%);
  transition: transform 200ms var(--ease);
}

.skip-link:focus-visible { transform: none; }

/* ---------- Header ---------- */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  background: linear-gradient(180deg, rgba(21, 4, 41, .65) 0%, transparent 100%);
  transition: background-color 300ms var(--ease), box-shadow 300ms var(--ease);
}

.header--scrolled {
  background: rgba(21, 4, 41, .8);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.header__logo img { height: 40px; width: auto; }

.header__nav-list {
  display: flex;
  align-items: center;
  gap: 32px;
}

.header__nav-list a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 200ms var(--ease);
}

.header__nav-list a:hover { color: var(--accent); }

.header__nav-list .header__nav-cta {
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
}

.header__nav-cta:hover { border-color: var(--accent); }

.header__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 48px;
  height: 48px;
  padding: 10px;
}

.header__burger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 1px;
  transition: transform 300ms var(--ease), opacity 200ms var(--ease);
}

.header__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.header__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.header__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Mobile menu ---------- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(21, 4, 41, .97);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 300ms var(--ease), visibility 0s linear 300ms;
}

.mobile-menu--open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 300ms var(--ease);
}

.mobile-menu__list { text-align: center; }

.mobile-menu__list a {
  display: block;
  padding: 16px 24px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  transition: color 200ms var(--ease);
}

.mobile-menu__list a:hover { color: var(--accent); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero__media, .hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__video { object-fit: cover; }
.hero__scrim { position: absolute; inset: 0; background: var(--scrim); }

.hero__inner {
  position: relative;
  z-index: 1;
  padding-block: calc(var(--header-h) + 48px) 96px;
}

.hero__eyebrow { color: var(--brand-green); }

.hero__title {
  max-width: 12ch;
  font-size: clamp(40px, 8vw, 88px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.hero__lead {
  margin-top: 24px;
  max-width: 52ch;
  font-size: 18px;
  color: var(--text-muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 40px;
}

.hero__scroll {
  position: absolute;
  left: 24px;
  bottom: 32px;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-dim);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: color 200ms var(--ease);
}

.hero__scroll:hover { color: var(--accent); }

.hero__scroll-line {
  width: 48px;
  height: 1px;
  background: var(--gradient-brand);
  animation: scroll-hint 2.4s var(--ease) infinite;
  transform-origin: left;
}

@keyframes scroll-hint {
  0%, 100% { transform: scaleX(0.4); opacity: .5; }
  50%      { transform: scaleX(1);   opacity: 1; }
}

/* ---------- Sections ---------- */
.section { padding-block: 96px; }
.section--alt { background: var(--bg-alt); }
.section__head { margin-bottom: 64px; }

/* ---------- Reveal animation (only when JS is available) ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 600ms var(--ease), transform 600ms var(--ease);
}

.js .reveal--visible { opacity: 1; transform: none; }

/* ---------- About ---------- */
.about__grid {
  display: grid;
  gap: 48px;
}

.about__text .section__title { margin-bottom: 32px; }

.about__text p + p { margin-top: 16px; color: var(--text-muted); }

/* Фото на всю высоту блока: от заголовка до конца текста;
   края растворяются в фон страницы */
.about__media img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  -webkit-mask-image: radial-gradient(ellipse 88% 88% at 50% 50%, #000 55%, transparent 100%);
  mask-image: radial-gradient(ellipse 88% 88% at 50% 50%, #000 55%, transparent 100%);
}

/* ---------- Services ---------- */
.services {
  display: grid;
  gap: 24px;
}

.service {
  position: relative;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: border-color 300ms var(--ease), transform 300ms var(--ease),
              background-color 300ms var(--ease);
}

.service:hover {
  border-color: var(--brand-teal);
  background: var(--surface-hover);
}

.service--cta:hover { transform: translateY(-4px); }

.service__num {
  position: absolute;
  top: 24px;
  right: 24px;
  font-size: 40px;
  font-weight: 900;
  line-height: 1;
  color: var(--border);
}

.service__icon {
  width: 48px;
  height: 48px;
  margin-bottom: 24px;
}

.service__title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 12px;
}

.service__text { color: var(--text-muted); max-width: 62ch; }

.service--cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 16px;
  background: linear-gradient(135deg, rgba(46,124,246,.16) 0%, rgba(31,182,166,.16) 55%, rgba(61,214,140,.16) 100%), var(--surface);
}

/* Кликабельные карточки услуг (stretched link) */
.service--link:hover {
  transform: translateY(-4px);
  border-color: var(--brand-teal);
}

.service__more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  transition: gap 200ms var(--ease);
}

.service__more:hover { gap: 10px; }

/* вся карточка — ссылка */
.service__more::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.service__more:focus-visible { outline-offset: 6px; }

/* ---------- Service subpages ---------- */
.subhero {
  position: relative;
  overflow: hidden;
  padding-block: calc(var(--header-h) + 64px) 64px;
  background: var(--bg);
}

.subhero__media, .subhero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.subhero__video { object-fit: cover; object-position: center bottom; }
.subhero__scrim { position: absolute; inset: 0; background: var(--scrim); }

.subhero .container { position: relative; z-index: 1; }

.subhero h1 {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 18ch;
}

.subhero h1::after {
  content: "";
  display: block;
  width: 64px;
  height: 4px;
  margin-top: 24px;
  background: var(--gradient-brand);
  border-radius: 2px;
}

.subhero .lead {
  margin-top: 24px;
  max-width: 62ch;
  color: var(--text-muted);
}

.subhero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 40px;
}

/* список фич на страницах услуг */
.features {
  display: grid;
  gap: 24px;
}

.feature {
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.feature h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature p { color: var(--text-muted); max-width: 62ch; }

/* CTA-полоса внизу страниц услуг */
.cta-band {
  padding-block: 96px;
  text-align: left;
  background:
    radial-gradient(60% 100% at 80% 0%, rgba(46, 124, 246, .16), transparent 70%),
    var(--bg-alt);
  border-top: 1px solid var(--border);
}

.cta-band h2 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 900;
  letter-spacing: -0.02em;
  max-width: 24ch;
}

.cta-band p {
  margin-top: 16px;
  color: var(--text-muted);
  max-width: 56ch;
}

.cta-band .btn { margin-top: 32px; }

.cta-band .container { position: relative; }

.cta-band__mark { display: none; }

@keyframes cta-mark-float {
  0%, 100% { transform: translateY(calc(-50% - 8px)); }
  50% { transform: translateY(calc(-50% + 8px)); }
}

@keyframes cta-mark-glow {
  0%, 100% { opacity: .45; transform: scale(1); }
  50% { opacity: .8; transform: scale(1.08); }
}

@keyframes cta-orbit-spin { to { transform: rotate(1turn); } }
@keyframes cta-orbit-spin-rev { to { transform: rotate(-1turn); } }

@media (min-width: 1024px) {
  .cta-band__mark {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    right: 48px;
    width: 240px;
    aspect-ratio: 1;
    transform: translateY(-50%);
    animation: cta-mark-float 6s ease-in-out infinite;
  }

  .cta-band__mark::before {
    content: "";
    position: absolute;
    inset: -30%;
    z-index: -1;
    background: radial-gradient(50% 50% at 50% 50%, rgba(46, 124, 246, .35), rgba(61, 214, 140, .15) 55%, transparent 75%);
    filter: blur(10px);
    animation: cta-mark-glow 7s ease-in-out infinite;
  }

  .cta-band__mark img { display: block; width: 50%; height: auto; }

  .cta-band__orbit {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
  }

  .cta-band__orbit--outer { animation: cta-orbit-spin 60s linear infinite; }
  .cta-band__orbit--inner { animation: cta-orbit-spin-rev 44s linear infinite; }
}

@media (min-width: 768px) {
  .features { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .features { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Process (infographic) ---------- */
.process {
  display: grid;
  gap: 40px;
  counter-reset: step;
}

.process__step {
  position: relative;
  padding-left: 96px;
}

.process__marker {
  position: absolute;
  left: 0;
  top: 0;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
}

.process__marker svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.process__arc { stroke: url(#gradStroke); stroke-linecap: round; }

.process__num {
  font-size: 28px;
  font-weight: 900;
  color: var(--brand-green);
}

.process__title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.process__text { color: var(--text-muted); max-width: 62ch; }

.process__note {
  margin-top: 48px;
  padding: 24px 32px;
  border-left: 4px solid var(--brand-teal);
  background: var(--surface);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  color: var(--text-muted);
  max-width: 62ch;
}

.process__note strong { color: var(--text); }

/* ---------- Tools ---------- */
.tools {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.tools__item {
  padding: 24px;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 300ms var(--ease), transform 300ms var(--ease);
}

.tools__item:hover {
  border-color: var(--brand-teal);
  transform: translateY(-4px);
}

.tools__item img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

/* ---------- Contacts ---------- */
.section--contacts {
  background:
    radial-gradient(60% 80% at 85% 20%, rgba(46, 124, 246, .12), transparent 70%),
    radial-gradient(50% 70% at 15% 90%, rgba(61, 214, 140, .10), transparent 70%),
    var(--bg);
}

.contacts__grid {
  display: grid;
  gap: 24px;
}

.contacts__block {
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  font-style: normal;
}

.contacts__label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.contacts__value {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.5;
}

.contacts__mail {
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 700;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.contacts__mail:hover { filter: brightness(1.2); }

.contacts__hint { margin-top: 16px; font-size: 14px; color: var(--text-dim); }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding-block: 48px;
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

.footer__logo img { height: 32px; width: auto; }

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
}

.footer__links a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color 200ms var(--ease);
}

.footer__links a:hover { color: var(--accent); }

.footer__copy { font-size: 13px; color: var(--text-dim); }

/* явный перенос копирайта виден только на таблетах */
.footer__copy-break { display: none; }

/* ---------- Cookie consent (pattern from aldynamictech, recolored) ---------- */
.consent {
  padding: 10px 25px 15px 25px;
  border-radius: var(--radius-sm);
  z-index: 1000;
  position: fixed !important;
}

.consent p { margin-bottom: 10px; color: var(--text); }

.bottom-center {
  position: absolute;
  bottom: 20px;
  right: 20px;
  left: 20px;
  max-width: calc(100vw - 40px);
}

.consent.dark {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  color: var(--text);
}

.consent .buttons { display: flex; }

.consent .btn {
  min-height: 0;
  font-weight: 700;
  padding: 7px 10px;
  margin-right: 5px;
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.consent .btn:hover { cursor: pointer; }

.consent .btn-agree { background: var(--accent); color: var(--accent-ink); }
.consent .btn-decline { background: var(--border); color: var(--text); }

/* ---------- Privacy policy page ---------- */
.legal { padding-block: calc(var(--header-h) + 64px) 96px; }
.legal h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.legal .legal__updated { color: var(--text-dim); font-size: 14px; margin-bottom: 48px; }
.legal h2 { font-size: 24px; font-weight: 700; margin: 40px 0 12px; }
.legal p, .legal li { color: var(--text-muted); max-width: 68ch; }
.legal ul { list-style: disc; padding-left: 24px; margin-top: 8px; }
.legal li + li { margin-top: 4px; }
.legal a { color: var(--accent); }
.legal a:hover { text-decoration: underline; }

/* ==========================================================================
   Tablet  (≥768px)
   ========================================================================== */
@media (min-width: 768px) {
  body { font-size: 17px; }

  .container { padding-inline: 48px; }

  .about__grid { grid-template-columns: 1.1fr 1fr; align-items: stretch; }

  .about__media { height: 100%; }

  .about__media img {
    height: 100%;
    object-fit: cover;
  }

  .services { grid-template-columns: repeat(2, 1fr); }

  .process { grid-template-columns: repeat(2, 1fr); }
  .process__step { padding-left: 88px; }

  .tools { grid-template-columns: repeat(5, 1fr); }

  .contacts__grid { grid-template-columns: 1fr 1.4fr; }

  /* Подвал на таблетах: слева лого + копирайт в 2 строки, справа сетка ссылок */
  .footer__inner {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "logo links"
      "copy links";
    align-items: center;
    column-gap: 48px;
    row-gap: 16px;
  }

  .footer__logo { grid-area: logo; justify-self: start; }

  .footer__copy {
    grid-area: copy;
    justify-self: start;
    max-width: none;
    text-align: left;
  }

  .footer__copy-break { display: block; }

  .footer__links {
    grid-area: links;
    justify-self: end;
    display: grid;
    grid-template-columns: repeat(3, auto);
    gap: 16px 48px;
    justify-items: start;
    text-align: left;
  }

  .bottom-center {
    left: auto;
    max-width: 420px;
  }
}

/* ==========================================================================
   Desktop  (≥1024px)
   ========================================================================== */
@media (min-width: 1024px) {
  .section { padding-block: 128px; }

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

  .process { grid-template-columns: repeat(4, 1fr); gap: 32px; }
  .process__step { padding-left: 0; padding-top: 96px; }
  .process__marker { top: 0; }

  .hero__scroll { left: 48px; }
}

/* Mobile & tablet nav (<1024px) */
@media (max-width: 1023.98px) {
  .header__nav { display: none; }
  .header__burger { display: flex; }
}

/* ==========================================================================
   Wide desktop  (≥1280px) — подвал в одну строку
   ========================================================================== */
@media (min-width: 1280px) {
  .footer__inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 32px;
    text-align: left;
  }

  .footer__copy { max-width: none; text-align: right; }

  .footer__copy-break { display: none; }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}

/* Короткие экраны (landscape-телефон) — не перекрывать CTA */
@media (max-height: 480px) {
  .hero__scroll { display: none; }
}
