/* ============================================
   WINTER.DESIGN — Portfolio Styles
   ============================================ */

:root {
  --color-bg: #faf7f2;
  --color-bg-alt: #f3efe8;
  --color-surface: #ffffff;
  --color-border: rgba(43, 43, 43, 0.1);
  --color-border-strong: rgba(43, 43, 43, 0.16);
  --color-text: #2b2b2b;
  --color-text-muted: #6e6e6e;
  --color-accent: #d4893a;
  --color-accent-light: #e8a04a;
  --color-accent-dark: #b86f28;
  --color-accent-soft: rgba(212, 137, 58, 0.1);
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --shadow-sm: 0 4px 20px rgba(43, 43, 43, 0.06);
  --shadow-md: 0 12px 40px rgba(43, 43, 43, 0.1);
  --shadow-lg: 0 24px 60px rgba(43, 43, 43, 0.12);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --header-h: 76px;
  --space-section: 140px;
  --space-block: 80px;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

em {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--color-accent-dark);
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  z-index: 1000;
  transition: background var(--transition), box-shadow var(--transition);
}

.header.scrolled {
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--color-border);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 1rem;
  z-index: 1001;
}

.logo__mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-style: italic;
  font-weight: 600;
  color: var(--color-accent-dark);
  background: transparent;
  border: 1.5px solid var(--color-accent);
  border-radius: 10px;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav__link {
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-muted);
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}

.nav__link:hover,
.nav__link.active {
  color: var(--color-text);
}

.nav__link--cta {
  background: var(--color-accent-soft);
  color: var(--color-accent-dark);
  border: 1px solid rgba(212, 137, 58, 0.2);
  margin-left: 8px;
}

.nav__link--cta:hover {
  background: rgba(212, 137, 58, 0.16);
  color: var(--color-accent-dark);
}

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  z-index: 1001;
}

.burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.burger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger.active span:nth-child(2) {
  opacity: 0;
}

.burger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.btn--primary {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 6px 20px rgba(212, 137, 58, 0.25);
}

.btn--primary:hover {
  background: var(--color-accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(212, 137, 58, 0.3);
}

.btn--ghost {
  border: 1.5px solid rgba(43, 43, 43, 0.32);
  color: var(--color-text);
  background: rgba(43, 43, 43, 0.03);
}

.btn--ghost:hover {
  border-color: var(--color-accent);
  color: var(--color-accent-dark);
  background: var(--color-accent-soft);
}

.btn--full {
  width: 100%;
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-h);
}

.hero__inner {
  padding: 72px 0 96px;
}

.hero__layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 72px;
  align-items: center;
}

.hero__label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent-dark);
  margin-bottom: 28px;
}

.hero__title {
  font-size: clamp(2.45rem, 5.5vw, 4.4rem);
  font-weight: 700;
  line-height: 1.11;
  letter-spacing: -0.032em;
  margin-bottom: 28px;
  max-width: 11ch;
  text-wrap: balance;
}

.hero__title em {
  font-weight: 400;
  letter-spacing: -0.01em;
}

.hero__desc {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  max-width: 520px;
  margin-bottom: 40px;
  line-height: 1.75;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 56px;
}

.hero__stats {
  display: grid;
  grid-template-columns: minmax(56px, 0.55fr) minmax(0, 1.25fr) minmax(0, 1.4fr);
  gap: 24px;
  padding-top: 26px;
  border-top: 1px solid var(--color-border);
}

.stat__num {
  display: block;
  font-size: 1.625rem;
  font-weight: 700;
  color: var(--color-text-muted);
  line-height: 1;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.stat__num--text {
  font-size: 0.875rem;
  line-height: 1.35;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.stat__label {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  opacity: 0.85;
}

/* Hero visual */
.hero__visual {
  --hero-front-depth-x: 0px;
  --hero-front-depth-y: 0px;
  --hero-back-depth-x: 0px;
  --hero-back-depth-y: 0px;
  position: relative;
  min-height: 420px;
}

.hero__preview {
  position: absolute;
  width: 78%;
  padding: 24px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.hero__preview--back {
  top: 0;
  right: 0;
  opacity: 0.4;
  filter: blur(0.6px);
  transform: rotate(4deg) scale(1.025);
  transform-origin: center;
}

.hero__preview--front {
  bottom: 0;
  left: 0;
  z-index: 1;
  box-shadow: 0 20px 55px rgba(43, 43, 43, 0.1);
  transition: transform 280ms ease, box-shadow 280ms ease;
}

.hero__preview-tag {
  display: inline-block;
  margin-bottom: 16px;
  padding: 6px 12px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-dark);
  background: var(--color-accent-soft);
  border-radius: 100px;
}

.hero__preview-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero__preview-bar {
  height: 10px;
  width: 42%;
  background: var(--color-bg-alt);
  border-radius: 100px;
  margin-bottom: 18px;
}

.hero__preview-block {
  height: 56px;
  background: var(--color-bg-alt);
  border-radius: 12px;
  margin-bottom: 14px;
}

.hero__preview-block--wide {
  height: 88px;
}

.hero__preview-image {
  display: block;
  width: 100%;
  height: 96px;
  object-fit: cover;
  object-position: top center;
  border-radius: var(--radius-md);
}

.project-card__stack.hero__preview-tags {
  min-height: 48px;
  align-items: center;
  margin-top: 14px;
}

.hero__preview-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.hero__preview--back .hero__preview-row {
  grid-template-columns: 1fr 1fr;
}

@media (hover: hover) and (pointer: fine) {
  .hero__preview--front:hover {
    transform: translateY(-2px);
  }
}

/* Sections */
.section {
  padding: var(--space-section) 0;
}

.section__tag {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--color-accent-dark);
  opacity: 0.76;
  margin-bottom: 20px;
}

.section__title {
  font-size: clamp(2rem, 3.8vw, 2.75rem);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.025em;
  max-width: 16ch;
  text-wrap: balance;
}

.section__header {
  margin-bottom: calc(var(--space-block) + 8px);
}

.section__subtitle {
  max-width: 64ch;
  margin-top: 20px;
  color: var(--color-text-muted);
  font-size: 1.0625rem;
  line-height: 1.75;
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal--delay { transition-delay: 0.12s; }
.reveal--delay-2 { transition-delay: 0.24s; }
.reveal--delay-3 { transition-delay: 0.36s; }

/* About */
.about__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 80px;
  align-items: start;
}

.about__text p {
  color: var(--color-text-muted);
  margin-bottom: 24px;
  font-size: 1.0625rem;
  line-height: 1.75;
  max-width: 54ch;
}

.about__skills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
}

.about__skills li {
  padding: 10px 18px;
  font-size: 0.875rem;
  font-weight: 500;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 100px;
  transition: border-color var(--transition), color var(--transition);
}

.about__skills li:hover {
  border-color: rgba(212, 137, 58, 0.35);
  color: var(--color-accent-dark);
}

.about__visual {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.about__card {
  padding: 36px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: box-shadow var(--transition), border-color var(--transition);
}

.about__card:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--color-border-strong);
}

.about__card--accent {
  background: linear-gradient(160deg, #fff 0%, #fdf8f1 100%);
  border-color: rgba(212, 137, 58, 0.18);
}

.about__card-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent-dark);
  margin-bottom: 14px;
}

.about__card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 10px;
  line-height: 1.3;
  text-wrap: balance;
}

.about__card p {
  color: var(--color-text-muted);
  font-size: 0.975rem;
}

/* Services */
.services {
  background: var(--color-bg-alt);
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 1fr;
  gap: 28px;
}

.service-card {
  padding: 44px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: box-shadow var(--transition), border-color var(--transition);
}

.service-card:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--color-border-strong);
}

.service-card__num {
  font-size: 2.75rem;
  font-weight: 700;
  color: rgba(212, 137, 58, 0.18);
  line-height: 1;
  margin-bottom: 20px;
}

.service-card__title {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 14px;
  text-wrap: balance;
}

.service-card__desc {
  color: var(--color-text-muted);
  font-size: 0.975rem;
  line-height: 1.65;
}

.creation__list {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.creation__list li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: var(--color-text-muted);
  font-size: 0.975rem;
  line-height: 1.65;
}

.creation__list span {
  flex-shrink: 0;
  color: var(--color-accent-dark);
  font-weight: 600;
}

/* Portfolio */
.portfolio__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 56px;
}

.filter-btn {
  padding: 11px 22px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  border-radius: 100px;
  background: var(--color-surface);
  transition: all var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  color: var(--color-accent-dark);
  border-color: rgba(212, 137, 58, 0.35);
  background: var(--color-accent-soft);
}

.portfolio__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

/* Пять карточек в 3-колоночной сетке дают незакрытый ряд из двух
   элементов, прижатых влево. Сдвигаем их к центру, чтобы ряд читался
   как осознанная композиция, а не обрыв сетки. */
@media (min-width: 1025px) {
  .portfolio__grid > .project-card:nth-child(4):nth-last-child(2) {
    grid-column: 2;
  }

  .portfolio__grid > .project-card:nth-child(7):last-child {
    grid-column: 2;
  }
}

.project-card {
  --project-card-motion: 300ms cubic-bezier(0.22, 1, 0.36, 1);
  --project-image-depth-x: 0px;
  --project-image-depth-y: 0px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  transition:
    transform var(--project-card-motion),
    box-shadow var(--project-card-motion),
    border-color var(--project-card-motion);
  cursor: pointer;
}

.project-card.hidden {
  display: none;
}

.project-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F8F6F2;
  padding: 0;
}

.project-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5a1fc4;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(123, 47, 232, 0.18);
  border-radius: 100px;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(90, 31, 196, 0.1);
  pointer-events: none;
}

.project-card__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  box-shadow: 0 3px 12px rgba(43, 43, 43, 0.08);
  transition: transform var(--project-card-motion);
}

.project-card__info {
  padding: 28px 28px 32px;
}

.project-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.project-card__tag {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent-dark);
}

.project-card__year {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  opacity: 0.75;
}

.project-card__title {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 8px;
  line-height: 1.3;
  text-wrap: balance;
}

.project-card__desc {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.55;
}

.project-card__stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.project-card__stack li {
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--color-text-muted);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 100px;
}

.portfolio .project-card__stack {
  gap: 7px;
}

.portfolio .project-card__stack li {
  padding: 5px 11px;
  font-size: 0.72rem;
  line-height: 1.4;
  letter-spacing: 0.01em;
  background: rgba(243, 239, 232, 0.72);
  border-color: rgba(43, 43, 43, 0.08);
}

.project-card__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-accent-dark);
  transition: color var(--project-card-motion);
}

.project-card__btn::after {
  content: '→';
  transition: transform var(--project-card-motion);
}

@media (hover: hover) and (pointer: fine) {
  .project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 60px rgba(43, 43, 43, 0.1);
    border-color: rgba(212, 137, 58, 0.2);
  }

  .project-card:hover .project-card__image {
    transform: scale(1.05);
  }

  .project-card--ozhivi:hover {
    transform: translateY(-6px);
    box-shadow: 0 26px 64px rgba(90, 31, 196, 0.16);
    border-color: rgba(123, 47, 232, 0.28);
  }

  .project-card--ozhivi:hover .project-card__image {
    transform: scale(1.08);
  }

  .project-card__btn:hover {
    color: var(--color-accent);
  }

  .project-card__btn:hover::after {
    transform: translateX(4px);
  }
}

@media (min-width: 1024px) and (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .hero__preview--front {
    transform: translate3d(var(--hero-front-depth-x), var(--hero-front-depth-y), 0);
    transition-duration: 220ms;
    transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
  }

  .hero__preview--front:hover {
    transform: translate3d(
      var(--hero-front-depth-x),
      calc(var(--hero-front-depth-y) - 2px),
      0
    );
  }

  .hero__preview--back {
    transform:
      translate3d(var(--hero-back-depth-x), var(--hero-back-depth-y), 0)
      rotate(4deg)
      scale(1.025);
    transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .project-card__image {
    transform: translate3d(
      var(--project-image-depth-x),
      var(--project-image-depth-y),
      0
    );
    transition-duration: 220ms;
    transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
  }

  .project-card:hover .project-card__image {
    transform:
      translate3d(
        var(--project-image-depth-x),
        var(--project-image-depth-y),
        0
      )
      scale(1.05);
  }
}

/* Process */
.process {
  background: var(--color-bg-alt);
}

.process__timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 36px;
}

.process__step {
  padding: 36px 24px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-align: left;
  transition: box-shadow var(--transition);
}

.process__step:hover {
  box-shadow: var(--shadow-sm);
}

.process__step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-accent-dark);
  background: var(--color-accent-soft);
  border-radius: 50%;
  margin-bottom: 22px;
}

.process__step h3 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 12px;
  text-wrap: balance;
}

.process__step p {
  font-size: 0.925rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* Approach */
.approach__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 28px;
}

/* Contact */
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.contact__info p {
  color: var(--color-text-muted);
  margin: 24px 0 48px;
  font-size: 1.0625rem;
  max-width: 42ch;
  line-height: 1.7;
}

.contact__details {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.contact__details li {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact__label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
}

.contact__details a {
  font-size: 1.1rem;
  color: var(--color-accent-dark);
  transition: color var(--transition);
}

.contact__details a:hover {
  color: var(--color-accent);
}

.contact__form {
  padding: 44px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.form-group {
  margin-bottom: 28px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--color-text);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 15px 16px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
  resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #9a9a9a;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(212, 137, 58, 0.14);
}

.form-group input.error,
.form-group textarea.error {
  border-color: #d45c5c;
}

.form-error {
  display: block;
  font-size: 0.8rem;
  color: #d45c5c;
  margin-top: 8px;
  min-height: 1.2em;
}

.form-success {
  text-align: center;
  margin-top: 20px;
  padding: 14px;
  font-size: 0.9rem;
  color: var(--color-accent-dark);
  background: var(--color-accent-soft);
  border-radius: var(--radius-sm);
}

#formError {
  margin-top: 16px;
  font-size: 0.9rem;
  text-align: center;
}

/* Footer */
.footer {
  padding: 48px 0;
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.logo--footer .logo__text {
  font-size: 0.95rem;
}

.footer__copy {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  opacity: 0.68;
}

.footer__socials {
  display: flex;
  gap: 12px;
}

.footer__socials a,
.footer__socials span {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 0.85rem;
  font-style: italic;
  font-weight: 600;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: var(--color-bg);
  transition: all var(--transition);
}

.footer__socials a:hover,
.footer__socials span:hover {
  color: var(--color-accent-dark);
  border-color: rgba(212, 137, 58, 0.35);
  background: var(--color-accent-soft);
}

/* ============================================
   ОЖИВИ promo (homepage)
   ============================================ */

.ozhivi-promo {
  --ozhivi-purple: #7b2fe8;
  --ozhivi-purple-dark: #5a1fc4;
  --ozhivi-purple-soft: rgba(123, 47, 232, 0.1);
  --ozhivi-pink: #ff4d8d;
  padding-top: calc(var(--space-section) - 24px);
  padding-bottom: calc(var(--space-section) - 24px);
}

.ozhivi-promo__card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(28px, 4vw, 52px);
  align-items: center;
  padding: clamp(32px, 4.5vw, 48px) clamp(24px, 4vw, 48px);
  background:
    radial-gradient(ellipse 55% 70% at 92% 42%, rgba(123, 47, 232, 0.2) 0%, transparent 58%),
    radial-gradient(ellipse 45% 55% at 8% 20%, rgba(255, 77, 141, 0.1) 0%, transparent 55%),
    radial-gradient(circle at 40% 100%, rgba(123, 47, 232, 0.08) 0%, transparent 45%),
    linear-gradient(155deg, #ffffff 0%, #f4efff 48%, #ebe3ff 100%);
  border: 1px solid rgba(123, 47, 232, 0.2);
  border-radius: var(--radius-lg);
  box-shadow:
    0 22px 56px rgba(90, 31, 196, 0.12),
    0 8px 24px rgba(43, 43, 43, 0.05);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}

.ozhivi-promo__card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, transparent 35%, rgba(255, 255, 255, 0.35) 50%, transparent 65%);
  opacity: 0.45;
}

.ozhivi-promo__card:hover {
  box-shadow:
    0 28px 64px rgba(90, 31, 196, 0.16),
    0 10px 28px rgba(43, 43, 43, 0.06);
}

.ozhivi-promo__badge {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ozhivi-purple-dark);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(123, 47, 232, 0.2);
  border-radius: 100px;
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 18px rgba(90, 31, 196, 0.1);
}

.ozhivi-promo__content {
  position: relative;
  z-index: 1;
}

.ozhivi-promo__tag {
  margin-bottom: 14px;
  color: var(--ozhivi-purple-dark);
  opacity: 0.82;
}

.ozhivi-promo__title {
  font-size: clamp(3.4rem, 8vw, 5.6rem);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: 0.02em;
  margin-bottom: 20px;
  color: #1a1228;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .ozhivi-promo__title {
    background: linear-gradient(135deg, #160f24 0%, var(--ozhivi-purple-dark) 48%, var(--ozhivi-purple) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.ozhivi-promo__text {
  max-width: 42ch;
  margin-bottom: 16px;
  color: var(--color-text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.ozhivi-promo__note {
  max-width: 28ch;
  margin-bottom: 28px;
  color: var(--ozhivi-purple-dark);
  font-family: var(--font-sans);
  font-size: clamp(1.15rem, 2.1vw, 1.35rem);
  font-style: normal;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.4;
}

.ozhivi-promo__btn {
  padding: 16px 34px;
  font-size: 1rem;
  background: linear-gradient(135deg, var(--ozhivi-purple) 0%, #9b4dff 55%, #b56bff 120%);
  background-size: 150% 150%;
  border-color: transparent;
  box-shadow: 0 12px 32px rgba(123, 47, 232, 0.34);
}

.ozhivi-promo__btn:hover {
  background-position: 100% 50%;
  background: linear-gradient(135deg, var(--ozhivi-purple-dark) 0%, var(--ozhivi-purple) 100%);
  box-shadow: 0 16px 40px rgba(123, 47, 232, 0.42);
  transform: translateY(-2px);
}

.ozhivi-promo__visual {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.68fr) auto minmax(0, 1.2fr);
  gap: 6px;
  align-items: center;
  min-width: 0;
  transition: transform var(--transition);
}

.ozhivi-promo__card:hover .ozhivi-promo__visual {
  transform: translateY(-4px);
}

.ozhivi-promo__print {
  position: relative;
  min-width: 0;
  max-width: 168px;
  justify-self: end;
  margin-right: 4px;
  transform: rotate(-5deg);
  transition: transform var(--transition), filter var(--transition), opacity var(--transition);
  opacity: 0.88;
  filter: saturate(0.9);
}

.ozhivi-promo__card:hover .ozhivi-promo__print {
  transform: rotate(-3deg) scale(0.98);
  opacity: 0.75;
  filter: saturate(0.7) grayscale(0.15);
}

.ozhivi-promo__print img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 28px rgba(43, 43, 43, 0.12);
}

.ozhivi-promo__bridge {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 48px;
  flex-shrink: 0;
  overflow: visible;
}

.ozhivi-promo__trail {
  position: absolute;
  left: 4%;
  right: 4%;
  top: 50%;
  height: 2px;
  transform: translateY(-50%);
  border-radius: 100px;
  background: linear-gradient(
    90deg,
    rgba(123, 47, 232, 0) 0%,
    rgba(123, 47, 232, 0.35) 22%,
    rgba(255, 77, 141, 0.55) 55%,
    rgba(255, 255, 255, 0.7) 78%,
    rgba(155, 77, 255, 0) 100%
  );
  filter: blur(0.4px);
  opacity: 0.85;
}

.ozhivi-promo__trail::before,
.ozhivi-promo__trail::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.95) 0%, rgba(155, 77, 255, 0.55) 42%, transparent 72%);
  filter: blur(0.5px);
  animation: ozhivi-promo-stream 2.4s ease-in-out infinite;
}

.ozhivi-promo__trail::before {
  left: 18%;
  animation-delay: 0s;
}

.ozhivi-promo__trail::after {
  left: 18%;
  width: 7px;
  height: 7px;
  animation-delay: 1.2s;
}

.ozhivi-promo__particle {
  position: absolute;
  top: 50%;
  left: 8%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, var(--ozhivi-purple) 48%, transparent 78%);
  opacity: 0;
  pointer-events: none;
  animation: ozhivi-promo-stream 2.8s ease-in-out infinite;
}

.ozhivi-promo__particle--1 {
  width: 5px;
  height: 5px;
  margin-top: -8px;
  animation-delay: 0.15s;
}

.ozhivi-promo__particle--2 {
  width: 3px;
  height: 3px;
  margin-top: 6px;
  animation-delay: 0.55s;
  background: radial-gradient(circle, #fff 0%, var(--ozhivi-pink) 50%, transparent 78%);
}

.ozhivi-promo__particle--3 {
  width: 4px;
  height: 4px;
  margin-top: -2px;
  animation-delay: 0.95s;
}

.ozhivi-promo__particle--4 {
  width: 3px;
  height: 3px;
  margin-top: 10px;
  animation-delay: 1.35s;
  background: radial-gradient(circle, #fff 0%, #9b4dff 50%, transparent 78%);
}

.ozhivi-promo__particle--5 {
  width: 4px;
  height: 4px;
  margin-top: -12px;
  animation-delay: 1.75s;
  background: radial-gradient(circle, #fff 0%, var(--ozhivi-pink) 45%, transparent 78%);
}

.ozhivi-promo__particle--6 {
  width: 2px;
  height: 2px;
  margin-top: 2px;
  animation-delay: 2.1s;
}

@keyframes ozhivi-promo-stream {
  0% {
    transform: translate(0, -50%) scale(0.55);
    opacity: 0;
  }
  18% {
    opacity: 0.85;
  }
  55% {
    transform: translate(34px, -50%) scale(1);
    opacity: 0.95;
  }
  100% {
    transform: translate(58px, -50%) scale(0.35);
    opacity: 0;
  }
}

.ozhivi-promo__phone-wrap {
  position: relative;
  justify-self: start;
  margin-left: 6px;
  width: min(100%, 204px);
  min-width: 0;
}

.ozhivi-promo__glow {
  position: absolute;
  inset: 4% -18% -8%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(123, 47, 232, 0.42) 0%, rgba(255, 77, 141, 0.16) 42%, transparent 70%);
  filter: blur(10px);
  pointer-events: none;
  z-index: 0;
  animation: ozhivi-promo-glow 3.6s ease-in-out infinite;
}

@keyframes ozhivi-promo-glow {
  0%, 100% { opacity: 0.7; transform: scale(0.96); }
  50% { opacity: 1; transform: scale(1.04); }
}

.ozhivi-promo__phone {
  position: relative;
  z-index: 1;
  padding: 12px;
  background: linear-gradient(160deg, #2e2e38 0%, #101016 100%);
  border-radius: 32px;
  box-shadow:
    0 24px 52px rgba(26, 26, 31, 0.34),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 0 28px rgba(123, 47, 232, 0.22);
  transition: box-shadow var(--transition), transform var(--transition);
}

.ozhivi-promo__card:hover .ozhivi-promo__phone {
  transform: scale(1.03);
  box-shadow:
    0 28px 60px rgba(90, 31, 196, 0.34),
    0 0 0 1px rgba(155, 77, 255, 0.22) inset,
    0 0 36px rgba(123, 47, 232, 0.32);
}

.ozhivi-promo__phone::before {
  content: '';
  display: block;
  width: 48px;
  height: 5px;
  margin: 0 auto 10px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.16);
}

.ozhivi-promo__screen {
  position: relative;
  overflow: hidden;
  aspect-ratio: 9 / 16;
  border-radius: 22px;
  background: #050509;
  box-shadow: 0 0 0 1px rgba(155, 77, 255, 0.18);
}

.ozhivi-promo__screen::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, transparent 28%, transparent 70%, rgba(123, 47, 232, 0.12) 100%);
}

.ozhivi-promo__screen img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 8px;
}

.ozhivi-promo__label {
  display: block;
  margin-top: 12px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  color: var(--color-text-muted);
}

.ozhivi-promo__label--live {
  color: var(--ozhivi-purple-dark);
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 1024px) {
  .ozhivi-promo__card {
    grid-template-columns: 1fr;
    gap: 36px;
    padding-top: clamp(48px, 8vw, 56px);
  }

  .ozhivi-promo__visual {
    max-width: 460px;
    margin: 0 auto;
  }

  .ozhivi-promo__print {
    justify-self: center;
    max-width: 160px;
  }

  .ozhivi-promo__bridge {
    width: 48px;
    height: 64px;
    transform: rotate(90deg);
  }

  .ozhivi-promo__phone-wrap {
    width: min(100%, 190px);
    justify-self: center;
    margin-left: 0;
  }

  .ozhivi-promo__print {
    margin-right: 0;
  }

  .ozhivi-promo__badge {
    top: 14px;
    right: 14px;
  }
  .hero__layout {
    grid-template-columns: 1fr;
    gap: 56px;
  }

  .hero__visual {
    width: 100%;
    min-height: 340px;
    max-width: 520px;
    margin: 0 auto;
  }

  .hero__title {
    max-width: none;
  }

  .about__grid,
  .contact__grid {
    grid-template-columns: 1fr;
    gap: 56px;
  }

  .portfolio__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
  }

  .portfolio__grid > .project-card:nth-child(5):last-child,
  .portfolio__grid > .project-card:nth-child(7):last-child {
    grid-column: 1 / -1;
    max-width: 460px;
    margin: 0 auto;
  }

  .process__timeline {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --space-section: 96px;
    --space-block: 56px;
  }

  .ozhivi-promo__card {
    padding: 52px 20px 28px;
    gap: 28px;
  }

  .ozhivi-promo__title {
    font-size: clamp(2.8rem, 14vw, 3.8rem);
  }

  .ozhivi-promo__note {
    max-width: none;
  }

  .ozhivi-promo__visual {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 6px;
    max-width: 100%;
  }

  .ozhivi-promo__print {
    max-width: 120px;
  }

  .ozhivi-promo__bridge {
    width: 36px;
    height: 52px;
  }

  .ozhivi-promo__phone-wrap {
    width: min(100%, 160px);
  }

  .ozhivi-promo__badge {
    top: 12px;
    right: 12px;
    left: 12px;
    width: max-content;
    max-width: calc(100% - 24px);
    margin-left: auto;
    padding: 7px 12px;
    font-size: 0.62rem;
  }

  .ozhivi-promo__btn {
    width: 100%;
  }

  .container {
    padding: 0 24px;
  }

  .burger {
    display: flex;
    position: relative;
    flex-shrink: 0;
    z-index: 1002;
  }

  .nav {
    position: fixed;
    top: var(--header-h);
    right: 0;
    bottom: 0;
    left: 0;
    width: auto;
    min-height: calc(100vh - var(--header-h));
    min-height: calc(100dvh - var(--header-h));
    padding: 24px;
    background: rgba(250, 247, 242, 0.98);
    backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    overscroll-behavior: contain;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 1000;
    transition: opacity var(--transition), visibility var(--transition);
  }

  .nav.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .header.menu-open {
    background: rgba(250, 247, 242, 0.98);
    backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 var(--color-border);
  }

  .nav__list {
    flex-direction: column;
    gap: 4px;
    width: 100%;
    max-width: 320px;
    text-align: center;
  }

  .nav__link {
    font-size: 1.15rem;
    padding: 14px 28px;
  }

  .nav__link--cta {
    margin-left: 0;
    margin-top: 8px;
  }

  .hero__inner {
    padding: 48px 0 72px;
  }

  .hero__stats {
    gap: 24px;
  }

  .services__grid {
    grid-template-columns: 1fr;
  }

  .portfolio__grid {
    grid-template-columns: 1fr;
  }

  .process__timeline {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .approach__grid {
    grid-template-columns: 1fr;
  }

  .footer__inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero__title {
    line-height: 1.13;
    letter-spacing: -0.025em;
  }

  .hero__actions {
    flex-direction: column;
  }

  .hero__actions .btn {
    width: 100%;
  }

  .hero__stats {
    grid-template-columns: minmax(72px, 0.65fr) minmax(0, 1.35fr);
    gap: 16px;
  }

  .hero__stats .stat:last-child {
    grid-column: 1 / -1;
  }

  .stat__num {
    font-size: 1.75rem;
  }

  .stat__num--text {
    font-size: 0.8125rem;
  }

  .section__title {
    line-height: 1.16;
  }

  .section__subtitle,
  .about__text p,
  .contact__info p {
    font-size: 1rem;
    line-height: 1.72;
  }

  .contact__form {
    padding: 28px 22px;
  }
}

@media (max-width: 360px) {
  :root {
    --header-h: 68px;
    --space-section: 80px;
    --space-block: 48px;
  }

  .container {
    padding: 0 16px;
  }

  .logo__text {
    font-size: 0.9rem;
  }

  .logo__mark {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
  }

  .hero__title {
    font-size: 2rem;
    margin-bottom: 20px;
  }

  .hero__desc {
    font-size: 1rem;
    margin-bottom: 32px;
  }

  .hero__visual {
    min-height: 280px;
  }

  .hero__preview {
    padding: 18px;
    width: 86%;
  }

  .hero__preview-tag {
    margin-bottom: 10px;
  }

  .hero__preview-title {
    margin-bottom: 16px;
  }

  .project-card__stack.hero__preview-tags {
    min-height: 44px;
    margin-top: 12px;
  }

  .section__title {
    font-size: 1.75rem;
  }

  .portfolio__filters {
    gap: 8px;
    margin-bottom: 40px;
  }

  .filter-btn {
    padding: 9px 16px;
    font-size: 0.82rem;
  }

  .project-card__info {
    padding: 22px 20px 26px;
  }

  .service-card {
    padding: 32px 24px;
  }

  .about__card {
    padding: 28px 24px;
  }

  .btn {
    padding: 14px 22px;
    font-size: 0.9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .ozhivi-promo__card:hover .ozhivi-promo__visual,
  .ozhivi-promo__card:hover .ozhivi-promo__print,
  .ozhivi-promo__card:hover .ozhivi-promo__phone {
    transform: none;
  }

  .ozhivi-promo__particle,
  .ozhivi-promo__trail::before,
  .ozhivi-promo__trail::after,
  .ozhivi-promo__glow {
    animation: none !important;
  }

  .ozhivi-promo__particle {
    opacity: 0.55;
    transform: none;
  }

  .ozhivi-promo__particle--1 { left: 18%; }
  .ozhivi-promo__particle--2 { left: 34%; }
  .ozhivi-promo__particle--3 { left: 50%; }
  .ozhivi-promo__particle--4 { left: 66%; }
  .ozhivi-promo__particle--5 { left: 78%; }
  .ozhivi-promo__particle--6 { left: 88%; }

  .ozhivi-promo__glow {
    opacity: 0.75;
  }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   404 Error Page
   ============================================ */
.error-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.error-page__main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 0 72px;
}

.error-page__inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 560px;
}

.error-page__logo {
  margin-bottom: 56px;
}

.error-page__code {
  font-family: var(--font-serif);
  font-size: clamp(5rem, 18vw, 8.5rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--color-text-muted);
  opacity: 0.22;
  margin-bottom: 24px;
  user-select: none;
}

.error-page__title {
  font-size: clamp(1.85rem, 4.5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.025em;
  margin-bottom: 20px;
  max-width: 18ch;
  text-wrap: balance;
}

.error-page__text {
  font-size: 1.0625rem;
  color: var(--color-text-muted);
  line-height: 1.75;
  max-width: 46ch;
  margin-bottom: 36px;
}

@media (max-width: 768px) {
  .error-page__main {
    padding: 40px 0 56px;
  }

  .error-page__logo {
    margin-bottom: 44px;
  }

  .error-page__code {
    margin-bottom: 20px;
  }

  .error-page__text {
    margin-bottom: 32px;
  }
}

@media (max-width: 480px) {
  .error-page__main {
    padding: 32px 0 48px;
  }

  .error-page__logo {
    margin-bottom: 36px;
  }
}
