/* ==========================================================================
   Tariffs, FAQ, process, contacts, footer, motion
   ========================================================================== */

/* ---------- Tariffs ---------- */

.tariffs {
  background:
    radial-gradient(ellipse at 8% 90%, rgba(94, 23, 33, 0.05), transparent 38%),
    var(--paper);
}

.tariffs__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: start;
}

.tariff-table {
  border-top: 2px solid var(--ink);
}

.tariff-row {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) auto;
  gap: 4px 24px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
  transition: background 0.3s ease, padding 0.3s ease;
}

.tariff-row:hover {
  padding-left: 10px;
  padding-right: 10px;
  background: var(--paper-2);
}

.tariff-row__name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.tariff-row__price {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.15;
  text-align: right;
  white-space: nowrap;
}

.tariff-row__price small {
  margin-left: 2px;
  font-family: var(--sans);
  font-size: 8px;
  font-weight: 500;
  color: var(--muted);
}

.tariff-row__note {
  grid-column: 1 / -1;
  font-size: 9px;
  line-height: 1.4;
  color: var(--muted);
}

.tariff-row--accent .tariff-row__price {
  color: var(--wine);
}

.tariff-row--accent {
  background: rgba(94, 23, 33, 0.035);
}

/* ---------- FAQ ---------- */

.faq__item {
  border-bottom: 1px solid var(--line);
}

.faq__item:first-child {
  border-top: 1px solid var(--line);
}

.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 0;
  list-style: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.faq__item summary::-webkit-details-marker {
  display: none;
}

.faq__item summary i {
  position: relative;
  flex: none;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.faq__item summary i::before,
.faq__item summary i::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  background: var(--ink);
  transition: transform 0.3s var(--ease), background 0.3s ease,
    opacity 0.3s ease;
}

.faq__item summary i::before {
  width: 8px;
  height: 1px;
  transform: translate(-50%, -50%);
}

.faq__item summary i::after {
  width: 1px;
  height: 8px;
  transform: translate(-50%, -50%);
}

.faq__item[open] summary i {
  background: var(--wine);
  border-color: var(--wine);
}

.faq__item[open] summary i::before,
.faq__item[open] summary i::after {
  background: var(--paper);
}

.faq__item[open] summary i::after {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(90deg);
}

.faq__body {
  padding: 0 36px 17px 0;
  animation: faqIn 0.35s var(--ease);
}

.faq__body p {
  max-width: 54ch;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}

.tariffs__note {
  max-width: 74ch;
  margin-top: 40px;
  font-size: 9px;
  line-height: 1.6;
  color: var(--muted);
}

/* ---------- Process ---------- */

.process {
  position: relative;
  overflow: hidden;
  background: var(--wine-deep);
  color: var(--paper);
}

.process::before {
  content: "";
  position: absolute;
  top: -30%;
  right: -12%;
  width: 60%;
  height: 120%;
  background: radial-gradient(ellipse, rgba(193, 18, 47, 0.22), transparent 62%);
  pointer-events: none;
}

.process::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(247, 242, 234, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(247, 242, 234, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse at 50% 50%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, #000 0%, transparent 78%);
  pointer-events: none;
}

.process .container {
  position: relative;
  z-index: 1;
}

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

.step {
  position: relative;
  padding-top: 28px;
  border-top: 1px solid rgba(247, 242, 234, 0.18);
}

.step__num {
  display: block;
  margin-bottom: 26px;
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--rose);
}

.step__line {
  position: absolute;
  top: -4px;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
}

.step h3 {
  margin-bottom: 10px;
  font-family: var(--serif);
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 500;
  line-height: 1.1;
}

.step p {
  max-width: 25ch;
  font-size: 12px;
  line-height: 1.65;
  color: rgba(247, 242, 234, 0.52);
}

.process__note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 32px;
  align-items: center;
  margin-top: clamp(48px, 6vw, 80px);
  padding-top: 24px;
  border-top: 1px solid rgba(247, 242, 234, 0.16);
}

.process__note > span {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rose);
  white-space: nowrap;
}

.process__note p {
  max-width: 58ch;
  font-size: 12px;
  line-height: 1.65;
  color: rgba(247, 242, 234, 0.52);
}

/* ---------- Contacts ---------- */

.contacts {
  padding-bottom: clamp(44px, 6vw, 76px);
  background: var(--paper);
}

.contacts__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 7vw, 100px);
  align-items: start;
}

.contacts__lead {
  max-width: 40ch;
  margin-top: 24px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}

.contacts__hours,
.contacts__geo {
  margin-top: 30px;
  padding-left: 18px;
  border-left: 2px solid var(--red);
}

.contacts__hours-label {
  display: block;
  margin-bottom: 6px;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.contacts__hours p,
.contacts__geo p {
  font-size: 13px;
  line-height: 1.55;
}

.contacts__hours p span {
  font-size: 11px;
  color: var(--muted);
}

.contacts__phones {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.phone-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 94px;
  padding: 22px 78px 22px 26px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: transparent;
  transition: background 0.35s var(--ease), color 0.35s var(--ease),
    border-color 0.35s var(--ease);
}

.phone-card:hover {
  background: var(--wine);
  border-color: var(--wine);
  color: var(--paper);
}

.phone-card__label {
  margin-bottom: 10px;
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.35s ease;
}

.phone-card:hover .phone-card__label {
  color: rgba(247, 242, 234, 0.48);
}

.phone-card__number {
  font-family: var(--serif);
  font-size: clamp(25px, 2.6vw, 33px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.phone-card__arrow {
  position: absolute;
  top: 50%;
  right: 24px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  transform: translateY(-50%);
  transition: background 0.35s ease, color 0.35s ease,
    border-color 0.35s ease, transform 0.35s var(--ease);
}

.phone-card__arrow svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.phone-card:hover .phone-card__arrow {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--wine);
  transform: translateY(-50%) rotate(-45deg);
}

.phone-card--main {
  min-height: 216px;
  padding: clamp(28px, 3vw, 38px);
  border-color: var(--wine);
  border-top-width: 3px;
  background: var(--paper);
  color: var(--wine);
}

.phone-card--main::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 88% 8%, rgba(193, 18, 47, 0.09), transparent 52%);
  pointer-events: none;
}

.phone-card--main .phone-card__label {
  position: relative;
  color: var(--muted);
}

.phone-card--main .phone-lockup {
  position: relative;
}

.phone-card--main .phone-lockup__number {
  font-size: clamp(27px, 3.3vw, 42px);
  color: var(--wine);
}

.phone-card--main .phone-lockup__circle {
  border-color: var(--red);
  color: var(--red);
}

.phone-card--main .phone-lockup__note {
  color: var(--muted);
}

.phone-card--main .phone-card__arrow {
  top: auto;
  bottom: 26px;
  border-color: rgba(94, 23, 33, 0.24);
  color: var(--wine);
  transform: none;
}

.phone-card--main:hover {
  background: var(--wine);
  border-color: var(--wine);
  color: var(--paper);
}

.phone-card--main:hover .phone-card__label {
  color: rgba(247, 242, 234, 0.5);
}

.phone-card--main:hover .phone-lockup__number {
  color: var(--paper);
}

.phone-card--main:hover .phone-lockup__circle {
  border-color: var(--red);
  color: var(--paper);
}

.phone-card--main:hover .phone-lockup__note {
  color: rgba(247, 242, 234, 0.52);
}

.phone-card--main:hover .phone-card__arrow {
  transform: rotate(-45deg);
}

.contacts__bottom {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: clamp(44px, 6vw, 76px);
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 8px;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.contacts__bottom a {
  transition: color 0.25s ease;
}

.contacts__bottom a:hover {
  color: var(--wine);
}

/* ---------- Footer ---------- */

.footer {
  padding: clamp(46px, 6vw, 72px) 0 22px;
  background: var(--ink);
  color: var(--paper);
}

.footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 48px;
  align-items: start;
  padding-bottom: 44px;
  border-bottom: 1px solid rgba(247, 242, 234, 0.12);
}

.footer .logo__text small {
  opacity: 0.6;
}

.footer__nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 28px;
  font-size: 11px;
  color: rgba(247, 242, 234, 0.62);
}

.footer__nav a {
  transition: color 0.25s ease;
}

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

.footer__phones {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  text-align: right;
}

.footer__phones span {
  margin-top: 8px;
  font-size: 9px;
  color: rgba(247, 242, 234, 0.6);
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-top: 18px;
  font-size: 9px;
  color: rgba(247, 242, 234, 0.6);
}

.footer__bottom a {
  transition: color 0.25s ease;
}

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

/* ---------- Mobile bar ---------- */

.mobile-bar {
  position: fixed;
  inset: auto 0 0;
  z-index: 90;
  display: none;
  gap: 8px;
  padding: 9px 12px calc(9px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(247, 242, 234, 0.94);
  backdrop-filter: blur(16px);
}

.mobile-bar a {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  border-radius: 1px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.mobile-bar svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mobile-bar__call {
  background: var(--red);
  color: #fff;
}

.mobile-bar__calc {
  border: 1px solid var(--line);
  color: var(--ink);
}

/* ---------- Motion ---------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: calc(var(--d, 0) * 90ms);
}

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

[data-delay="1"] {
  --d: 1;
}

[data-delay="2"] {
  --d: 2;
}

[data-delay="3"] {
  --d: 3;
}

[data-delay="4"] {
  --d: 4;
}

.route-pulse {
  stroke-dasharray: 0.06 1;
  stroke-dashoffset: 1;
  animation: routePulse 6.5s linear infinite;
}

.route-pulse--msk {
  animation-delay: 2.2s;
}

.route-pulse--psk {
  animation-delay: 4.4s;
}

.node-pulse {
  transform-box: fill-box;
  transform-origin: center;
  animation: nodePulse 3.8s ease-out infinite;
}

.node-pulse--slow {
  animation-duration: 5.4s;
  animation-delay: 1.2s;
}

@keyframes routePulse {
  from {
    stroke-dashoffset: 1;
  }
  to {
    stroke-dashoffset: -1;
  }
}

@keyframes nodePulse {
  0% {
    transform: scale(0.65);
    opacity: 0.65;
  }
  70% {
    transform: scale(2.6);
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

@keyframes mapFloat {
  from {
    transform: translateY(-50%);
  }
  to {
    transform: translateY(-52.5%);
  }
}

@keyframes fogMove {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(4vw, -2vw, 0) scale(1.12);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulseDot {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(123, 216, 143, 0.28);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(123, 216, 143, 0);
  }
}

@keyframes faqIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

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

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

  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
