/* ═══════════════════════════════════════════════════════════
   ШАПКА — ЖУРНАЛЬНЫЙ РАЗВОРОТ СО СКАЛОЙ
   ═══════════════════════════════════════════════════════════ */

:root {
  --mh-edge: clamp(18px, 1.6vw, 30px);
  --mh-inner: clamp(24px, 2.4vw, 40px);
  --mh-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

.masthead {
  display: flex;
  flex-direction: column;
  background: #f4f1eb;
  min-height: 100vh;
}

.masthead__meta {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1.2fr;
  gap: 16px;
  align-items: start;
  padding: var(--mh-edge) var(--mh-edge) calc(var(--mh-edge) + 4px);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.6rem;
  line-height: 1.4;
  letter-spacing: 0.02em;
  color: #0a0a0a;
  position: relative;
  z-index: 10;
}
.masthead__meta-cell { display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.masthead__meta-cell--right { text-align: right; }
.masthead__meta-cell:nth-child(2),
.masthead__meta-cell:nth-child(3) { text-align: center; }
.masthead__meta b { font-weight: 600; }
.masthead__meta em { font-style: italic; color: rgba(10,10,10,0.65); }
.masthead__meta span {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transform: translateX(-110%);
  animation: mhSlideIn 1.1s var(--mh-ease) forwards;
}
.masthead__meta-cell:nth-child(1) span:nth-child(1) { animation-delay: 0.10s; }
.masthead__meta-cell:nth-child(1) span:nth-child(2) { animation-delay: 0.18s; }
.masthead__meta-cell:nth-child(2) span:nth-child(1) { animation-delay: 0.14s; }
.masthead__meta-cell:nth-child(2) span:nth-child(2) { animation-delay: 0.22s; }
.masthead__meta-cell:nth-child(3) span:nth-child(1) { animation-delay: 0.18s; }
.masthead__meta-cell:nth-child(3) span:nth-child(2) { animation-delay: 0.26s; }
.masthead__meta-cell:nth-child(4) span:nth-child(1) { animation-delay: 0.22s; }
.masthead__meta-cell:nth-child(4) span:nth-child(2) { animation-delay: 0.30s; }

.masthead__rule {
  height: 1px;
  background: #0a0a0a;
  position: relative;
  z-index: 10;
  transform: scaleX(0);
  transform-origin: left;
  animation: mhLine 1.3s var(--mh-ease) 0.35s forwards;
}

.masthead__stage {
  position: relative;
  background: #050505;
  color: #f4f1eb;
  flex: 1;
  margin: var(--mh-edge);
  overflow: hidden;
  min-height: 0;
}

.masthead__rock {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 50%;
  height: 70%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  -webkit-mask-image: linear-gradient(315deg, #000 40%, transparent 85%);
  mask-image: linear-gradient(315deg, #000 40%, transparent 85%);
  animation: mhFadeIn 1.8s var(--mh-ease) 0.6s forwards;
}
.masthead__rock img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.45) contrast(1.15) saturate(0.85);
}
.masthead__rock-scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(0deg, rgba(5,5,5,0.8) 0%, transparent 60%);
}

.masthead__spine {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 1px;
  background: rgba(244,241,235,0.18);
  z-index: 1;
  transform: scaleY(0);
  transform-origin: top;
  animation: mhSpine 1.4s var(--mh-ease) 0.7s forwards;
}

.masthead__note {
  position: absolute;
  top: var(--mh-inner);
  right: var(--mh-inner);
  width: clamp(220px, 24vw, 340px);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: clamp(0.58rem, 0.7vw, 0.7rem);
  line-height: 1.55;
  color: rgba(244,241,235,0.92);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 5;
}
.masthead__note em { font-style: italic; color: rgba(244,241,235,0.6); }
.masthead__note-line { overflow: hidden; }
.masthead__note-line p {
  transform: translateX(-105%);
  animation: mhSlideIn 1.2s var(--mh-ease) forwards;
}
.masthead__note-line:nth-child(1) p { animation-delay: 0.9s; }
.masthead__note-line:nth-child(2) p { animation-delay: 1.05s; }
.masthead__note-line:nth-child(3) p { animation-delay: 1.20s; }

.masthead__status {
  position: absolute;
  left: var(--mh-inner);
  bottom: calc(var(--mh-inner) + clamp(7rem, 24vw, 24rem) + 20px);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: clamp(0.72rem, 0.9vw, 0.88rem);
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #f4f1eb;
  background: none;
  border: none;
  padding: 0;
  z-index: 6;
  opacity: 0;
  transform: translateX(-20px);
  animation: mhSlideInSoft 1s var(--mh-ease) 1.6s forwards;
}
.masthead__status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f4f1eb;
  animation: mhDot 2s ease-in-out infinite;
}
@keyframes mhDot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.masthead__title {
  position: absolute;
  left: var(--mh-inner);
  right: var(--mh-inner);
  bottom: calc(var(--mh-inner) + 18px);
  display: flex;
  flex-direction: column;
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 900;
  font-size: clamp(3rem, 12vw, 13rem);
  line-height: 0.85;
  letter-spacing: -0.05em;
  color: #f4f1eb;
  pointer-events: none;
  margin: 0;
  z-index: 5;
}
.masthead__title-row {
  display: block;
  overflow: hidden;
  padding-bottom: 0.06em;
  margin-bottom: -0.06em;
}
.masthead__title-row > span {
  display: block;
  transform: translateX(-105%);
  animation: mhSlideIn 1.4s var(--mh-ease) forwards;
}
.masthead__title-row:nth-child(1) > span { animation-delay: 0.45s; }
.masthead__title-row:nth-child(2) > span { animation-delay: 0.65s; }

.masthead__foot {
  position: absolute;
  left: var(--mh-inner);
  right: var(--mh-inner);
  bottom: var(--mh-inner);
  display: flex;
  justify-content: space-between;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.55rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(244,241,235,0.4);
  z-index: 5;
  opacity: 0;
  animation: mhFadeIn 1s ease 1.8s forwards;
}

@keyframes mhSlideIn {
  from { transform: translateX(-105%); }
  to   { transform: translateX(0); }
}
@keyframes mhSlideInSoft {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes mhLine {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
@keyframes mhSpine {
  from { transform: scaleY(0); }
  to   { transform: scaleY(1); }
}
@keyframes mhFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@media (max-width: 900px) {
  :root { --mh-edge: 14px; --mh-inner: 20px; }
  .masthead__meta {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    font-size: 0.55rem;
  }
  .masthead__meta-cell:nth-child(2),
  .masthead__meta-cell:nth-child(3) { text-align: left; }
  .masthead__meta-cell--right { text-align: left; }
  .masthead__stage { min-height: 560px; }
  .masthead__title { font-size: clamp(2.4rem, 14vw, 5rem); }
  .masthead__status {
    bottom: calc(var(--mh-inner) + clamp(5rem, 22vw, 8rem) + 16px);
    font-size: 0.66rem;
  }
  .masthead__note {
    width: clamp(180px, 55vw, 240px);
    font-size: 0.6rem;
  }
}

/* ═══════════════════════════════════════════════════════════
   ГЛОБАЛЬНЫЕ СТИЛИ
   ═══════════════════════════════════════════════════════════ */

:root {
  --color-bg: #FAFAFA;
  --color-surface: #FFFFFF;
  --color-text: #0A0A0A;
  --color-text-muted: #666666;
  --color-border: #E0E0E0;
  --color-accent: #0A0A0A;
  --color-accent-hover: #333333;

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 6rem;

  --radius-sm: 0.5rem;
  --radius-md: 1rem;
  --radius-lg: 2rem;

  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { border: none; background: none; font: inherit; cursor: pointer; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
@media (max-width: 768px) { .container { padding: 0 1.5rem; } }

/* ═══ REVEAL — со стороны (слева) ═══ */
.reveal {
  opacity: 0;
  transform: translateX(-60px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}
.reveal.in { opacity: 1; transform: translateX(0); }

.section-header.reveal.in { transition-delay: 0.05s; }
.about__text.reveal.in { transition-delay: 0.15s; }
.about__skills.reveal.in { transition-delay: 0.3s; }
.services__intro.reveal.in { transition-delay: 0.15s; }
.contacts__text.reveal.in { transition-delay: 0.15s; }
.contacts__grid.reveal.in { transition-delay: 0.3s; }

.section-header { margin-bottom: var(--spacing-lg); }
.section-number {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-sm);
}
.section-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--color-text);
}
.section-title em {
  font-style: italic;
  font-weight: 700;
  position: relative;
}
.section-title em::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0.08em;
  width: 100%;
  height: 0.06em;
  background: #999999;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1s var(--ease-out) 0.5s;
}
.reveal.in .section-title em::after { transform: scaleX(1); }

/* ═══════════════════════════════════════════════════════════
   ГЕРОЙ — ЧЕРЕЗ TRANSITION + КЛАСС in (перезапускается через JS)
   ═══════════════════════════════════════════════════════════ */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 2rem 4rem;
  position: relative;
  background: linear-gradient(180deg, #FAFAFA 0%, #F0EDE6 100%);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -20%;
  width: 70vw;
  height: 70vw;
  max-width: 900px;
  max-height: 900px;
  background: radial-gradient(circle, rgba(212, 255, 58, 0.14) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}
.hero__container {
  max-width: 900px;
  text-align: center;
  position: relative;
  z-index: 1;
}

/* стартовые состояния */
.hero__eyebrow,
.hero__subtitle,
.hero__cta,
.hero__stats {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}
.hero__title-row {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
  opacity: 0;
  transform: translateX(-100%);
  transition: opacity 1.1s var(--ease-out), transform 1.1s var(--ease-out);
}

/* финальные состояния — когда есть класс in */
.hero.in .hero__eyebrow,
.hero.in .hero__subtitle,
.hero.in .hero__cta,
.hero.in .hero__stats,
.hero.in .hero__title-row {
  opacity: 1;
  transform: translateX(0);
}

/* задержки */
.hero.in .hero__eyebrow                { transition-delay: 0.15s; }
.hero.in .hero__title-row:nth-child(1) { transition-delay: 0.3s;  }
.hero.in .hero__title-row:nth-child(2) { transition-delay: 0.5s;  }
.hero.in .hero__subtitle               { transition-delay: 0.75s; }
.hero.in .hero__cta                    { transition-delay: 0.9s;  }
.hero.in .hero__stats                  { transition-delay: 1.05s; }

/* подчёркивание у слова «сайты» */
.hero__title em {
  font-style: italic;
  font-weight: 700;
  position: relative;
  display: inline-block;
  color: var(--color-text);
}
.hero__title em::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0.05em;
  width: 100%;
  height: 0.06em;
  background: #0A0A0A;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1s var(--ease-out);
}
.hero.in .hero__title em::after {
  transform: scaleX(1);
  transition-delay: 1.4s;
}

/* стрелка «листай вниз» */
.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  opacity: 0;
  transition: opacity 1s ease;
}
.hero.in .hero__scroll {
  opacity: 1;
  transition-delay: 1.6s;
  animation: bounce 2s ease-in-out 2.6s infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(10px); }
}

/* ─── СТИЛИ ЭЛЕМЕНТОВ ГЕРОЯ ─── */
.hero__eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding: 0.5rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  margin-bottom: 2rem;
  background: rgba(255,255,255,0.6);
}

.hero__title {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.hero__subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 300;
  line-height: 1.6;
  color: var(--color-text-muted);
  margin-bottom: 3rem;
}

.hero__cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 4rem;
}

.hero__stats {
  display: flex;
  gap: 3rem;
  justify-content: center;
  flex-wrap: wrap;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}
.stat { text-align: center; }
.stat__value { font-size: 1.5rem; font-weight: 700; color: var(--color-text); margin-bottom: 0.25rem; }
.stat__label { font-size: 0.85rem; color: var(--color-text-muted); }

/* ═══ КНОПКИ ═══ */
.btn {
  display: inline-block;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 999px;
  transition: var(--transition);
  cursor: pointer;
}
.btn--primary { background: var(--color-accent); color: #FFFFFF; }
.btn--primary:hover { background: var(--color-accent-hover); transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.btn--ghost { background: transparent; color: var(--color-text); border: 1px solid var(--color-border); }
.btn--ghost:hover { border-color: var(--color-text); transform: translateY(-2px); }

/* ═══ О СЕБЕ ═══ */
.about { padding: var(--spacing-xl) 0; background: var(--color-surface); }
.about__content { display: grid; grid-template-columns: 1fr 1fr; gap: var(--spacing-lg); align-items: start; }
.about__text p { font-size: 1.1rem; line-height: 1.8; color: var(--color-text); margin-bottom: 1.5rem; }
.about__text p:last-child { margin-bottom: 0; }
.about__skills { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.skill-badge {
  padding: 0.75rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  transition: var(--transition);
}
.skill-badge:hover { border-color: var(--color-text); transform: translateY(-2px); }
@media (max-width: 768px) {
  .about__content { grid-template-columns: 1fr; gap: var(--spacing-md); }
  .about__text p { font-size: 1rem; }
}

/* ═══ УСЛУГИ ═══ */
.services { padding: var(--spacing-xl) 0; background: var(--color-bg); }
.services__intro { font-size: 1.1rem; color: var(--color-text-muted); margin-bottom: var(--spacing-lg); text-align: center; }
.services__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2rem; }

.service-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  opacity: 0;
  transform: translateX(-60px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out),
              border-color 0.3s, box-shadow 0.3s;
}
.service-card.in { opacity: 1; transform: translateX(0); }
.service-card.in:nth-child(1) { transition-delay: 0.05s; }
.service-card.in:nth-child(2) { transition-delay: 0.12s; }
.service-card.in:nth-child(3) { transition-delay: 0.19s; }
.service-card.in:nth-child(4) { transition-delay: 0.26s; }
.service-card.in:nth-child(5) { transition-delay: 0.33s; }
.service-card.in:nth-child(6) { transition-delay: 0.4s; }
.service-card:hover { border-color: var(--color-text); transform: translateX(0) translateY(-4px); box-shadow: 0 20px 40px rgba(0,0,0,0.08); }
.service-card__header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.service-card__number { font-size: 0.75rem; font-weight: 600; color: var(--color-text-muted); }
.service-card__title { font-size: 1.5rem; font-weight: 700; color: var(--color-text); }
.service-card__desc { font-size: 0.95rem; line-height: 1.6; color: var(--color-text-muted); margin-bottom: 1.5rem; }
.service-card__demo {
  width: 100%; height: 160px;
  background: var(--color-bg);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; opacity: 0.5;
  transition: var(--transition);
}
.service-card:hover .service-card__demo { opacity: 1; }

.demo-animations { flex-direction: column; gap: 1rem; position: relative; }
.demo-text { font-size: 1.2rem; font-weight: 600; opacity: 0; transform: translateY(20px); }
.service-card:hover .demo-text { animation: textFadeIn 0.6s ease-out forwards; }
@keyframes textFadeIn { to { opacity: 1; transform: translateY(0); } }
.demo-box { width: 50px; height: 50px; background: var(--color-text); border-radius: var(--radius-sm); opacity: 0; transform: scale(0.5) rotate(0deg); }
.service-card:hover .demo-box:nth-child(2) { animation: boxAppear 0.4s ease-out 0.1s forwards; }
.service-card:hover .demo-box:nth-child(3) { animation: boxAppear 0.4s ease-out 0.2s forwards; }
.service-card:hover .demo-box:nth-child(4) { animation: boxAppear 0.4s ease-out 0.3s forwards; }
@keyframes boxAppear { to { opacity: 1; transform: scale(1) rotate(360deg); } }

.demo-adaptive { gap: 1rem; justify-content: space-around; }
.device { border: 2px solid var(--color-text); border-radius: 4px; display: flex; align-items: center; justify-content: center; opacity: 0; transform: translateY(20px); }
.device.phone { width: 40px; height: 70px; border-radius: 6px; }
.device.tablet { width: 60px; height: 80px; }
.device.desktop { width: 90px; height: 60px; }
.device-screen { width: 80%; height: 70%; background: var(--color-text); opacity: 0.3; }
.service-card:hover .device.phone { animation: deviceAppear 0.4s ease-out 0.1s forwards; }
.service-card:hover .device.tablet { animation: deviceAppear 0.4s ease-out 0.2s forwards; }
.service-card:hover .device.desktop { animation: deviceAppear 0.4s ease-out 0.3s forwards; }
@keyframes deviceAppear { to { opacity: 1; transform: translateY(0); } }

.demo-landing { flex-direction: column; padding: 0; }
.landing-preview { width: 100%; height: 100%; display: flex; flex-direction: column; gap: 0.5rem; padding: 1rem; }
.landing-hero { height: 60px; background: var(--color-text); color: var(--color-bg); display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 700; border-radius: 4px; opacity: 0; transform: translateY(-20px); }
.landing-section { height: 30px; background: var(--color-border); display: flex; align-items: center; justify-content: center; font-size: 0.65rem; font-weight: 600; color: var(--color-text-muted); border-radius: 4px; opacity: 0; transform: translateX(-20px); }
.service-card:hover .landing-hero { animation: slideDown 0.4s ease-out 0.1s forwards; }
.service-card:hover .landing-section:nth-child(2) { animation: slideRight 0.4s ease-out 0.2s forwards; }
.service-card:hover .landing-section:nth-child(3) { animation: slideRight 0.4s ease-out 0.3s forwards; }
@keyframes slideDown { to { opacity: 1; transform: translateY(0); } }
@keyframes slideRight { to { opacity: 1; transform: translateX(0); } }

.demo-layout { gap: 1rem; }
.layout-layers, .layout-code { display: flex; flex-direction: column; gap: 0.5rem; }
.layer, .code-line { height: 8px; border-radius: 2px; opacity: 0; }
.layer { background: var(--color-border); }
.layer:nth-child(1) { width: 60px; }
.layer:nth-child(2) { width: 50px; }
.layer:nth-child(3) { width: 70px; }
.code-line { background: var(--color-text); }
.code-line:nth-child(1) { width: 70px; }
.code-line:nth-child(2) { width: 50px; }
.code-line:nth-child(3) { width: 60px; }
.layout-arrow { font-size: 1.5rem; font-weight: 700; opacity: 0; }
.service-card:hover .layer { animation: fadeInLeft 0.4s ease-out forwards; }
.service-card:hover .layer:nth-child(2) { animation-delay: 0.1s; }
.service-card:hover .layer:nth-child(3) { animation-delay: 0.2s; }
.service-card:hover .layout-arrow { animation: fadeIn 0.4s ease-out 0.3s forwards; }
.service-card:hover .code-line { animation: fadeInRight 0.4s ease-out 0.4s forwards; }
.service-card:hover .code-line:nth-child(2) { animation-delay: 0.5s; }
.service-card:hover .code-line:nth-child(3) { animation-delay: 0.6s; }
@keyframes fadeInLeft { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes fadeInRight { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes fadeIn { to { opacity: 1; } }

.demo-multipage { padding: 1rem; }
.sitemap { display: flex; flex-direction: column; gap: 1rem; align-items: center; }
.sitemap-node { width: 40px; height: 30px; background: var(--color-text); border-radius: 4px; opacity: 0; transform: scale(0.8); }
.sitemap-node.main { width: 60px; height: 40px; }
.sitemap-level { display: flex; gap: 0.5rem; }
.service-card:hover .sitemap-node.main { animation: nodeAppear 0.4s ease-out 0.1s forwards; }
.service-card:hover .sitemap-level .sitemap-node:nth-child(1) { animation: nodeAppear 0.4s ease-out 0.2s forwards; }
.service-card:hover .sitemap-level .sitemap-node:nth-child(2) { animation: nodeAppear 0.4s ease-out 0.3s forwards; }
.service-card:hover .sitemap-level .sitemap-node:nth-child(3) { animation: nodeAppear 0.4s ease-out 0.4s forwards; }
@keyframes nodeAppear { to { opacity: 1; transform: scale(1); } }

.demo-optimization { position: relative; }
.speedometer { width: 100px; height: 100px; position: relative; }
.speedometer-circle { width: 100%; height: 100%; transform: rotate(-90deg); }
.speedometer-circle circle { fill: none; stroke: var(--color-border); stroke-width: 8; }
.speedometer-circle circle.progress { stroke: var(--color-text); stroke-dasharray: 283; stroke-dashoffset: 283; transition: stroke-dashoffset 1.5s ease-out; }
.service-card:hover .speedometer-circle circle.progress { stroke-dashoffset: 28; }
.speedometer-value { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 2rem; font-weight: 700; opacity: 0; }
.service-card:hover .speedometer-value { animation: fadeIn 0.4s ease-out 0.5s forwards; }

@media (max-width: 768px) { .services__grid { grid-template-columns: 1fr; } }

/* ═══ ПРОЦЕСС ═══ */
.process { padding: var(--spacing-xl) 0; background: var(--color-surface); }
.process__steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; }
.process__step {
  text-align: center;
  opacity: 0;
  transform: translateX(-60px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}
.process__step.in { opacity: 1; transform: translateX(0); }
.process__step.in:nth-child(1) { transition-delay: 0.05s; }
.process__step.in:nth-child(2) { transition-delay: 0.15s; }
.process__step.in:nth-child(3) { transition-delay: 0.25s; }
.process__step.in:nth-child(4) { transition-delay: 0.35s; }
.process__step.in:nth-child(5) { transition-delay: 0.45s; }
.process__step-number {
  display: inline-flex;
  width: 50px; height: 50px;
  background: var(--color-text);
  color: var(--color-bg);
  font-size: 1.25rem;
  font-weight: 700;
  border-radius: 50%;
  align-items: center; justify-content: center;
  margin-bottom: 1rem;
}
.process__step-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.75rem; }
.process__step-desc { font-size: 0.95rem; line-height: 1.6; color: var(--color-text-muted); }
@media (max-width: 768px) { .process__steps { grid-template-columns: 1fr; } }

/* ═══ ПРИНЦИПЫ ═══ */
.principles { padding: var(--spacing-xl) 0; background: var(--color-bg); }
.principles__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; }
.principle-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 2rem;
  text-align: center;
  opacity: 0;
  transform: translateX(-60px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out),
              border-color 0.3s;
}
.principle-card.in { opacity: 1; transform: translateX(0); }
.principle-card.in:nth-child(1) { transition-delay: 0.05s; }
.principle-card.in:nth-child(2) { transition-delay: 0.15s; }
.principle-card.in:nth-child(3) { transition-delay: 0.25s; }
.principle-card.in:nth-child(4) { transition-delay: 0.35s; }
.principle-card:hover { border-color: var(--color-text); transform: translateX(0) translateY(-4px); }
.principle-card__icon {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1.6rem;
  font-weight: 300;
  letter-spacing: 0.15em;
  color: var(--color-text);
  margin-bottom: 1.2rem;
  line-height: 1;
  display: inline-block;
}
.principle-card__title { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.75rem; }
.principle-card__desc { font-size: 0.95rem; line-height: 1.6; color: var(--color-text-muted); }

/* ═══ КОНТАКТЫ ═══ */
.contacts { padding: var(--spacing-xl) 0; background: var(--color-surface); }
.contacts__content { display: grid; grid-template-columns: 1fr 2fr; gap: var(--spacing-lg); align-items: start; }
.contacts__text { font-size: 1.1rem; line-height: 1.8; color: var(--color-text-muted); }
.contacts__text p { margin-bottom: 1rem; }
.contacts__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.contact-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: var(--transition);
  cursor: pointer;
}
.contact-card:hover { border-color: var(--color-text); transform: translateY(-4px); box-shadow: 0 10px 30px rgba(0,0,0,0.08); }
.contact-card__label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}
.contact-card__value { font-size: 1rem; font-weight: 600; color: var(--color-text); }
@media (max-width: 768px) {
  .contacts__content { grid-template-columns: 1fr; }
  .contacts__grid { grid-template-columns: 1fr; }
}

/* ═══ ФУТЕР ═══ */
.footer { padding: var(--spacing-lg) 0; background: var(--color-text); color: var(--color-bg); }
.footer__content {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer__logo { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; }
.footer__tagline { font-size: 0.9rem; opacity: 0.6; }
.footer__tech { font-size: 0.9rem; opacity: 0.6; }
.footer__bottom { display: flex; justify-content: space-between; align-items: center; }
.footer__copy { font-size: 0.85rem; opacity: 0.6; }
.footer__up {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.85rem; opacity: 0.6;
  transition: var(--transition);
}
.footer__up:hover { opacity: 1; }
@media (max-width: 768px) {
  .footer__content { flex-direction: column; gap: 2rem; }
  .footer__bottom { flex-direction: column; gap: 1rem; text-align: center; }
}

/* ═══ ТОСТ ═══ */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 1rem 2rem;
  background: var(--color-text);
  color: var(--color-bg);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0;
  transition: var(--transition);
  z-index: 10000;
  pointer-events: none;
}
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }