/* ============ Fonts (self-hosted) ============ */
@font-face {
  font-family: 'Golos Text';
  font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("../fonts/golos-cyrillic-ext.woff2") format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("../fonts/golos-cyrillic.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("../fonts/golos-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("../fonts/golos-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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Unbounded';
  font-style: normal; font-weight: 600 800; font-display: swap;
  src: url("../fonts/unbounded-cyrillic-ext.woff2") format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Unbounded';
  font-style: normal; font-weight: 600 800; font-display: swap;
  src: url("../fonts/unbounded-cyrillic.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Unbounded';
  font-style: normal; font-weight: 600 800; font-display: swap;
  src: url("../fonts/unbounded-vietnamese.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Unbounded';
  font-style: normal; font-weight: 600 800; font-display: swap;
  src: url("../fonts/unbounded-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Unbounded';
  font-style: normal; font-weight: 600 800; font-display: swap;
  src: url("../fonts/unbounded-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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ============ Base ============ */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: #12140f;
  font-family: 'Golos Text', system-ui, sans-serif;
  color: #e7e9e2;
  min-height: 100vh;
}
a { color: oklch(0.72 0.12 165); text-decoration: none; }
a:hover { color: oklch(0.8 0.12 165); }
h1, h2, h3 { font-family: 'Golos Text', system-ui, -apple-system, sans-serif; }

.page {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background: #12140f;
  overflow-x: hidden;
}

/* ============ Top Panoramic Hero Backdrop ============ */
.hero-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 440px;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
}
.hero-backdrop__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  filter: brightness(1.05) contrast(1.05);
  display: block;
}
.hero-backdrop__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(18, 20, 15, 0) 0%,
    rgba(18, 20, 15, 0.15) 50%,
    rgba(18, 20, 15, 0.8) 85%,
    #12140f 100%
  );
}

.container {
  position: relative;
  z-index: 2;
  width: 100%;
  margin: 0 auto;
}

/* ============ Mobile Layout (< 900px) ============ */
@media (max-width: 899px) {
  .page {
    max-width: 440px;
    margin: 0 auto;
  }
  .hero {
    padding: 22px 20px 0;
  }
  .hero .badge {
    margin-bottom: 20px;
  }
  .hero-auth {
    padding: 0 20px 28px;
  }
}

/* ============ Hero Content ============ */
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.08); backdrop-filter: blur(8px);
  padding: 7px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.14);
}
.badge__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: oklch(0.75 0.14 165); box-shadow: 0 0 8px oklch(0.75 0.14 165);
}
.badge__text { font-size: 12px; font-weight: 600; letter-spacing: .02em; color: #dfe3d7; }

.hero__title { font-size: 32px; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; }
.hero__lead { margin-top: 14px; margin-bottom: 16px; font-size: 15px; line-height: 1.55; color: #a9ad9f; }

.hero__checklist {
  list-style: none;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hero__checklist li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #cfd3c6;
  font-weight: 500;
}
.hero__checklist svg {
  flex-shrink: 0;
}

/* ============ Auth card ============ */
.card {
  background: #1a1d15; border: 1px solid #262a1e;
  border-radius: 22px; padding: 24px 22px;
}
.card__label { display: block; font-size: 15px; font-weight: 700; margin-bottom: 14px; }
.field-group {
  margin-bottom: 12px;
}
.field-group:last-of-type {
  margin-bottom: 0;
}
.field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #a9ad9f;
  margin-bottom: 5px;
}
.field {
  display: flex; align-items: center; gap: 10px;
  background: #22261b; border: 1px solid #33382a;
  border-radius: 14px; padding: 13px 15px;
}
.field__cc {
  display: flex; align-items: center; gap: 6px;
  padding-right: 12px; border-right: 1px solid #3a3f30;
}
.flag {
  width: 22px; height: 16px; border-radius: 3px; overflow: hidden;
  display: inline-flex; flex-direction: column; border: 1px solid rgba(255,255,255,0.15);
}
.flag span { flex: 1; }
.flag__w { background: #f2f2f2; }
.flag__b { background: #3559b3; }
.flag__r { background: #c2382f; }
.field__code { font-size: 15px; font-weight: 600; color: #cfd3c6; }
.field__input {
  flex: 1; min-width: 0; background: transparent; border: none; outline: none;
  font-family: 'Golos Text', sans-serif; font-size: 16px; color: #e7e9e2; letter-spacing: .03em;
}
.pin-grid {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.pin-cell {
  flex: 1;
  min-width: 0;
  height: 54px;
  background: #22261b;
  border: 1px solid #33382a;
  border-radius: 13px;
  font-family: 'Golos Text', system-ui, sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #e7e9e2;
  text-align: center;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.pin-cell:focus {
  border-color: oklch(0.72 0.13 165);
  box-shadow: 0 0 0 2px rgba(0, 200, 140, 0.18);
  background: #272d20;
}
.pin-cell.is-filled {
  border-color: #4a543b;
}
.btn {
  width: 100%; margin-top: 16px; padding: 16px;
  border: none; border-radius: 14px;
  background: #2a2e21; color: #6b7159;
  font-family: 'Golos Text', sans-serif; font-size: 16px; font-weight: 700;
  cursor: pointer; transition: background .15s, filter .15s, transform .1s;
}
.btn:disabled { opacity: .5; cursor: not-allowed; filter: none; }
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: scale(0.985); }
.btn.is-ready { background: oklch(0.72 0.13 165); color: #0f120c; }
.btn-back {
  width: 100%; background: none; border: none;
  color: #767c68; font-family: 'Golos Text', sans-serif;
  font-size: 13px; font-weight: 600; padding: 10px 0 0;
  cursor: pointer; transition: color .15s; text-align: center;
}
.btn-back:hover { color: #a9ad9f; }
.note { margin-top: 14px; font-size: 12px; line-height: 1.5; color: #767c68; text-align: center; }

/* ============ Step Animation ============ */
@keyframes stepFadeIn {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.99);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.auth-step.is-entering {
  animation: stepFadeIn 0.24s cubic-bezier(0.2, 0.9, 0.3, 1) forwards;
}

/* ============ Mini Loader ============ */
.auth-loader { text-align: center; padding: 24px 0 10px; }
.spinner {
  width: 38px; height: 38px;
  border: 3px solid #262a1e;
  border-top-color: oklch(0.72 0.13 165);
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: spin 0.75s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.auth-loader__title {
  font-size: 16px; font-weight: 700; color: #e7e9e2; margin-bottom: 6px;
}
.auth-loader__sub {
  font-size: 13px; color: #a9ad9f;
}

/* ============ Auth Success ============ */
.auth-success { text-align: center; padding: 20px 0 10px; }
.auth-success__icon {
  width: 60px; height: 60px; border-radius: 50%;
  background: oklch(0.32 0.06 165); margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 24px rgba(0, 200, 140, 0.25);
  animation: stepFadeIn 0.4s cubic-bezier(0.2, 0.9, 0.3, 1) forwards;
}
.auth-success__title { font-size: 18px; font-weight: 700; color: #e7e9e2; margin-bottom: 8px; }
.auth-success__text { font-size: 14px; line-height: 1.55; color: #a9ad9f; }

/* ============ Features ============ */
.features-head { padding: 36px 20px 8px; }
.features-head h2 { font-size: 20px; font-weight: 700; text-align: center; letter-spacing: -0.01em; color: #e7e9e2; }
.features { padding: 16px 20px 44px; display: flex; flex-direction: column; gap: 14px; }
.feature {
  background: #1a1d15; border: 1px solid #262a1e;
  border-radius: 18px; padding: 20px;
}
.feature__head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.feature__icon {
  width: 38px; height: 38px; border-radius: 11px;
  background: oklch(0.32 0.06 165);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.feature__title { font-size: 16px; font-weight: 600; color: oklch(0.82 0.1 165); }
.feature__body { font-size: 14px; line-height: 1.55; color: #a9ad9f; }

/* ============ Footer ============ */
.footer { padding: 0 20px 48px; text-align: center; }
.footer p { font-size: 12px; color: #5c6350; line-height: 1.6; }

/* ============ PC / Desktop Styles (>= 900px) ============ */
@media (min-width: 900px) {
  .page {
    background: #12140f;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }
  .hero-backdrop {
    height: 100%;
    min-height: 100vh;
  }
  .hero-backdrop__img {
    object-position: center 25%;
    filter: brightness(0.95) contrast(1.05);
  }
  .hero-backdrop__scrim {
    background:
      linear-gradient(90deg, rgba(18,20,15,0.92) 0%, rgba(18,20,15,0.75) 45%, rgba(18,20,15,0.45) 75%, rgba(18,20,15,0.75) 100%),
      linear-gradient(180deg, rgba(18,20,15,0.2) 0%, rgba(18,20,15,0.3) 50%, rgba(18,20,15,0.85) 100%);
  }
  .container {
    max-width: 1200px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 50px 32px 30px;
    gap: 40px;
  }
  .hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 60px;
    align-items: center;
    padding-top: 10px;
  }
  .hero {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
  .hero .badge {
    margin-bottom: 24px;
    background: rgba(18, 20, 15, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
  }
  .hero__title {
    font-size: 48px;
    line-height: 1.06;
    font-weight: 800;
    text-shadow: 0 3px 20px rgba(0, 0, 0, 0.9), 0 1px 4px rgba(0, 0, 0, 0.95);
  }
  .hero__lead {
    font-size: 16px;
    line-height: 1.6;
    max-width: 500px;
    margin-top: 18px;
    margin-bottom: 0;
    color: #cbd1c0;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.9);
  }
  .hero__checklist {
    list-style: none;
    margin-top: 24px;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .hero__checklist li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #dfe3d7;
    font-weight: 500;
  }
  .hero-auth {
    display: flex;
    justify-content: flex-end;
  }
  .hero-auth .card {
    width: 100%;
    max-width: 440px;
    background: rgba(22, 26, 19, 0.88);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    padding: 32px 28px;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }
  .features-section {
    width: 100%;
  }
  .features-head {
    padding: 0 0 16px;
    text-align: left;
  }
  .features-head h2 {
    text-align: left;
    font-size: 20px;
    color: #c2c7b8;
  }
  .features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 0;
  }
  .feature {
    background: rgba(22, 26, 19, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 22px;
    transition: transform 0.2s, border-color 0.2s, background 0.2s;
  }
  .feature:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(26, 31, 22, 0.88);
  }
  .footer {
    padding: 16px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }
}

/* ============ Small Screens (< 380px) ============ */
@media (max-width: 380px) {
  .hero__title {
    font-size: 28px;
  }
  .hero {
    padding: 16px 14px 20px;
  }
  .section {
    padding: 0 14px;
  }
  .card {
    padding: 20px 14px;
  }
  .pin-grid {
    gap: 5px;
  }
  .pin-cell {
    height: 48px;
    font-size: 19px;
  }
  .features, .features-head {
    padding-left: 14px;
    padding-right: 14px;
  }
}
