/* PRIMAL ERA — оформление страницы. Разделы организованы для редактирования. */

:root {
  color: #f4f3ec;
  font-synthesis: none;
  background: #071015;
  font-family: Manrope,sans-serif;
}


/* ── Основной каркас, фон и декоративные слои ── */
.site-shell {
  isolation: isolate;
  background: #071015;
  min-height: 100svh;
  position: relative;
  overflow: hidden;
}

.background {
  z-index: -3;
  background-image: url(../server-background.jpg);
  background-position: 50%;
  background-size: cover;
  animation: 1.4s ease-out both reveal;
  position: absolute;
  inset: 0;
}

.site-shell:before {
  z-index: -2;
  content: "";
  background: linear-gradient(90deg,#03090c26 0%,#03090c2e 40%,#03090cb8 100%),linear-gradient(#0106094d 0%,#0000 64%,#010609d1 100%);
  position: absolute;
  inset: 0;
}

.grain {
  z-index: -1;
  opacity: .075;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
  animation: .28s steps(2,end) infinite grain;
  position: absolute;
  inset: -50%;
}


/* ── Шапка: логотип и индикатор онлайна ── */
.topbar {
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 30px clamp(24px,4.5vw,72px);
  display: flex;
}

.brand {
  color: inherit;
  align-items: center;
  gap: 13px;
  text-decoration: none;
  display: inline-flex;
}

.brand-mark {
  color: #b6d3b6;
  border: 1px solid #bfdcbf73;
  place-items: center;
  width: 41px;
  height: 46px;
  font-family: Oswald,sans-serif;
  font-size: 22px;
  display: grid;
  transform: skew(-7deg);
}

.brand-text {
  letter-spacing: .25em;
  flex-direction: column;
  font-family: Oswald,sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  display: flex;
}

.brand-text small {
  color: #91a598;
  letter-spacing: .5em;
  margin-top: 6px;
  font-family: Manrope,sans-serif;
  font-size: 8px;
  font-weight: 600;
}

.server-state {
  color: #96a39d;
  letter-spacing: .16em;
  text-transform: uppercase;
  align-items: center;
  gap: 12px;
  font-size: 10px;
  line-height: 1.5;
  display: flex;
}

.server-state span:last-child {
  flex-direction: column;
  display: flex;
}

.server-state strong {
  color: #e7ebe5;
  font-size: 11px;
  font-weight: 600;
}

.pulse {
  background: #8bc494;
  border-radius: 50%;
  width: 7px;
  height: 7px;
  position: relative;
  box-shadow: 0 0 12px #8bc494;
}

.pulse:after {
  border-radius: inherit;
  content: "";
  border: 1px solid #8bc49473;
  animation: 2s ease-out infinite pulse;
  position: absolute;
  inset: -5px;
  }

.server-state.is-offline .pulse {
  background: #c46b5f;
  box-shadow: 0 0 12px #c46b5f;
  }

.server-state.is-offline .pulse:after {
  border-color: #c46b5f73;
  animation: none;
  }


/* ── Основной экран: заголовок, текст, навигация ── */
.hero {
  width: min(690px,48vw);
  margin: clamp(6vh,10vh,120px) clamp(24px,5.5vw,90px) 110px auto;
  animation: .9s ease-out .2s both content-in;
}

.eyebrow {
  color: #a9b9af;
  letter-spacing: .34em;
  text-transform: uppercase;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  font-size: 10px;
  font-weight: 700;
  display: flex;
}

.eyebrow:before {
  content: "";
  background: #9db9a1;
  width: 34px;
  height: 1px;
}

h1 {
  letter-spacing: -.035em;
  text-transform: uppercase;
  text-shadow: 0 8px 40px #00000059;
  margin: 0;
  font-family: Oswald,sans-serif;
  font-size: clamp(58px,6.2vw,104px);
  font-weight: 600;
  line-height: .93;
}

h1 em {
  color: #0000;
  -webkit-text-stroke: 1px #e2ece394;
  font-style: normal;
}

.intro {
  color: #aeb7b3;
  max-width: 510px;
  margin: 28px 0 34px;
  font-size: clamp(13px,1.05vw,16px);
  line-height: 1.8;
}

.actions {
  border-top: 1px solid #d5e4d924;
  flex-direction: column;
  max-width: 560px;
  display: flex;
}

.action {
  color: #e9ece8;
  letter-spacing: .035em;
  text-align: left;
  cursor: pointer;
  background: 0 0;
  border: 0;
  border-bottom: 1px solid #d5e4d924;
  grid-template-columns: 34px 1fr 28px;
  align-items: center;
  gap: 14px;
  min-height: 68px;
  padding: 0 18px 0 4px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: padding .3s,background .3s,color .3s;
  display: grid;
}

.action:hover,.action:focus-visible {
  color: #fff;
  background: #a6c7ab1a;
  outline: none;
  padding-left: 18px;
}

.action-index {
  color: #718079;
  letter-spacing: .1em;
  font-family: Oswald,sans-serif;
  font-size: 10px;
}

.action svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5px;
  width: 21px;
  transition: transform .3s;
}

.action:hover svg {
  transform: translate(5px);
}

.action-primary {
  color: #f5f8f2;
}


/* ── Нижняя панель ── */
footer {
  color: #6f7c77;
  letter-spacing: .25em;
  text-transform: uppercase;
  align-items: center;
  gap: 18px;
  font-size: 9px;
  font-weight: 700;
  display: flex;
  position: absolute;
  bottom: 28px;
  left: clamp(24px,4.5vw,72px);
  right: clamp(24px,4.5vw,72px);
}

.footer-line {
  background: #59645f;
  width: 46px;
  height: 1px;
}


/* ── Общие стили модальных окон ── */
.modal-backdrop {
  z-index: 10;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  background: #01070ad1;
  place-items: center;
  padding: 24px;
  animation: .25s ease-out both fade-in;
  display: grid;
  position: fixed;
  inset: 0;
}

.modal {
  background: linear-gradient(145deg,#111f21fa,#060f13fa);
  border: 1px solid #c0d5c533;
  width: min(540px,100%);
  max-height: calc(100svh - 48px);
  padding: clamp(30px,5vw,54px);
  animation: .35s ease-out both modal-in;
  position: relative;
  overflow: auto;
  box-shadow: 0 24px 90px #0009;
}

.close-button {
  color: #9eaaa3;
  cursor: pointer;
  background: 0 0;
  border: 1px solid #cadcce29;
  place-items: center;
  width: 38px;
  height: 38px;
  display: grid;
  position: absolute;
  top: 18px;
  right: 18px;
}

.close-button:hover {
  color: #fff;
  border-color: #cadcce66;
}

.close-button svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.5px;
  width: 17px;
}

.modal-kicker {
  color: #82a188;
  letter-spacing: .3em;
  text-transform: uppercase;
  font-size: 9px;
  font-weight: 700;
}

.modal h2 {
  text-transform: uppercase;
  margin: 11px 0 28px;
  font-family: Oswald,sans-serif;
  font-size: clamp(32px,6vw,48px);
  font-weight: 600;
  line-height: 1.05;
}


/* ── Список правил ── */
.rules {
  flex-direction: column;
  gap: 0;
  margin: 0 0 30px;
  padding: 0;
  list-style: none;
  display: flex;
}

.rules li {
  border-top: 1px solid #cadcce1f;
  grid-template-columns: 34px 1fr;
  gap: 13px;
  padding: 16px 0;
  display: grid;
}

.rules li>span {
  color: #708079;
  font-family: Oswald,sans-serif;
  font-size: 11px;
}

.rules p {
  color: #89958f;
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
}

.rules strong {
  color: #e9eee9;
  margin-bottom: 3px;
  font-size: 13px;
  font-weight: 600;
  display: block;
}


/* ── Форма заявки ── */
form {
  flex-direction: column;
  gap: 17px;
  display: flex;
}

label {
  color: #93a098;
  letter-spacing: .13em;
  text-transform: uppercase;
  flex-direction: column;
  gap: 8px;
  font-size: 9px;
  font-weight: 700;
  display: flex;
}

input,textarea {
  color: #e8eee9;
  letter-spacing: 0;
  text-transform: none;
  background: #030a0c73;
  border: 1px solid #cadcce29;
  border-radius: 0;
  outline: none;
  width: 100%;
  font-family: inherit;
  font-size: 13px;
  transition: border-color .2s;
}

input {
  height: 48px;
  padding: 0 15px;
}

textarea {
  resize: vertical;
  padding: 14px 15px;
}

input:focus,textarea:focus {
  border-color: #8fab94;
}

input::placeholder,textarea::placeholder {
  color: #56635d;
}

.modal-cta {
  color: #07100c;
  letter-spacing: .15em;
  text-transform: uppercase;
  cursor: pointer;
  background: #abc2af;
  border: 1px solid #a9c0ad;
  min-height: 50px;
  margin-top: 4px;
  padding: 0 22px;
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  transition: background .2s,transform .2s;
}

.modal-cta:hover {
  background: #c4d5c7;
  transform: translateY(-1px);
}

.modal-cta:disabled {
  cursor: wait;
  opacity: .6;
  transform: none;
}

.form-error {
  color: #e0a39a;
  border: 1px solid rgba(224, 163, 154, .35);
  background: rgba(224, 163, 154, .08);
  margin: 0;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.5;
}


/* ── Экран подтверждения ── */
.success {
  text-align: center;
  padding: 24px 0 4px;
}

.success-mark {
  color: #a8c5ae;
  border: 1px solid #8eaa94;
  border-radius: 50%;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 26px;
  font-size: 23px;
  display: grid;
}

.success p {
  color: #8e9a93;
  max-width: 350px;
  margin: -10px auto 26px;
  font-size: 13px;
  line-height: 1.7;
}

.success .modal-cta {
  width: 100%;
}


/* ── Анимации ── */
@keyframes content-in {
  0% {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes reveal {
  0% {
    opacity: 0;
    transform: scale(1.04);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fade-in {
  0% {
    opacity: 0;
  }
}

@keyframes modal-in {
  0% {
    opacity: 0;
    transform: translateY(18px)scale(.98);
  }
}

@keyframes pulse {
  50% {
    opacity: .5;
  }
}

@keyframes grain {
  0% {
    transform: translate(0);
  }
  25% {
    transform: translate(2%,-1%);
  }
  50% {
    transform: translate(-1%,2%);
  }
  75% {
    transform: translate(1%,1%);
  }
}


/* ── Адаптивная вёрстка ── */
@media (width<=900px) {
  .background {
    background-position: 35%;
  }
  .site-shell:before {
    background: linear-gradient(90deg,#03090c2e,#03090ca8),linear-gradient(#0106090d 30%,#010609e6);
  }
  .hero {
    width: min(600px,100% - 48px);
    margin: clamp(9vh,14vh,150px) 24px 100px auto;
  }
}

@media (width<=560px) {
  .topbar {
    padding: 22px 20px;
  }
  .server-state {
    font-size: 0;
  }
  .server-state strong {
    font-size: 9px;
  }
  .hero {
    width: calc(100% - 40px);
    margin: clamp(11vh,16vh,150px) 20px 90px;
  }
  h1 {
    font-size: clamp(52px,15vw,74px);
  }
  .intro {
    margin: 22px 0 28px;
    font-size: 12px;
    line-height: 1.7;
  }
  .action {
    grid-template-columns: 26px 1fr 22px;
    min-height: 62px;
    padding-right: 8px;
    font-size: 11px;
  }
  footer {
    bottom: 20px;
    left: 20px;
    right: 20px;
  }
  footer span:last-child,.footer-line {
    display: none;
  }
  .modal-backdrop {
    padding: 12px;
  }
  .modal {
    max-height: calc(100svh - 24px);
    padding: 34px 24px 26px;
  }
}

@media (prefers-reduced-motion:reduce) {
  *,:before,:after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* $vite$:1 */

/* Дополнения после перехода на обычный HTML. */
[hidden] {
  display: none !important;
}

body.modal-open {
  overflow: hidden;
}
