/* =========================================================
   Farikov — стили
   Размеры в rem: 1rem ≈ 16px на макете 2560px,
   на других экранах всё масштабируется вместе с шириной.
   ========================================================= */

:root {
  --teal: #34828c;
  --teal-dark: #2a6b73;
  --gray: #d9d9d9;
  --gray-hover: #d1d1d1;
  --text: #000;
  --white: #fff;

  --side: 60px;          /* отступ слева и справа у карточек */
  --header-side: 18px;   /* отступ у нав-панели */
  --gap: 20px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

html {
  font-size: clamp(7px, 0.4vw, 11px);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

/* Скрываем полосы прокрутки везде (прокрутка колесом и жестами работает) */
html,
* {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

*::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

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

body {
  min-height: 100vh;
  font-family: "Montserrat", system-ui, sans-serif;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

body.no-scroll {
  overflow: hidden;
}

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

button {
  font-family: inherit;
}

:focus-visible {
  outline: 3px solid #8fd3dc;
  outline-offset: 3px;
}

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

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 200;
  padding: 10px 18px;
  color: var(--white);
  background: var(--teal);
  border-radius: 12px;
}

.skip-link:focus {
  top: 12px;
}

/* ---------- Header ---------- */

.header {
  position: sticky;
  top: 1rem;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 8.75rem;
  margin: 3rem var(--header-side) 0;
  padding: 0 2.5rem 0 2.75rem;
  background: var(--teal);
  border-radius: 100px;
  transition: box-shadow 0.3s var(--ease);
}

.header.is-stuck {
  box-shadow: 0 10px 30px rgba(52, 130, 140, 0.35);
}

.logo {
  font-family: "Dancing Script", cursive;
  font-weight: 600;
  font-size: 4.6rem;
  line-height: 1;
  color: var(--white);
  transition: transform 0.25s var(--ease);
}

.logo:hover {
  transform: scale(1.04);
}

.nav {
  display: flex;
  align-items: center;
  gap: 2.1rem;
}

.nav__link {
  position: relative;
  font-size: 2rem;
  font-weight: 400;
  color: var(--white);
  opacity: 0.85;
  transition: opacity 0.2s;
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.35em;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.nav__link:hover,
.nav__link.is-active {
  opacity: 1;
}

.nav__link:hover::after,
.nav__link.is-active::after {
  transform: scaleX(1);
}

.btn {
  height: 4.5rem;
  padding: 0 2.6rem;
  margin-left: 0.25rem;
  font-size: 2rem;
  font-weight: 400;
  color: var(--text);
  background: var(--white);
  border: none;
  border-radius: 100px;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

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

.btn--accent {
  width: 100%;
  height: 54px;
  margin: 0;
  padding: 0 28px;
  font-size: 18px;
  font-weight: 500;
  color: var(--white);
  background: var(--teal);
}

.btn--accent:hover {
  background: var(--teal-dark);
}

.btn:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
  box-shadow: none;
}

/* Бургер (виден только на узких экранах) */

.burger {
  display: none;
  width: 48px;
  height: 48px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
}

.burger span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--white);
  border-radius: 3px;
  transition: transform 0.3s var(--ease), opacity 0.2s;
}

.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ---------- Pages ---------- */

.main {
  padding: 0 var(--side) 6rem;
}

.page {
  display: none;
  min-height: 50vh;
}

.page.is-active {
  display: block;
}

/* ---------- Portfolio grid ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 5), 1fr);
  gap: var(--gap);
  margin-top: 20px;
}

/* Карточка: картинка → затемнение → заголовок */
.card {
  position: relative;
  display: flex;
  align-items: flex-end;
  aspect-ratio: 506 / 297;
  padding: 0 1.1vw 1vw;
  color: var(--white);
  background: var(--gray);
  border-radius: 1.1vw;
  overflow: hidden;
  isolation: isolate;
  cursor: pointer;
  opacity: 0;
  animation: card-in 0.5s var(--ease) forwards;
  animation-delay: calc(var(--i, 0) * 40ms);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    to top,
    rgba(8, 8, 14, 0.88) 0%,
    rgba(8, 8, 14, 0.55) 32%,
    rgba(8, 8, 14, 0) 68%
  );
  pointer-events: none;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
}

.card__img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.card:hover .card__img {
  transform: scale(1.04);
}

.card__title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.8vw;
  font-weight: 600;
  line-height: 1.25;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}


/* ---------- Главный экран ---------- */

.page--home.is-active {
  display: flex;
}

.hero {
  align-items: center;
  min-height: calc(100vh - 16rem);
}

/* Главная помещается в экран — прокрутки нет (только на десктопе) */
@media (min-width: 1001px) and (min-height: 620px) {
  body.is-home {
    overflow: hidden;
  }

  body.is-home .main {
    padding-bottom: 0;
  }

  .page--home.is-active {
    height: calc(100vh - 14.75rem);
    min-height: 0;
  }
}

.hero__inner {
  width: max-content;   /* ширину задаёт самая широкая строка — имя */
  max-width: 100%;
  padding: 2vw 0;
}

.hero__inner > * {
  opacity: 0;
  animation: card-in 0.6s var(--ease) forwards;
}

.hero__inner > :nth-child(2) { animation-delay: 80ms; }
.hero__inner > :nth-child(3) { animation-delay: 160ms; }
.hero__inner > :nth-child(4) { animation-delay: 240ms; }
.hero__inner > :nth-child(5) { animation-delay: 320ms; }

.hero__title {
  font-family: "Russo One", "Montserrat", sans-serif;
  font-weight: 400;
  line-height: 1;
  text-transform: uppercase;
}

.hero__hello {
  display: block;
  font-size: clamp(20px, 2.3vw, 46px);
  color: #14282b;
  letter-spacing: 0.01em;
}

.hero__name {
  display: block;
  margin-top: 0.4vw;
  font-size: clamp(30px, 4.7vw, 96px);
  color: transparent;
  -webkit-text-stroke: 1.5px var(--teal);
  letter-spacing: 0.01em;
}

.hero__tag {
  display: inline-block;
  margin-top: 1.6vw;
  padding: 0.7em 1.2em;
  font-size: clamp(11px, 0.72vw, 15px);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-dark);
  background: #e4f0f1;
  border-left: 4px solid var(--teal);
}

.hero__text {
  width: 0;
  min-width: 100%;      /* текст переносится вниз по ширине имени */
  margin-top: 1.1vw;
  padding-left: 1.1vw;
  border-left: 2px dashed #bcd0d3;
  font-size: clamp(14px, 0.85vw, 18px);
  line-height: 1.6;
  color: #34474a;
}

.hero__text p + p {
  margin-top: 0.9em;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8vw;
  margin-top: 1.6vw;
}

.hero__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: clamp(42px, 2.6vw, 54px);
  padding: 0 2em;
  font-family: inherit;
  font-size: clamp(12px, 0.72vw, 14px);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 2px solid var(--teal);
  border-radius: 100px;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease),
    background 0.2s, color 0.2s;
}

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

.hero__btn--primary {
  color: var(--white);
  background: var(--teal);
}

.hero__btn--primary:hover {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
  box-shadow: 0 10px 24px rgba(52, 130, 140, 0.35);
}

.hero__btn--ghost {
  color: var(--teal);
  background: transparent;
}

.hero__btn--ghost:hover {
  color: var(--white);
  background: var(--teal);
}

.hero__btn--light {
  color: var(--teal-dark);
  background: var(--white);
  border-color: var(--white);
}

.hero__btn--light:hover {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.hero__btn--outline-light {
  color: var(--white);
  background: transparent;
  border-color: rgba(255, 255, 255, 0.7);
}

.hero__btn--outline-light:hover {
  color: var(--teal-dark);
  background: var(--white);
  border-color: var(--white);
}

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2vw 3vw;
  margin-top: 2.6vw;
  padding-top: 1.3vw;
  border-top: 1px solid #dbe5e7;
  list-style: none;
}

.hero__stats strong {
  display: block;
  font-size: clamp(20px, 1.7vw, 34px);
  font-weight: 800;
  line-height: 1.1;
  color: var(--teal);
}

.hero__stats span {
  display: block;
  margin-top: 0.3em;
  font-size: clamp(11px, 0.7vw, 14px);
  color: #5b6b6e;
}

@media (max-width: 1000px) {
  .hero { min-height: auto; }
  .hero__inner { width: 100%; max-width: none; padding: 28px 4px 8px; }
  .hero__text { width: auto; min-width: 0; }
  .hero__hello { font-size: clamp(20px, 5vw, 38px); }
  .hero__name { font-size: clamp(30px, 9.2vw, 76px); -webkit-text-stroke-width: 1.2px; }
  .hero__tag { margin-top: 22px; font-size: 12px; }
  .hero__text { margin-top: 20px; padding-left: 14px; font-size: 16px; }
  .hero__actions { gap: 12px; margin-top: 24px; }
  .hero__btn { flex: 1 1 100%; height: 52px; font-size: 14px; }
  .hero__stats { gap: 18px 28px; margin-top: 32px; padding-top: 20px; }
  .hero__stats strong { font-size: 26px; }
  .hero__stats span { font-size: 13px; }
}


/* ---------- Обо мне ---------- */

.about {
  padding: 2vw 0 1vw;
}

.about__section {
  margin-top: 7vw;
}

.eyebrow {
  display: inline-block;
  padding: 0.7em 1.2em;
  font-size: clamp(11px, 0.72vw, 15px);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-dark);
  background: #e4f0f1;
  border-left: 4px solid var(--teal);
}

.section-head {
  margin-bottom: 2.4vw;
}

.section-title {
  margin-top: 1vw;
  font-family: "Russo One", "Montserrat", sans-serif;
  font-size: clamp(22px, 2.1vw, 42px);
  font-weight: 400;
  line-height: 1.1;
  text-transform: uppercase;
  color: #14282b;
}

/* Знакомство */

.about__intro {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  gap: 6vw;
  align-items: center;
}

.about__title {
  margin-top: 1.4vw;
  font-family: "Russo One", "Montserrat", sans-serif;
  font-size: clamp(30px, 4vw, 80px);
  font-weight: 400;
  line-height: 1.05;
  text-transform: uppercase;
  color: #14282b;
}

.about__title-outline {
  display: block;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--teal);
}

.about__lead {
  max-width: 38em;
  margin-top: 1.8vw;
  font-size: clamp(16px, 1.1vw, 22px);
  font-weight: 500;
  line-height: 1.5;
  color: #14282b;
}

.about__text {
  max-width: 46em;
  margin-top: 1vw;
  font-size: clamp(14px, 0.88vw, 18px);
  line-height: 1.7;
  color: #34474a;
}

.about__facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.4vw 2.4vw;
  max-width: 46em;
  margin-top: 2.2vw;
  padding-top: 1.6vw;
  border-top: 1px solid #dbe5e7;
}

.about__facts dt {
  font-size: clamp(11px, 0.7vw, 14px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7c7f;
}

.about__facts dd {
  margin-top: 0.4em;
  font-size: clamp(14px, 0.95vw, 19px);
  font-weight: 600;
  color: #14282b;
}

.about__photo {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: linear-gradient(150deg, #43a0ad 0%, var(--teal) 45%, #24616a 100%);
  border-radius: 1.8vw;
}

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

.about__photo-mark {
  font-family: "Russo One", "Montserrat", sans-serif;
  font-size: clamp(70px, 9vw, 180px);
  color: rgba(255, 255, 255, 0.22);
  letter-spacing: 0.04em;
}

.about__badge {
  position: absolute;
  left: 1.2vw;
  bottom: 1.2vw;
  padding: 0.9vw 1.3vw;
  font-size: clamp(12px, 0.8vw, 16px);
  color: #34474a;
  background: var(--white);
  border-radius: 0.9vw;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.about__badge strong {
  margin-right: 0.3em;
  font-size: 1.5em;
  font-weight: 800;
  color: var(--teal);
}

/* Услуги */

.services {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4vw;
  list-style: none;
}

.service {
  padding: 2vw;
  background: #f4f9f9;
  border: 1px solid #dfeaeb;
  border-radius: 1.3vw;
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s var(--ease);
}

.service:hover {
  transform: translateY(-4px);
  border-color: var(--teal);
  box-shadow: 0 14px 28px rgba(52, 130, 140, 0.15);
}

.service__icon {
  display: grid;
  place-items: center;
  width: clamp(40px, 3vw, 62px);
  height: clamp(40px, 3vw, 62px);
  color: var(--white);
  background: var(--teal);
  border-radius: 50%;
}

.service__icon svg,
.why__icon svg {
  width: 48%;
  height: 48%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service h3 {
  margin-top: 1.3vw;
  font-size: clamp(16px, 1.1vw, 22px);
  font-weight: 700;
  color: #14282b;
}

.service p {
  margin-top: 0.6vw;
  font-size: clamp(13px, 0.84vw, 17px);
  line-height: 1.6;
  color: #55676a;
}

/* Процесс */

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2.4vw;
  list-style: none;
}

.step {
  position: relative;
  padding-top: 1.6vw;
  border-top: 2px solid #d3e2e4;
}

.step::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 0;
  width: 3.5vw;
  height: 2px;
  background: var(--teal);
}

.step__num {
  display: block;
  font-family: "Russo One", "Montserrat", sans-serif;
  font-size: clamp(28px, 2.6vw, 52px);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.2px var(--teal);
}

.step h3 {
  margin-top: 1vw;
  font-size: clamp(16px, 1.1vw, 22px);
  font-weight: 700;
  color: #14282b;
}

.step p {
  margin-top: 0.6vw;
  font-size: clamp(13px, 0.84vw, 17px);
  line-height: 1.6;
  color: #55676a;
}

/* Преимущества */

.why {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2vw 4vw;
  list-style: none;
}

.why li {
  display: flex;
  gap: 1.3vw;
  align-items: flex-start;
}

.why__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: clamp(34px, 2.4vw, 50px);
  height: clamp(34px, 2.4vw, 50px);
  color: var(--teal);
  background: #e4f0f1;
  border-radius: 50%;
}

.why h3 {
  font-size: clamp(16px, 1.1vw, 22px);
  font-weight: 700;
  color: #14282b;
}

.why p {
  margin-top: 0.4vw;
  font-size: clamp(13px, 0.84vw, 17px);
  line-height: 1.6;
  color: #55676a;
}

/* Призыв к действию */

.about__cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3vw;
  margin-top: 7vw;
  margin-bottom: 2vw;
  padding: 3.2vw 3.6vw;
  color: var(--white);
  background: linear-gradient(120deg, var(--teal) 0%, #2a6b73 100%);
  border-radius: 2vw;
}

.cta__title {
  font-family: "Russo One", "Montserrat", sans-serif;
  font-size: clamp(22px, 2.2vw, 44px);
  font-weight: 400;
  line-height: 1.1;
  text-transform: uppercase;
}

.cta__text {
  margin-top: 0.8vw;
  font-size: clamp(14px, 0.95vw, 19px);
  line-height: 1.5;
  opacity: 0.92;
}

.cta__actions {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8vw;
}

/* Появление при прокрутке */

.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 1000px) {
  .about { padding-top: 16px; }
  .about__section { margin-top: 56px; }
  .eyebrow { font-size: 12px; }
  .section-head { margin-bottom: 22px; }
  .section-title { margin-top: 12px; font-size: 24px; }

  .about__intro { grid-template-columns: 1fr; gap: 32px; }
  .about__intro-text { order: 2; }
  .about__photo { order: 1; width: 100%; max-width: 420px; border-radius: 24px; }
  .about__photo-mark { font-size: 110px; }
  .about__badge { left: 14px; bottom: 14px; padding: 10px 14px; border-radius: 12px; font-size: 13px; }

  .about__title { margin-top: 16px; font-size: clamp(30px, 8.5vw, 52px); }
  .about__lead { margin-top: 18px; font-size: 17px; }
  .about__text { margin-top: 12px; font-size: 15px; }
  .about__facts { gap: 16px 20px; margin-top: 24px; padding-top: 20px; }
  .about__facts dt { font-size: 11px; }
  .about__facts dd { font-size: 15px; }

  .services { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .service { padding: 22px; border-radius: 18px; }
  .service__icon { width: 46px; height: 46px; }
  .service h3 { margin-top: 16px; font-size: 18px; }
  .service p { margin-top: 8px; font-size: 14px; }

  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; }
  .step { padding-top: 18px; }
  .step::before { width: 40px; }
  .step__num { font-size: 32px; }
  .step h3 { margin-top: 12px; font-size: 18px; }
  .step p { margin-top: 8px; font-size: 14px; }

  .why { grid-template-columns: 1fr; gap: 20px; }
  .why li { gap: 14px; }
  .why__icon { width: 40px; height: 40px; }
  .why h3 { font-size: 18px; }
  .why p { margin-top: 4px; font-size: 14px; }

  .about__cta { flex-direction: column; align-items: stretch; gap: 22px; margin: 56px 0 8px; padding: 28px 22px; border-radius: 26px; }
  .cta__title { font-size: 26px; }
  .cta__text { margin-top: 10px; font-size: 15px; }
  .cta__actions { gap: 12px; }
}

@media (max-width: 560px) {
  .services,
  .steps { grid-template-columns: 1fr; }
  .about__facts { grid-template-columns: 1fr; }
}


/* ---------- Шапка внутренних страниц (Портфолио, Контакты) ---------- */

.page-head {
  padding-top: 2vw;
}

.page-title {
  margin-top: 1.2vw;
  font-family: "Russo One", "Montserrat", sans-serif;
  font-size: clamp(26px, 3.2vw, 64px);
  font-weight: 400;
  line-height: 1.05;
  text-transform: uppercase;
  color: #14282b;
}

.page-title .outline {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--teal);
}

.page-head__actions {
  margin-top: 2vw;
}

.page-head + .grid {
  margin-top: 2.2vw;
}

@media (max-width: 1000px) {
  .page-head { padding-top: 16px; }
  .page-title { margin-top: 16px; font-size: clamp(28px, 8vw, 44px); -webkit-text-stroke-width: 1.2px; }
  .page-head__actions { margin-top: 24px; }
  .page-head + .grid { margin-top: 24px; }
}

/* Страница «Услуги» */

.page-head + .services {
  margin-top: 2.2vw;
}

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

.service__link {
  margin-top: auto;
  padding: 1.2vw 0 0;
  font-family: inherit;
  font-size: clamp(13px, 0.84vw, 17px);
  font-weight: 600;
  color: var(--teal);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s;
}

.service__link span {
  display: inline-block;
  transition: transform 0.2s var(--ease);
}

.service__link:hover { color: var(--teal-dark); }
.service__link:hover span { transform: translateX(4px); }

.service__link:focus-visible {
  outline: 3px solid rgba(52, 130, 140, 0.45);
  outline-offset: 4px;
  border-radius: 6px;
}

.page[data-page="services"] .about__cta {
  margin-top: 4vw;
}

@media (max-width: 1000px) {
  .page-head + .services { margin-top: 24px; }
  .service__link { padding-top: 16px; font-size: 14px; }
  .page[data-page="services"] .about__cta { margin-top: 40px; }
}

/* Страница «Контакты» */

.contacts {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
  gap: 6vw;
  align-items: start;
}

.contact-form {
  margin-top: 2vw;
  padding: 2.4vw;
  background: var(--white);
  border: 1px solid #dfeaeb;
  border-radius: 1.8vw;
  box-shadow: 0 14px 40px rgba(52, 130, 140, 0.12);
}

.contact-form__title {
  margin-bottom: 1.6vw;
  font-family: "Russo One", "Montserrat", sans-serif;
  font-size: clamp(20px, 1.5vw, 30px);
  font-weight: 400;
  text-transform: uppercase;
  color: #14282b;
}

@media (max-width: 1000px) {
  .contacts { grid-template-columns: 1fr; gap: 24px; }
  .contact-form { margin-top: 0; padding: 24px 20px; border-radius: 22px; }
  .contact-form__title { margin-bottom: 20px; font-size: 22px; }
}

/* ---------- Окно проекта ---------- */

.pmodal {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.pmodal.is-open { display: flex; }

.pmodal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(8, 20, 22, 0.6);
  backdrop-filter: blur(4px);
  animation: fade 0.25s ease;
}

.pmodal__box {
  position: relative;
  width: 100%;
  max-width: 860px;
  max-height: calc(100vh - 40px);
  padding: 36px 40px 32px;
  overflow-y: auto;
  background: var(--white);
  border-radius: 28px;
  animation: pop 0.3s var(--ease);
}

.pmodal__close {
  position: absolute;
  top: 16px;
  right: 18px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  font-size: 28px;
  line-height: 1;
  color: #55676a;
  background: #f1f5f5;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.pmodal__close:hover { color: var(--white); background: var(--teal); }

.pmodal__title {
  padding-right: 48px;
  font-family: "Russo One", "Montserrat", sans-serif;
  font-size: 26px;
  font-weight: 400;
  line-height: 1.2;
  text-transform: uppercase;
  color: #14282b;
}

.pmodal__tag {
  display: inline-block;
  margin-top: 14px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal-dark);
  background: #e4f0f1;
  border-left: 4px solid var(--teal);
}

.pmodal__tag:empty { display: none; }

/* Слайдер */

.pslider {
  position: relative;
  margin-top: 20px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #eef3f3;
  border: 1px solid #dfeaeb;
  border-radius: 18px;
  touch-action: pan-y;
}

.pslider__track {
  display: flex;
  height: 100%;
  transition: transform 0.4s var(--ease);
}

.pslider__slide {
  flex: none;
  width: 100%;
  height: 100%;
}

.pslider__slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pslider__ph {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  width: 100%;
  height: 100%;
  font-size: 15px;
  color: #7a8c8f;
  background: linear-gradient(135deg, #e4f0f1, #f6fafa);
}

.pslider__ph svg {
  width: 44px;
  height: 44px;
  fill: none;
  stroke: var(--teal);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pslider__arrow {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding-bottom: 4px;
  font-size: 30px;
  line-height: 1;
  color: var(--white);
  background: rgba(20, 40, 43, 0.55);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s;
}

.pslider__arrow:hover { background: var(--teal); }
.pslider__arrow--prev { left: 14px; }
.pslider__arrow--next { right: 14px; }

.pslider.is-single .pslider__arrow,
.pslider.is-single .pslider__dots { display: none; }

.pslider__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.pslider__dot {
  width: 9px;
  height: 9px;
  padding: 0;
  background: rgba(255, 255, 255, 0.6);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
  transition: width 0.25s var(--ease), background 0.2s;
}

.pslider__dot.is-active {
  width: 24px;
  background: var(--white);
  border-radius: 6px;
}

.pmodal__text {
  margin-top: 22px;
  font-size: 17px;
  line-height: 1.55;
  color: #2b3b3e;
}

.pmodal__text:empty { display: none; }

.pmodal__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid #e3ecec;
}

.pmodal__votes,
.pmodal__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pmodal__link {
  font-size: 15px;
  font-weight: 600;
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.pmodal__foot > *,
.pmodal__actions > * {
  flex: none;
}

.pmodal__actions .hero__btn {
  height: 50px;
  font-size: 14px;
}

.vote {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 20px;
  font-size: 16px;
  font-weight: 600;
  color: #2b3b3e;
  background: var(--white);
  border: 1px solid #cfdcdd;
  border-radius: 100px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.vote svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.vote:hover { border-color: var(--teal); color: var(--teal); }

.vote[aria-pressed="true"] {
  color: var(--white);
  background: var(--teal);
  border-color: var(--teal);
}

.pmodal__close:focus-visible,
.pslider__arrow:focus-visible,
.pslider__dot:focus-visible,
.vote:focus-visible {
  outline: 3px solid rgba(52, 130, 140, 0.5);
  outline-offset: 3px;
}

@media (max-width: 700px) {
  .pmodal { padding: 12px; }
  .pmodal__box { padding: 24px 18px 20px; border-radius: 22px; }
  .pmodal__title { font-size: 19px; }
  .pmodal__close { top: 12px; right: 12px; width: 36px; height: 36px; }
  .pslider { border-radius: 14px; }
  .pslider__arrow { width: 38px; height: 38px; font-size: 26px; }
  .pslider__arrow--prev { left: 8px; }
  .pslider__arrow--next { right: 8px; }
  .pmodal__text { font-size: 15px; }
  .pmodal__foot { flex-direction: column; align-items: stretch; }
  .pmodal__actions { flex-direction: column; align-items: stretch; }
  .pmodal__actions .hero__btn { width: 100%; }
  .pmodal__votes { justify-content: center; }
}

/* ---------- Modal ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.is-open {
  display: flex;
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(3px);
  animation: fade 0.25s ease;
}

.modal__box {
  position: relative;
  width: 100%;
  max-width: 480px;
  padding: 36px;
  background: var(--white);
  border-radius: 28px;
  animation: pop 0.3s var(--ease);
}

.modal__close {
  position: absolute;
  top: 14px;
  right: 20px;
  font-size: 34px;
  line-height: 1;
  color: #777;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s;
}

.modal__close:hover {
  color: var(--text);
}

.modal__title {
  margin-bottom: 22px;
  font-size: 26px;
  font-weight: 500;
}

.field {
  display: block;
  margin-bottom: 16px;
}

.field span {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  color: #555;
}

.field input,
.field textarea {
  width: 100%;
  padding: 14px 18px;
  font-family: inherit;
  font-size: 16px;
  background: #f3f3f3;
  border: 2px solid transparent;
  border-radius: 16px;
  outline: none;
  resize: vertical;
  transition: border-color 0.2s, background 0.2s;
}

.field input:focus,
.field textarea:focus {
  background: var(--white);
  border-color: var(--teal);
}

.field.is-invalid input {
  border-color: #d64545;
}

.field__error {
  display: block;
  min-height: 0;
  margin-top: 4px;
  font-size: 13px;
  color: #d64545;
}

.modal__status {
  min-height: 20px;
  margin-top: 12px;
  font-size: 14px;
  color: var(--teal);
}

@keyframes fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes pop {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Адаптив ---------- */

@media (max-width: 1100px) {
  .grid {
    gap: 20px;
  }

  .card {
    padding: 0 20px 18px;
    border-radius: 22px;
  }

  .card__title {
    font-size: 18px;
  }


}

@media (max-width: 1500px) {
  .grid { --cols: 4; }
}

@media (max-width: 1200px) {
  .grid { --cols: 3; }
}

@media (max-width: 760px) {
  .grid { --cols: 2; }
}

/* Планшет и телефон: меню в бургере, размеры в px */
@media (max-width: 1000px) {
  :root { --side: 16px; --header-side: 16px; }

  .header {
    flex-wrap: wrap;
    height: auto;
    min-height: 76px;
    margin-top: 16px;
    padding: 14px 20px 14px 26px;
    border-radius: 38px;
  }

  .logo { font-size: 36px; }

  .burger { display: flex; }

  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px 0 8px;
  }

  .nav.is-open {
    display: flex;
    animation: fade 0.25s ease;
  }

  .nav__link {
    padding: 12px 6px;
    font-size: 20px;
  }

  .nav__link::after { display: none; }

  .nav__link.is-active {
    text-decoration: underline;
    text-underline-offset: 6px;
  }

  .btn {
    height: 52px;
    margin: 8px 0 0;
    font-size: 20px;
  }


  .main { padding-bottom: 40px; }
  .grid { margin-top: 20px; }
}

@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
  .modal__box { padding: 28px 22px; }
}

/* ---------- Чат поддержки (заглушка) ---------- */

.chat {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  font-family: inherit;
}

.chat__toggle {
  position: relative;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-left: auto;
  color: var(--white);
  background: var(--teal);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(42, 107, 115, 0.45);
  transition: transform 0.2s var(--ease), background 0.2s, box-shadow 0.2s var(--ease);
}

.chat__toggle:hover {
  background: var(--teal-dark);
  transform: translateY(-2px) scale(1.05);
}

.chat__toggle:focus-visible,
.chat__close:focus-visible,
.chat__send:focus-visible {
  outline: 3px solid rgba(52, 130, 140, 0.45);
  outline-offset: 3px;
}

.chat__icon {
  position: absolute;
  transition: opacity 0.2s, transform 0.25s var(--ease);
}

.chat__icon--close {
  opacity: 0;
  transform: rotate(-90deg) scale(0.6);
}

.chat.is-open .chat__icon--open {
  opacity: 0;
  transform: rotate(90deg) scale(0.6);
}

.chat.is-open .chat__icon--close {
  opacity: 1;
  transform: none;
}

.chat__panel {
  position: absolute;
  right: 0;
  bottom: 80px;
  display: flex;
  flex-direction: column;
  width: 360px;
  max-width: calc(100vw - 32px);
  height: 480px;
  max-height: calc(100vh - 130px);
  overflow: hidden;
  background: var(--white);
  border-radius: 24px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.97);
  transform-origin: bottom right;
  transition: opacity 0.2s, transform 0.25s var(--ease), visibility 0s 0.25s;
}

.chat.is-open .chat__panel {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}

.chat__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  color: var(--white);
  background: var(--teal);
}

.chat__avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  font-size: 20px;
  font-weight: 600;
  color: var(--teal);
  background: var(--white);
  border-radius: 50%;
}

.chat__who {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}

.chat__who strong { font-size: 16px; font-weight: 600; }
.chat__who span { font-size: 12px; opacity: 0.85; }

.chat__close {
  font-size: 28px;
  line-height: 1;
  color: var(--white);
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.chat__close:hover { opacity: 1; }

.chat__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  overflow-y: auto;
  background: #f6f8f8;
}

.chat__msg {
  max-width: 82%;
  padding: 10px 14px;
  font-size: 15px;
  line-height: 1.4;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  border-radius: 18px;
  animation: chat-in 0.25s var(--ease);
}

.chat__msg--bot {
  align-self: flex-start;
  color: #222;
  background: var(--white);
  border-bottom-left-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.chat__msg--user {
  align-self: flex-end;
  color: var(--white);
  background: var(--teal);
  border-bottom-right-radius: 6px;
}

.chat__action {
  align-self: flex-start;
  height: 38px;
  padding: 0 18px;
  font-family: inherit;
  font-size: 14px;
  color: var(--teal);
  background: var(--white);
  border: 2px solid var(--teal);
  border-radius: 100px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  animation: chat-in 0.25s var(--ease);
}

.chat__action:hover {
  color: var(--white);
  background: var(--teal);
}

.chat__form {
  display: flex;
  gap: 8px;
  padding: 12px;
  background: var(--white);
  border-top: 1px solid #ececec;
}

.chat__input {
  flex: 1;
  min-width: 0;
  padding: 0 16px;
  height: 44px;
  font-family: inherit;
  font-size: 16px;
  background: #f3f3f3;
  border: 2px solid transparent;
  border-radius: 100px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

.chat__input:focus {
  background: var(--white);
  border-color: var(--teal);
}

.chat__send {
  flex: none;
  width: 44px;
  height: 44px;
  font-size: 18px;
  color: var(--white);
  background: var(--teal);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s;
}

.chat__send:hover { background: var(--teal-dark); }

@keyframes chat-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 560px) {
  .chat { right: 16px; bottom: 16px; }
  .chat__toggle { width: 58px; height: 58px; }
  .chat__panel { bottom: 72px; height: 70vh; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
