@font-face {
  font-family: Vazirmatn;
  src: url('/assets/vazirmatn-arabic.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0600-06FF,U+0750-077F,U+0870-089F,U+08A0-08FF,U+200C-200F,U+FB50-FDFF,U+FE70-FEFF;
}

@font-face {
  font-family: Vazirmatn;
  src: url('/assets/vazirmatn-latin.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
  font-family: 'Space Mono';
  src: url('/assets/space-mono.woff2') format('woff2');
  font-display: swap;
}

:root {
  color-scheme: light;
  font-family: Vazirmatn, Tahoma, sans-serif;
  color: #172436;
  background: #f7f5ef;
  --paper: #f7f5ef;
  --muted: #565e67;
  --gold: #a17b47;
  --line: #e4dfd4;
  --mono: 'Space Mono', monospace;
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid #91682e; outline-offset: 4px; }

.shell { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr); direction: ltr; min-height: 100svh; }
.sky {
  position: relative;
  isolation: isolate;
  min-height: 700px;
  overflow: hidden;
  color: #f0eee7;
  background: #071321 url('/assets/star-trails.webp') center 43% / cover no-repeat;
}
.sky::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: '';
  background: linear-gradient(180deg, #030c19a6, transparent 26%, #07131d12 48%, #040c17b2 74%, #050d19 100%);
}
.sky-border { position: absolute; inset: 24px; border: 1px solid #c0b9a331; pointer-events: none; }
.sky-header { position: absolute; inset: 47px 49px auto; display: flex; justify-content: space-between; gap: 12px; }
.sky-label, .sky-coordinate { font: 10px var(--mono); letter-spacing: .15em; white-space: nowrap; }
.sky-label { color: #f2e7d2; }
.sky-coordinate { color: #c9cdd5; }
.sky-label i { display: inline-block; width: 6px; height: 6px; margin-right: 7px; background: #edcc8f; transform: rotate(45deg); box-shadow: 0 0 15px #f4ba61; }
.constellation { position: absolute; width: min(57%, 430px); aspect-ratio: 1; left: 50%; top: 43.5%; transform: translate(-50%, -50%); display: grid; place-items: center; }
.constellation img { width: 74%; height: auto; filter: drop-shadow(0 0 25px #0e233a); }
.orbit-guide { position: absolute; inset: 1%; border: 1px solid #aeb8c42b; border-radius: 50%; }
.star-orbits { position: absolute; inset: 0; pointer-events: none; }
.star-orbit {
  position: absolute;
  inset: var(--inset);
  transform: rotate(var(--angle));
  animation: orbit var(--period) linear infinite;
}
.star-orbit-inner { --inset: 1%; --period: 138s; }
.star-orbit-middle { --inset: -9%; --period: 172s; }
.star-orbit-wide { --inset: -19%; --period: 208s; }
.star-orbit-outer { --inset: -28%; --period: 244s; }
.star-orbit:nth-child(1) { --angle: 43deg; --size: 4px; }
.star-orbit:nth-child(2) { --angle: 124deg; --size: 2.5px; }
.star-orbit:nth-child(3) { --angle: 222deg; --size: 3px; }
.star-orbit:nth-child(4) { --angle: 296deg; --size: 2px; }
.star-orbit:nth-child(5) { --angle: 14deg; --size: 2px; }
.star-orbit:nth-child(6) { --angle: 102deg; --size: 3.5px; }
.star-orbit:nth-child(7) { --angle: 188deg; --size: 2.5px; }
.star-orbit:nth-child(8) { --angle: 288deg; --size: 4.5px; }
.star-orbit:nth-child(9) { --angle: 63deg; --size: 2.5px; }
.star-orbit:nth-child(10) { --angle: 145deg; --size: 2px; }
.star-orbit:nth-child(11) { --angle: 235deg; --size: 3.5px; }
.star-orbit:nth-child(12) { --angle: 328deg; --size: 2.5px; }
.star-orbit:nth-child(13) { --angle: 35deg; --size: 2px; }
.star-orbit:nth-child(14) { --angle: 107deg; --size: 3px; }
.star-orbit:nth-child(15) { --angle: 277deg; --size: 2px; }
.orbit-star {
  position: absolute;
  top: 0;
  left: 50%;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  transform: translate(-50%, -50%);
  pointer-events: auto;
}
.orbit-star::after {
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: #f6d39a;
  box-shadow: 0 0 6px #e7b866a6;
  content: '';
  transition: box-shadow .6s ease, transform .6s ease, background-color .6s ease;
}

@keyframes orbit {
  to { transform: rotate(calc(var(--angle) + 360deg)); }
}

@media (hover: hover) {
  .star-orbit:has(.orbit-star:hover) { animation-play-state: paused; }
  .orbit-star:hover::after {
    transform: scale(1.6);
    background: #fff3d4;
    box-shadow: 0 0 7px 2px #f4cb86c9, 0 0 22px 6px #dea65f6b;
  }
}
.sky-copy { position: absolute; inset: auto 54px 60px; text-align: center; direction: rtl; }
.gold-rule { display: block; width: 32px; height: 1px; background: #c3a475; margin: 0 auto 18px; }
.sky-copy p { margin: 0; font-size: clamp(38px, 4vw, 65px); line-height: 1.28; font-weight: 770; letter-spacing: -.04em; }
.sky-copy small { display: block; margin-top: 14px; color: #d3cbba; font-size: 13px; font-weight: 400; }

.panel {
  direction: rtl;
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 45px clamp(35px, 5vw, 76px) 25px;
  background: radial-gradient(ellipse at 100% 0, #e8dfcb73, transparent 55%), var(--paper);
}
.brand { display: inline-flex; align-items: center; justify-self: start; gap: 11px; text-decoration: none; }
.brand img { width: 39px; height: 39px; filter: drop-shadow(0 3px 4px #a17b4740); }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 22px; font-weight: 850; line-height: 1.1; }
.brand small { margin-top: 4px; font: 8px var(--mono); letter-spacing: .23em; }
.panel-body { width: min(100%, 384px); margin: auto; padding: 52px 0 65px; }
.form-emblem { width: 46px; height: 46px; display: grid; place-items: center; color: #8c6430; background: #efe7d7; border: 1px solid #e8dbc4; border-radius: 14px; margin-bottom: 22px; }
.form-emblem svg { width: 22px; height: 22px; }
h1 { margin: 0; font-size: clamp(27px, 3.2vw, 45px); font-weight: 880; letter-spacing: -.045em; line-height: 1.37; text-wrap: balance; }
.intro { margin: 11px 0 31px; color: var(--muted); line-height: 1.85; font-size: 14px; }
.field-label { display: block; margin: 0 0 8px; font-size: 13px; font-weight: 730; }
.field { display: flex; align-items: center; min-height: 56px; gap: 12px; padding: 0 15px; margin: 0 0 19px; border: 1px solid #ddd7ca; border-radius: 10px; background: #fffdfa; }
.field:focus-within { border-color: #9c743d; box-shadow: 0 0 0 3px #a17b471c; }
.field-icon { color: #7d7568; display: grid; place-items: center; }
.field svg { width: 18px; height: 18px; }
.field input { flex: 1; width: 0; min-height: 54px; padding: 0; border: 0; outline: 0; background: transparent; color: #172436; font-size: 14px; }
.field input::placeholder { color: #716b61; opacity: 1; }
#code { letter-spacing: .18em; }
.send-code { flex-shrink: 0; min-height: 36px; padding: 4px 10px; border: 1px solid #e8dbc4; border-radius: 7px; color: #694b25; background: #f3ead9; font-size: 12px; font-weight: 750; }
.send-code:hover { background: #eadeca; }
.primary { position: relative; display: grid; place-items: center; width: 100%; min-height: 56px; margin-top: 26px; padding: 10px 44px; border: 1px solid #111c2c; border-radius: 10px; background: #142338; color: #fff8eb; box-shadow: 0 6px 15px #17243619; font-size: 14px; font-weight: 760; text-align: center; text-decoration: none; transition: background .2s ease; }
.primary:hover { background: #243a54; }
.primary:disabled, .send-code:disabled { cursor: default; opacity: .58; }
.primary:disabled:hover { background: #142338; }
.send-code:disabled:hover { background: #f3ead9; }
.primary svg { position: absolute; inset-inline-end: 19px; width: 18px; height: 18px; color: #e3c18c; }
.code-status { margin: -7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.75; }
.availability { margin: -12px 0 18px; padding: 9px 12px; border-inline-start: 2px solid #a17b47; border-radius: 6px; background: #f1e9d8; color: #694b25; font-size: 13px; }
.alert { color: #872c22; background: #f7e8e2; border-inline-start: 2px solid #aa5142; border-radius: 6px; padding: 9px 12px; font-size: 13px; line-height: 1.75; }
.account-mobile { padding: 12px; border: 1px solid var(--line); border-radius: 10px; overflow-wrap: anywhere; }
.panel-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.panel-footer span:first-child { display: inline-flex; align-items: center; gap: 7px; }
.panel-footer svg { width: 14px; height: 14px; color: #8b693b; }
.footer-brand { font: 9px var(--mono); letter-spacing: .16em; }

@media (max-width: 780px) {
  .shell { display: flex; flex-direction: column; }
  .sky { min-height: 0; height: 286px; }
  .sky-border { inset: 14px; }
  .sky-header { inset: 26px 26px auto; }
  .sky-label, .sky-coordinate { font-size: 8px; }
  .constellation { width: 154px; top: 44%; }
  .sky-copy { inset: auto 24px 29px; }
  .gold-rule { display: none; }
  .sky-copy p { font-size: 29px; }
  .sky-copy p br { display: none; }
  .sky-copy small { margin-top: 5px; font-size: 11px; }
  .panel { padding: 24px max(24px, 7vw) 20px; flex: 1; }
  .panel-body { padding: 32px 0 45px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .star-orbit { animation: none; }
}
