@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  color-scheme: dark;
  font-family: Manrope, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  font-weight: 400;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  --bg: #020304;
  --bg-deep: #050608;
  --bg-soft: rgba(255, 255, 255, 0.032);
  --bg-strong: rgba(10, 11, 15, 0.88);
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.3);
  --text: #f6f7f9;
  --text-soft: rgba(255, 255, 255, 0.72);
  --text-dim: rgba(255, 255, 255, 0.45);
  --text-faint: rgba(255, 255, 255, 0.28);
  --accent: #ffffff;
  --accent-text: #050608;
  --success-bg: rgba(18, 60, 42, 0.28);
  --success-border: rgba(98, 192, 143, 0.18);
  --error-bg: rgba(116, 23, 23, 0.24);
  --error-border: rgba(255, 108, 108, 0.22);
  --grid-step: 36px;
  --grid-line-width: 1px;
  --grid-line: rgba(255, 255, 255, 0.042);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
}

body {
  color: var(--text);
  user-select: none;
  -webkit-user-select: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

a {
  color: inherit;
}

#app {
  min-height: 100dvh;
}

.page {
  position: relative;
  min-height: 100dvh;
  overflow-x: hidden;
}

.page__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.page__bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 44%, rgba(255, 255, 255, 0.06), transparent 13%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, transparent 40%);
}

.page__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, transparent 0%, rgba(2, 3, 4, 0.16) 48%, rgba(2, 3, 4, 0.88) 100%);
  mix-blend-mode: screen;
  opacity: 0.72;
}

.page__matrix {
  display: none;
}

.page__grid {
  position: absolute;
  pointer-events: none;
  opacity: 0.92;
}

.page__grid--vertical-left,
.page__grid--vertical-right {
  top: 0;
  bottom: 0;
  width: calc(50% - (var(--grid-line-width) / 2));
  background-image: repeating-linear-gradient(
    90deg,
    var(--grid-line) 0,
    var(--grid-line) var(--grid-line-width),
    transparent var(--grid-line-width),
    transparent var(--grid-step)
  );
}

.page__grid--vertical-left {
  right: calc(50% + (var(--grid-line-width) / 2));
  background-image: repeating-linear-gradient(
    270deg,
    var(--grid-line) 0,
    var(--grid-line) var(--grid-line-width),
    transparent var(--grid-line-width),
    transparent var(--grid-step)
  );
}

.page__grid--vertical-right {
  left: calc(50% + (var(--grid-line-width) / 2));
}

.page__grid--horizontal-top,
.page__grid--horizontal-bottom {
  left: 0;
  right: 0;
  height: 50%;
  background-image: repeating-linear-gradient(
    180deg,
    var(--grid-line) 0,
    var(--grid-line) var(--grid-line-width),
    transparent var(--grid-line-width),
    transparent var(--grid-step)
  );
}

.page__grid--horizontal-top {
  bottom: 50%;
  background-image: repeating-linear-gradient(
    0deg,
    var(--grid-line) 0,
    var(--grid-line) var(--grid-line-width),
    transparent var(--grid-line-width),
    transparent var(--grid-step)
  );
}

.page__grid--horizontal-bottom {
  top: 50%;
}

.page__scroll {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  overflow-y: auto;
  scrollbar-gutter: stable both-edges;
}

.page__scroll::-webkit-scrollbar {
  width: 10px;
}

.page__scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
}

.shell {
  width: min(100%, 1180px);
  min-height: 100dvh;
  margin: 0 auto;
  padding: 28px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 22px;
}

.shell--stacked {
  gap: 18px;
}

.shell--landing {
  width: min(100%, 880px);
}

.shell--split {
  width: min(100%, calc(1000px + (var(--grid-step) * 2) + 32px));
  display: grid;
  grid-template-columns: minmax(0, 500px) calc(var(--grid-step) * 2) minmax(0, 500px);
  align-items: center;
  justify-content: center;
  gap: 0;
}

.shell--layout-entering .hero--landing {
  animation: landingHeroIn 0.32s ease both;
}

.shell--layout-entering .landing-actions-stage {
  animation: landingActionsIn 0.34s ease both;
}

.shell--layout-entering .hero--split {
  animation: splitHeroIn 0.34s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.shell--layout-entering .layout-divider {
  animation: dividerIn 0.34s ease both;
}

.shell--layout-entering .panel {
  animation: splitPanelIn 0.34s ease both;
}

.shell--layout-leaving .hero--landing {
  animation: landingHeroOut 0.18s ease forwards;
}

.shell--layout-leaving .landing-actions-stage {
  animation: landingActionsOut 0.18s ease forwards;
}

.shell--layout-leaving .hero--split {
  animation: splitHeroOut 0.18s ease forwards;
}

.shell--layout-leaving .layout-divider {
  animation: dividerOut 0.18s ease forwards;
}

.shell--layout-leaving .panel {
  animation: splitPanelOut 0.18s ease forwards;
}

.hero {
  width: min(100%, 820px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.72s cubic-bezier(0.22, 0.8, 0.22, 1);
}

.hero--visible {
  opacity: 1;
  transform: translateY(0);
}

.hero--stacked {
  transform: translateY(-32px);
}

.hero--split {
  width: 100%;
  max-width: 500px;
  align-items: flex-start;
  text-align: left;
  justify-self: stretch;
  padding-right: 26px;
  box-sizing: border-box;
}

.shell--split .hero--stacked {
  transform: translateY(0);
}

.hero__brandline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(4rem, 9vw, 7rem);
  opacity: 0;
}

.hero--visible .hero__brandline {
  opacity: 1;
}

.hero__word,
.hero__badge {
  transition: opacity 0.42s ease;
}

.hero__word {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  opacity: 0;
  white-space: nowrap;
}

.hero__word--visible {
  opacity: 1;
}

.hero__word-text {
  display: inline-block;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(2.5rem, 7vw, 5.2rem);
  font-weight: 900;
  line-height: 0.92;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-width: 1.42em;
  min-height: 1.42em;
  padding: 0 0.22em;
  border-radius: 0.24em;
  background: var(--accent);
  color: var(--accent-text);
  font-size: clamp(2.5rem, 7vw, 5.2rem);
  font-weight: 900;
  line-height: 0.92;
  opacity: 0;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.9),
    0 18px 54px rgba(255, 255, 255, 0.08);
}

.hero__badge--visible {
  opacity: 1;
}

.hero__description {
  max-width: 640px;
  margin: 18px 0 0;
  min-height: 1.5em;
  color: var(--text-soft);
  font-size: 0.96rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0;
}

.hero__description span {
  display: block;
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  border-right: 0 solid rgba(255, 255, 255, 0.45);
}

.hero__description--visible {
  opacity: 1;
}

.shell--split .hero__brandline {
  justify-content: flex-start;
}

.shell--split .hero__description {
  display: none;
}

.hero__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 16px;
}

.hero__links--landing {
  margin-top: 26px;
}

.landing-stage {
  opacity: 0;
}

.landing-stage--visible {
  opacity: 1;
}

.landing-stage--intro {
  animation: landingStageFadeIn 0.55s ease both;
}

.landing-actions-stage {
  display: grid;
  justify-items: center;
  margin-top: 44px;
  min-height: 108px;
  opacity: 0;
  pointer-events: none;
}

.landing-actions-stage--visible {
  opacity: 1;
  pointer-events: auto;
}

.hero__actions {
  display: grid;
  gap: 10px;
}

.hero__actions--landing {
  width: min(100%, 420px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-stage {
  display: grid;
  justify-items: center;
  transform-origin: center top;
  will-change: opacity;
}

.auth-stage--leaving {
  animation: authStageFadeOut 0.18s ease forwards;
}

.auth-stage--entering {
  animation: authStageFadeIn 0.22s ease both;
}

.layout-divider {
  width: var(--grid-line-width);
  height: min(62vh, 560px);
  justify-self: center;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(255, 255, 255, 0.16) 12%,
    rgba(255, 255, 255, 0.62) 50%,
    rgba(255, 255, 255, 0.16) 88%,
    transparent 100%
  );
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.1);
}

.panel {
  position: relative;
  width: min(100%, 500px);
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #ffffff0a;
  box-shadow:
    0 22px 70px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(4px);
  padding: 22px;
  overflow: hidden;
}

.shell--split .panel {
  width: 100%;
  max-width: 500px;
  justify-self: stretch;
  margin-left: 26px;
  box-sizing: border-box;
}

.shell--split .panel--wide {
  max-width: 500px;
}

.panel--wide {
  width: min(100%, 720px);
}

.panel__head {
  margin-bottom: 18px;
}

.panel__eyebrow {
  margin: 0 0 8px;
  color: var(--text-dim);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.panel__title {
  margin: 0;
  font-size: 1.46rem;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.panel__description {
  margin: 10px 0 0;
  color: var(--text-soft);
  font-size: 0.94rem;
}

.context,
.message,
.profile-summary,
.consent-summary {
  position: relative;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.02);
  padding: 12px 13px;
}

.context,
.message {
  margin-bottom: 14px;
}

.message--error {
  border-color: var(--error-border);
  background: var(--error-bg);
  color: #ffd7d7;
}

.message--success,
.profile-summary {
  border-color: var(--success-border);
  background: var(--success-bg);
}

.context__label {
  display: block;
  margin-bottom: 5px;
  color: var(--text-dim);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.form {
  display: grid;
  gap: 13px;
}

.form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px 10px;
}

.field {
  display: grid;
  gap: 6px;
}

.field--full {
  grid-column: 1 / -1;
}

.field__label {
  color: var(--text-soft);
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.field__input {
  width: 100%;
  min-height: 44px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: var(--text);
  padding: 11px 12px;
  font-size: 0.92rem;
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.field__input::placeholder {
  color: var(--text-faint);
}

.field__input:focus {
  outline: none;
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.06);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12),
    0 0 0 4px rgba(255, 255, 255, 0.03);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.actions--equal {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.actions--equal .button {
  width: 100%;
  min-width: 0;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button,
.button-text {
  border: 0;
  background: none;
  padding: 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.button--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}

.button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.24);
}

.button--primary:hover:not(:disabled) {
  background: #d8dde2;
  border-color: #f6f7f9;
  color: #050608;
  box-shadow:
    black 0px 0px 16px 4px,
    rgba(255, 255, 255, 0.18) 0px 0px 0px 1px,
    rgba(255, 255, 255, 0.18) 0px 0px 20px 0px;
}

.button:active:not(:disabled) {
  background: rgba(255, 255, 255, 0.14);
}

.button--primary:active:not(:disabled) {
  background: #eef2f5;
}

.button:disabled,
.button-text:disabled {
  opacity: 0.52;
}

.button-text {
  color: var(--text-dim);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.18s ease, text-shadow 0.18s ease;
}

.button-text:hover:not(:disabled) {
  color: var(--text);
}

.button-text--ghost:hover:not(:disabled) {
  text-shadow:
    0 0 10px rgba(255, 255, 255, 0.3),
    0 0 24px rgba(255, 255, 255, 0.14);
}

.consent-sections,
.details-grid {
  display: grid;
  gap: 10px;
}

.consent-section,
.details-card {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.018);
  padding: 12px;
}

.consent-section__title,
.details-card__title {
  margin: 0 0 10px;
  font-size: 0.92rem;
  letter-spacing: 0.03em;
}

.consent-section__list,
.details-list {
  margin: 0;
  padding-left: 18px;
  color: var(--text-soft);
}

.consent-section__list li + li {
  margin-top: 6px;
}

.details-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.details-list {
  display: grid;
  gap: 12px;
  padding-left: 0;
}

.details-list__row {
  display: grid;
  gap: 4px;
}

.details-list__row dt {
  color: var(--text-dim);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.details-list__row dd {
  margin: 0;
}

.profile-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}

.profile-header__text {
  min-width: 0;
}

.profile-summary__identity {
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile-summary__avatar {
  width: 68px;
  height: 68px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 1.25rem;
  font-weight: 700;
  flex-shrink: 0;
}

.profile-summary__name {
  margin: 0;
  font-size: 1.2rem;
}

.profile-summary__meta {
  margin: 5px 0 0;
  color: rgba(232, 255, 243, 0.82);
}

.empty-note {
  color: var(--text-soft);
  text-align: center;
}

@keyframes authStageFadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

@keyframes authStageFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes landingStageFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes landingHeroIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes landingHeroOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

@keyframes landingActionsIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes landingActionsOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

@keyframes splitHeroIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes splitHeroOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

@keyframes dividerIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes dividerOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

@keyframes splitPanelIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes splitPanelOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

@media (max-width: 760px) {
  .shell {
    width: min(100%, 100%);
    padding: 18px 14px;
    gap: 18px;
  }

  .shell--split {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .layout-divider {
    display: none;
  }

  .hero--split {
    width: min(100%, 820px);
    align-items: center;
    text-align: center;
    justify-self: center;
    max-width: none;
    padding-right: 0;
  }

  .hero__brandline {
    gap: 10px;
  }

  .shell--split .hero__brandline {
    justify-content: center;
  }

  .hero__word--visible {
    opacity: 1;
  }

  .hero__description {
    font-size: 0.9rem;
  }

  .shell--split .hero__description {
    max-width: 640px;
  }

  .hero__actions--landing {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .landing-actions-stage {
    min-height: 154px;
  }

  .panel,
  .panel--wide {
    width: 100%;
    padding: 18px;
  }

  .shell--split .panel,
  .shell--split .panel--wide {
    max-width: none;
    margin-left: 0;
  }

  .form__grid,
  .details-grid {
    grid-template-columns: 1fr;
  }

  .field--full {
    grid-column: auto;
  }

  .actions,
  .profile-header {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .links {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-summary__identity {
    align-items: flex-start;
  }
}
