/* АРТ Групп — монохромная тёмная тема, mobile-first fluid */

:root {
  --color-bg: #0a0a0a;
  --color-surface: #141414;
  --color-elevated: #1c1c1c;
  --color-border: #3f3f3f;
  --color-border-strong: #525252;
  --color-text: #f5f5f5;
  --color-muted: #a3a3a3;
  --color-subtle: #737373;
  --focus-ring: #e5e5e5;
  --gutter: clamp(1rem, 4vw, 2rem);
  --container-max: 72rem;
  --font-sans:
    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 0.5rem;
  --radius-lg: 0.75rem;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* Якоря и нижний бар in-app Safari */
  scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 4.5rem);
  scroll-padding-bottom: max(1rem, env(safe-area-inset-bottom, 0px));
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  font-family: var(--font-sans);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.0625rem);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-text);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--color-muted);
}

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--color-text);
  color: var(--color-bg);
  font-weight: 600;
  border-radius: var(--radius);
}

.skip-link:focus {
  left: var(--gutter);
  top: var(--gutter);
}

.container {
  width: min(100% - 2 * var(--gutter), var(--container-max));
  margin-inline: auto;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  /* In-app Safari / вырез: контент шапки ниже safe-area */
  padding-top: env(safe-area-inset-top, 0px);
  /* Без backdrop-filter: иначе position:fixed у мобильного меню привязывается к шапке и «уезжает» */
  background: color-mix(in srgb, var(--color-bg) 96%, transparent);
  border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
  position: relative;
  display: flex;
  flex-direction: row;
  /* nowrap: иначе в iOS WebView телефон и бургер могут уезжать на вторую строку */
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-block: clamp(0.75rem, 2vw, 1rem);
  min-width: 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  text-decoration: none;
  min-width: 0;
  flex-shrink: 1;
}

.logo__text {
  display: inline-block;
  font-size: clamp(1rem, 0.75rem + 1vw, 1.3rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.04em;
  color: var(--color-text);
  transition: opacity 0.2s ease;
}

.logo:hover .logo__text {
  opacity: 0.88;
}

.site-header__toolbar {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
  flex-shrink: 0;
}

.site-header__phone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  color: var(--color-text);
  text-decoration: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease;
}

.site-header__phone img {
  width: 1.5rem;
  height: 1.5rem;
}

@media (hover: hover) and (pointer: fine) {
  .site-header__phone:hover {
    color: var(--color-text);
    border-color: var(--color-border-strong);
  }
}

.site-header__phone:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
}

.site-header__menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  color: var(--color-text);
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
  .site-header__menu-btn:hover {
    border-color: var(--color-border-strong);
  }
}

.site-header__menu-btn:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
}

.site-header__burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 1.25rem;
}

.site-header__burger > span {
  display: block;
  height: 2px;
  width: 100%;
  background: currentColor;
  border-radius: 1px;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.site-header.is-nav-open .site-header__burger > span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-header.is-nav-open .site-header__burger > span:nth-child(2) {
  opacity: 0;
}

.site-header.is-nav-open .site-header__burger > span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-header__backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease;
  pointer-events: none;
}

.site-header.is-nav-open .site-header__backdrop {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.site-nav {
  position: fixed;
  inset: 0;
  z-index: 51;
  width: 100%;
  max-width: none;
  flex-basis: auto;
  order: 3;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  backdrop-filter: none;
  display: block;
  pointer-events: none;
  overflow: visible;
}

.site-nav__sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: min(88vh, 32rem);
  max-height: min(88dvh, 32rem);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--color-surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: 0 -16px 48px rgba(0, 0, 0, 0.5);
  padding: 1.125rem var(--gutter)
    calc(1.25rem + env(safe-area-inset-bottom, 0px));
  transform: translate3d(0, 100%, 0);
  opacity: 0;
  visibility: hidden;
  transition:
    transform 0.3s cubic-bezier(0.32, 0.72, 0, 1),
    opacity 0.22s ease,
    visibility 0.22s ease;
  pointer-events: none;
}

.site-header.is-nav-open .site-nav {
  pointer-events: none;
}

.site-header.is-nav-open .site-nav__sheet {
  transform: translate3d(0, 0, 0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.site-nav__geolocation {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}

.site-nav__geo-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: fit-content;
  max-width: 100%;
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-text);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

.site-nav__geo-link-icon {
  flex-shrink: 0;
  display: block;
}

.site-nav__phone-block {
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}

.site-nav__phone-number {
  display: block;
  width: fit-content;
  max-width: 100%;
  font-weight: 600;
  font-size: 1.0625rem;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  color: var(--color-text);
}

.site-nav__phone-info {
  margin-top: 0.25rem;
  font-size: 0.8125rem;
  color: var(--color-muted);
  line-height: 1.4;
}

.site-nav__list {
  list-style: none;
  list-style-type: none;
  margin: 0;
  padding: 0.25rem 0 0;
  padding-inline-start: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.site-nav__list > li {
  list-style: none;
  list-style-type: none;
  margin: 0;
  padding: 0;
}

.site-nav__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 52px;
  padding: 0.35rem 0;
  font-weight: 500;
  text-decoration: none;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
  transition: color 0.2s ease;
}

.site-nav li:last-child .site-nav__item {
  border-bottom: none;
}

.site-nav__item-icon {
  display: flex;
  flex-shrink: 0;
}

.site-nav__item-icon svg {
  display: block;
}

.site-nav__item-label {
  flex: 1;
  min-width: 0;
}

.site-nav__item-arrow {
  flex-shrink: 0;
  margin-left: auto;
  width: 1.25rem;
  height: 1.25rem;
}

@media (hover: hover) and (pointer: fine) {
  .site-nav__item:hover {
    color: var(--color-text);
  }

  .site-nav__phone-number:hover {
    color: var(--color-muted);
  }

  .site-nav__geo-link:hover {
    color: var(--color-muted);
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header__burger > span {
    transition: none;
  }

  .site-header__backdrop,
  .site-nav__sheet {
    transition: none;
  }
}

@media (min-width: 40rem) {
  .site-header__menu-btn {
    display: none;
  }

  .site-header__inner {
    flex-wrap: nowrap;
    justify-content: flex-start;
  }

  .logo {
    order: 1;
  }

  .site-header__toolbar {
    order: 3;
    margin-left: 0;
    gap: 0;
  }

  .site-header__backdrop {
    display: none !important;
  }

  .site-nav {
    position: static;
    inset: auto;
    z-index: auto;
    display: flex !important;
    width: auto;
    flex-basis: auto;
    order: 2;
    margin: 0 0 0 auto;
    padding: 0;
    pointer-events: auto;
    overflow: visible;
  }

  .site-nav__sheet {
    position: static;
    display: contents;
    max-height: none;
    overflow: visible;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: none;
  }

  .site-header.is-nav-open .site-nav__sheet {
    transform: none;
  }

  .site-nav__geolocation,
  .site-nav__phone-block {
    display: none !important;
  }

  .site-nav__list {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem 1.25rem;
    padding: 0;
  }

  .site-nav__item {
    display: inline-flex;
    min-height: 0;
    padding: 0.35rem 0.25rem;
    border-bottom: 1px solid transparent;
    gap: 0;
  }

  .site-nav__item-icon,
  .site-nav__item-arrow {
    display: none !important;
  }

  @media (hover: hover) and (pointer: fine) {
    .site-nav__item:hover {
      border-bottom-color: var(--color-border-strong);
    }
  }

  .site-nav li:last-child .site-nav__item {
    border-bottom: 1px solid transparent;
  }
}

/* Hero */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.hero__media {
  position: relative;
  z-index: 0;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: min(42vh, 17.5rem);
  min-height: 11rem;
  overflow: hidden;
  flex-shrink: 0;
  isolation: isolate;
}

.hero__picture {
  display: none;
}

.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.hero__slideshow {
  position: absolute;
  inset: 0;
  display: block;
  pointer-events: none;
}

.hero__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
  opacity: 0;
  z-index: 1;
  transition: opacity 0.45s ease;
}

.hero__slide.is-active {
  opacity: 1;
  z-index: 2;
}

@media (prefers-reduced-motion: reduce) {
  .hero__slide {
    transition: none;
  }

  .hero__slideshow .hero__slide:not(.is-active) {
    display: none;
  }

  .hero__slideshow .hero__slide.is-active {
    opacity: 1;
  }
}

.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.78) 0%,
    rgba(0, 0, 0, 0.42) 36%,
    rgba(0, 0, 0, 0.14) 62%,
    transparent 100%
  );
}

.hero__logo-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 4;
  width: clamp(8.5rem, 28vw, 15rem);
  height: auto;
  transform: translate(-50%, -50%);
  pointer-events: none;
  user-select: none;
  opacity: 0.5;
}

.hero__content {
  position: relative;
  z-index: 2;
  align-self: stretch;
  padding-top: clamp(1.25rem, 4vw, 1.75rem);
  padding-bottom: clamp(1.75rem, 5vw, 2.5rem);
  background: var(--color-bg);
}

@media (min-width: 40rem) {
  .hero__slideshow {
    display: none;
  }

  .hero__picture {
    display: contents;
  }

  .hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(clamp(26rem, 75vh, 44rem), auto);
    min-height: clamp(26rem, 75vh, 44rem);
  }

  .hero__media {
    grid-area: 1 / 1;
    align-self: stretch;
    width: 100%;
    min-height: 0;
    aspect-ratio: auto;
    max-height: none;
    overflow: hidden;
  }

  .hero__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 100%;
  }

  .hero__media::after {
    background: linear-gradient(
      to top,
      rgba(0, 0, 0, 0.88) 0%,
      rgba(0, 0, 0, 0.55) 28%,
      rgba(0, 0, 0, 0.22) 52%,
      color-mix(in srgb, var(--color-bg) 35%, transparent) 78%,
      transparent 100%
    );
  }

  .hero__logo-overlay {
    width: clamp(12rem, 18vw, 18rem);
    transform: translate(-50%, -100%);
  }

  .hero__content {
    grid-area: 1 / 1;
    align-self: end;
    z-index: 2;
    padding-bottom: clamp(2rem, 6vw, 4rem);
    padding-top: clamp(3rem, 8vw, 5rem);
    background: transparent;
  }
}

.hero__title {
  margin: 0 0 clamp(0.75rem, 2vw, 1rem);
  font-size: clamp(1.5rem, 1.1rem + 2vw, 2.5rem);
  line-height: 1.15;
  font-weight: 700;
  max-width: 22ch;
}

.hero__lead {
  margin: 0 0 clamp(1.25rem, 3vw, 2rem);
  max-width: 42ch;
  color: var(--color-muted);
  font-size: clamp(1rem, 0.92rem + 0.35vw, 1.125rem);
}

.hero__cta {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.hero__cta .button {
  width: 100%;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  font: inherit;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.button--primary {
  background: var(--color-text);
  color: var(--color-bg);
}

.button--outlined {
  background: var(--color-bg);
  color: var(--color-text);
  border-color: var(--color-border-strong);
}

/* Сброс глобального a:hover (серый текст) при залипшем :hover на тач */
@media (hover: none) {
  a.button--primary:hover {
    background: var(--color-text);
    color: var(--color-bg);
    border-color: transparent;
  }
}

/* Hover только у мыши — на тач не «залипает» серый фон после тапа */
@media (hover: hover) and (pointer: fine) {
  .button--primary:hover {
    background: var(--color-border-strong);
    color: var(--color-bg);
    border-color: var(--color-border-strong);
    transform: translateY(-1px);
  }
}

.button--primary:active {
  transform: translateY(0);
}

@media (hover: none) {
  .button--primary:active {
    background: var(--color-border-strong);
    border-color: var(--color-border-strong);
    color: var(--color-bg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .button--primary:active {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) and (hover: hover) and (pointer: fine) {
  .button--primary:hover {
    transform: none;
  }
}

@media (hover: none) {
  a.button--outlined:hover {
    background: var(--color-bg);
    color: var(--color-text);
    border-color: var(--color-border-strong);
  }
}

@media (hover: hover) and (pointer: fine) {
  .button--outlined:hover {
    background: color-mix(in srgb, var(--color-surface) 75%, transparent);
    border-color: var(--color-text);
    color: var(--color-text);
    transform: translateY(-1px);
  }
}

.button--outlined:active {
  transform: translateY(0);
}

@media (hover: none) {
  .button--outlined:active {
    background: color-mix(in srgb, var(--color-surface) 88%, transparent);
    border-color: var(--color-text);
  }
}

@media (prefers-reduced-motion: reduce) {
  .button--outlined:active {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) and (hover: hover) and (pointer: fine) {
  .button--outlined:hover {
    transform: none;
  }
}

/* Sections */

.section {
  padding-block: clamp(2.5rem, 8vw, 5rem);
  border-top: 1px solid var(--color-border);
}

.section__title {
  margin: 0 0 clamp(0.75rem, 2vw, 1rem);
  font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem);
  font-weight: 700;
}

.section__intro {
  margin: 0 0 clamp(1.5rem, 4vw, 2rem);
  max-width: 55ch;
  color: var(--color-muted);
}

.prose p {
  margin: 0 0 1rem;
  max-width: 65ch;
  color: color-mix(in srgb, var(--color-text) 92%, var(--color-muted));
}

.prose p:last-child {
  margin-bottom: 0;
}

.about-layout {
  display: grid;
  gap: clamp(1rem, 3vw, 2rem);
}

.about-photo {
  display: block;
  order: -1;
  width: 100%;
  height: 300px;
  margin: 0 0 1.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow);
  object-fit: cover;
  object-position: 100% 75%;
}

@media (min-width: 64rem) {
  .about-layout {
    grid-template-columns: minmax(0, 1fr) minmax(14rem, 20rem);
    align-items: start;
  }

  .about-photo {
    order: 0;
    width: min(100%, 20rem);
    height: auto;
    margin: 0;
    justify-self: end;
  }
}

/* Почему мы */

.section--why-us .section__title {
  margin-bottom: clamp(1.25rem, 3vw, 1.75rem);
}

.why-us__list {
  list-style: none;
  list-style-type: none;
  margin: 0;
  padding: 0;
  padding-inline-start: 0;
  display: grid;
  gap: clamp(1rem, 2.5vw, 1.25rem);
}

@media (min-width: 40rem) {
  .why-us__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }
}

@media (min-width: 56rem) {
  .why-us__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.why-us__item {
  list-style: none;
  list-style-type: none;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.15rem 1.2rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  min-width: 0;
}

.why-us__icon {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius);
  background: var(--color-elevated);
  color: var(--color-text);
}

.why-us__icon svg {
  display: block;
  width: 1.45rem;
  height: 1.45rem;
}

.why-us__text {
  margin: 0;
  padding-top: 0.2rem;
  font-size: clamp(0.98rem, 0.94rem + 0.2vw, 1.05rem);
  font-weight: 600;
  line-height: 1.45;
  color: var(--color-text);
  flex: 1;
  min-width: 0;
}

/* Этапы работ — цепочка */

.section--work-stages {
  background: color-mix(in srgb, var(--color-surface) 35%, var(--color-bg));
}

.section--work-stages .section__title {
  margin-bottom: clamp(1.25rem, 3vw, 1.75rem);
}

.work-stages__wrap {
  position: relative;
}

.work-stages__rail {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  color: var(--color-border-strong);
}

.work-stages__rail-path {
  stroke: currentColor;
}

.work-stages__chain {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: min(40rem, 100%);
  position: relative;
  z-index: 1;
}

.work-stages__step {
  list-style: none;
  position: relative;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 1rem;
  padding-block-end: clamp(1.25rem, 3vw, 1.5rem);
  margin: 0;
  min-width: 0;
}

.work-stages__step:last-child {
  padding-block-end: 0;
}

@media (max-width: 51.99rem) {
  .work-stages__step:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 1.3125rem;
    top: 2.75rem;
    bottom: 0;
    width: 2px;
    margin-bottom: 0.25rem;
    background: linear-gradient(
      to bottom,
      var(--color-border-strong),
      var(--color-border)
    );
  }
}

@media (min-width: 52rem) {
  .work-stages__wrap {
    --work-stages-row-gap: clamp(1rem, 2.2vw, 1.5rem);
    --work-stages-col-gap: clamp(0.65rem, 1.5vw, 1rem);
  }

  .work-stages__rail--wrap {
    display: block;
  }

  .work-stages__rail--flat {
    display: none;
  }

  .work-stages__chain {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--work-stages-row-gap) var(--work-stages-col-gap);
    align-items: stretch;
    max-width: none;
    margin-inline: 0;
  }

  .work-stages__step {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
    padding-block-end: 0;
    padding-inline: 0;
    min-height: 100%;
    height: 100%;
  }
}

@media (min-width: 72rem) {
  .work-stages__rail--wrap {
    display: none;
  }

  .work-stages__rail--flat {
    display: block;
  }

  .work-stages__chain {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.work-stages__node {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.625rem;
  height: 2.625rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  color: var(--color-text);
  background: var(--color-elevated);
  border: 2px solid var(--color-border-strong);
  box-shadow: var(--shadow);
  z-index: 1;
}

.work-stages__content {
  flex: 1;
  min-width: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.15rem;
  box-shadow: var(--shadow);
}

@media (min-width: 52rem) {
  .work-stages__content {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    padding: 0.85rem 0.65rem;
    text-align: center;
  }

  .work-stages__heading {
    font-size: clamp(0.92rem, 0.85rem + 0.2vw, 1.02rem);
  }

  .work-stages__text {
    font-size: clamp(0.82rem, 0.78rem + 0.12vw, 0.9rem);
    line-height: 1.45;
  }
}

.work-stages__heading {
  margin: 0 0 0.4rem;
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.1rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text);
}

.work-stages__text {
  margin: 0;
  font-size: clamp(0.9rem, 0.86rem + 0.15vw, 0.98rem);
  font-weight: 500;
  line-height: 1.5;
  color: var(--color-muted);
}

@media (prefers-reduced-motion: reduce) and (max-width: 51.99rem) {
  .work-stages__step:not(:last-child)::before {
    background: var(--color-border-strong);
  }
}


/* Portfolio */

.portfolio__subtitle {
  margin: clamp(2rem, 5vw, 3rem) 0 1rem;
  font-size: clamp(1.1rem, 1rem + 0.35vw, 1.25rem);
  font-weight: 600;
  color: var(--color-text);
}

.portfolio__subtitle:first-of-type {
  margin-top: 0;
}

.portfolio__description {
  margin: 0 0 0.9rem;
  max-width: 58ch;
  color: var(--color-muted);
}

/* Горизонтальный скролл: flex на контейнере (без width:max-content у полосы — убирает лишнюю пустоту) */
.portfolio-scroll {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: clamp(1rem, 3vw, 1.5rem);
  width: 100%;
  min-width: 0;
  padding-inline: var(--gutter);
  padding-bottom: 0.35rem;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  outline: none;
}

.portfolio-scroll:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
}

.portfolio-strip {
  display: contents;
  list-style: none;
  margin: 0;
  padding: 0;
}

.portfolio-strip > li {
  flex: 0 0 min(17.5rem, 82vw);
  flex-shrink: 0;
  scroll-snap-align: start;
  scroll-snap-stop: normal;
  margin: 0;
  min-width: 0;
}

@media (min-width: 40rem) {
  .portfolio-scroll {
    scroll-snap-type: x proximity;
  }
}

.portfolio-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s ease,
    border-color 0.35s ease;
}

.portfolio-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.55);
  border-color: var(--color-border-strong);
}

.portfolio-card:focus-within {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

/* После скролл-анимации transform задаётся .reveal--visible — усиливаем hover */
html.has-scroll-anim .portfolio-scroll.reveal--visible .portfolio-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.55);
  border-color: var(--color-border-strong);
}

html.has-scroll-anim
  .portfolio-scroll.reveal--visible
  .portfolio-card:focus-within {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

@media (prefers-reduced-motion: reduce) {
  .portfolio-card:hover,
  .portfolio-card:focus-within {
    transform: none;
  }

  html.has-scroll-anim .portfolio-scroll.reveal--visible .portfolio-card:hover,
  html.has-scroll-anim
    .portfolio-scroll.reveal--visible
    .portfolio-card:focus-within {
    transform: none;
  }
}

.portfolio-card img {
  aspect-ratio: 3 / 2;
  object-fit: cover;
  width: 100%;
}

.portfolio-card__caption {
  display: none;
}

.portfolio-scroll.is-gallery {
  display: block;
  padding-inline: 0;
  overflow: visible;
  scroll-snap-type: none;
}

.portfolio-gallery {
  display: grid;
  gap: 0.85rem;
}

.portfolio-gallery__stage {
  position: relative;
  margin: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface);
  display: flex;
  justify-content: center;
  align-items: center;
}

.portfolio-gallery__main-image {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: clamp(16rem, 62vh, 34rem);
  object-fit: contain;
  background: var(--color-elevated);
  opacity: 1;
  transition: opacity 0.28s ease;
}

.portfolio-gallery__main-image.is-switching {
  opacity: 0.35;
}

@media (max-width: 39.99rem) {
  .portfolio-gallery__main-image {
    max-height: clamp(16rem, 62vh, 15rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .portfolio-gallery__main-image {
    transition: none;
  }
}

.portfolio-gallery__nav {
  position: absolute;
  top: calc(50% - 2rem);
  z-index: 2;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid #111;
  background: #000;
  color: #fff;
  border-radius: 0.5rem;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.portfolio-gallery__nav:hover {
  background: #111;
}

.portfolio-gallery__nav--prev {
  left: 0.85rem;
}

.portfolio-gallery__nav--next {
  right: 0.85rem;
}

.portfolio-gallery__thumbs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.55rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.2rem;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.portfolio-gallery__thumbs::-webkit-scrollbar {
  display: none;
}

.portfolio-gallery__thumb {
  flex: 0 0 clamp(5.5rem, 18vw, 8rem);
  border: 1px solid var(--color-border);
  border-radius: 0.45rem;
  overflow: hidden;
  padding: 0;
  background: var(--color-surface);
  cursor: pointer;
  opacity: 0.55;
  transition:
    opacity 0.2s ease,
    border-color 0.2s ease;
  scroll-snap-align: start;
}

.portfolio-gallery__thumb.is-active {
  opacity: 1;
  border-color: var(--color-border-strong);
}

.portfolio-gallery__thumb img {
  display: block;
  width: 100%;
  height: clamp(3.5rem, 9vw, 5.75rem);
  object-fit: cover;
}

.portfolio-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(0.75rem, 2vw, 1.5rem);
}

.portfolio-lightbox[hidden] {
  display: none;
}

.portfolio-lightbox__dialog {
  position: relative;
  width: min(100%, 80rem);
  max-height: 100%;
  display: grid;
  gap: 0.75rem;
}

.portfolio-lightbox__close {
  position: absolute;
  top: -0.15rem;
  right: -0.15rem;
  z-index: 3;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid #2a2a2a;
  border-radius: 999px;
  background: #000;
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.portfolio-lightbox__stage {
  position: relative;
  border: 1px solid #2a2a2a;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #050505;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: min(70vh, 40rem);
}

.portfolio-lightbox__image {
  display: block;
  max-width: 100%;
  max-height: min(70vh, 40rem);
  width: auto;
  height: auto;
  object-fit: contain;
}

.portfolio-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid #111;
  background: #000;
  color: #fff;
  border-radius: 0.5rem;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.portfolio-lightbox__nav--prev {
  left: 0.85rem;
}

.portfolio-lightbox__nav--next {
  right: 0.85rem;
}

.portfolio-lightbox__thumbs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.55rem;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.25rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.portfolio-lightbox__thumbs::-webkit-scrollbar {
  display: none;
}

.portfolio-lightbox__thumb {
  flex: 0 0 clamp(5.5rem, 14vw, 7.5rem);
  border: 1px solid #2a2a2a;
  border-radius: 0.45rem;
  overflow: hidden;
  padding: 0;
  background: #090909;
  opacity: 0.55;
  cursor: pointer;
}

.portfolio-lightbox__thumb.is-active {
  opacity: 1;
  border-color: #fff;
}

.portfolio-lightbox__thumb img {
  width: 100%;
  height: clamp(3.25rem, 7vw, 4.75rem);
  object-fit: cover;
  display: block;
}

/* Calculator */

.calc-form {
  max-width: 32rem;
  margin-top: 0.5rem;
}

.calc-fieldset {
  margin: 0 0 1.5rem;
  padding: 0;
  border: 0;
}

.calc-legend {
  padding: 0;
  margin-bottom: 0.75rem;
  font-weight: 600;
  font-size: 1rem;
}

.calc-segment {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

@media (min-width: 30rem) {
  .calc-segment {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

.calc-radio {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  cursor: pointer;
  flex: 1 1 auto;
  gap: 0.5rem;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.calc-radio:hover {
  transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
  .calc-radio:hover {
    transform: none;
  }
}

.calc-radio:has(:checked) {
  border-color: var(--color-border-strong);
  background: var(--color-elevated);
}

.calc-radio input {
  width: 1.125rem;
  height: 1.125rem;
  accent-color: var(--color-text);
}

.calc-radio span {
  font-weight: 500;
}

.calc-field {
  margin-bottom: 1.25rem;
}

.calc-field label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 500;
  color: var(--color-muted);
  font-size: 0.9375rem;
}

.calc-field input[type="number"],
.calc-field select {
  width: 100%;
  max-width: 16rem;
  min-height: 48px;
  padding: 0.75rem 0.875rem;
  font: inherit;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.calc-field select {
  cursor: pointer;
}

.calc-field input[type="number"]:invalid,
.calc-field.is-invalid input {
  border-color: #737373;
}

.calc-field__error {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.875rem;
  color: var(--color-muted);
}

.calc-field--checkbox {
  margin-bottom: 1.5rem;
}

.calc-checkbox {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 44px;
  cursor: pointer;
  font-weight: 500;
}

.calc-field .calc-checkbox {
  display: flex;
}

.calc-checkbox input {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0;
  flex-shrink: 0;
  accent-color: var(--color-text);
}

.calc-result {
  margin-top: 1.5rem;
  padding: 1.25rem 1.25rem 1.5rem;
  background: var(--color-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.calc-result__label {
  margin: 0 0 0.35rem;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-subtle);
}

.calc-result__value {
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.calc-result__note {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--color-muted);
  line-height: 1.5;
}

.calc-cta {
  margin: 1.25rem 0 0;
}

.calc-cta .button {
  width: 100%;
}

@media (min-width: 30rem) {
  .hero__cta {
    flex-direction: row;
    align-items: center;
  }

  .hero__cta .button {
    width: auto;
  }

  .calc-cta .button {
    width: auto;
  }
}

/* Contacts */

.contacts-block {
  font-style: normal;
  margin: 0;
  padding: 1.25rem 1.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  max-width: min(100%, 44rem);
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 1.75rem;
}

.contacts-block__main {
  flex: 1 1 12rem;
  min-width: 0;
}

.contacts-block__main p {
  margin: 0 0 0.75rem;
}

.contacts-block__main p:last-child {
  margin-bottom: 0;
}

.contacts-block__logo {
  display: block;
  width: clamp(6.75rem, 20vw, 11rem);
  height: auto;
  object-fit: contain;
  flex: 0 0 auto;
  align-self: center;
}

@media (max-width: 40rem) {
  .contacts-block__logo {
    display: none;
  }
}

@media (max-width: 28rem) {
  .contacts-block__logo {
    align-self: flex-end;
  }
}

.contacts-block__hint {
  color: var(--color-subtle);
  font-size: 0.875rem;
}

.contacts-block__note {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.875rem;
  color: var(--color-muted);
}

/* Footer */

.site-footer {
  padding-block: clamp(1.5rem, 4vw, 2rem);
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.site-footer__copy {
  margin: 0;
  font-size: 0.9375rem;
}

.site-footer__meta {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--color-subtle);
}

@media (min-width: 40rem) {
  .site-footer__inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: baseline;
  }
}

/* Анимации: hero при загрузке, появление при скролле, лёгкий hover */

@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(1.1rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-entrance .hero__title {
  animation: heroFadeUp 0.75s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.hero-entrance .hero__lead {
  animation: heroFadeUp 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.12s backwards;
}

.hero-entrance .button {
  animation: heroFadeUp 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.26s backwards;
}

@media (prefers-reduced-motion: reduce) {
  .hero-entrance .hero__title,
  .hero-entrance .hero__lead,
  .hero-entrance .button {
    animation: none;
  }
}

/* Скролл-раскрытие: скрыто только при включённом JS (см. main.js) */
html.has-scroll-anim .reveal:not(.reveal--visible) {
  opacity: 0;
  transform: translate3d(0, 1.35rem, 0);
}

html.has-scroll-anim .reveal {
  transition:
    opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

html.has-scroll-anim .reveal.reveal--visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  will-change: auto;
}

@media (prefers-reduced-motion: reduce) {
  html.has-scroll-anim .reveal {
    opacity: 1;
    transform: none;
    transition: none;
    will-change: auto;
  }
}

/* Portfolio page */

.portfolio-page main {
  overflow: clip;
}

.portfolio-page {
  position: relative;
}

.portfolio-page::before {
  content: "";
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: clamp(14rem, 42vw, 32rem);
  aspect-ratio: 1 / 1;
  background: center / contain no-repeat url("/static/white-logo.png");
  opacity: 0.06;
  pointer-events: none;
  z-index: 0;
}

.portfolio-page > * {
  position: relative;
}

.portfolio-page > main,
.portfolio-page > .site-footer {
  z-index: 1;
}

.portfolio-page__hero {
  border-top: 0;
}

.portfolio-project__title {
  margin: 0 0 0.9rem;
  font-size: clamp(1.15rem, 1rem + 0.65vw, 1.65rem);
  font-weight: 700;
}

.portfolio-project__description {
  margin: 0 0 1.25rem;
  max-width: 75ch;
  color: var(--color-muted);
}

.portfolio-project__masonry {
  column-gap: 0.85rem;
  columns: 2;
}

.portfolio-project__item {
  display: block;
  width: 100%;
  margin: 0 0 0.85rem;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 0.65rem;
  overflow: hidden;
  break-inside: avoid;
  background: var(--color-surface);
  cursor: pointer;
  transition:
    transform 0.24s ease,
    border-color 0.24s ease,
    box-shadow 0.24s ease;
}

.portfolio-project__item:hover {
  transform: translateY(-2px);
  border-color: var(--color-border-strong);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.4);
}

.portfolio-project__thumb {
  position: relative;
  display: block;
  line-height: 0;
}

.portfolio-project__placeholder {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(18px);
  transform: scale(1.06);
  transform-origin: center;
  pointer-events: none;
}

.portfolio-project__photo {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.portfolio-project__thumb.is-loaded .portfolio-project__photo {
  opacity: 1;
}

.portfolio-project__thumb.is-loaded .portfolio-project__placeholder {
  opacity: 0;
  transition: opacity 0.4s ease;
}

@media (prefers-reduced-motion: reduce) {
  .portfolio-project__photo,
  .portfolio-project__thumb.is-loaded .portfolio-project__placeholder {
    transition: none;
  }
}

@media (min-width: 40rem) {
  .portfolio-project__masonry {
    columns: 3;
    column-gap: 1rem;
  }

  .portfolio-project__item {
    margin-bottom: 1rem;
  }
}

@media (min-width: 64rem) {
  .portfolio-project__masonry {
    columns: 4;
  }
}

@media (prefers-reduced-motion: reduce) {
  .portfolio-project__item {
    transition: none;
  }

  .portfolio-project__item:hover {
    transform: none;
  }
}

.portfolio-page-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(0.75rem, 2vw, 1.5rem);
}

.portfolio-page-lightbox[hidden] {
  display: none;
}

.portfolio-page-lightbox__dialog {
  position: relative;
  width: min(100%, 80rem);
  max-height: 100%;
  display: grid;
  gap: 0.75rem;
}

.portfolio-page-lightbox__close {
  position: absolute;
  top: -0.2rem;
  right: -0.2rem;
  z-index: 3;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid #2a2a2a;
  border-radius: 999px;
  background: #000;
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.portfolio-page-lightbox__stage {
  position: relative;
  border: 1px solid #2a2a2a;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #050505;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: min(72vh, 42rem);
}

.portfolio-page-lightbox__thumb {
  position: relative;
  display: inline-block;
  max-width: 100%;
  line-height: 0;
}

.portfolio-page-lightbox__placeholder {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(28px);
  transform: scale(1.08);
  transform-origin: center;
  pointer-events: none;
}

.portfolio-page-lightbox__image {
  position: relative;
  z-index: 1;
  display: block;
  max-width: 100%;
  max-height: min(72vh, 42rem);
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.portfolio-page-lightbox__thumb.is-loaded .portfolio-page-lightbox__image {
  opacity: 1;
}

.portfolio-page-lightbox__thumb.is-loaded .portfolio-page-lightbox__placeholder {
  opacity: 0;
  transition: opacity 0.35s ease;
}

@media (prefers-reduced-motion: reduce) {
  .portfolio-page-lightbox__image,
  .portfolio-page-lightbox__thumb.is-loaded .portfolio-page-lightbox__placeholder {
    transition: none;
  }
}

.portfolio-page-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 2.8rem;
  height: 2.8rem;
  border: 1px solid #111;
  background: #000;
  color: #fff;
  border-radius: 0.5rem;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.portfolio-page-lightbox__nav--prev {
  left: 0.85rem;
}

.portfolio-page-lightbox__nav--next {
  right: 0.85rem;
}

.portfolio-page-lightbox__counter {
  margin: 0;
  text-align: center;
  color: var(--color-muted);
}

.floating-phone-cta {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right, 0px) + 0.75rem);
  bottom: max(1rem, env(safe-area-inset-bottom, 0px) + 0.75rem);
  z-index: 1000;
  width: 3.35rem;
  height: 3.35rem;
  border: 1px solid var(--color-border-strong);
  border-radius: 999px;
  background: var(--color-text);
  color: var(--color-bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.floating-phone-cta img {
  width: 1.35rem;
  height: 1.35rem;
  filter: invert(1);
}

.floating-phone-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.5);
}

@media (prefers-reduced-motion: reduce) {
  .floating-phone-cta {
    transition: none;
  }

  .floating-phone-cta:hover {
    transform: none;
  }
}
