/* ==========================================================================
   Академия контекстА — main stylesheet
   ========================================================================== */

/* --------------------------------------------------------------------------
   Fonts
   -------------------------------------------------------------------------- */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("../fonts/montserrat-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("../fonts/montserrat-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --------------------------------------------------------------------------
   Custom properties
   -------------------------------------------------------------------------- */
:root {
  --bg: #292929;
  --bg-deep: #202020;
  --surface: #2d2d2d;
  --surface-hover: #343434;
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.7);
  --red: #ae1414;
  --red-hover: #c51b1b;
  --red-light: #d13b3b;
  --line: rgba(255, 255, 255, 0.22);
  --line-soft: rgba(255, 255, 255, 0.12);

  --font: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --container: 1360px;
  --gutter: clamp(20px, 3.2vw, 44px);

  --header-gap: clamp(18px, 3vh, 32px);
  --section-gap: clamp(22px, 4vh, 48px);
  --radius: 10px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --speed: 0.28s;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

body.is-locked {
  overflow: hidden;
}

h1,
h2,
h3,
p,
figure,
blockquote {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

button:disabled {
  cursor: default;
}

strong,
b {
  font-weight: 600;
}

::selection {
  background: var(--red);
  color: #fff;
}

:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
  border-radius: 2px;
}

.modal__panel :focus-visible,
.doc :focus-visible,
.doc-header :focus-visible,
.modal--wide :focus-visible {
  outline-color: #111111;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 10px 16px;
  background: #fff;
  color: #111;
  font-size: 14px;
  transform: translateY(-200%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: none;
}

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

.site {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}

.main {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
}

.page-dark {
  position: relative;
  isolation: isolate;
}

.page-dark::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    url("../img/bg-texture.webp") center / cover no-repeat,
    var(--bg);
  opacity: 0.55;
  pointer-events: none;
}

.page-dark::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 50% at 78% 62%, rgba(190, 160, 115, 0.1), transparent 70%),
    radial-gradient(50% 60% at 8% 88%, rgba(0, 0, 0, 0.42), transparent 75%),
    linear-gradient(180deg, rgba(41, 41, 41, 0.1), rgba(41, 41, 41, 0.65));
  pointer-events: none;
}

/* Decorative ghost lettering */
.ghost {
  position: fixed;
  inset: 0;
  z-index: 0;
  color: #fff;
  opacity: 0.032;
  font-weight: 900;
  line-height: 0.82;
  letter-spacing: -0.045em;
  pointer-events: none;
  user-select: none;
}

.ghost span {
  position: absolute;
  left: 50px;
  bottom: 10%;
  display: block;
  white-space: nowrap;
  writing-mode: sideways-lr;
  font-size: clamp(60px, 7.6vw, 110px);
  font-weight: 900;
  line-height: 0.82;
  letter-spacing: -0.045em;
}

.ghost span + span {
  left: 170px;
  bottom: 10%;
  font-size: clamp(32px, 3.7vw, 54px);
}

@supports not (writing-mode: sideways-lr) {
  .ghost span {
    writing-mode: horizontal-tb;
    left: 140px;
    top: auto;
    bottom: 10%;
    transform-origin: left bottom;
    transform: rotate(-90deg);
  }

  .ghost span + span {
    left: 214px;
    top: auto;
    bottom: 10%;
  }
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  position: relative;
  z-index: 20;
  padding-top: var(--header-gap);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: clamp(14px, 2vh, 20px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 26px);
}

.nav__link {
  position: relative;
  padding: 6px 0;
  color: #fff;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.25;
  transition: color var(--speed) var(--ease);
}

.nav__link:hover {
  color: var(--red-light);
}

.nav__link[aria-current="page"] {
  color: var(--red);
}

.nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: currentColor;
  opacity: 0.8;
}

.contacts {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.2vw, 18px);
}

.contacts__link {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: #c7c7c7;
  transition: color var(--speed) var(--ease), transform var(--speed) var(--ease);
}

.contacts__link:hover {
  color: #fff;
  transform: translateY(-1px);
}

.contacts__link svg {
  width: 22px;
  height: 22px;
}

.contacts__link--phone svg {
  width: 25px;
  height: 25px;
}

.contacts__phone {
  margin-left: 6px;
  color: var(--red);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.2;
  white-space: nowrap;
  transition: color var(--speed) var(--ease);
}

.contacts__phone:hover {
  color: var(--red-light);
}

.burger {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  place-items: center;
  color: #fff;
  transition: border-color var(--speed) var(--ease),
    background-color var(--speed) var(--ease);
}

.burger:hover {
  border-color: rgba(255, 255, 255, 0.5);
}

.burger__box {
  position: relative;
  display: block;
  width: 22px;
  height: 14px;
}

.burger__line {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transition: transform var(--speed) var(--ease),
    top var(--speed) var(--ease), opacity var(--speed) var(--ease);
}

.burger__line:nth-child(1) {
  top: 0;
}

.burger__line:nth-child(2) {
  top: 6px;
}

.burger__line:nth-child(3) {
  top: 12px;
}

.burger[aria-expanded="true"] .burger__line:nth-child(1) {
  top: 6px;
  transform: rotate(45deg);
}

.burger[aria-expanded="true"] .burger__line:nth-child(2) {
  opacity: 0;
}

.burger[aria-expanded="true"] .burger__line:nth-child(3) {
  top: 6px;
  transform: rotate(-45deg);
}

.mobile-brand {
  display: none;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.mobile-brand span {
  display: block;
}

.mobile-brand span + span {
  color: rgba(255, 255, 255, 0.55);
}

/* --------------------------------------------------------------------------
   Mobile menu
   -------------------------------------------------------------------------- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  padding: clamp(22px, 4vh, 40px) var(--gutter) 32px;
  background: #161616;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity var(--speed) var(--ease),
    transform var(--speed) var(--ease), visibility var(--speed);
  overflow-y: auto;
}

.mobile-menu.is-open {
  visibility: visible;
  opacity: 1;
  transform: none;
}

.mobile-menu__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.mobile-menu__title {
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.mobile-menu__close {
  display: grid;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  place-items: center;
  color: #fff;
}

.mobile-menu__close svg {
  width: 18px;
  height: 18px;
}

.mobile-menu__nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: clamp(24px, 5vh, 48px);
}

.mobile-menu__nav a {
  padding: 10px 0;
  font-size: clamp(30px, 8vw, 44px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: #fff;
  transition: color var(--speed) var(--ease);
}

.mobile-menu__nav a:hover,
.mobile-menu__nav a[aria-current="page"] {
  color: var(--red);
}

.mobile-menu__footer {
  margin-top: auto;
  padding-top: clamp(28px, 5vh, 56px);
}

.mobile-menu__phone {
  display: block;
  margin-bottom: 20px;
  color: var(--red);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.2;
}

.mobile-menu__socials {
  display: flex;
  gap: 14px;
}

.mobile-menu__socials .contacts__link {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
.display {
  position: relative;
  z-index: 2;
  color: #fff;
  font-size: clamp(40px, 6.4vw, 92px);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.display--md {
  font-size: clamp(36px, 5.15vw, 74px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.display--home {
  font-size: clamp(38px, 6.5vw, 94px);
  letter-spacing: -0.035em;
  white-space: nowrap;
}

.display__accent {
  position: relative;
  display: inline-block;
  color: var(--red);
}

.play {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 0.33em;
  color: #fff;
  transform: translateY(-38%);
  pointer-events: none;
}

.play svg {
  display: block;
  width: 100%;
  height: auto;
}

.display--home .play {
  left: 1.7em;
  width: 0.42em;
}

.display--about .play {
  top: 52%;
  left: 0.44em;
  width: 0.38em;
}

.display--cases .play {
  left: 1.02em;
  width: 0.46em;
}

.display--reviews .play {
  left: 0.55em;
  width: 0.5em;
}

.display--success .play {
  left: 43%;
  width: 0.44em;
}

.subtitle {
  max-width: 680px;
  color: #fff;
  font-size: clamp(18px, 2vw, 30px);
  font-weight: 300;
  line-height: 1.32;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}

.lead {
  color: #fff;
  font-size: clamp(16px, 1.3vw, 18px);
  font-weight: 300;
  line-height: 1.6;
  text-wrap: pretty;
}

/* Home subtitle sits right below the wordmark, like the original */
.home__content {
  text-align: left;
}

.home__subtitle {
  margin-top: clamp(6px, 1vh, 12px);
  margin-left: 0.1em;
}

/* --------------------------------------------------------------------------
   Buttons and links
   -------------------------------------------------------------------------- */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: clamp(28px, 4vh, 46px);
}

.btn {
  display: inline-flex;
  min-width: 306px;
  min-height: 71px;
  align-items: center;
  justify-content: center;
  padding: 18px 28px;
  border: 1px solid transparent;
  background: none;
  color: #fff;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.2;
  text-align: center;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  transition: background-color var(--speed) var(--ease),
    border-color var(--speed) var(--ease), color var(--speed) var(--ease),
    transform var(--speed) var(--ease);
}

.btn--primary {
  background: var(--red);
  color: #fff;
}

.btn--primary:hover {
  background: var(--red-hover);
  transform: translateY(-2px);
}

.btn--ghost {
  border-color: var(--red);
  color: #fff;
}

.btn--ghost:hover {
  background: var(--red);
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.home .home__actions {
  margin-top: clamp(48px, 8vh, 76px);
}

.link-red {
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: color var(--speed) var(--ease);
}

.link-red:hover {
  color: var(--red-light);
}

/* --------------------------------------------------------------------------
   Partner badge
   -------------------------------------------------------------------------- */
.partner-badge {
  position: absolute;
  top: clamp(22px, 3vh, 36px);
  right: 0;
  z-index: 5;
  display: block;
  width: 150px;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.35));
  transition: transform var(--speed) var(--ease);
}

.partner-badge:hover {
  transform: translateY(-3px);
}

.partner-badge img {
  width: 100%;
  height: auto;
}

.home .partner-badge {
  top: calc(clamp(22px, 3vh, 36px) - var(--section-gap));
}

/* --------------------------------------------------------------------------
   Home page
   -------------------------------------------------------------------------- */
.home {
  position: relative;
  display: flex;
  flex: 1;
  align-items: flex-start;
  padding: var(--section-gap) 0;
}

.home__inner {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  align-items: center;
  gap: clamp(20px, 3.5vw, 56px);
  width: 100%;
}

.home__content {
  min-width: 0;
}

.home__visual {
  position: relative;
  z-index: 1;
  justify-self: end;
  will-change: transform;
  transform-style: preserve-3d;
  width: min(56vw, 620px);
  margin-top: -3%;
  margin-right: -10px;
}

.home__visual::before {
  content: "";
  position: absolute;
  top: 22%;
  left: 12%;
  width: 82%;
  height: 62%;
  background: radial-gradient(
    ellipse at center,
    rgba(208, 184, 140, 0.22),
    rgba(208, 184, 140, 0) 68%
  );
  filter: blur(28px);
  pointer-events: none;
}

.home__visual img {
  position: relative;
  z-index: 1;
  width: 100%;
  filter: drop-shadow(0 46px 60px rgba(0, 0, 0, 0.6));
  animation: cube-levitate 9s ease-in-out infinite;
  will-change: transform;
}

.home__visual::before {
  animation: cube-glow 9s ease-in-out infinite;
}

@keyframes cube-levitate {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -16px, 0) rotate(-0.5deg);
  }
}

@keyframes cube-glow {
  0%,
  100% {
    opacity: 0.78;
    transform: scale(0.98);
  }
  50% {
    opacity: 1;
    transform: scale(1.04);
  }
}

.services {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 34px;
  margin-top: clamp(22px, 3.4vh, 38px);
}

.services li {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #fff;
  font-size: 18px;
  font-weight: 300;
  line-height: 1.4;
}

.services li::before {
  content: "";
  flex: none;
  width: 12px;
  height: 12px;
  background: var(--red);
  transform: rotate(45deg);
}

.note {
  position: relative;
  max-width: 580px;
  margin-top: clamp(24px, 3.6vh, 40px);
  padding-left: 22px;
  color: #fff;
  font-size: 20px;
  font-weight: 300;
  line-height: 1.55;
  text-wrap: pretty;
}

.note::before {
  content: "";
  position: absolute;
  top: 0.18em;
  bottom: 0.18em;
  left: 0;
  width: 4px;
  background: var(--red);
}

.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 260px));
  gap: 16px;
  width: 100%;
  max-width: 812px;
  margin-top: clamp(24px, 3.5vh, 40px);
}

.feature {
  min-height: 112px;
  padding: 10px;
  background: var(--surface);
  border-radius: var(--radius);
  transition: background-color var(--speed) var(--ease);
}

.feature:hover {
  background: var(--surface-hover);
}

.feature__inner {
  display: grid;
  height: 100%;
  min-height: 90px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 7px;
  place-items: center;
  color: #fff;
  font-size: 18px;
  font-weight: 300;
  line-height: 1.4;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Page heading / tabs
   -------------------------------------------------------------------------- */
.page-head {
  position: relative;
  z-index: 2;
  padding-top: var(--section-gap);
}

.page-head .display {
  max-width: 1000px;
}

.page-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 36px;
  margin-top: clamp(18px, 2.8vh, 30px);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
}

.page-tabs a {
  position: relative;
  color: #fff;
  transition: color var(--speed) var(--ease);
}

.page-tabs a:hover {
  color: var(--red-light);
}

.page-tabs a.is-active {
  color: var(--red);
}

.page-actions {
  margin-top: clamp(26px, 4.2vh, 48px);
}

/* --------------------------------------------------------------------------
   Carousels
   -------------------------------------------------------------------------- */
.carousel-block {
  position: relative;
  z-index: 2;
  margin-top: clamp(20px, 3.2vh, 34px);
}

.carousel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.carousel-title {
  color: #fff;
  font-size: 25px;
  font-weight: 700;
  line-height: 1.3;
}

.carousel-title--sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.carousel-nav {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.carousel-btn {
  display: grid;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  place-items: center;
  color: #fff;
  transition: background-color var(--speed) var(--ease),
    border-color var(--speed) var(--ease), opacity var(--speed) var(--ease);
}

.carousel-btn:hover:not(:disabled) {
  border-color: var(--red);
  background: var(--red);
}

.carousel-btn:disabled {
  opacity: 0.28;
}

.carousel-btn svg {
  width: 18px;
  height: 18px;
}

.carousel {
  --per-view: 4;
  --carousel-gap: 32px;
  display: flex;
  gap: var(--carousel-gap);
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.carousel::-webkit-scrollbar {
  display: none;
}

.carousel__item {
  flex: 0 0
    calc(
      (100% - (var(--per-view) - 1) * var(--carousel-gap)) / var(--per-view)
    );
  min-width: 0;
  scroll-snap-align: start;
}

.carousel--letters {
  --carousel-gap: 32px;
}

.case-card,
.review-card {
  display: block;
  width: 100%;
  aspect-ratio: 260 / 288;
  padding: 0;
  border: 0;
  background: #fff;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
  overflow: hidden;
}

.case-card img,
.review-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s var(--ease);
}

.case-card:hover img,
.review-card:hover img {
  transform: scale(1.025);
}

.review-card {
  cursor: zoom-in;
}

.review-card img {
  object-fit: contain;
  background: #fff;
}

.review-card:focus-visible {
  outline-color: #fff;
}

/* --------------------------------------------------------------------------
   About page
   -------------------------------------------------------------------------- */
.about {
  position: relative;
  z-index: 2;
  flex: 1;
  padding: var(--section-gap) 0;
}

.about .display {
  max-width: 1000px;
}

.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 560px);
  align-items: start;
  gap: clamp(32px, 6vw, 90px);
  margin-top: clamp(22px, 3.4vh, 38px);
}

.quote {
  max-width: 570px;
  padding-left: clamp(18px, 2.4vw, 28px);
  border-left: 4px solid var(--red);
  color: #fff;
  font-size: 18px;
  font-weight: 300;
  line-height: 1.6;
  text-wrap: pretty;
}

.about h2 {
  margin-top: clamp(24px, 4vh, 44px);
  color: #fff;
  font-size: 25px;
  font-weight: 700;
  line-height: 1.35;
}

.diamond-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  color: #fff;
  font-size: 20px;
  font-weight: 300;
  line-height: 1.5;
}

.diamond-list li {
  position: relative;
  padding-left: 28px;
  text-wrap: pretty;
}

.diamond-list li::before {
  content: "";
  position: absolute;
  top: 0.55em;
  left: 2px;
  width: 12px;
  height: 12px;
  background: var(--red);
  transform: rotate(45deg);
}

.about__actions {
  margin-top: clamp(26px, 4vh, 46px);
}

/* Certificate slider */
.cert-slider {
  position: relative;
  padding: 0 42px;
  margin-top: 4px;
}

.cert-track {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.cert-track::-webkit-scrollbar {
  display: none;
}

.cert-slide {
  flex: 0 0 100%;
  padding: 6px;
  scroll-snap-align: center;
}

.cert-card {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #fff;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
  cursor: zoom-in;
  transition: transform var(--speed) var(--ease);
}

.cert-card:hover {
  transform: translateY(-2px);
}

.cert-card img {
  width: 100%;
  aspect-ratio: 442 / 449;
  object-fit: contain;
  background: #fff;
}

.cert-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  place-items: center;
  color: #d6d6d6;
  transform: translateY(-50%);
  transition: background-color var(--speed) var(--ease),
    border-color var(--speed) var(--ease), opacity var(--speed) var(--ease);
}

.cert-arrow:hover:not(:disabled) {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

.cert-arrow:disabled {
  opacity: 0.28;
}

.cert-arrow--prev {
  left: 0;
}

.cert-arrow--next {
  right: 0;
}

.cert-arrow svg {
  width: 15px;
  height: 15px;
}

.cert-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.cert-dots button {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  transition: background-color var(--speed) var(--ease);
}

.cert-dots button[aria-current="true"] {
  background: var(--red);
}

/* --------------------------------------------------------------------------
   Reviews page
   -------------------------------------------------------------------------- */
.reviews {
  position: relative;
  z-index: 2;
  flex: 1;
  padding-top: clamp(18px, 3vh, 28px);
  padding-bottom: 0;
}

.reviews .carousel-block {
  margin-top: clamp(20px, 3.2vh, 32px);
}

.reviews__directions {
  margin-top: clamp(18px, 2.6vh, 26px);
}

.reviews .page-actions {
  margin-top: 20px;
}

.reviews .page-actions .actions {
  margin-top: 0;
}

.reviews__directions h2 {
  color: #fff;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.4;
}

.directions {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(2, auto);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 32px;
  max-width: 1240px;
  margin-top: 12px;
  padding-right: 180px;
}

.directions li {
  position: relative;
  padding-left: 24px;
  color: #fff;
  font-size: 15px;
  font-weight: 300;
  line-height: 1.5;
}

.directions li::before {
  content: "";
  position: absolute;
  top: 0.55em;
  left: 2px;
  width: 11px;
  height: 11px;
  background: var(--red);
  transform: rotate(45deg);
}

.directions__more {
  position: absolute;
  right: 0;
  bottom: 0;
  color: var(--red);
  font-size: 15px;
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: color var(--speed) var(--ease);
}

.directions__more:hover {
  color: var(--red-light);
}

.reviews__directions-wrap {
  position: relative;
}

/* --------------------------------------------------------------------------
   Creatives page — collage slides
   -------------------------------------------------------------------------- */
.creatives {
  position: relative;
  z-index: 2;
  flex: 1;
  padding-bottom: 0;
}

.creatives .page-actions {
  margin-top: clamp(14px, 2.2vh, 22px);
}

.creatives__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: clamp(20px, 3.2vh, 32px);
}

.creatives__title {
  color: #fff;
  font-size: 25px;
  font-weight: 700;
  line-height: 1.3;
}

.pagination-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.pagination__more {
  min-width: 30px;
  height: 34px;
  padding: 0 6px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  transition: color var(--speed) var(--ease);
}

.pagination__more:hover {
  color: #fff;
}

.pagination button {
  min-width: 30px;
  height: 34px;
  padding: 0 6px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  transition: color var(--speed) var(--ease),
    background-color var(--speed) var(--ease);
}

.pagination button:hover {
  color: #fff;
}

.pagination button[aria-selected="true"],
.pagination button.is-active {
  background: var(--red);
  color: #fff;
}

.creative-panel[hidden] {
  display: none;
}

.collage {
  position: relative;
  width: 100%;
  aspect-ratio: 1094 / 366;
  margin-top: 14px;
}

.collage__item {
  position: absolute;
  top: calc(var(--y) * 1%);
  left: calc(var(--x) * 1%);
  width: calc(var(--w) * 1%);
  height: calc(var(--h) * 1%);
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  transition: transform var(--speed) var(--ease),
    filter var(--speed) var(--ease);
}

.collage__item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.22));
}

.collage__item:hover {
  z-index: 3;
  transform: translateY(-2px) scale(1.008);
  filter: brightness(1.04);
}

/* --------------------------------------------------------------------------
   Privacy page (light)
   -------------------------------------------------------------------------- */
.page-doc {
  min-height: 100vh;
  min-height: 100svh;
  background: #fff;
  color: #171717;
}

.doc-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid #e5e5e5;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.doc-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 64px;
}

.doc-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #171717;
  font-size: 14px;
  font-weight: 500;
  transition: color var(--speed) var(--ease);
}

.doc-back:hover {
  color: var(--red);
}

.doc-back svg {
  width: 16px;
  height: 16px;
}

.doc-brand {
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.doc {
  width: min(100% - var(--gutter) * 2, 900px);
  margin-inline: auto;
  padding: clamp(36px, 6vh, 72px) 0 clamp(60px, 10vh, 120px);
}

.doc h1 {
  margin-bottom: 36px;
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.doc h2 {
  margin: 34px 0 12px;
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 700;
  line-height: 1.35;
}

.doc h3 {
  margin: 24px 0 8px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
}

.doc p {
  margin: 0 0 14px;
  font-size: clamp(15px, 1.4vw, 17px);
  line-height: 1.72;
  text-wrap: pretty;
}

.doc ul {
  margin: 0 0 16px;
  padding-left: 22px;
  list-style: disc;
}

.doc li {
  margin-bottom: 6px;
  font-size: clamp(15px, 1.4vw, 17px);
  line-height: 1.7;
}

.doc a {
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.doc a:hover {
  color: #7e0f0f;
}

/* --------------------------------------------------------------------------
   Success page
   -------------------------------------------------------------------------- */
.success {
  position: relative;
  z-index: 2;
  display: grid;
  flex: 1;
  padding: var(--section-gap) 0;
  place-items: center;
  text-align: center;
}

.success__inner {
  width: min(100%, 930px);
  margin-inline: auto;
}

.display--success {
  color: var(--red);
  font-size: clamp(36px, 5.2vw, 69px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.success__subtitle {
  max-width: 700px;
  margin: 14px auto 0;
  color: #fff;
  font-size: clamp(20px, 2.4vw, 30px);
  font-weight: 300;
  line-height: 1.35;
  text-wrap: balance;
}

.success__actions {
  display: flex;
  justify-content: center;
  margin-top: clamp(34px, 6vh, 64px);
}

.success .btn {
  min-width: 366px;
}

/* --------------------------------------------------------------------------
   Dialog / modal base
   -------------------------------------------------------------------------- */
dialog {
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  overflow: visible;
}

dialog::backdrop {
  background: rgba(10, 10, 10, 0.78);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

.modal__panel {
  position: relative;
  width: min(480px, calc(100vw - 32px));
  max-height: calc(100svh - 24px);
  padding: clamp(28px, 4vw, 42px) clamp(22px, 4vw, 40px) 26px;
  background: #fff;
  color: #111;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.55);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.modal__close {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #111;
  opacity: 0.38;
  transition: opacity var(--speed) var(--ease);
}

.modal__close:hover {
  opacity: 0.85;
}

.modal__close svg {
  width: 20px;
  height: 20px;
}

.modal__title {
  padding: 0;
  color: #111;
  font-size: clamp(20px, 2.2vw, 24px);
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  text-wrap: balance;
}

/* Audit form */
.form {
  margin-top: 26px;
}

.form__field {
  position: relative;
  margin-bottom: 16px;
}

.form__input {
  width: 100%;
  height: 62px;
  padding: 0 18px;
  border: 1px solid #969696;
  border-radius: 0;
  background: #fff;
  color: #111;
  font-size: 16px;
  font-weight: 400;
  transition: border-color var(--speed) var(--ease),
    box-shadow var(--speed) var(--ease);
}

.form__input::placeholder {
  color: #6f6f6f;
  opacity: 1;
}

.form__input:focus {
  border-color: var(--red);
  outline: none;
  box-shadow: 0 0 0 1px var(--red);
}

.form__input[aria-invalid="true"] {
  border-color: #b00020;
  box-shadow: 0 0 0 1px #b00020;
}

.form__phone-control {
  position: relative;
}

.form__phone-control .form__input {
  padding-right: 48px;
}

.form__clear {
  position: absolute;
  top: 50%;
  right: 8px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #767676;
  font-size: 22px;
  line-height: 1;
  transform: translateY(-50%);
  transition: color var(--speed) var(--ease);
}

.form__clear:hover {
  color: var(--red);
}

.form__clear[hidden] {
  display: none;
}

.form__error {
  display: none;
  margin-top: 6px;
  color: #b00020;
  font-size: 12px;
  line-height: 1.4;
}

.form__field.has-error .form__error {
  display: block;
}

.form__submit {
  display: block;
  width: min(100%, 280px);
  min-height: 64px;
  margin: 8px auto 0;
  border: 0;
  background: var(--red);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: background-color var(--speed) var(--ease),
    transform var(--speed) var(--ease);
}

.form__submit:hover {
  background: var(--red-hover);
  transform: translateY(-1px);
}

.form__submit:disabled {
  opacity: 0.6;
  transform: none;
}

.form__field--consent {
  max-width: 330px;
  margin: 16px auto 0;
}

.form__consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  color: #555;
  font-size: 12px;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
  text-wrap: pretty;
}

.form__checkbox {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.form__box {
  position: relative;
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border: 1px solid #969696;
  background: #fff;
  transition: background-color var(--speed) var(--ease),
    border-color var(--speed) var(--ease);
}

.form__consent:hover .form__box {
  border-color: #555;
}

.form__checkbox:focus-visible + .form__box {
  outline: 2px solid #111;
  outline-offset: 2px;
}

.form__checkbox:checked + .form__box {
  border-color: var(--red);
  background: var(--red);
}

.form__checkbox:checked + .form__box::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 5px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.form__checkbox[aria-invalid="true"] + .form__box {
  border-color: #b00020;
}

.form__consent-text a {
  color: #555;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.form__consent-text a:hover {
  color: var(--red);
}

.form__field--consent .form__error {
  margin-top: 8px;
  text-align: left;
}

.form__status {
  margin-top: 12px;
  color: #b00020;
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

.form__status:empty {
  display: none;
}

.form-success {
  display: none;
  padding: 22px 0 10px;
  text-align: center;
}

.form-success.is-visible {
  display: block;
}

.form-success__icon {
  display: grid;
  width: 62px;
  height: 62px;
  margin: 0 auto 20px;
  border: 2px solid var(--red);
  border-radius: 50%;
  place-items: center;
  color: var(--red);
}

.form-success__icon svg {
  width: 28px;
  height: 28px;
}

.form-success h3 {
  margin: 0 0 10px;
  color: #111;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
}

.form-success p {
  margin: 0;
  color: #555;
  font-size: 15px;
  line-height: 1.55;
}

/* Directions dialog */
.modal--wide .modal__panel {
  width: min(980px, calc(100vw - 32px));
  padding: clamp(30px, 4vw, 48px);
}

.modal--wide .modal__title {
  padding: 0 30px;
  text-align: left;
}

.directions-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 28px;
  margin-top: 26px;
}

.directions-list li {
  position: relative;
  padding-left: 22px;
  color: #222;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.45;
}

.directions-list li::before {
  content: "";
  position: absolute;
  top: 0.5em;
  left: 1px;
  width: 9px;
  height: 9px;
  background: var(--red);
  transform: rotate(45deg);
}

/* Lightbox */
.lightbox {
  width: 100vw;
  height: 100svh;
  background: transparent;
}

.lightbox::backdrop {
  background: rgba(8, 8, 8, 0.94);
  backdrop-filter: none;
}

.lightbox__inner {
  position: relative;
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  padding: 64px clamp(16px, 6vw, 92px);
}

.lightbox__figure {
  display: flex;
  max-width: 100%;
  max-height: 100%;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.lightbox__img {
  width: auto;
  max-width: 100%;
  max-height: calc(100svh - 160px);
  object-fit: contain;
  background: #fff;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.5);
}

.lightbox__caption {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.03em;
  text-align: center;
}

.lightbox__close {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2;
  display: grid;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  place-items: center;
  color: #fff;
  transition: background-color var(--speed) var(--ease),
    border-color var(--speed) var(--ease);
}

.lightbox__close:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.lightbox__close svg {
  width: 20px;
  height: 20px;
}

.lightbox__nav {
  position: fixed;
  top: 50%;
  z-index: 2;
  display: grid;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  place-items: center;
  color: #fff;
  transform: translateY(-50%);
  transition: background-color var(--speed) var(--ease),
    border-color var(--speed) var(--ease), opacity var(--speed) var(--ease);
}

.lightbox__nav:hover:not(:disabled) {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.lightbox__nav:disabled {
  opacity: 0.25;
}

.lightbox__nav svg {
  width: 20px;
  height: 20px;
}

.lightbox__nav--prev {
  left: clamp(12px, 3vw, 36px);
}

.lightbox__nav--next {
  right: clamp(12px, 3vw, 36px);
}

.lightbox__counter {
  position: fixed;
  bottom: 22px;
  left: 50%;
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  letter-spacing: 0.14em;
  transform: translateX(-50%);
}




/* --------------------------------------------------------------------------
   Cost calculator quiz
   -------------------------------------------------------------------------- */
.quiz-modal .quiz__panel {
  width: min(660px, calc(100vw - 32px));
  max-height: min(88vh, 820px);
  padding: 30px 36px 24px;
  overflow-y: auto;
  text-align: left;
}

.quiz__top {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-right: 32px;
}

.quiz__step {
  flex: none;
  color: #7b7b7b;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.quiz__progress {
  flex: 1;
  height: 3px;
  overflow: hidden;
  background: #ececec;
}

.quiz__progress span {
  display: block;
  width: 8%;
  height: 100%;
  background: var(--red);
  transition: width 0.35s var(--ease);
}

.quiz__content {
  margin-top: 22px;
}

.quiz__title {
  margin: 0;
  color: #111;
  font-size: clamp(23px, 3vw, 30px);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.quiz__hint {
  max-width: 520px;
  margin: 10px 0 0;
  color: #6c6c6c;
  font-size: 13px;
  line-height: 1.55;
}

.quiz__options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
}

.quiz__option {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid #cfcfcf;
  background: #fff;
  color: #171717;
  font-size: 13px;
  line-height: 1.4;
  text-align: left;
  transition: border-color var(--speed) var(--ease),
    background-color var(--speed) var(--ease), color var(--speed) var(--ease);
}

.quiz__option:hover,
.quiz__option:focus-visible {
  border-color: var(--red);
  outline: none;
}

.quiz__option.is-selected {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

.quiz__option-arrow {
  flex: none;
  font-size: 18px;
  line-height: 1;
  color: var(--red);
  transition: color var(--speed) var(--ease);
}

.quiz__option.is-selected .quiz__option-arrow {
  color: #fff;
}

.quiz__text-field {
  margin-top: 24px;
}

.quiz__text-field .form__input {
  height: 60px;
  font-size: 16px;
}

.quiz__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
}

.quiz__back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 0;
  color: #555;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.quiz__back:hover {
  color: var(--red);
}

.quiz__back[hidden],
.quiz__next[hidden] {
  display: none;
}

.quiz__back svg {
  width: 16px;
  height: 16px;
}

.quiz__next {
  width: auto;
  min-width: 150px;
  min-height: 48px;
  margin: 0 0 0 auto;
  padding: 0 24px;
  font-size: 11px;
}

.quiz__contact-form {
  margin-top: 22px;
}

.quiz__contact-form .form__field {
  margin-bottom: 12px;
}

.quiz__contact-form .form__input {
  height: 54px;
}

.quiz__contact-form .form__field--consent {
  margin-top: 14px;
}

.quiz__submit {
  width: 100%;
  min-height: 54px;
  margin-top: 16px;
  border: 0;
  background: var(--red);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: background-color var(--speed) var(--ease);
}

.quiz__submit:hover {
  background: var(--red-hover);
}

.quiz__success {
  padding: 18px 0 6px;
}

.quiz__success-icon {
  display: grid;
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
  place-items: center;
  background: var(--red);
  color: #fff;
}

.quiz__success-icon svg {
  width: 26px;
  height: 26px;
}

.quiz__success-title {
  margin: 0;
  color: #111;
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 700;
  line-height: 1.2;
}

.quiz__success-text {
  margin: 12px 0 20px;
  color: #555;
  font-size: 14px;
  line-height: 1.6;
}

.quiz__success-close {
  margin-top: 4px;
}

@media (max-width: 640px) {
  .quiz-modal .quiz__panel {
    width: 100vw;
    max-height: 90vh;
    padding: 24px 18px 18px;
  }

  .quiz__top {
    padding-right: 26px;
  }

  .quiz__content {
    margin-top: 18px;
  }

  .quiz__options {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 18px;
  }

  .quiz__option {
    min-height: 50px;
    padding: 11px 14px;
    font-size: 12px;
  }

  .quiz__title {
    font-size: 22px;
  }

  .quiz__nav {
    margin-top: 16px;
  }

  .quiz__next {
    min-width: 0;
  }
}

/* --------------------------------------------------------------------------
   Cookie consent
   -------------------------------------------------------------------------- */
.cookie {
  position: fixed;
  left: clamp(16px, 2vw, 28px);
  bottom: clamp(16px, 3vh, 28px);
  z-index: 75;
  display: flex;
  width: min(370px, calc(100vw - 32px));
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #171717;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.42);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity var(--speed) var(--ease),
    transform var(--speed) var(--ease), visibility var(--speed);
}

.cookie.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}

.cookie__text {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  line-height: 1.45;
}

.cookie__text a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie__text a:hover {
  color: var(--red-light);
}

.cookie__accept {
  flex: none;
  min-height: 38px;
  padding: 0 14px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1;
  text-transform: uppercase;
  transition: background-color var(--speed) var(--ease);
}

.cookie__accept:hover {
  background: var(--red-hover);
}

/* --------------------------------------------------------------------------
   Messenger widget
   -------------------------------------------------------------------------- */
.messenger {
  position: fixed;
  right: clamp(16px, 2vw, 28px);
  bottom: clamp(16px, 3vh, 28px);
  z-index: 80;
}

.messenger__toggle {
  position: relative;
  display: grid;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  place-items: center;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
  transition: background-color var(--speed) var(--ease),
    transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
}

.messenger__toggle:hover {
  background: var(--red-hover);
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.42);
}

.messenger__toggle:active {
  transform: translateY(0);
}

.messenger__toggle svg {
  width: 25px;
  height: 25px;
}

.messenger__icon {
  position: absolute;
  display: grid;
  place-items: center;
  transition: opacity var(--speed) var(--ease),
    transform var(--speed) var(--ease);
}

.messenger__icon--close {
  opacity: 0;
  transform: rotate(-45deg) scale(0.8);
}

.messenger.is-open .messenger__icon--chat {
  opacity: 0;
  transform: rotate(45deg) scale(0.8);
}

.messenger.is-open .messenger__icon--close {
  opacity: 1;
  transform: none;
}

.messenger__panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  width: min(286px, calc(100vw - 32px));
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #111111;
  color: #fff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  visibility: hidden;
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  transform-origin: right bottom;
  pointer-events: none;
  transition: opacity var(--speed) var(--ease),
    transform var(--speed) var(--ease), visibility var(--speed);
}

.messenger.is-open .messenger__panel {
  visibility: visible;
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.messenger__title {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.52);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.messenger__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px;
  border-radius: 10px;
  transition: background-color var(--speed) var(--ease);
}

.messenger__item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.messenger__logo {
  display: grid;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  place-items: center;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.messenger__logo--max {
  background: linear-gradient(140deg, #0077ff, #00b2ff);
}

.messenger__logo--tg {
  background: #229ed9;
}

.messenger__logo svg {
  width: 20px;
  height: 20px;
}

.messenger__text {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.messenger__name {
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
}

.messenger__hint {
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  line-height: 1.35;
}

@media (max-width: 1599px) {
  .ghost {
    opacity: 0.022;
  }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1400px) {
  .about__grid {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 500px);
    gap: clamp(30px, 4.5vw, 60px);
  }

  .about__actions .btn {
    min-width: 250px;
    padding-inline: 16px;
    font-size: 16px;
  }

  .cert-slider {
    margin-top: 28px;
  }
}

@media (max-width: 1199px) {
  .carousel {
    --per-view: 3;
  }

  .home__visual {
    width: min(100%, 560px);
  }

  .about__grid {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 440px);
    gap: clamp(32px, 5vw, 64px);
  }

  .cert-slider {
    padding: 0 38px;
  }

  .directions {
    padding-right: 140px;
  }
}

@media (max-width: 1100px) {
  .btn {
    min-width: 270px;
  }

  .actions {
    gap: 10px;
  }

  .display--home {
    font-size: clamp(38px, 7.2vw, 76px);
  }

  .home__inner {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  }

  .note {
    font-size: 18px;
  }

  .features {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .about__grid {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 360px);
    gap: 28px;
  }

  .about__actions {
    margin-top: 20px;
  }
}

@media (max-width: 900px) {
  :root {
    --header-gap: 18px;
    --section-gap: 26px;
  }

  .nav,
  .site-header .contacts {
    display: none;
  }

  .burger {
    display: grid;
  }

  .mobile-brand {
    display: block;
  }

  .site-header__inner {
    justify-content: space-between;
    min-height: 54px;
    padding-bottom: 14px;
  }

  .partner-badge {
    position: static;
    width: 120px;
    margin: 16px 0 0;
  }

  .ghost {
    display: none;
  }

  .home {
    display: block;
    padding-top: 24px;
  }

  .home .home__actions {
    margin-top: clamp(40px, 6vh, 64px);
  }

  .home__inner {
    display: block;
  }

  .home__visual {
    position: absolute;
    top: 12%;
    right: -12%;
    z-index: 0;
    width: min(62vw, 430px);
    margin: 0;
    opacity: 0.42;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
  }

  .home__content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .display--home {
    white-space: normal;
    font-size: clamp(38px, 10.4vw, 72px);
    line-height: 1.02;
  }

  .features {
    margin-top: 28px;
  }

  .features .feature {
    min-height: 102px;
  }

  .page-head {
    padding-top: 24px;
  }

  .about {
    padding-top: 24px;
  }

  .about__grid {
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 20px;
  }

  .cert-slider {
    width: min(100%, 520px);
    margin-inline: auto;
  }

  .about__actions {
    margin-top: 30px;
  }

  .reviews {
    padding-top: 20px;
  }

  .reviews .carousel-block {
    margin-top: 22px;
  }

  .reviews__directions {
    margin-top: 20px;
  }

  .directions {
    grid-auto-flow: row;
    grid-template-rows: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-right: 0;
    padding-bottom: 34px;
  }

  .directions__more {
    right: auto;
    left: 0;
    bottom: 0;
  }

  .creatives__bar {
    margin-top: 20px;
  }

  .carousel {
    --per-view: 2;
    --carousel-gap: 24px;
  }

  .modal--wide .modal__panel {
    padding: 32px 24px;
  }

  .directions-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .success .btn {
    min-width: 320px;
  }
}

@media (max-width: 640px) {
  :root {
    --gutter: 20px;
  }

  .contacts__phone {
    font-size: 18px;
  }

  .display {
    font-size: clamp(34px, 8.6vw, 52px);
  }

  .display--md {
    font-size: clamp(32px, 8.2vw, 46px);
  }

  .display--home {
    font-size: clamp(34px, 10.6vw, 52px);
  }

  .display--home .play {
    left: 1.68em;
    width: 0.31em;
  }

  .home__visual {
    display: none;
  }

  .subtitle {
    font-size: 18px;
  }

  .services {
    display: grid;
    gap: 10px;
    margin-top: 22px;
  }

  .services li {
    font-size: 17px;
  }

  .note {
    margin-top: 22px;
    font-size: 17px;
  }

  .actions {
    width: 100%;
    margin-top: 26px;
    gap: 12px;
  }

  .btn {
    width: 100%;
    min-width: 0;
    min-height: 62px;
    font-size: 16px;
  }

  .features {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 24px;
  }

  .feature,
  .feature__inner {
    min-height: 76px;
  }

  .feature__inner {
    font-size: 16px;
  }

  .partner-badge {
    width: 110px;
    margin-top: 14px;
  }

  .page-tabs {
    gap: 18px;
    font-size: 15px;
  }

  .carousel {
    --per-view: 1;
    --carousel-gap: 16px;
  }

  .carousel-title,
  .creatives__title {
    font-size: 21px;
  }

  .carousel-btn {
    width: 40px;
    height: 40px;
  }

  .carousel-head {
    margin-bottom: 10px;
  }

  .case-card,
  .review-card {
    max-width: 340px;
  }

  .quote {
    font-size: 16px;
    padding-left: 16px;
    border-left-width: 3px;
  }

  .about h2 {
    font-size: 21px;
  }

  .diamond-list {
    font-size: 17px;
    gap: 8px;
  }

  .diamond-list li::before {
    width: 10px;
    height: 10px;
    top: 0.5em;
  }

  .cert-slider {
    padding: 0 34px;
  }

  .cert-arrow {
    width: 32px;
    height: 32px;
  }

  .directions {
    grid-auto-flow: row;
    grid-template-rows: none;
    grid-template-columns: 1fr;
  }

  .collage {
    aspect-ratio: auto;
    display: grid;
    gap: 10px;
    margin-top: 14px;
  }

  .collage__item {
    position: static;
    width: 100%;
    height: auto;
    aspect-ratio: auto;
  }

  .collage__item img {
    width: 100%;
    height: auto;
    object-fit: contain;
  }

  .creative-panel--portrait .collage {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pagination button {
    min-width: 26px;
    height: 30px;
    font-size: 17px;
  }

  .modal__panel {
    width: 100vw;
    max-height: 92svh;
    margin: auto 0 0;
    padding: 32px 20px 24px;
  }

  dialog {
    margin: auto 0 0;
  }

  .modal--wide {
    margin: auto 0 0;
  }

  .modal--wide .modal__panel {
    width: 100vw;
  }

  .modal__title {
    padding: 0 20px;
  }

  .form__input {
    height: 58px;
  }

  .form__submit {
    width: 100%;
  }

  .directions-list {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .lightbox__inner {
    padding: 64px 12px 80px;
  }

  .lightbox__nav {
    top: auto;
    bottom: 18px;
    width: 46px;
    height: 46px;
    transform: none;
  }

  .lightbox__nav--prev {
    left: 18px;
  }

  .lightbox__nav--next {
    right: 18px;
  }

  .lightbox__counter {
    bottom: 32px;
  }

  .lightbox__img {
    max-height: calc(100svh - 190px);
  }

  .cookie {
    right: 16px;
    bottom: 84px;
    left: 16px;
    width: auto;
    padding: 12px 14px;
    gap: 12px;
  }

  .cookie__text {
    font-size: 11px;
  }

  .cookie__accept {
    min-height: 34px;
    padding: 0 12px;
    font-size: 10px;
  }

  .messenger {
    right: 16px;
    bottom: 16px;
  }

  .messenger__toggle {
    width: 52px;
    height: 52px;
  }

  .messenger__panel {
    width: min(286px, calc(100vw - 32px));
  }

  .doc-brand {
    display: none;
  }

  .doc-header__inner {
    min-height: 56px;
  }

  .doc {
    width: calc(100% - 40px);
  }
}

@media (max-width: 480px) {
  .display--home {
    font-size: clamp(31px, 10.2vw, 44px);
  }

  .contacts__phone {
    font-size: 16px;
  }

  .modal__panel {
    padding: 30px 16px 20px;
  }

  .form__consent {
    font-size: 11px;
  }

  .success .btn {
    width: 100%;
    min-width: 0;
  }
}

/* Short desktop viewports: keep everything on one screen where possible */
@media (min-width: 901px) and (max-height: 820px) {
  :root {
    --section-gap: 26px;
  }

  .site-header {
    padding-top: 18px;
  }

  .home,
  .about,
  .success {
    padding-top: 20px;
    padding-bottom: 22px;
  }

  .page-head {
    padding-top: 20px;
  }

  .creatives__bar {
    margin-top: 8px;
  }

  .collage {
    margin-top: 6px;
  }

  .creatives .page-actions {
    margin-top: 0;
  }

  .creatives .page-actions .actions {
    margin-top: 0;
  }

  .reviews .review-card {
    aspect-ratio: 260 / 270;
  }

  .partner-badge {
    top: 20px;
  }

  .home .partner-badge {
    top: 0;
  }

  .reviews .page-head {
    padding-top: 14px;
  }

  .reviews .carousel-block {
    margin-top: 6px;
  }

  .reviews__directions {
    margin-top: 12px;
  }

  .reviews .page-actions {
    margin-top: 0;
  }

  .about h2 {
    margin-top: 18px;
  }

  .note {
    margin-top: 22px;
  }

  .actions,
  .about__actions,
  .page-actions {
    margin-top: 24px;
  }

  .features {
    margin-top: 22px;
  }

  .home .home__actions {
    margin-top: 44px;
  }

  .about h2 {
    margin-top: 24px;
  }

  .carousel-block {
    margin-top: 18px;
  }

  .reviews__directions {
    margin-top: 18px;
  }

  .about .quote {
    font-size: 17px;
    line-height: 1.55;
  }

  .about__actions {
    margin-top: 12px;
  }

  .reviews__directions {
    margin-top: 10px;
  }

  .reviews .page-actions .actions {
    margin-top: 0;
  }

  .btn {
    min-height: 62px;
  }
}

@media (min-width: 901px) and (max-height: 730px) {
  .site .btn {
    min-height: 56px;
  }

  .features .feature {
    min-height: 96px;
  }

  .features .feature__inner {
    min-height: 74px;
  }

  .home__visual {
    width: min(100%, 540px);
  }
}

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

  .home__visual img,
  .home__visual::before {
    animation: none !important;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------------------
   Print (privacy page)
   -------------------------------------------------------------------------- */
@media print {
  .doc-header {
    position: static;
    border: 0;
  }

  .doc-back {
    display: none;
  }

  .doc {
    width: 100%;
    padding: 0;
  }

  .doc a {
    color: inherit;
  }
}
