/* EDS Ленинградский — лендинг приглашения на экскурсию
   Вёрстка по макету Figma: node 2652:703 (форма) и 2652:811 (спасибо), артборд 1440×900. */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg-base: #121f3a;
  --panel-from: #101930;
  --panel-to: #091023;

  --field-bg: #10192f;
  --field-border: #2c314e;

  --accent: #a381ff;
  --btn-from: #a98eee;
  --btn-to: #5440cc;
  --divider-from: #5641cc;
  --divider-to: #a88ded;

  --text: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.5);
  --hairline: rgba(255, 255, 255, 0.2);

  --danger: #ff6b6b;
  --success: #6bd6a5;

  --field-w: 460px;
  --field-h: 54px;
  --radius: 10px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  /* Rectangle 24 из макета перекрывает фотоподложку целиком, поэтому видимый фон — её градиент. */
  background: var(--bg-base) linear-gradient(195.3deg, var(--panel-from) 0%, var(--panel-to) 100%) fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Каркас экрана ---------- */

.page {
  position: relative;
  min-height: 100dvh;
  display: grid;
  align-content: center;
  justify-items: center;
  /* Пропорции отступов макета: 60px сверху / 161px снизу при высоте 900px. */
  padding: 60px 20px 161px;
  overflow: hidden;
}
/* На экране благодарности блок короче, а логотип по макету остаётся на y=60. */
.page.is-thanks { padding-bottom: 323.66px; }

/* Волна: left 12.71% / right 12.72% / bottom 0, исходник 1074×275. */
.wave {
  position: absolute;
  left: 12.71%;
  right: 12.72%;
  bottom: 0;
  aspect-ratio: 1074 / 275;
  pointer-events: none;
  user-select: none;
  /* Никакого z-index: он создал бы stacking context и изолировал mix-blend-mode
     от фона страницы — волна потеряла бы синее свечение color-dodge. */
}
.wave img {
  display: block;
  width: 100%;
  height: 100%;
  mix-blend-mode: color-dodge;
}

.screen {
  position: relative;
  z-index: 1;
  display: none;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: var(--field-w);
}
.screen.is-active { display: flex; }

/* ---------- Шапка ---------- */

.logo {
  width: 102.175px;
  height: 38.577px;
  flex: none;
}

/* ---------- Экран формы ---------- */

.headline {
  margin: 68.76px 0 0;
  font-size: clamp(20px, 2.64vw, 38px);
  font-weight: 300;
  line-height: 1.21;
  text-align: center;
  white-space: nowrap;
}
.headline .accent { color: var(--accent); }

.divider {
  width: 105.667px;
  height: 5.333px;
  flex: none;
  margin-top: 28.33px;
}

.form {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-top: 35.33px;
}

.field {
  width: 100%;
  height: var(--field-h);
  padding: 0 18px;
  border: 1px solid var(--field-border);
  border-radius: var(--radius);
  background: var(--field-bg);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  text-align: center;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field + .field { margin-top: 9px; }
.field::placeholder {
  color: var(--text-muted);
  opacity: 1;
}
.field:hover { border-color: #3b4165; }
.field:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(163, 129, 255, 0.18);
}
.field[aria-invalid='true'] { border-color: var(--danger); }

/* Скрытая ловушка для ботов. */
.hp {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.submit {
  width: 100%;
  height: var(--field-h);
  margin-top: 17px;
  border: 0;
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--btn-from) 0%, var(--btn-to) 100%);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  text-transform: uppercase;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.05s ease;
}
.submit:hover { filter: brightness(1.08); }
.submit:active { transform: translateY(1px); }
.submit:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.submit[disabled] { opacity: 0.6; cursor: progress; }

.consent {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11.5px;
  margin: 26px 0 0;
  font-size: 12px;
  line-height: 1.35;
  /* На узких экранах подпись переносится — строки должны остаться по центру. */
  text-align: center;
}
.consent a { color: var(--accent); text-decoration: none; }
.consent a:hover { text-decoration: underline; }

/* «Rectangle 23» + иконка arrow-up: кнопка-ссылка на оферту. */
.offer-link {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--hairline);
  border-radius: 5px;
  flex: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.offer-link:hover {
  border-color: var(--accent);
  background: rgba(163, 129, 255, 0.1);
}
.offer-link img { display: block; width: 24px; height: 24px; }

/* Вынесено из потока, чтобы высота экрана совпадала с макетом (900px). */
.form-error {
  position: absolute;
  top: calc(100% + 14px);
  left: 0;
  right: 0;
  margin: 0;
  font-size: 13px;
  color: var(--danger);
  text-align: center;
}

/* ---------- Экран «Спасибо» ---------- */

.thanks-text,
.thanks-sign {
  margin: 0;
  font-size: clamp(20px, 2.36vw, 34px);
  font-weight: 300;
  line-height: 1.21;
  text-align: center;
  white-space: nowrap;
}
.thanks-text { margin-top: 191px; }
.thanks-sign { margin-top: 35.33px; }
.thanks-sign .accent { color: var(--accent); }
.screen--thanks { max-width: none; }
.screen--thanks .divider { margin-top: 40.33px; }

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

@media (max-width: 1000px) {
  .page { padding-bottom: 120px; }
  .wave { left: 0; right: 0; }
}

@media (max-width: 560px) {
  .headline,
  .thanks-text,
  .thanks-sign { white-space: normal; }
  .headline br,
  .thanks-text br,
  .thanks-sign br { display: none; }
  .headline { margin-top: 48px; }
  .form { margin-top: 28px; }
  .thanks-text { margin-top: 90px; }
  .page { padding: 40px 20px 90px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
