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

:root {
  color-scheme: dark;
  --bg: #091115;
  --ink: #e5e0d2;
  --muted: #b4beb8;
  --gold: #a99573;
  --line: rgba(185, 192, 177, 0.22);
  --button: #b9ad91;
  --button-ink: #101a1b;
  --header-clearance: calc(84px + env(safe-area-inset-top, 0px));
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  overflow-x: clip;
}
a { color: inherit; }
button, input { font: inherit; }
::selection { background: rgba(169, 149, 115, 0.35); color: var(--ink); }
:focus-visible { outline: 1px solid var(--gold); outline-offset: 3px; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  opacity: 0.14;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.32'/%3E%3C/svg%3E");
}

.topbar {
  position: absolute;
  z-index: 5;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: calc(12px + env(safe-area-inset-top)) 20px 10px;
  border-bottom: 1px solid rgba(220, 220, 204, 0.12);
  background: linear-gradient(180deg, rgba(7, 13, 17, 0.78), rgba(7, 13, 17, 0));
}
.brand {
  text-decoration: none;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1;
  white-space: nowrap;
}
.brand span:last-child {
  display: block;
  margin-top: 4px;
  font-family: Inter, sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.28em;
  color: var(--gold);
}
.apostrophe { color: var(--gold); }
nav { display: flex; align-items: center; flex: none; }
.lang {
  min-width: 44px;
  min-height: 44px;
  background: none;
  border: 0;
  color: #82908c;
  cursor: pointer;
  font-size: 12px;
  letter-spacing: 0.16em;
  padding: 8px;
}
.lang.active { color: var(--ink); }
.separator { color: #56635f; }

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: var(--header-clearance);
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 42%, #284047 0, #122329 44%, #070d11 82%);
}
.sky { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.moon {
  position: absolute;
  left: 50%;
  top: 8%;
  transform: translateX(-50%);
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, #b7c3ad 0, #84988e 28%, #536c69 47%, transparent 71%);
  opacity: 0.16;
  filter: blur(10px);
}
.horizon {
  position: absolute;
  top: 42%;
  left: 0;
  width: 100%;
  height: 30%;
  background: linear-gradient(180deg, transparent, #0b1c21 78%);
}
.city {
  position: absolute;
  top: 2%;
  left: 50%;
  width: 700px;
  height: 280px;
  transform: translateX(-50%) scale(0.62);
  transform-origin: top center;
  opacity: 0.88;
  filter: blur(0.2px);
}
.city i {
  position: absolute;
  bottom: 0;
  background:
    linear-gradient(180deg, rgba(214, 220, 208, 0.62), rgba(214, 220, 208, 0) 11%),
    linear-gradient(180deg, #1d3534 0%, #0c181a 38%, #050c0e 100%);
  clip-path: polygon(15% 100%, 0 15%, 70% 0, 100% 100%);
}
.city i:nth-child(1) { height: 210px; width: 90px; left: 100px; transform: rotate(-13deg); }
.city i:nth-child(2) {
  height: 300px;
  width: 110px;
  left: 200px;
  transform: rotate(9deg);
  clip-path: polygon(16% 100%, 0 58%, 24% 58%, 18% 30%, 42% 30%, 50% 0, 74% 6%, 100% 100%);
}
.city i:nth-child(3) {
  height: 245px;
  width: 125px;
  left: 310px;
  transform: rotate(-6deg);
  clip-path: polygon(6% 100%, 0 40%, 30% 34%, 22% 8%, 68% 0, 88% 24%, 100% 100%);
}
.city i:nth-child(4) { height: 320px; width: 85px; left: 450px; transform: rotate(13deg); }
.city i:nth-child(5) {
  height: 170px;
  width: 130px;
  left: 520px;
  transform: rotate(-10deg);
  clip-path: polygon(0 100%, 8% 46%, 0 42%, 20% 16%, 62% 0, 100% 26%, 86% 100%);
}
.city i:nth-child(6) {
  height: 115px;
  width: 110px;
  left: 0;
  clip-path: polygon(0 100%, 12% 38%, 46% 24%, 100% 52%, 100% 100%);
}
.city i:nth-child(7) { height: 90px; width: 90px; right: 0; }
.fog {
  position: absolute;
  left: -15%;
  width: 130%;
  height: 140px;
  border-radius: 50%;
  background: rgba(115, 143, 137, 0.13);
  filter: blur(46px);
}
.fog-a { top: 34%; }
.fog-b { top: 48%; opacity: 0.6; }
.water {
  position: absolute;
  bottom: 0;
  height: 68%;
  width: 100%;
  background:
    linear-gradient(180deg, transparent, rgba(7, 16, 20, 0.45) 24%, #071014 68%),
    repeating-linear-gradient(176deg, transparent 0 18px, rgba(134, 159, 149, 0.055) 19px, transparent 21px);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(100%, 640px);
  margin: 0 auto;
  padding: 0 20px calc(18px + env(safe-area-inset-bottom));
  text-align: center;
}
.hero h1,
.signup h2,
.legal h1 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  letter-spacing: 0.03em;
}
.hero h1 {
  margin: 0;
  font-size: 46px;
  line-height: 0.92;
  text-wrap: balance;
}
.hero h1 em { font-style: normal; color: #aabbb3; }
.rule {
  height: 1px;
  width: 56px;
  margin: 12px auto;
  background: var(--gold);
}
.lead,
.story,
.game,
.signup p { margin: 0 auto; }
.lead {
  max-width: 28rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 18px;
  line-height: 1.25;
}
.story,
.game {
  max-width: 34rem;
  color: #c9d1cb;
  font-size: 13px;
  line-height: 1.45;
}
.story { margin-top: 10px; }
.game { margin-top: 8px; color: #b7c1bb; }

.signup { margin: 16px auto 0; max-width: 34rem; }
.signup h2 {
  margin: 0 0 4px;
  font-size: 26px;
  line-height: 1.05;
  text-wrap: balance;
}
.signup p { color: #c5cdc7; font-size: 13px; line-height: 1.45; }
.form-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.form-row input {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 12px 14px;
  background: rgba(4, 13, 16, 0.75);
  border: 1px solid rgba(197, 205, 188, 0.4);
  border-radius: 0;
  color: var(--ink);
  font-size: 16px;
}
.form-row input:-webkit-autofill {
  -webkit-text-fill-color: var(--ink);
  box-shadow: 0 0 0 1000px #0c1619 inset;
  caret-color: var(--ink);
}
.form-row button {
  min-height: 48px;
  padding: 12px 16px;
  background: var(--button);
  color: var(--button-ink);
  border: 1px solid var(--button);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
  cursor: pointer;
}
.form-row button:hover { background: #ded1b0; }
.form-row button:disabled { opacity: 0.55; cursor: wait; }
#signup-challenge { display: flex; justify-content: center; margin-top: 12px; }
#signup-challenge[hidden] { display: none; }
.consent {
  display: flex;
  text-align: left;
  gap: 10px;
  margin-top: 10px;
  color: #c2cac4;
  font-size: 12px;
  line-height: 1.4;
}
.consent input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex: none;
  accent-color: var(--button);
}
.consent a { text-underline-offset: 3px; }
@media (max-width: 879px) {
  .consent {
    gap: 8px;
    margin-top: 8px;
    font-size: 11px;
    line-height: 1.35;
  }
  .consent input {
    width: 18px;
    height: 18px;
  }
}
#form-status {
  min-height: 1.2em;
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.4;
  color: #e5d4aa;
}
.telegram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  margin-top: 14px;
  padding: 10px 16px;
  border: 1px solid var(--gold);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.08em;
}
.telegram span { letter-spacing: 0.04em; color: var(--muted); }
.telegram:hover { background: rgba(169, 149, 115, 0.15); }

footer {
  display: flex;
  justify-content: center;
  gap: 14px 22px;
  flex-wrap: wrap;
  padding: 18px 20px calc(18px + env(safe-area-inset-bottom));
  color: #8c9a93;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-align: center;
}
footer a { text-decoration: none; }
footer a:hover { text-decoration: underline; }

.legal {
  max-width: 720px;
  margin: 0 auto;
  padding: calc(108px + env(safe-area-inset-top)) 24px 64px;
}
.legal-copy[hidden] { display: none; }
.legal h1 { margin: 0 0 20px; font-size: 40px; line-height: 1; }
.legal h2 {
  margin: 28px 0 8px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  font-size: 26px;
  letter-spacing: 0.02em;
}
.legal p,
.legal li { color: #c5cdc6; font-size: 15px; line-height: 1.7; }
.legal ul { margin: 8px 0 0; padding-left: 1.2em; }
.legal .todo { color: #d7c7a2; }
.legal a { text-underline-offset: 3px; }

@media (min-width: 880px) {
  :root { --header-clearance: calc(108px + env(safe-area-inset-top, 0px)); }
  .topbar { padding: calc(22px + env(safe-area-inset-top)) clamp(24px, 6vw, 100px) 16px; }
  .brand { font-size: 28px; letter-spacing: 0.16em; }
  .moon { top: 12%; width: 270px; height: 270px; filter: blur(12px); }
  .city { top: 5%; height: 330px; transform: translateX(-50%) scale(0.92); opacity: 0.82; }
  .hero-content { width: min(100%, 720px); padding-bottom: 48px; }
  .hero h1 { font-size: 84px; }
  .rule { margin: 22px auto; }
  .lead { font-size: 28px; }
  .story, .game { font-size: 15px; line-height: 1.6; }
  .story { margin-top: 16px; }
  .game { margin-top: 14px; }
  .signup { margin-top: 40px; }
  .signup h2 { margin-bottom: 10px; font-size: 36px; }
  .signup p { font-size: 14px; }
  .form-row { flex-direction: row; align-items: stretch; margin-top: 18px; }
  .form-row button { width: auto; padding-inline: 22px; white-space: nowrap; }
  footer { justify-content: space-between; padding-inline: clamp(24px, 6vw, 100px); text-align: left; }
}

@media (max-width: 879px) and (max-height: 740px) {
  .hero h1 { font-size: 40px; }
  .lead { font-size: 16px; }
  .story, .game, .signup p { font-size: 12.5px; }
  .signup { margin-top: 12px; }
  .signup h2 { font-size: 22px; }
  .rule { margin: 8px auto; }
  .story { margin-top: 8px; }
}

@media (prefers-reduced-motion: no-preference) {
  .fog-a { animation: drift 25s ease-in-out infinite alternate; }
  .fog-b { animation: drift 32s ease-in-out infinite alternate-reverse; }
}
@keyframes drift { to { transform: translateX(7%); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
