/* ═══════════════════════════════════════════════════════════
   ASIA BRIDGE ADVISORS v3 — Editorial B2B Design
   Color palette: #0D1B2A #162232 #0A1520 #2B3E50 #7E9FBF #A8C4DB #C8DCF0
   ═══════════════════════════════════════════════════════════ */

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

::selection { background: rgba(126,159,191,.28); color: #fff; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #0A1520; }
::-webkit-scrollbar-thumb { background: #2B3E50; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #7E9FBF; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}
body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}
main {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

/* Footer — ограничение ширины на всех страницах */
footer {
  width: 100%;
  max-width: 100vw;
  min-width: 0;
  overflow-x: hidden;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}
footer > div[class*="max-w"] {
  width: 100%;
  max-width: 1920px;
  margin-left: auto;
  margin-right: auto;
  min-width: 0;
  overflow-x: hidden;
  box-sizing: border-box;
}
footer > div[class*="max-w"] > div:first-child {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
}
@media (max-width: 639px) {
  footer > div[class*="max-w"] > div:first-child {
    grid-template-columns: 1fr;
  }
}

/* IT page — ограничение ширины секций при зуме */
.page-it main {
  max-width: 100vw;
  margin-left: auto;
  margin-right: auto;
}
.page-it main > section {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}
.page-it main > section > div[class*="max-w"] {
  width: 100%;
  max-width: 1920px;
  margin-left: auto;
  margin-right: auto;
  overflow-x: hidden;
  box-sizing: border-box;
}
/* #services (marquee) — div, не section; жёсткое ограничение */
.page-it main > div#services {
  width: 100% !important;
  max-width: min(1920px, 100vw) !important;
  min-width: 0 !important;
  margin-left: auto !important;
  margin-right: auto !important;
  overflow-x: hidden !important;
  box-sizing: border-box;
}
.page-it main > div#services .marquee-wrap {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
  box-sizing: border-box;
}

/* Support page — ограничение ширины секций (hero stats, services, process, swot, contacts, capabilities) */
.page-support main {
  max-width: 100vw;
  margin-left: auto;
  margin-right: auto;
}
.page-support main > section {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}
.page-support main > section > div {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}
.page-support main section div[class*="max-w-[1920px]"] {
  width: 100%;
  max-width: 1920px;
  margin-left: auto;
  margin-right: auto;
  min-width: 0;
  overflow-x: hidden;
  box-sizing: border-box;
}
.page-support main > section .marquee-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

/* Главная страница — ограничение ширины секций (hero stats, directions, about, contacts) */
.home-page main {
  max-width: 100vw;
  margin-left: auto;
  margin-right: auto;
}
.home-page main > section {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}
.home-page main > section > div {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}
.home-page main section div[class*="max-w-[1920px]"] {
  width: 100%;
  max-width: 1920px;
  margin-left: auto;
  margin-right: auto;
  min-width: 0;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* ── Grain texture overlay ────────────────────────────────── */
.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: .028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* ── Custom cursor ────────────────────────────────────────── */
#cursor {
  position: fixed;
  width: 40px; height: 40px;
  border: 1px solid rgba(126,159,191,.5);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  top: -20px; left: -20px;
  transition: transform .18s ease, opacity .3s ease, border-color .3s ease, width .3s ease, height .3s ease;
  mix-blend-mode: difference;
}
#cursor-dot {
  position: fixed;
  width: 5px; height: 5px;
  background: #7E9FBF;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  top: -2.5px; left: -2.5px;
  transition: transform .08s ease;
}
#cursor.hovered { width: 56px; height: 56px; border-color: rgba(168,196,219,.7); }
#cursor.clicking { transform: scale(.8); }
body.no-cursor #cursor, body.no-cursor #cursor-dot { opacity: 0; }

/* ── Nav ──────────────────────────────────────────────────── */
#nav { background: #0D1B2A; }
.nav-link { font-size: var(--size-nav-link, 11pt) !important; }
.cta-btn { font-size: var(--size-cta-button, 11pt) !important; }
.mobile-nav { font-size: var(--size-nav-mobile, 13pt) !important; }

/* Тёмные блоки — тот же цвет, что и хедер (#0D1B2A) */
.bg-ink,
section#contacts .bg-ink,
section#digest .bg-ink,
section#results,
section#services .bg-ink,
section#process .bg-ink,
section#swot .bg-ink,
section#directions .bg-ink,
section#about .bg-ink {
  background-color: #0D1B2A !important;
}
/* Hero stats bar — тот же цвет, 90% прозрачность */
section#hero .bg-ink\/90 {
  background-color: rgba(13, 27, 42, 0.9) !important;
}
#nav.scrolled {
  background: rgba(13,27,42,.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}

/* Burger open state */
#burger.open .burger-line:nth-child(1) { transform: translateY(6px) rotate(45deg); background: white; }
#burger.open .burger-line:nth-child(2) { opacity: 0; transform: translateX(-8px); }
#burger.open .burger-line:nth-child(3) { transform: translateY(-6px) rotate(-45deg); width: 24px; background: white; }
#mobile-menu.open { max-height: 320px; }
#mobile-menu > div { padding-top: calc(1.5rem + 10px) !important; } /* отступ 10px от хэдера на мобильном */

/* Отступ от хедера для первого контента на мобильных */
@media (max-width: 768px) {
  section#hero { padding-top: calc(68px + 2.5rem) !important; }
}

/* ── Section tags ─────────────────────────────────────────── */
.section-tag {
  display: inline-block;
  font-size: var(--size-section-tag, 10pt);
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #7E9FBF;
}
.about-desc p { margin-bottom: 0.75em; }
.about-desc p:last-child { margin-bottom: 0; }
.footer-desc p { margin-bottom: 0.5em; white-space: nowrap; }
.footer-desc p:last-child { margin-bottom: 0; }
@media (max-width: 480px) {
  .footer-desc p { white-space: normal; }
}
/* Футер: светлый текст на тёмном фоне (сквозной footer на всех страницах) */
footer.bg-ink .footer-desc,
footer.bg-ink .footer-desc p,
footer.bg-ink .footer-desc a {
  color: #cbd5e1 !important;
}
footer.bg-ink .footer-desc a:hover {
  color: #ffffff !important;
}

/* ── Scroll reveal ────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s cubic-bezier(.16,1,.3,1), transform .8s cubic-bezier(.16,1,.3,1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal[data-delay="150"] { transition-delay: .15s; }
.reveal[data-delay="300"] { transition-delay: .3s; }

/* ── Direction cards bullets ───────────────────────────────── */
.direction-list {
  list-style: none;
  padding-left: 0;
}
.direction-list li {
  position: relative;
  padding-left: 1.125rem;
  margin-bottom: 0.5rem;
}
.direction-list li:last-child { margin-bottom: 0; }
.direction-list li::before {
  content: '';
  display: inline-block;
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7E9FBF !important;
  opacity: 1 !important;
}
.direction-list--support li::before,
.direction-list--it li::before,
.direction-list--geo li::before { background: #7E9FBF !important; }

/* ── Hero ─────────────────────────────────────────────────── */
.hero-accent { font-size: 2em; font-weight: bold; }
.hero-img { transform-origin: center; }

.hero-overline {
  opacity: 0;
  transform: translateX(-20px);
  animation: fadeSlideRight .9s cubic-bezier(.16,1,.3,1) .2s both;
}
.hero-title {
  opacity: 0;
  animation: revealUp 1s cubic-bezier(.16,1,.3,1) .4s both;
}
/* Заголовок без переноса на мобильных (страница Сопровождение) */
@media (max-width: 640px) {
  .hero-title--no-wrap {
    white-space: nowrap;
    font-size: clamp(28px, 8.5vw, 48px) !important;
  }
}
.hero-sub {
  opacity: 0;
  animation: fadeSlideRight .9s cubic-bezier(.16,1,.3,1) .8s both;
}
.hero-actions {
  opacity: 0;
  animation: fadeSlideRight .9s cubic-bezier(.16,1,.3,1) 1s both;
}

.text-outline {
  -webkit-text-stroke: 2px white;
  color: transparent;
}

.stat-item {
  opacity: 0;
  transform: translateY(16px);
}
.stat-item.visible {
  animation: fadeUp .7s cubic-bezier(.16,1,.3,1) both;
}
.stat-item:nth-child(1) { animation-delay: .05s; }
.stat-item:nth-child(2) { animation-delay: .15s; }
.stat-item:nth-child(3) { animation-delay: .25s; }
.stat-item:nth-child(4) { animation-delay: .35s; }
.stat-number { font-size: var(--size-stat-number, 32pt) !important; }
.stat-label { font-size: var(--size-stat-label, 11pt) !important; }
.contacts-form-title { font-size: var(--size-contacts-form-title, 22pt) !important; }
.required-note { font-size: var(--size-required-note, 11pt) !important; }
#form-success, #geo-form-success, .form-success { font-size: var(--size-form-success, 13pt) !important; }

/* ── Services accordion ───────────────────────────────────── */
.svc-panel { position: relative; }
.svc-body { max-height: 0; overflow: hidden; }
.svc-body.open { max-height: 1200px; }

.svc-trigger[aria-expanded="true"] .svc-num { color: #7E9FBF; }
.svc-trigger[aria-expanded="true"] .svc-icon { color: #7E9FBF; }
.svc-trigger[aria-expanded="true"] .svc-icon-h { transform: scaleX(0); opacity: 0; }

.svc-card {
  opacity: 0;
  transform: translateY(12px) scale(.98);
  transition: opacity .45s ease, transform .45s ease, background .3s, border-color .3s;
}
.svc-body.open .svc-card { opacity: 1; transform: translateY(0) scale(1); }
.svc-body.open .svc-card:nth-child(1) { transition-delay: .06s; }
.svc-body.open .svc-card:nth-child(2) { transition-delay: .12s; }
.svc-body.open .svc-card:nth-child(3) { transition-delay: .18s; }
.svc-body.open .svc-card:nth-child(4) { transition-delay: .24s; }
.svc-body.open .svc-card:nth-child(5) { transition-delay: .30s; }
.svc-body.open .svc-card:nth-child(6) { transition-delay: .36s; }

/* ── Process steps ────────────────────────────────────────── */
.step-row {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1);
}
.step-row.visible { opacity: 1; transform: translateY(0); }

.step-circle {
  transition: all .4s ease;
}
.step-row:hover .step-circle {
  border-color: #7E9FBF;
  color: #7E9FBF;
  box-shadow: 0 0 32px rgba(126,159,191,.18);
}

/* ── Marquee / Capabilities ───────────────────────────────── */
.marquee-wrap {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.marquee-wrap::before, .marquee-wrap::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 120px;
  z-index: 2;
}
.marquee-wrap::before { left: 0; background: linear-gradient(to right, #f8fafc, transparent); }
.marquee-wrap::after  { right: 0; background: linear-gradient(to left, #f8fafc, transparent); }
.marquee-wrap-dark::before { background: linear-gradient(to right, #1a0a2e, transparent); }
.marquee-wrap-dark::after  { background: linear-gradient(to left, #1a0a2e, transparent); }

@keyframes marquee     { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes marqueeRtl  { from { transform: translateX(-50%); } to { transform: translateX(0); } }

.marquee-track { animation: marquee 28s linear infinite; }
.marquee-track.marquee-rtl { animation: marqueeRtl 32s linear infinite; }

/* IT hero marquee — бегущая строка */
.it-marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
}
.it-marquee-inner {
  display: flex;
  gap: 4rem;
  width: max-content;
  will-change: transform;
  animation: marquee 25s linear infinite;
}
.it-marquee-inner span { white-space: nowrap; flex-shrink: 0; }

.cap-pill {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 10px 22px;
  border-radius: 9999px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.03);
  font-size: var(--size-cta-button, 12pt);
  font-weight: 600;
  letter-spacing: .08em;
  color: #94A3B8;
  transition: all .3s;
  cursor: default;
}
.cap-pill.active {
  border-color: rgba(126,159,191,.35);
  background: rgba(126,159,191,.08);
  color: #C8DCF0;
}

/* ── About ────────────────────────────────────────────────── */
section#about .grid > div:first-child {
  align-self: stretch;
}
section#about .about-img-wrap {
  max-height: min(70vh, 550px);
  overflow: hidden;
}
@media (min-width: 1024px) {
  section#about .about-img-wrap {
    max-height: none;
    min-height: 100%;
  }
}
section#about .about-img {
  transition: transform .9s cubic-bezier(.25,.46,.45,.94);
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
}
@media (min-width: 1024px) {
  section#about .about-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}
.about-img:hover { transform: scale(1.03); }

.swot-block {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1);
}
.swot-block.visible { opacity: 1; transform: translateY(0); }
.swot-block:nth-child(2) { transition-delay: .15s; }

.swot-vert {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  white-space: nowrap;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  min-height: 1.5em;
}

.swot-item { transition: background .3s ease; }

/* ── Contact form ─────────────────────────────────────────── */
.form-label {
  display: block;
  font-size: var(--size-form-label, 10pt);
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #94A3B8;
  margin-bottom: 6px;
}
.form-input {
  display: block;
  width: 100%;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 6px;
  padding: 11px 14px;
  font-size: var(--size-form-input, 13pt);
  font-family: var(--font-sans, inherit);
  color: white;
  outline: none;
  transition: border-color .3s ease, background .3s ease, box-shadow .3s ease;
}
.form-input::placeholder { color: rgba(255,255,255,.22); }
.form-input:focus {
  border-color: rgba(126,159,191,.5);
  background: rgba(126,159,191,.07);
  box-shadow: 0 0 0 3px rgba(126,159,191,.1);
}

/* Contact form on light background (index) */
#contacts .form-label { color: #475569; }
#contacts .form-input {
  background: #ffffff;
  border: 1px solid rgba(13,27,42,.12);
  color: #0D1B2A;
}
#contacts .form-input::placeholder { color: #94a3b8; }
#contacts .form-input:focus {
  border-color: #7E9FBF;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(126,159,191,.15);
}
#contacts textarea.form-input {
  min-height: 100px;
  resize: vertical;
}

/* Контакты — блоки на всю ширину своей колонки, не растягиваются при зуме */
#contacts .grid {
  min-height: auto;
  align-items: start;
  width: 100%;
  max-width: 100%;
}
#contacts .grid > div:first-child {
  justify-content: flex-start;
}
#contacts .grid > div:last-child {
  justify-content: flex-start;
}
#contacts .grid > div:first-child .bg-ink {
  margin-bottom: 1.5rem;
}
#contacts .grid > div:first-child > div:last-child {
  margin-top: clamp(60px, 10vw, 100px);
}

#contacts .contact-line {
  margin-bottom: clamp(60px, 10vw, 100px);
}

.submit-btn { border-radius: 4px; }
.submit-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 32px rgba(126,159,191,.25); }
.submit-btn:active { transform: translateY(0); }

.contact-line { border-bottom: 1px solid rgba(255,255,255,.06); padding-bottom: 16px; }
.contact-link { position: relative; }
.contact-link::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: #7E9FBF;
  transition: width .3s ease;
}
.contact-link:hover::after { width: 100%; }

/* ── Keyframes ────────────────────────────────────────────── */
@keyframes revealUp {
  from { opacity: 0; transform: translateY(60px) skewY(2deg); clip-path: inset(0 0 100% 0); }
  to   { opacity: 1; transform: translateY(0) skewY(0); clip-path: inset(0 0 0% 0); }
}
@keyframes fadeSlideRight {
  from { opacity: 0; transform: translateX(-24px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Premium IT / Geophysics ──────────────────────────────── */
.it-reveal, .geo-reveal, .bento-card {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .9s cubic-bezier(.16,1,.3,1), transform .9s cubic-bezier(.16,1,.3,1);
}
.it-reveal.visible, .geo-reveal.visible, .bento-card.visible {
  opacity: 1;
  transform: translateY(0);
}
.it-reveal[data-delay="1"], .geo-reveal[data-delay="1"] { transition-delay: .08s; }
.it-reveal[data-delay="2"], .geo-reveal[data-delay="2"] { transition-delay: .16s; }
.it-reveal[data-delay="3"], .geo-reveal[data-delay="3"] { transition-delay: .24s; }
.it-reveal[data-delay="4"], .geo-reveal[data-delay="4"] { transition-delay: .32s; }
.it-reveal[data-delay="5"], .geo-reveal[data-delay="5"] { transition-delay: .4s; }
.it-reveal[data-delay="6"], .geo-reveal[data-delay="6"] { transition-delay: .48s; }
.bento-card[data-delay="1"] { transition-delay: .06s; }
.bento-card[data-delay="2"] { transition-delay: .12s; }
.bento-card[data-delay="3"] { transition-delay: .18s; }
.bento-card[data-delay="4"] { transition-delay: .24s; }
.bento-card[data-delay="5"] { transition-delay: .3s; }
.bento-card[data-delay="6"] { transition-delay: .36s; }

/* IT cases layout: stable left-right split */
.it-case-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
.it-case-nav {
  min-width: 0;
  width: 100%;
}
.it-case-main {
  min-width: 0;
  width: 100%;
}

@media (min-width: 1024px) {
  .it-case-layout {
    grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
    align-items: start;
    gap: 32px;
  }
  .it-case-nav {
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    scrollbar-width: none;
  }
  .it-case-nav::-webkit-scrollbar { display: none; }
  .it-case-main { display: block !important; }
}

/* На мобильном десктопная правая панель скрыта — контент в аккордеоне */
@media (max-width: 1023px) {
  .it-case-main { display: none !important; }
}

/* Прогресс-бар: анимация заполнения */
.it-infobar-fill {
  width: 0;
  transition: width 1.2s cubic-bezier(.16,1,.3,1);
}

/* Мобильный аккордеон */
.it-mobile-panel {
  animation: itMobilePanelIn 0.35s cubic-bezier(.16,1,.3,1) both;
}
@keyframes itMobilePanelIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.it-case-tab.it-mobile-active .it-case-tab-label { color: #fff; }
/* Заголовки IT-кейсов (вкладки и панель): единый размер 22pt как h3 */
#it-case-switcher #it-case-tabs-list .it-case-tab .it-case-tab-label,
#it-case-switcher #it-case-title {
  font-size: var(--size-h3, 22pt) !important;
  line-height: 1.1;
}
#it-case-switcher #it-case-tabs-list .it-case-tab .it-case-tab-label {
  padding-left: 1.5rem !important; /* 24px — эквивалент pl-6 */
}
.it-case-tab.it-mobile-active img { border-color: rgba(255,255,255,0.25) !important; }

/* Анимация картинки аккордеона — масштабируется при уменьшении viewport */
.it-case-tab {
  min-width: 0;
}
.it-tab-img {
  max-width: 100%;
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  transition: opacity 0.25s ease;
}
.it-tab-img.hidden {
  display: none;
}

/* Активная/развёрнутая вкладка — фон как у хедера (ink), белый текст */
.it-case-tab.it-tab-expanded,
.it-case-tab.it-mobile-active,
.it-case-tab.active {
  background: #0D1B2A !important;
  border-color: #0D1B2A !important;
  color: #fff !important;
  box-shadow: 0 8px 24px rgba(13,27,42,0.25);
}
.it-case-tab.it-tab-expanded .it-case-tab-label,
.it-case-tab.it-mobile-active .it-case-tab-label,
.it-case-tab.active .it-case-tab-label {
  color: #fff !important;
  background: transparent !important;
}
.it-case-tab.active img,
.it-case-tab.it-tab-expanded img,
.it-case-tab.it-mobile-active img { border-color: rgba(255,255,255,0.25) !important; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(1deg); }
}
@keyframes pulse-glow {
  0%, 100% { opacity: .4; }
  50% { opacity: .7; }
}
@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.animate-float { animation: float 6s ease-in-out infinite; }
.animate-pulse-glow { animation: pulse-glow 3s ease-in-out infinite; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }
.scrollbar-hide::-webkit-scrollbar { display: none; }

/* ── IT websites: new 3-column dashboard ─────────────── */
@keyframes itPulseDot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(139,92,246,.55); opacity: .9; }
  50% { box-shadow: 0 0 0 8px rgba(139,92,246,0); opacity: 1; }
}
@keyframes itPulseDotWhite {
  0%, 100% { opacity: .6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.3); }
}
@keyframes itSpinnerRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.it-live-dot {
  width: 7px; height: 7px; border-radius: 999px; background: #8b5cf6;
  animation: itPulseDot 1.7s ease-in-out infinite;
}

/* SVG circle progress */
.it-orbit-ring-v2 {
  position: relative; width: fit-content; margin: 0 auto;
}
.it-progress-circle {
  transition: stroke-dashoffset 1.5s cubic-bezier(.16,1,.3,1);
}

/* Timeline styles */
.it-timeline-step {
  position: relative;
}
.it-timeline-icon {
  width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center; flex-shrink: 0;
  background: #e9d5ff; color: #a78bfa;
  transition: all 0.3s ease;
}
.it-timeline-complete .it-timeline-icon {
  background: #8b5cf6; color: white;
}
.it-timeline-active .it-timeline-icon {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  color: white; box-shadow: 0 4px 12px rgba(139,92,246,.4);
}

/* Spinner for active step */
.it-spinner {
  width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.3);
  border-top-color: white; border-radius: 50%;
  animation: itSpinnerRotate 0.8s linear infinite;
}

/* White pulse dot for chart */
.it-pulse-dot {
  animation: itPulseDotWhite 2s ease-in-out infinite;
}

/* KPI cards with charts */
.it-kpi-card {
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.it-kpi-card:hover {
  box-shadow: 0 8px 30px rgba(139,92,246,0.12);
  border-color: rgba(139,92,246,0.35);
}
.it-chart-anim {
  stroke-dasharray: 150;
  stroke-dashoffset: 150;
  animation: itChartDraw 1.2s cubic-bezier(.16,1,.3,1) 0.3s forwards;
}
@keyframes itChartDraw {
  to { stroke-dashoffset: 0; }
}

/* ── Geo seismic wave animation ───────────────────────────── */
@keyframes geoWave1 {
  0%, 100% { opacity: 0.5; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-4px); }
}
@keyframes geoWave2 {
  0%, 100% { opacity: 0.4; transform: translateY(0); }
  50% { opacity: 0.9; transform: translateY(4px); }
}
@keyframes geoWave3 {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.02); }
}
@keyframes geoPulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.25); }
}
.geo-wave { transform-origin: center; }
.geo-dot { transform-origin: center; }

/* ── Responsive tweaks ────────────────────────────────────── */
@media (max-width: 768px) {
  .text-outline { -webkit-text-stroke: 1.5px white; }
  #cursor, #cursor-dot { display: none; }
  /* Предотвращение горизонтального скролла и тёмной полосы справа */
  html, body { overflow-x: hidden; -webkit-overflow-scrolling: touch; }
  /* Отключаем transform-анимации reveal на мобильном — иначе карточки «крутятся» сами при свайпе */
  .reveal, .step-row, .swot-block, .stat-item, .svc-card,
  .it-reveal, .geo-reveal, .bento-card,
  .page-geophysics .reveal-card, .page-geophysics .reveal-step {
    transform: none !important;
    opacity: 1 !important;
    transition: none !important;
  }
  .reveal.visible, .step-row.visible { transform: none !important; }
  .page-geophysics .reveal-card.revealed, .page-geophysics .reveal-step.revealed { transform: none !important; }
  /* Главная: убираем подёргивание при скролле (smooth scroll может конфликтовать с touch) */
  html { scroll-behavior: auto; }
  section { min-width: 0; }
  /* Предотвращение обрезки текста — перенос длинных слов */
  p, .hero-sub, .about-desc {
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  /* Заголовки: без переноса по слогам (не разбивать слова), fallback для очень длинных */
  h1, h2, h3, h4, .section-tag {
    hyphens: none !important;
    -webkit-hyphens: none !important;
    -ms-hyphens: none !important;
    word-break: normal;
    overflow-wrap: break-word;
  }
  /* Grid/flex дети могут сжиматься */
  .grid > *, .flex > * { min-width: 0; }
  /* Тёмные заголовки секций — ограничение ширины */
  .bg-ink.text-white h2 { max-width: 100%; }
  /* Тёмные блоки: адаптивное уменьшение шрифта на мобильном, без переноса слов */
  .bg-ink.text-white h2,
  .bg-ink h2,
  .it-dark-block h2,
  .geo-dark-block h2,
  .page-geophysics .geo-contacts-title {
    font-size: clamp(18px, 5vw, 32px) !important;
  }
}

/* ── IT: читаемость на тёмном фоне ────────────────────────── */
.it-hero-dark h1,
.it-hero-dark h1 span:not([class*="c084fc"]):not([class*="8b5cf6"]):not([class*="a78bfa"]) { color: #fff !important; }
.it-hero-dark p { color: rgba(255, 255, 255, 0.85) !important; }
.it-hero-dark h1,
.it-hero-dark p,
.it-hero-dark a,
.it-hero-dark span {
  text-shadow: 0 2px 14px rgba(5, 2, 14, 0.65);
}

@media (max-width: 768px) {
  .it-hero-dark { padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px)) !important; }
}
section.it-dark-cta h2 { color: #fff !important; }
section.it-dark-cta p { color: rgba(203, 213, 225, 0.95) !important; }
/* IT contacts: тёмный заголовочный блок как на других страницах (ink) */
.it-dark-block {
  background: #0D1B2A !important;
}
.it-dark-block,
.it-dark-block * {
  color: #fff !important;
}

/* ── Геофизика: читаемость на тёмном фоне ────────────────── */
.geo-hero-dark h1,
.geo-hero-dark h1 span { color: #fff !important; }
.geo-hero-dark p { color: rgba(255, 255, 255, 0.85) !important; }
section.geo-dark-cta h2 { color: #fff !important; }
section.geo-dark-cta p { color: rgba(203, 213, 225, 0.95) !important; }
.geo-dark-block h2,
.geo-dark-block p,
.geo-dark-block span,
.geo-dark-block a:not(.contact-num) { color: #fff !important; }
.geo-dark-block .contact-num { color: #fff !important; }

/* ── Геофизика: тематические стили ───────────────────────── */
.geo-strata-bg {
  background-image: repeating-linear-gradient(
    180deg,
    transparent,
    transparent 2px,
    rgba(245,158,11,0.03) 2px,
    rgba(245,158,11,0.03) 4px
  );
}
.geo-section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245,158,11,0.3) 20%, rgba(245,158,11,0.3) 80%, transparent);
  opacity: 0.6;
}
.geo-timeline-line {
  background: linear-gradient(180deg, #f59e0b, #ea580c);
  width: 2px;
  border-radius: 2px;
}
.geo-card-strata {
  position: relative;
  overflow: hidden;
}
.geo-card-strata::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #f59e0b, #ea580c);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.geo-card-strata:hover::before { opacity: 1; }