/* =========================================================
   СВЕЖО — служебные страницы
   ========================================================= */

/* ---------- Общие элементы ---------- */

.utility-header {
  position: relative;
  z-index: 2;
  padding: 22px 0;
}

.utility-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.utility-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 253, 248, 0.78);
  font-size: 13px;
  font-weight: 600;
  transition: color 0.2s ease;
}

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

.utility-phone .icon {
  color: var(--sage);
}

.utility-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.utility-back:hover {
  color: var(--ink);
}

.utility-footer {
  position: relative;
  z-index: 2;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 253, 248, 0.12);
}

.utility-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  color: rgba(255, 253, 248, 0.35);
  font-size: 9.5px;
}

.utility-footer__inner a {
  color: rgba(255, 253, 248, 0.5);
  transition: color 0.2s ease;
}

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

.utility-footer--dark-text {
  border-top-color: var(--line-soft);
  color: var(--muted);
}

.utility-footer--dark-text .utility-footer__inner a {
  color: var(--muted);
}

.utility-footer--dark-text .utility-footer__inner a:hover {
  color: var(--ink);
}

/* ---------- Сайт закрыт ---------- */

.closed-page {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  background:
    radial-gradient(circle at 18% 18%, rgba(128, 172, 142, 0.14), transparent 30%),
    radial-gradient(circle at 86% 76%, rgba(217, 107, 69, 0.1), transparent 32%),
    var(--forest-deep);
  color: var(--paper);
  overflow: hidden;
}

.closed-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.65'/%3E%3C/svg%3E");
  opacity: 0.04;
  pointer-events: none;
}

.closed-main {
  position: relative;
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  padding: 32px 0 54px;
}

.closed-inner {
  position: relative;
  z-index: 2;
  max-width: 840px;
  text-align: center;
}

.closed-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  margin: 0 auto 32px;
  border: 1px solid rgba(255, 253, 248, 0.22);
  border-radius: 50%;
  color: var(--sage);
}

.closed-mark svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
  stroke: none;
  animation: closedPulse 3.5s ease-in-out infinite;
}

.closed-mark__orbit {
  position: absolute;
  inset: -14px;
  border: 1px dashed rgba(255, 253, 248, 0.16);
  border-radius: 50%;
  animation: spin 34s linear infinite;
}

@keyframes closedPulse {
  0%,
  100% {
    opacity: 0.65;
    transform: scale(0.94) rotate(0);
  }
  50% {
    opacity: 1;
    transform: scale(1.06) rotate(8deg);
  }
}

.closed-title {
  font-size: clamp(4rem, 9vw, 7.4rem);
  color: var(--paper);
}

.closed-title em {
  color: #e7c8b1;
}

.closed-message {
  max-width: 500px;
  margin: 24px auto 0;
  color: rgba(255, 253, 248, 0.55);
  font-size: 14px;
  line-height: 1.8;
}

.closed-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 32px;
}

.closed-actions .btn {
  min-height: 48px;
  font-size: 12px;
}

.closed-status {
  max-width: 460px;
  margin: 25px auto 0;
  color: rgba(255, 253, 248, 0.3);
  font-size: 10px;
  line-height: 1.7;
}

.closed-decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.closed-ring {
  position: absolute;
  border: 1px solid rgba(255, 253, 248, 0.08);
  border-radius: 50%;
}

.closed-ring--1 {
  top: -170px;
  right: -120px;
  width: 600px;
  height: 600px;
}

.closed-ring--2 {
  top: -70px;
  right: -20px;
  width: 400px;
  height: 400px;
  border-style: dashed;
}

.closed-ring--3 {
  bottom: -280px;
  left: -180px;
  width: 620px;
  height: 620px;
  border-color: rgba(255, 253, 248, 0.055);
}

/* ---------- 404 ---------- */

.notfound-page {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  background:
    radial-gradient(circle at 82% 15%, rgba(205, 224, 207, 0.65), transparent 30%),
    radial-gradient(circle at 4% 80%, rgba(233, 217, 192, 0.5), transparent 28%),
    var(--bg);
}

.utility-header--dark-text {
  position: relative;
}

.utility-header--dark-text .logo__text {
  color: var(--ink);
}

.utility-header--dark-text .logo__mark {
  background: var(--forest);
  color: var(--paper);
}

.notfound-main {
  position: relative;
  display: flex;
  flex: 1;
  align-items: center;
  padding: 44px 0 80px;
  overflow: hidden;
}

.notfound-main::before {
  content: '404';
  position: absolute;
  right: -2vw;
  bottom: -11vw;
  color: rgba(18, 35, 30, 0.035);
  font-family: var(--font-display);
  font-size: 42vw;
  font-weight: 600;
  line-height: 0.7;
  letter-spacing: -0.08em;
  pointer-events: none;
}

.notfound-inner {
  position: relative;
  z-index: 1;
  max-width: 780px;
  text-align: center;
}

.notfound-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 22px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--gold);
  transform: rotate(8deg);
}

.notfound-mark svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  stroke: none;
}

.notfound-code {
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.25em;
}

.notfound-title {
  margin-top: 15px;
  font-size: clamp(4rem, 9vw, 7rem);
}

.notfound-title em {
  color: var(--forest-soft);
}

.notfound-text {
  max-width: 430px;
  margin: 22px auto 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.notfound-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 30px;
}

/* ---------- Правовая информация ---------- */

.legal-page {
  min-height: 100svh;
  background: var(--paper);
}

.legal-main {
  padding: 38px 0 clamp(60px, 8vw, 100px);
}

.legal-layout {
  display: grid;
  grid-template-columns: minmax(190px, 0.32fr) minmax(0, 0.68fr);
  align-items: start;
  gap: clamp(40px, 8vw, 110px);
}

.legal-aside {
  position: sticky;
  top: 32px;
  padding-top: 12px;
}

.legal-nav-note {
  max-width: 220px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.65;
}

.legal-contact {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  color: var(--ink-2);
  font-size: 11px;
  transition: color 0.2s ease;
}

.legal-contact:first-of-type {
  margin-top: 20px;
}

.legal-contact:hover {
  color: var(--forest-soft);
}

.legal-title {
  font-size: clamp(3rem, 5.5vw, 4.8rem);
}

.legal-title em {
  color: var(--forest-soft);
}

.legal-updated {
  margin-top: 16px;
  color: var(--muted);
  font-size: 10px;
}

.legal-content section {
  margin-top: 36px;
  padding-top: 26px;
  border-top: 1px solid var(--line-soft);
}

.legal-content h2 {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.015em;
}

.legal-content p {
  margin-top: 12px;
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.8;
}

.legal-content ul {
  margin-top: 12px;
  padding-left: 20px;
  list-style: disc;
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.85;
}

.legal-content li::marker {
  color: var(--gold);
}

.legal-contact-box {
  margin-top: 16px;
  padding: 20px 22px;
  border-radius: var(--radius-md);
  background: var(--bg);
}

.legal-contact-box a {
  display: block;
  width: fit-content;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.9;
}

.legal-contact-box a:hover {
  color: var(--forest-soft);
}

.legal-contact-box p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11.5px;
}

@media (max-width: 900px) {
  .legal-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .legal-aside {
    position: static;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--line-soft);
  }

  .legal-nav-note {
    max-width: 420px;
  }

  .legal-contact {
    display: inline-flex;
    margin-right: 20px;
  }
}

@media (max-width: 640px) {
  .utility-header {
    padding: 16px 0;
  }

  .utility-phone span {
    display: none;
  }

  .utility-phone {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 253, 248, 0.18);
    border-radius: 50%;
  }

  .closed-main {
    padding: 20px 0 40px;
  }

  .closed-mark {
    width: 62px;
    height: 62px;
    margin-bottom: 26px;
  }

  .closed-title {
    font-size: clamp(3.5rem, 16vw, 5.4rem);
  }

  .closed-message {
    font-size: 12.5px;
  }

  .closed-actions {
    flex-direction: column;
    align-items: stretch;
    max-width: 320px;
    margin: 26px auto 0;
  }

  .closed-status {
    font-size: 9.5px;
  }

  .utility-footer__inner {
    justify-content: flex-start;
    gap: 7px 16px;
  }

  .notfound-main {
    padding: 30px 0 60px;
  }

  .notfound-title {
    font-size: clamp(3.3rem, 15vw, 4.6rem);
  }

  .notfound-actions {
    flex-direction: column;
    align-items: stretch;
    max-width: 310px;
    margin: 26px auto 0;
  }

  .legal-main {
    padding-top: 20px;
  }

  .legal-title {
    font-size: clamp(2.8rem, 12vw, 3.6rem);
  }

  .legal-content section {
    margin-top: 28px;
    padding-top: 22px;
  }
}
