/* Studio layout & components */

/* ——— Header ——— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 0.75rem var(--pad) 0;
  background: transparent;
  border: none;
  pointer-events: none;
}

.site-header > .studio-container {
  pointer-events: auto;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1rem 1.15rem;
  background: color-mix(in srgb, var(--ink-2) 82%, transparent);
  border: 1px solid var(--line);
  border-radius: 1.75rem;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(14px) saturate(1.15);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  transition:
    background 0.35s var(--ease),
    border-color 0.35s var(--ease),
    box-shadow 0.35s var(--ease),
    border-radius 0.3s var(--ease);
}

@supports not (background: color-mix(in srgb, white 50%, transparent)) {
  .site-header > .studio-container {
    background: var(--header-bg);
  }
}

.site-header.is-scrolled > .studio-container {
  background: var(--header-bg);
  border-color: var(--signal-border);
  box-shadow: 0 14px 40px var(--glow);
}

.site-header__inner {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.55rem;
  transition: padding-block 0.3s var(--ease);
}

.site-header.is-scrolled .site-header__inner {
  padding-block: 0.4rem;
}

.site-nav ul {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-header__cta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.site-header__cta .btn-signal {
  border-radius: 999px;
}

.site-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--mute);
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
}

.site-nav a::after {
  display: none;
}

.site-nav a:hover {
  color: var(--paper);
  background: var(--signal-soft);
}

.site-nav a[aria-current="page"] {
  color: var(--paper);
  background: var(--ink-3);
}

.site-header__mail {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--mute);
  transition: color 0.2s;
}

.site-header__mail:hover {
  color: var(--signal);
}

.mobile-menu-btn {
  display: none;
  background: var(--ink-3);
  border: 1px solid var(--line);
  color: var(--paper);
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1.125rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.mobile-menu-btn:hover {
  border-color: var(--signal);
  color: var(--signal);
}

.mobile-menu {
  display: block;
  width: 100%;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding-bottom: 0;
  padding-top: 0;
  border-top: 0 solid var(--line);
  pointer-events: none;
  transition: max-height 0.4s var(--ease), opacity 0.3s var(--ease), padding 0.3s var(--ease);
}

.mobile-menu.is-open {
  max-height: 22rem;
  opacity: 1;
  padding-bottom: 1rem;
  padding-top: 0.75rem;
  border-top-width: 1px;
  pointer-events: auto;
}

.mobile-menu ul {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.mobile-menu a {
  display: block;
  font-size: 1rem;
  font-weight: 500;
  color: var(--paper);
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-md);
  transition: color 0.2s, background 0.2s;
}

.mobile-menu a:hover {
  background: var(--signal-soft);
}

.mobile-menu a[aria-current="page"] {
  color: var(--signal);
  background: var(--signal-soft);
}

.site-header__tools {
  display: none;
  align-items: center;
  gap: 0.5rem;
}

/* When mobile drawer opens — softer card corners */
.site-header:has(.mobile-menu.is-open) > .studio-container {
  border-radius: var(--radius-xl);
}

/* Tablet+desktop: hide long email before nav gets cramped */
@media (max-width: 1100px) {
  .site-header__mail-wrap {
    display: none !important;
  }

  .site-nav ul {
    gap: 0.2rem;
  }

  .site-nav a {
    padding: 0.4rem 0.65rem;
  }
}

@media (min-width: 901px) {
  .mobile-menu,
  .mobile-menu.is-open {
    display: none !important;
    max-height: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  .site-header > .studio-container {
    border-radius: 999px;
    padding-inline: 0.85rem 0.95rem;
  }
}

/* Mobile / tablet portrait: hamburger */
@media (max-width: 900px) {
  .site-nav,
  .site-header__mail-wrap,
  .site-header__cta {
    display: none !important;
  }

  .mobile-menu-btn {
    display: inline-flex;
  }

  .site-header__tools {
    display: flex;
  }

  .site-header > .studio-container {
    border-radius: 1.35rem;
  }
}

/* ——— Hero ——— */
.hero {
  position: relative;
  display: flex;
  align-items: flex-start;
  margin-top: calc(var(--header-h) * -1);
  padding: calc(var(--header-h) + 2.75rem) 0 5.5rem;
  overflow: hidden;
  background: var(--ink);
  isolation: isolate;
}

.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse 520px 360px at 82% 18%, color-mix(in srgb, var(--signal) 18%, transparent), transparent 72%),
    radial-gradient(ellipse 440px 300px at 12% 78%, color-mix(in srgb, var(--signal) 9%, transparent), transparent 72%),
    radial-gradient(ellipse 380px 280px at 80% 20%, var(--glow), transparent 70%),
    linear-gradient(var(--pixel-gap) 1px, transparent 1px),
    linear-gradient(90deg, var(--pixel-gap) 1px, transparent 1px);
  background-size: auto, auto, auto, 28px 28px, 28px 28px;
  background-repeat: no-repeat, no-repeat, no-repeat, repeat, repeat;
  pointer-events: none;
  opacity: 0;
  animation: gridIn 1.1s var(--ease) 0.05s forwards;
}

@keyframes gridIn {
  to { opacity: 0.9; }
}

/* Soft handoff: grid only in hero, flat ink below */
.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 7.5rem;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    color-mix(in srgb, var(--ink) 55%, transparent) 45%,
    var(--ink) 100%
  );
}

#directions.section {
  background: var(--ink);
}

/* Quiet field: cells + dots (hero keeps its own dense grid + glows) */
.section--atmosphere {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--ink);
}

/* Same dense 28px grid as hero (logo / title) — continuous field for a page */
.page--pixel-field {
  position: relative;
  isolation: isolate;
  background: var(--ink);
}

.page--pixel-field::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(ellipse 520px 360px at 82% 18%, color-mix(in srgb, var(--signal) 18%, transparent), transparent 72%),
    radial-gradient(ellipse 440px 300px at 12% 78%, color-mix(in srgb, var(--signal) 9%, transparent), transparent 72%),
    radial-gradient(ellipse 380px 280px at 80% 20%, var(--glow), transparent 70%),
    linear-gradient(var(--pixel-gap) 1px, transparent 1px),
    linear-gradient(90deg, var(--pixel-gap) 1px, transparent 1px);
  background-size: auto, auto, auto, 28px 28px, 28px 28px;
  background-repeat: no-repeat, no-repeat, no-repeat, repeat, repeat;
  opacity: 0.9;
}

.page--pixel-field > * {
  position: relative;
  z-index: 1;
}

.page--pixel-field > .page-hero {
  margin-top: calc(var(--header-h) * -1);
  padding-top: calc(var(--header-h) + clamp(3.5rem, 10vw, 6rem));
  background: transparent;
}

.page--pixel-field > .section:not([class*="section--"]) {
  background: transparent;
}

.section--atmosphere::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: var(--ink);
  background-image:
    linear-gradient(color-mix(in srgb, var(--paper) 5%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--paper) 5%, transparent) 1px, transparent 1px),
    radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--paper) 12%, transparent) 1.15px, transparent 0);
  background-size:
    64px 64px,
    64px 64px,
    16px 16px;
}

.section--atmosphere > * {
  position: relative;
  z-index: 1;
}

.pixel-float {
  position: absolute;
  width: 6px;
  height: 6px;
  background: var(--signal);
  opacity: 0.28;
  pointer-events: none;
  animation: floatPixel 7s ease-in-out infinite;
}

.pixel-float:nth-child(1) { top: 18%; left: 12%; animation-delay: 0s; }
.pixel-float:nth-child(2) { top: 32%; right: 18%; width: 5px; height: 5px; animation-delay: 1.2s; opacity: 0.2; }
.pixel-float:nth-child(3) { top: 55%; left: 22%; width: 7px; height: 7px; animation-delay: 2.1s; opacity: 0.18; }
.pixel-float:nth-child(4) { bottom: 28%; right: 12%; animation-delay: 0.7s; }
.pixel-float:nth-child(5) { top: 22%; right: 38%; width: 4px; height: 4px; animation-delay: 3s; opacity: 0.22; }

@keyframes floatPixel {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  display: grid;
  gap: 1.25rem 1.5rem;
  align-items: start;
  grid-template-areas:
    "copy"
    "logo"
    "lede";
}

.hero__copy { grid-area: copy; }
.hero__logo-stage { grid-area: logo; }
.hero__lede { grid-area: lede; }

@media (min-width: 700px) {
  .hero__inner {
    grid-template-columns: 1.15fr 0.85fr;
    grid-template-areas:
      "copy logo"
      "lede logo";
    column-gap: 1.5rem;
    row-gap: 0;
    align-items: center;
  }

  .hero__logo-stage {
    align-self: center;
    justify-self: center;
  }
}

@media (min-width: 900px) {
  .hero__inner {
    grid-template-columns: 1.2fr 0.8fr;
    column-gap: 2rem;
  }
}

.hero__brand {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 5.5rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.04em;
  margin: 0;
}

.hero__lede .hero__claim {
  margin-top: 1.15rem;
}

.hero__brand .pixel-word {
  font-family: var(--font-pixel);
  font-size: 0.72em;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--signal);
  display: inline-block;
  vertical-align: baseline;
  line-height: 1.05;
  margin-top: 0.08em;
}

.hero__logo-stage {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  align-self: center;
  min-height: min(280px, 62vw);
  margin: 0;
  padding: 0;
  opacity: 0;
  animation: fadeIn 0.8s var(--ease) 0.45s forwards;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

.hero__logo-frame {
  width: min(240px, 56vw);
  aspect-ratio: 1;
  border-radius: 22%;
  background: #fff;
  padding: 5%;
  box-shadow: 0 0 0 1px var(--line), 0 12px 32px var(--glow);
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.hero__logo-frame img {
  width: 94%;
  height: 94%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.hero__logo-ring {
  position: absolute;
  inset: 50% auto auto 50%;
  width: min(290px, 68vw);
  aspect-ratio: 1;
  margin: 0;
  border: 1px dashed var(--line);
  border-radius: 26%;
  transform: translate(-50%, -50%);
  animation: spinSlow 36s linear infinite;
  pointer-events: none;
}

@keyframes spinSlow {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--line);
  background: var(--ink-2);
  border-radius: var(--radius-sm);
}

.hero__badge-dot {
  width: 8px;
  height: 8px;
  background: var(--signal);
  animation: blinkDot 1.6s steps(2) infinite;
}

@keyframes blinkDot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

.hero__claim {
  font-size: clamp(1.125rem, 2.2vw, 1.5rem);
  font-weight: 500;
  color: var(--paper);
  max-width: 34rem;
  margin: 0 0 0.75rem;
  line-height: 1.4;
}

.hero__sub {
  color: var(--mute);
  max-width: 32rem;
  margin: 0 0 2rem;
  font-size: 1rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero .clip-line > span {
  animation: clipUp 0.9s var(--ease) forwards;
}

.hero .clip-line:nth-child(1) > span { animation-delay: 0.08s; }
.hero .clip-line:nth-child(2) > span { animation-delay: 0.2s; }

.hero .clip-line > .pixel-word {
  display: block;
}

@keyframes clipUp {
  from { transform: translateY(110%); }
  to { transform: translateY(0); }
}

.hero-enter {
  opacity: 0;
  transform: translateY(14px);
  animation: heroIn 0.7s var(--ease) forwards;
  animation-delay: calc(0.32s + var(--hero-d, 0) * 0.08s);
}

@keyframes heroIn {
  to {
    opacity: 1;
    transform: none;
  }
}

/* ——— Service rows / directions ——— */
.directions-stack {
  display: grid;
  gap: 1.15rem;
}

.dir-block {
  padding: 1.35rem 1.35rem 0.85rem;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.dir-block__head {
  margin-bottom: 0.65rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line);
}

.dir-block__title {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.4vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.2;
}

.service-list {
  list-style: none;
  margin: 0;
  padding: 0.15rem 0 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.service-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.85rem 1rem;
  align-items: center;
  padding: 0.85rem 0.7rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.22s var(--ease);
}

.service-row:hover {
  background: var(--ink-3);
}

.service-row__main {
  min-width: 0;
}

.service-row__title {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  font-weight: 700;
  margin: 0 0 0.2rem;
  transition: color 0.2s;
}

.service-row:hover .service-row__title {
  color: var(--signal);
}

.service-row__desc {
  margin: 0;
  color: var(--mute);
  font-size: 0.875rem;
  line-height: 1.4;
}

.service-row__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.service-row__arrow {
  color: var(--mute);
  transition: transform 0.22s var(--ease), color 0.2s;
}

.service-row:hover .service-row__arrow {
  transform: translateX(3px);
  color: var(--signal);
}

.dir-block.reveal .service-row {
  transform: translateY(8px);
}

.dir-block.reveal.is-in .service-row {
  transform: none;
  transition: transform 0.5s var(--ease), background 0.22s var(--ease);
}

.dir-block.reveal.is-in .service-row:nth-child(1) { transition-delay: 0.04s; }
.dir-block.reveal.is-in .service-row:nth-child(2) { transition-delay: 0.1s; }
.dir-block.reveal.is-in .service-row:nth-child(3) { transition-delay: 0.16s; }
.dir-block.reveal.is-in .service-row:nth-child(4) { transition-delay: 0.22s; }
.dir-block.reveal.is-in .service-row:nth-child(5) { transition-delay: 0.28s; }

@media (max-width: 640px) {
  .dir-block {
    padding: 1.1rem 1rem 0.65rem;
  }

  .service-row {
    grid-template-columns: auto 1fr;
    gap: 0.65rem 0.75rem;
  }

  .service-row__meta {
    grid-column: 2;
    justify-content: space-between;
    width: 100%;
  }

  .service-row__icon {
    grid-row: span 2;
  }
}

/* ——— Cases ——— */
.cases-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

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

.case-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--ink);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  cursor: pointer;
  border-radius: var(--radius-lg);
}

[data-theme="light"] .case-card {
  background: var(--ink-3);
}

.case-card:hover {
  border-color: var(--signal-border);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px var(--glow);
}

.case-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #fff;
}

.case-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-hero-gallery {
  border: 1px solid var(--line);
  background: #fff;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.case-card__body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.case-card__title {
  font-size: 1.25rem;
  margin: 0;
}

.case-card__excerpt {
  color: var(--mute);
  font-size: 0.875rem;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.case-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.case-card__techs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.75rem;
  color: var(--mute);
}

.cases-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.5rem;
}

/* ——— Pricing ——— */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

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

.price-panel {
  background: var(--ink-2);
  border: 1px solid var(--line);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border-radius: var(--radius-lg);
  transition: border-color 0.3s var(--ease);
  min-width: 0;
}

.price-panel:hover {
  border-color: var(--signal-border);
}

.price-panel__title {
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  margin: 0 0 1rem;
}

.price-panel__text {
  color: var(--mute);
  margin: 0 0 1.25rem;
  font-size: 0.9375rem;
}

.price-panel__checks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-bottom: 1.5rem;
  list-style: none;
  padding: 0;
}

@media (max-width: 520px) {
  .price-panel__checks {
    grid-template-columns: 1fr;
  }
}

.price-panel__checks li {
  display: flex;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--paper);
}

.price-panel__badge {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.15rem;
  margin-bottom: 1.25rem;
  background: var(--signal-soft);
  border: 1px solid var(--signal-border);
  border-radius: var(--radius-md);
}

.price-panel__checks li::before {
  content: "";
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  margin-top: 0.45em;
  background: var(--signal);
  border-radius: 50%;
}

.price-panel__badge-label {
  font-weight: 600;
  color: var(--mute);
  font-size: 0.875rem;
}

.price-panel__badge-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--paper);
}

.price-panel .studio-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  scrollbar-width: none;
}

.price-panel .studio-table-wrap::-webkit-scrollbar {
  display: none;
}

.price-panel .studio-table {
  min-width: 32rem;
  width: max-content;
  max-width: none;
}

.price-stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
}

/* ——— Stack ——— */
.stack-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.stack-list li {
  padding: 0.55rem 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--paper);
  border: 1px solid var(--line);
  background: var(--ink-2);
  border-radius: var(--radius-sm);
}

.partner-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.5rem;
}

.partner-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border: 1px solid var(--line);
  background: var(--ink-2);
  border-radius: var(--radius-md);
  transition: border-color 0.2s, transform 0.25s var(--ease);
}

.partner-link:hover {
  border-color: var(--signal);
  transform: translateY(-2px);
}

.partner-link img {
  height: 2rem;
  width: auto;
  opacity: 0.9;
}

[data-theme="dark"] .partner-link img {
  filter: brightness(0) invert(1);
  opacity: 0.85;
}

.site-footer__brand span {
  color: var(--signal);
}

.partner-link span {
  font-size: 0.875rem;
  font-weight: 600;
}

/* ——— Automat (Bitrix24) ——— */
.automat {
  background: var(--ink-2);
}

.automat__main {
  display: flex;
  justify-content: space-between;
  gap: 3rem;
  align-items: stretch;
}

.automat__par {
  width: 100%;
  max-width: 380px;
  flex-shrink: 0;
}

.automat__par-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.automat__par-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 1.1rem 1.25rem;
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.automat__par-item.active,
.automat__par-item:hover {
  background: var(--ink-3);
  border-color: var(--signal-border);
}

.automat__par-item-main {
  display: flex;
  align-items: center;
  flex-grow: 1;
  gap: 0.65rem;
  position: relative;
}

.automat__par-item-icon {
  left: 0;
  position: absolute;
  opacity: 0;
  width: 32px;
  height: auto;
  filter: brightness(0);
  transition: opacity 0.25s var(--ease), filter 0.25s var(--ease);
}

[data-theme="dark"] .automat__par-item-icon {
  filter: brightness(0) invert(1);
}

.automat__par-item-icon_gray {
  opacity: 0.45;
}

.automat__par-item.active .automat__par-item-icon:not(.automat__par-item-icon_gray),
.automat__par-item:hover .automat__par-item-icon:not(.automat__par-item-icon_gray) {
  opacity: 0;
}

.automat__par-item.active .automat__par-item-icon_gray,
.automat__par-item:hover .automat__par-item-icon_gray {
  opacity: 0.95;
}

.automat__par-item-text {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--mute);
  margin: 0 0 0 2.75rem;
  transition: color 0.25s;
}

.automat__par-item.active .automat__par-item-text,
.automat__par-item:hover .automat__par-item-text {
  color: var(--paper);
}

.automat__par-item-arrow {
  opacity: 0;
  width: 12px;
  height: auto;
  filter: brightness(0);
  transition: opacity 0.25s var(--ease);
}

[data-theme="dark"] .automat__par-item-arrow {
  filter: brightness(0) invert(1);
}

.automat__par-item.active .automat__par-item-arrow,
.automat__par-item:hover .automat__par-item-arrow {
  opacity: 0.85;
}

.automat__info-list {
  display: grid;
  width: 100%;
  max-width: 700px;
  position: relative;
  overflow: hidden;
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.automat__info-item {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.75rem 1.85rem;
  width: 100%;
  visibility: hidden;
  background: var(--ink);
  z-index: 0;
  pointer-events: none;
}

.automat__info-item.active {
  visibility: visible;
  z-index: 1;
  pointer-events: auto;
}

.automat__info-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--paper);
  margin: 0 0 0.85rem;
  opacity: 0;
  transform: translateY(8px);
}

.automat__info-item.active .automat__info-title {
  opacity: 1;
  transform: none;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.automat__info-sublist {
  list-style: none;
  margin: 0;
  padding: 0;
}

.automat__info-subitem {
  color: var(--mute);
  line-height: 1.6;
  font-size: 0.9375rem;
  padding-left: 1.1rem;
  position: relative;
  margin-bottom: 0.45rem;
  opacity: 0;
  transform: translateY(8px);
}

.automat__info-item.active .automat__info-subitem {
  opacity: 1;
  transform: none;
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}

.automat__info-item.active .automat__info-subitem:nth-child(1) { transition-delay: 0.04s; }
.automat__info-item.active .automat__info-subitem:nth-child(2) { transition-delay: 0.08s; }
.automat__info-item.active .automat__info-subitem:nth-child(3) { transition-delay: 0.12s; }
.automat__info-item.active .automat__info-subitem:nth-child(4) { transition-delay: 0.16s; }
.automat__info-item.active .automat__info-subitem:nth-child(5) { transition-delay: 0.2s; }
.automat__info-item.active .automat__info-subitem:nth-child(6) { transition-delay: 0.24s; }
.automat__info-item.active .automat__info-subitem:nth-child(7) { transition-delay: 0.28s; }
.automat__info-item.active .automat__info-subitem:nth-child(8) { transition-delay: 0.32s; }
.automat__info-item.active .automat__info-subitem:nth-child(9) { transition-delay: 0.36s; }

.automat__info-subitem::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--signal);
}

@media (max-width: 1024px) {
  .automat__main {
    flex-direction: column;
    gap: 1.25rem;
  }

  .automat__par {
    max-width: none;
  }

  .automat__par-list {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.15rem;
    scrollbar-width: none;
  }

  .automat__par-list::-webkit-scrollbar {
    display: none;
  }

  .automat__par-item {
    width: auto;
    flex: 0 0 auto;
    padding: 0.85rem 1rem;
  }

  .automat__par-item-text {
    font-size: 0.9375rem;
    white-space: nowrap;
  }

  .automat__par-item-arrow {
    display: none;
  }

  .automat__info-list {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .automat__info-item,
  .automat__info-title,
  .automat__info-subitem,
  .automat__par-item-icon,
  .automat__par-item-arrow {
    transform: none;
    transition: none;
  }

  .automat__info-item.active .automat__info-title,
  .automat__info-item.active .automat__info-subitem {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero__logo-stage,
  .hero__grid,
  .page-hero.reveal .project-hero-gallery {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ——— Contact ——— */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

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

.contact-info {
  padding: 2rem;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.contact-info__item {
  margin-bottom: 1.5rem;
}

.contact-info__item:last-child {
  margin-bottom: 0;
}

.contact-info__label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mute);
  margin: 0 0 0.35rem;
}

.contact-info__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--paper);
  flex-shrink: 0;
  line-height: 0;
}

.contact-info__icon svg {
  width: 1.25rem;
  height: 1.25rem;
  display: block;
}

.contact-info a {
  color: var(--signal);
  font-weight: 600;
  word-break: break-all;
}

.contact-info a:hover {
  text-decoration: underline;
}

.contact-form-wrap {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.35rem, 3vw, 2rem);
  min-height: 280px;
  overflow: hidden;
}

.contact-form-wrap__head {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.contact-form-wrap__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--paper);
  line-height: 1.2;
}

.contact-form-wrap__lead {
  margin: 0.15rem 0 0;
  color: var(--mute);
  font-size: 0.9375rem;
  line-height: 1.45;
  max-width: 34rem;
}

.contact-form-wrap__body {
  min-height: 12rem;
}

/* ——— Bitrix24 inline form → site tokens ——— */
.contact-form-wrap .b24-form,
.contact-form-wrap .b24-form-wrapper {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  border-radius: 0 !important;
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  font-family: var(--font-body) !important;
  color: var(--paper) !important;
}

.contact-form-wrap .b24-form-border-bottom {
  border-bottom: none !important;
}

.contact-form-wrap .b24-form-content,
.contact-form-wrap .b24-form-header-padding,
.contact-form-wrap .b24-form-padding-side {
  padding: 0 !important;
}

.contact-form-wrap .b24-form-header-padding {
  display: none !important;
}

.contact-form-wrap .b24-form-field {
  margin-bottom: 0.75rem !important;
}

.contact-form-wrap .b24-form-control {
  background: var(--ink-2) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-sm) !important;
  color: var(--paper) !important;
  font-family: var(--font-body) !important;
  font-size: 0.9375rem !important;
  box-shadow: none !important;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.contact-form-wrap .b24-form-control:hover {
  border-color: var(--signal-border) !important;
}

.contact-form-wrap .b24-form-control:focus {
  outline: none !important;
  border-color: var(--signal) !important;
  background: var(--ink-3) !important;
  box-shadow: 0 0 0 3px var(--signal-soft) !important;
}

.contact-form-wrap .b24-form-control-label {
  color: var(--mute) !important;
  font-family: var(--font-body) !important;
  font-size: 0.8125rem !important;
}

.contact-form-wrap .b24-form-control-required {
  color: var(--signal) !important;
}

.contact-form-wrap textarea.b24-form-control {
  min-height: 6.5rem !important;
  resize: vertical;
}

.contact-form-wrap .b24-form-control-alert-message {
  color: #d97777 !important;
  font-size: 0.75rem !important;
}

.contact-form-wrap .b24-form-field-agreement {
  margin-top: 0.35rem !important;
}

.contact-form-wrap .b24-form-field-agreement .b24-form-control-desc,
.contact-form-wrap .b24-form-field-agreement-link {
  color: var(--mute) !important;
  font-size: 0.75rem !important;
  line-height: 1.45 !important;
  font-family: var(--font-body) !important;
}

.contact-form-wrap .b24-form-field-agreement-link {
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  text-decoration-color: var(--signal-border);
  transition: color 0.15s var(--ease), text-decoration-color 0.15s var(--ease);
}

.contact-form-wrap .b24-form-field-agreement-link:hover {
  color: var(--signal) !important;
  text-decoration-color: var(--signal);
}

.contact-form-wrap .b24-form-field-agreement input[type="checkbox"] {
  accent-color: var(--signal);
  width: 1rem;
  height: 1rem;
}

.contact-form-wrap .b24-form-btn-container {
  margin-top: 0.75rem !important;
}

.contact-form-wrap .b24-form-btn {
  width: 100% !important;
  height: auto !important;
  min-height: 3rem !important;
  padding: 0.85rem 1.25rem !important;
  background: var(--signal) !important;
  color: var(--signal-ink) !important;
  border: 1px solid var(--signal) !important;
  border-radius: var(--radius-md) !important;
  font-family: var(--font-body) !important;
  font-size: 0.9375rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.01em !important;
  box-shadow: none !important;
  text-transform: none !important;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.contact-form-wrap .b24-form-btn:hover,
.contact-form-wrap .b24-form-btn:focus {
  background: var(--signal-hover) !important;
  border-color: var(--signal-hover) !important;
  color: var(--signal-ink) !important;
}

.contact-form-wrap .b24-form-sign {
  display: none !important;
}

.contact-form-wrap .b24-form-state-text {
  color: var(--paper) !important;
  font-family: var(--font-body) !important;
}

.contact-form-wrap .b24-form-success-icon,
.contact-form-wrap .b24-form-loader-icon {
  color: var(--signal) !important;
}

/* ——— Bitrix24 CRM widget: removed ——— */
.b24-widget-button-wrapper,
.b24-widget-button-position-bottom-right,
[data-b24-crm-button-cont] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* ——— Bitrix24 consent / window popup ——— */
.b24-window-overlay {
  background: rgba(18, 18, 20, 0.72) !important;
  backdrop-filter: blur(6px);
}

.b24-window-popup-wrapper {
  background: var(--ink-2) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: 0 24px 64px var(--glow) !important;
  color: var(--paper) !important;
  font-family: var(--font-body) !important;
  max-width: min(560px, calc(100vw - 2rem)) !important;
  overflow: hidden !important;
}

.b24-window-popup-head {
  padding: 1.25rem 3.25rem 1rem 1.35rem !important;
  border-bottom: 1px solid var(--line) !important;
  background: transparent !important;
}

.b24-window-popup-title,
.b24-window-popup-head {
  color: var(--paper) !important;
  font-family: var(--font-display) !important;
  font-size: 1.125rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
  line-height: 1.3 !important;
}

.b24-window-popup-body {
  color: var(--mute) !important;
  font-family: var(--font-body) !important;
  font-size: 0.875rem !important;
  line-height: 1.55 !important;
  background: transparent !important;
}

.b24-window-popup-body > div {
  padding: 1rem 1.35rem 1.35rem !important;
  color: var(--mute) !important;
}

.b24-window-popup-body > div > div {
  color: var(--mute) !important;
  font-family: var(--font-body) !important;
  font-size: 0.875rem !important;
  line-height: 1.55 !important;
}

.b24-window-scrollable {
  max-height: min(70vh, 36rem) !important;
  scrollbar-width: thin;
  scrollbar-color: var(--ink-3) transparent;
}

.b24-window-scrollable::-webkit-scrollbar {
  width: 6px;
}

.b24-window-scrollable::-webkit-scrollbar-thumb {
  background: var(--ink-3);
  border-radius: 999px;
}

.b24-window-close {
  top: 1rem !important;
  right: 1rem !important;
  width: 2rem !important;
  height: 2rem !important;
  border-radius: var(--radius-sm) !important;
  background: var(--ink-3) !important;
  border: 1px solid var(--line) !important;
  opacity: 1 !important;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease) !important;
}

.b24-window-close::before,
.b24-window-close::after {
  background: var(--paper) !important;
}

.b24-window-close:hover {
  border-color: var(--signal) !important;
  background: var(--signal-soft) !important;
}

.b24-window-popup-body .b24-form-btn-container {
  padding: 1rem 0 0 !important;
  margin: 0 !important;
}

.b24-window-popup-body .b24-form-btn-block {
  display: flex !important;
  gap: 0.65rem !important;
  flex-wrap: wrap !important;
}

.b24-window-popup-body .b24-form-btn {
  flex: 1 1 10rem !important;
  height: auto !important;
  min-height: 2.85rem !important;
  padding: 0.75rem 1.1rem !important;
  background: var(--signal) !important;
  color: var(--signal-ink) !important;
  border: 1px solid var(--signal) !important;
  border-radius: var(--radius-md) !important;
  font-family: var(--font-body) !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  text-transform: none !important;
  box-shadow: none !important;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease) !important;
}

.b24-window-popup-body .b24-form-btn:hover {
  background: var(--signal-hover) !important;
  border-color: var(--signal-hover) !important;
}

.b24-window-popup-body .b24-form-btn-border,
.b24-window-popup-body .b24-form-btn-white {
  background: transparent !important;
  color: var(--paper) !important;
  border: 1px solid var(--line) !important;
}

.b24-window-popup-body .b24-form-btn-border:hover,
.b24-window-popup-body .b24-form-btn-white:hover {
  border-color: var(--signal) !important;
  color: var(--signal) !important;
  background: var(--signal-soft) !important;
}

/* Scroll hint: «Прочитайте до конца» */
.b24-form-scroll-textable {
  background: var(--ink-2) !important;
  border-top: 1px solid var(--line) !important;
  box-shadow: 0 -12px 24px var(--ink-2) !important;
  color: var(--mute) !important;
  font-family: var(--font-body) !important;
  padding: 0.85rem 1rem 1rem !important;
}

.b24-form-scroll-textable-text {
  color: var(--mute) !important;
  font-family: var(--font-body) !important;
  font-size: 0.8125rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.02em !important;
  margin: 0 0 0.35rem !important;
}

.b24-form-scroll-textable-arrow-item {
  opacity: 0.7 !important;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20viewBox%3D%220%200%2027%208%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%3E%3Cpath%20d%3D%22M1%201l12.5%206L26%201%22%20stroke%3D%22%237a9eb8%22%20stroke-width%3D%222%22%20fill%3D%22none%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22/%3E%3C/svg%3E") !important;
}

[data-theme="light"] .b24-form-scroll-textable-arrow-item {
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20viewBox%3D%220%200%2027%208%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%3E%3Cpath%20d%3D%22M1%201l12.5%206L26%201%22%20stroke%3D%22%233d7ab5%22%20stroke-width%3D%222%22%20fill%3D%22none%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22/%3E%3C/svg%3E") !important;
}

/* ——— Page hero (inner) ——— */
.page-hero {
  padding: clamp(3.5rem, 10vw, 6rem) 0 clamp(2.5rem, 5vw, 3.5rem);
}

.page-hero h1 {
  font-size: clamp(2.25rem, 6vw, 4.5rem);
  margin: 0 0 1rem;
}

.page-hero p {
  color: var(--mute);
  max-width: 36rem;
  margin: 0;
  font-size: 1.125rem;
}

.page-hero.reveal .section-label,
.page-hero.reveal h1,
.page-hero.reveal p {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.page-hero.reveal.is-in .section-label,
.page-hero.reveal.is-in h1,
.page-hero.reveal.is-in p {
  opacity: 1;
  transform: none;
}

.page-hero.reveal.is-in h1 { transition-delay: 0.07s; }
.page-hero.reveal.is-in h1 .clip-line > span { transition-delay: 0.07s; }
.page-hero.reveal.is-in p { transition-delay: 0.14s; }

.page-hero.reveal .project-hero-gallery {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.page-hero.reveal.is-in .project-hero-gallery {
  opacity: 1;
  transform: none;
  transition-delay: 0.16s;
}

/* ——— Filters sticky ——— */
.page-hero:has(+ .filters-bar) {
  padding-bottom: clamp(1.25rem, 3vw, 1.75rem);
}

.filters-bar {
  position: sticky;
  top: calc(var(--header-h) + 0.75rem);
  z-index: 40;
  padding: 0.25rem 0 1.35rem;
  background: transparent;
  border: none;
}

.filters-bar.is-stuck {
  padding-bottom: 0.9rem;
}

.filters-bar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: max-content;
  max-width: 100%;
  margin-inline: auto;
  padding: 0.55rem 0.65rem;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition:
    background 0.28s var(--ease),
    border-color 0.28s var(--ease),
    box-shadow 0.28s var(--ease),
    backdrop-filter 0.28s var(--ease);
}

.filters-bar.is-stuck .filters-bar__inner {
  background: color-mix(in srgb, var(--ink-2) 78%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-color: color-mix(in srgb, var(--paper) 14%, transparent);
  box-shadow:
    0 1px 0 color-mix(in srgb, var(--paper) 5%, transparent),
    0 16px 40px color-mix(in srgb, var(--ink) 48%, transparent);
}

.filters-bar .filter-btn {
  border-color: transparent;
  border-radius: 999px;
}

.filters-bar .filter-btn:hover {
  color: var(--paper);
  background: color-mix(in srgb, var(--paper) 6%, transparent);
  border-color: transparent;
}

.filters-bar .filter-btn.active {
  color: var(--signal-ink);
  background: var(--signal);
  border-color: var(--signal);
}

.filters-bar .filter-btn.active:hover {
  color: var(--signal-ink);
  background: var(--signal-hover);
  border-color: var(--signal-hover);
}

.filters-bar + .section {
  padding-top: clamp(1.5rem, 3.5vw, 2.5rem);
}

/* ——— Contacts page ——— */
.contact-tiles {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
}

@media (max-width: 1100px) {
  .contact-tiles {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .contact-tiles {
    grid-template-columns: 1fr;
  }
}

.contact-tile {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  padding: 1.35rem 1.35rem;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  transition: border-color 0.2s var(--ease), transform 0.25s var(--ease);
}

a.contact-tile:hover {
  border-color: var(--signal);
  transform: translateY(-2px);
}

.contact-tile__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  flex-shrink: 0;
  color: var(--paper);
  line-height: 0;
}

.contact-tile__icon svg,
.contact-tile__icon img {
  width: 1.75rem;
  height: 1.75rem;
  display: block;
  margin: 0;
  object-fit: contain;
  flex-shrink: 0;
}

.contact-tile__icon svg {
  stroke: currentColor;
}

[data-theme="dark"] .contact-tile__icon img {
  filter: brightness(0) invert(1);
}

[data-theme="light"] .contact-tile__icon img {
  filter: brightness(0);
}

.contact-tile__text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.contact-tile__label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.25;
}

.contact-tile__value {
  color: var(--mute);
  font-size: 0.875rem;
  line-height: 1.35;
  word-break: break-word;
}

.requisites {
  background: var(--ink-2);
  border: 1px solid var(--line);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border-radius: var(--radius-lg);
}

.requisites h2 {
  font-size: 1.5rem;
  margin: 0 0 1.5rem;
}

.requisites__row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.requisites__row:last-child {
  border-bottom: none;
}

@media (min-width: 640px) {
  .requisites__row {
    flex-direction: row;
    justify-content: space-between;
    gap: 2rem;
  }
}

.requisites__row:last-child {
  border-bottom: none;
}

.requisites__key {
  font-weight: 600;
  color: var(--mute);
  font-size: 0.875rem;
  min-width: 12rem;
}

.requisites__val {
  color: var(--paper);
  flex: 1;
  font-size: 0.9375rem;
}

/* ——— Footer ——— */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0;
  background: var(--ink);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.site-footer__brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
}

.site-footer__brand span {
  color: var(--signal);
}

.site-footer__copy {
  color: var(--mute);
  font-size: 0.8125rem;
}

.site-footer a {
  color: var(--mute);
  font-size: 0.875rem;
  transition: color 0.2s;
}

.site-footer a:hover {
  color: var(--signal);
}

/* ——— Cookie ——— */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: opacity 0.4s, transform 0.4s var(--ease);
}

.cookie-banner__panel {
  max-width: 72rem;
  margin: 0 var(--pad) 1.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}

.cookie-banner__text {
  flex: 1 1 12rem;
  min-width: 0;
}

.cookie-banner__text h4 {
  font-size: 1rem;
  margin: 0 0 0.35rem;
  color: var(--paper);
}

.cookie-banner__text p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--mute);
  line-height: 1.5;
}

.cookie-banner__text a {
  color: var(--signal);
}

/* ——— Post content (single) ——— */
.tech-badge {
  background: var(--ink-3);
  border: 1px solid var(--line);
  color: var(--paper);
  transition: border-color 0.2s;
  border-radius: var(--radius-sm);
}

.tech-badge:hover {
  border-color: var(--signal);
}

.post-content h2,
.post-content h3,
.post-content h4 {
  color: var(--paper);
  font-family: var(--font-display);
}

.post-content h2 {
  font-size: 1.875rem;
  margin-bottom: 1.3rem;
}

.post-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.1rem;
}

.post-content h4 {
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.post-content p {
  margin-bottom: 1rem;
  max-width: 56rem;
  color: var(--mute);
}

.post-content p,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content ul *,
.post-content ol * {
  max-width: 56rem;
}

.post-content .wp-block-image {
  width: 100%;
  margin-bottom: 2rem;
}

.post-content .wp-block-image img {
  width: 100%;
}

.post-content .wp-block-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  width: 100%;
  margin-bottom: 2rem;
}

.post-content .wp-block-gallery .wp-block-image {
  max-width: 17.5rem;
  height: 17.5rem;
  width: 100%;
  margin-bottom: 0;
}

@media (max-width: 615px) {
  .post-content .wp-block-gallery .wp-block-image {
    max-width: none;
  }
}

.post-content .wp-block-gallery img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  cursor: pointer;
}

.post-content .wp-block-list {
  list-style-type: disc;
  margin: 0 0 1rem 1.5rem;
  color: var(--mute);
}

.post-content .wp-block-table table {
  margin-bottom: 1rem;
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
}

.post-content .wp-block-table th {
  font-weight: 700;
  padding: 1rem;
  background: var(--signal);
  color: var(--signal-ink);
  border: 1px solid var(--line);
}

.post-content .wp-block-table td {
  border: 1px solid var(--line);
  padding: 1rem;
  color: var(--mute);
}

.post-content a {
  color: var(--signal);
}

.post-content hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 1.5rem 0;
}

/* ——— 404 ——— */
.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  padding: 4rem 0;
}

.error-page__code {
  font-family: var(--font-display);
  font-size: clamp(5rem, 20vw, 12rem);
  font-weight: 800;
  line-height: 1;
  color: var(--signal);
  margin: 0 0 1rem;
  letter-spacing: -0.05em;
}

.error-page__title {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  margin: 0 0 1rem;
}

.error-page__text {
  color: var(--mute);
  margin: 0 0 2rem;
}

.error-page.reveal .error-page__code,
.error-page.reveal .error-page__title,
.error-page.reveal .error-page__text,
.error-page.reveal .studio-container > div {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}

.error-page.reveal.is-in .error-page__code,
.error-page.reveal.is-in .error-page__title,
.error-page.reveal.is-in .error-page__text,
.error-page.reveal.is-in .studio-container > div {
  opacity: 1;
  transform: none;
}

.error-page.reveal.is-in .error-page__title { transition-delay: 0.08s; }
.error-page.reveal.is-in .error-page__text { transition-delay: 0.14s; }
.error-page.reveal.is-in .studio-container > div { transition-delay: 0.2s; }

/* ——— Section shells ——— */
.section {
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
}

.section--ink2 {
  background: var(--ink-2);
}

.section--border {
  /* contrast via background only — no lonely hairline dividers */
  border-block: none;
}

.section-head {
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section-head--center {
  text-align: center;
}

.section-head--center .section-lead {
  margin-inline: auto;
}

.marquee {
  overflow: hidden;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee__track {
  display: flex;
  width: max-content;
  gap: 0;
  animation: marquee 32s linear infinite;
}

.marquee__track:hover {
  animation-play-state: paused;
}

.marquee__item {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 1.1rem 2rem;
  font-family: var(--font-pixel);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--mute);
  white-space: nowrap;
  border-right: 1px solid var(--line);
  letter-spacing: 0.04em;
  transition: color 0.25s var(--ease);
}

.marquee__item:hover {
  color: var(--paper);
}

.marquee__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--signal);
  flex-shrink: 0;
  opacity: 0.9;
}

.marquee__icon svg {
  width: 1.125rem;
  height: 1.125rem;
  display: block;
}

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

.site-footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.site-footer__brand img {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 4px;
  background: #fff;
}

.error-page__code {
  font-family: var(--font-pixel) !important;
  font-size: clamp(3.5rem, 14vw, 8rem) !important;
}

/* ——— Tux Run easter egg ——— */
.tux-run {
  margin-top: 1.5rem;
  padding-top: 1.15rem;
  border-top: 1px dashed var(--line);
  user-select: none;
  -webkit-user-select: none;
}

.tux-run__chrome {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.45rem;
}

.tux-run__dot {
  width: 7px;
  height: 7px;
  border-radius: 1px;
  background: var(--ink-3);
  border: 1px solid var(--line);
}

.tux-run__dot:nth-child(1) { background: #c45c5c; border-color: transparent; }
.tux-run__dot:nth-child(2) { background: #c4a35c; border-color: transparent; }
.tux-run__dot:nth-child(3) { background: #5c9c6e; border-color: transparent; }

.tux-run__title {
  margin-left: 0.35rem;
  font-family: var(--font-pixel);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  color: var(--mute);
  text-transform: lowercase;
}

.tux-run__hi {
  margin-left: auto;
  font-family: var(--font-pixel);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  color: var(--signal);
}

.tux-run__canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 320 / 96;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #16171b;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  cursor: pointer;
  touch-action: manipulation;
  outline: none;
}

.tux-run__canvas:focus-visible {
  border-color: var(--signal);
  box-shadow: 0 0 0 3px var(--signal-soft);
}

[data-theme="light"] .tux-run__canvas {
  background: #e8eef4;
}

.tux-run.is-playing .tux-run__canvas {
  border-color: var(--signal-border);
}

.tux-run.is-dead .tux-run__canvas {
  border-color: rgba(196, 92, 92, 0.45);
}

.tux-run__hint {
  margin: 0.45rem 0 0;
  font-family: var(--font-pixel);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--mute);
  line-height: 1.45;
}

.tux-run__world {
  margin: 0.35rem 0 0;
  font-size: 0.6875rem;
  color: var(--mute);
  opacity: 0.85;
  line-height: 1.4;
}

.tux-run__world span {
  color: var(--signal);
  font-family: var(--font-pixel);
  font-variant-numeric: tabular-nums;
}

.tux-run__credit {
  margin: 0.4rem 0 0;
  font-size: 0.75rem;
  color: var(--mute);
  opacity: 0.8;
  line-height: 1.4;
}

.tux-run__credit a {
  color: var(--mute) !important;
  font-weight: 500 !important;
  word-break: normal;
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.tux-run__credit a:hover {
  color: var(--signal) !important;
  text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
  .tux-run__canvas {
    cursor: default;
  }
}

/* ——— Scrollbars: keep scroll, hide tracks ——— */
.studio-scroll-x,
.price-panel .studio-table-wrap,
.automat__par-list,
.filters-bar__inner {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.studio-scroll-x::-webkit-scrollbar,
.price-panel .studio-table-wrap::-webkit-scrollbar,
.automat__par-list::-webkit-scrollbar,
.filters-bar__inner::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* ——— Responsive polish ——— */
html {
  overflow-x: clip;
}

body {
  overflow-x: clip;
}

@media (max-width: 900px) {
  .filters-bar__inner {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-width: 100%;
    border-radius: var(--radius-md);
  }

  .filters-bar .filter-btn {
    flex: 0 0 auto;
  }

  .hero {
    padding: calc(var(--header-h) + 1.75rem) 0 3.5rem;
  }

  .hero__brand {
    font-size: clamp(2.15rem, 11vw, 3.25rem);
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__actions .btn-signal,
  .hero__actions .btn-ghost {
    width: 100%;
  }

  .cases-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .cases-actions .btn-signal,
  .cases-actions .btn-ghost {
    width: 100%;
    justify-content: center;
  }

  .contact-info {
    padding: 1.35rem;
  }

  .automat__info-item {
    padding: 1.25rem 1.15rem;
  }

  .site-footer__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .cookie-banner__panel {
    padding: 1rem 1.15rem;
    margin-bottom: 1rem;
  }

  .cookie-banner__panel .btn-signal {
    width: 100%;
  }

  .page-hero h1 {
    font-size: clamp(1.75rem, 8vw, 2.75rem);
  }

  .marquee__item {
    padding: 0.9rem 1.35rem;
    font-size: 0.9375rem;
  }

  .partner-row {
    flex-direction: column;
  }

  .partner-link {
    width: 100%;
  }
}

/* Phone only: logo under brand title */
@media (max-width: 699px) {
  .hero__logo-stage {
    justify-self: start;
    align-self: start;
    width: fit-content;
    min-height: 0;
    margin: 0.15rem 0 0.35rem;
    justify-content: center;
    padding: 0.85rem;
  }

  .hero__logo-frame {
    width: min(132px, 34vw);
  }

  .hero__logo-ring {
    width: 100%;
  }

  .hero__brand {
    margin-bottom: 0.35rem;
  }

  .hero__lede .hero__claim {
    margin-top: 0.15rem;
  }
}

@media (max-width: 640px) {
  .section {
    padding-block: clamp(2.75rem, 10vw, 4rem);
  }

  .section-title {
    font-size: clamp(1.65rem, 8vw, 2.35rem);
  }

  .section-lead {
    font-size: 1rem;
  }

  .case-card__body {
    padding: 1.15rem;
  }

  .price-panel {
    padding: 1.25rem;
  }

  .price-panel__badge-value {
    font-size: 1.25rem;
  }

  .studio-table th,
  .studio-table .table-td {
    padding: 0.65rem 0.75rem;
    font-size: 0.8125rem;
  }

  .contact-form-wrap {
    padding: 1.15rem;
  }

  .mobile-menu a {
    font-size: 1.0625rem;
  }

  .requisites__key {
    min-width: 0;
  }
}

@media (max-width: 400px) {
  .site-logo__text {
    font-size: 0.875rem;
  }

  .hero__badge {
    font-size: 0.875rem;
    padding: 0.35rem 0.55rem;
  }

  .hero__sub {
    font-size: 0.9375rem;
  }

  .service-row__title {
    font-size: 1rem;
  }

  .price-signal {
    font-size: 1rem;
  }
}

/* ——— Image lightbox (project galleries) ——— */
.image-modal {
  display: none;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0);
  z-index: 10000;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s ease, background-color 0.3s ease;
}

.image-modal.active {
  display: flex;
  opacity: 1;
  background: rgba(0, 0, 0, 0.9);
}

.image-modal-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  width: 90vw;
  height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.25s ease;
  cursor: zoom-in;
}

.image-modal.active .image-modal-content {
  opacity: 1;
}

.image-modal-content.is-zoomed {
  cursor: grab;
}

.image-modal-content.is-zoomed.is-dragging {
  cursor: grabbing;
}

.image-modal-content.is-dragging img {
  transition: none;
}

.image-modal-content img {
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0;
  cursor: inherit;
  transform-origin: center center;
  transition: opacity 0.2s ease;
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
}

.image-modal-zoom {
  position: fixed;
  top: 90px;
  left: 30px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 10001;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.image-modal.active .image-modal-zoom {
  opacity: 1;
}

.image-modal-zoom button {
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  line-height: 1;
  padding: 0;
}

.image-modal-zoom button:hover {
  background: rgba(0, 0, 0, 0.8);
}

.image-modal-zoom button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

@media (max-width: 640px) {
  .image-modal-zoom {
    top: 80px;
    left: 16px;
  }

  .image-modal-zoom button {
    width: 42px;
    height: 42px;
    font-size: 20px;
  }
}

.image-modal-title,
.image-modal-counter {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  text-align: center;
  background: rgba(0, 0, 0, 0.75);
  border-radius: 8px;
  z-index: 10001;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.image-modal-title {
  top: 80px;
  font-size: 1.25rem;
  font-weight: 600;
  padding: 12px 24px;
  max-width: calc(90vw - 40px);
  word-wrap: break-word;
}

.image-modal-counter {
  bottom: 30px;
  font-size: 1rem;
  font-weight: 500;
  padding: 10px 20px;
}

.image-modal.active .image-modal-title,
.image-modal.active .image-modal-counter {
  opacity: 1;
}

.image-modal-close,
.image-modal-prev,
.image-modal-next {
  position: fixed;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  z-index: 10001;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s, opacity 0.3s ease, transform 0.3s ease;
  opacity: 0;
  user-select: none;
}

.image-modal-close {
  top: 20px;
  right: 30px;
  font-size: 40px;
  width: 50px;
  height: 50px;
  transform: scale(1.8);
}

.image-modal.active .image-modal-close {
  opacity: 1;
  transform: scale(1);
}

.image-modal-prev,
.image-modal-next {
  top: 50%;
  transform: translateY(-50%);
  font-size: 40px;
  width: 60px;
  height: 60px;
  line-height: 1;
}

.image-modal.active .image-modal-prev,
.image-modal.active .image-modal-next {
  opacity: 1;
}

.image-modal-prev { left: 30px; }
.image-modal-next { right: 30px; }

.image-modal-prev::after {
  content: "‹";
  position: relative;
  top: -3px;
  left: -2px;
}

.image-modal-next::after {
  content: "›";
  position: relative;
  top: -3px;
  right: -2px;
}

.image-modal-close:hover,
.image-modal-prev:hover,
.image-modal-next:hover {
  background: rgba(0, 0, 0, 0.8);
}

.image-modal-prev.disabled,
.image-modal-next.disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.project-hero-gallery img,
.post-content .wp-block-gallery img,
.post-content .wp-block-image img {
  cursor: zoom-in;
}

@media (min-width: 1024px) {
  .project-hero-grid {
    grid-template-columns: 1fr 1fr !important;
  }
}
