:root {
  color-scheme: dark;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #f6f1ed;
  background: #10131d;
  --gold: #e6c58a;
  --gold-bright: #f4dbac;
  --muted: #c7c2c8;
  --panel: rgba(19, 18, 30, .91);
  --line: rgba(229, 199, 151, .34);
  --focus: #a9d8ff;
}

* { box-sizing: border-box; }

html { min-width: 320px; min-height: 100%; background: #10131d; }

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  isolation: isolate;
}

.scene {
  position: fixed;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  background: #10131d;
  pointer-events: none;
}

.scene::before,
.scene::after {
  position: absolute;
  inset: 0;
  content: "";
}

.scene::before {
  background-image:
    linear-gradient(90deg, rgba(8, 10, 18, .14) 0%, rgba(8, 10, 18, .08) 38%, rgba(10, 10, 18, .64) 72%, rgba(10, 10, 18, .78) 100%),
    linear-gradient(0deg, rgba(9, 10, 16, .84) 0%, transparent 25%, transparent 72%, rgba(10, 11, 19, .28) 100%),
    url("/assets/sirion-background.png");
  background-position: center, center, 37% 29%;
  background-size: cover;
  background-repeat: no-repeat;
  transform: scale(1.015);
}

.scene::after {
  background:
    radial-gradient(ellipse at 75% 44%, rgba(112, 77, 136, .18), transparent 34%),
    linear-gradient(115deg, transparent 30%, rgba(8, 10, 18, .16) 61%, rgba(8, 10, 18, .4) 100%);
}

.page-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(25rem, 30rem);
  grid-template-rows: auto 1fr auto;
  column-gap: clamp(2.5rem, 8vw, 9rem);
  align-items: center;
  width: min(100%, 100rem);
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding: clamp(1.25rem, 3.4vw, 3.25rem) clamp(1.25rem, 6.4vw, 7rem);
}

.brand {
  grid-column: 1;
  grid-row: 1;
  align-self: start;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .2rem;
}

.brand__link {
  display: inline-flex;
  align-items: center;
  gap: .9rem;
  color: inherit;
  text-decoration: none;
}

.brand__logo {
  display: block;
  width: clamp(3rem, 5vw, 4.5rem);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 14px rgba(63, 170, 230, .3));
}

.brand__name {
  color: #fff8ed;
  font-size: clamp(1.25rem, 2vw, 1.8rem);
  font-weight: 600;
  letter-spacing: .12em;
  text-shadow: 0 2px 12px rgba(8, 9, 15, .75);
}

.brand__name span { color: var(--gold-bright); }

.brand__caption {
  margin-left: calc(clamp(3rem, 5vw, 4.5rem) + .9rem);
  color: #eee2d4;
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-shadow: 0 2px 10px rgba(8, 9, 15, .9);
}

.registration-card {
  position: relative;
  grid-column: 2;
  grid-row: 1 / 4;
  align-self: center;
  width: 100%;
  padding: clamp(1.65rem, 3.3vw, 2.65rem);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  background: var(--panel);
  box-shadow: 0 2rem 5rem rgba(4, 5, 12, .48), inset 0 1px rgba(255, 255, 255, .07);
  backdrop-filter: blur(14px);
}

.registration-card::before,
.registration-card::after {
  position: absolute;
  width: 3.5rem;
  height: 3.5rem;
  border-color: rgba(238, 207, 155, .56);
  border-style: solid;
  content: "";
  pointer-events: none;
}

.registration-card::before {
  top: .55rem;
  left: .55rem;
  border-width: 1px 0 0 1px;
  border-radius: .45rem 0 0;
}

.registration-card::after {
  right: .55rem;
  bottom: .55rem;
  border-width: 0 1px 1px 0;
  border-radius: 0 0 .45rem;
}

.card-ornament {
  position: relative;
  width: 3.4rem;
  height: 1px;
  margin-bottom: 1.3rem;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.card-ornament span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: .48rem;
  height: .48rem;
  border: 1px solid var(--gold-bright);
  background: #211d2b;
  transform: translate(-50%, -50%) rotate(45deg);
}

.eyebrow {
  margin: 0 0 .3rem;
  color: var(--gold-bright);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: #fffaf4;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.9rem, 3vw, 2.45rem);
  font-weight: 500;
  line-height: 1.15;
  text-wrap: balance;
}

.intro {
  margin: .75rem 0 1.65rem;
  color: var(--muted);
}

.field { margin-top: 1.1rem; }

.field > label {
  display: block;
  margin-bottom: .42rem;
  color: #f5eee6;
  font-size: .9rem;
  font-weight: 600;
}

input {
  display: block;
  width: 100%;
  min-height: 3.15rem;
  padding: .75rem .9rem;
  border: 1px solid rgba(228, 218, 225, .25);
  border-radius: .55rem;
  background: rgba(7, 9, 16, .62);
  color: #fff;
  font: inherit;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

input:hover { border-color: rgba(230, 197, 138, .55); }

input:focus-visible {
  border-color: var(--focus);
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  background: rgba(7, 9, 16, .9);
  box-shadow: 0 0 0 .25rem rgba(169, 216, 255, .18);
}

input[aria-invalid="true"] { border-color: #ff9a9a; }

.password-control { position: relative; }

.password-control input { padding-right: 6.25rem; }

.reveal {
  position: absolute;
  top: 50%;
  right: .55rem;
  min-height: 2.25rem;
  padding: .3rem .55rem;
  border: 1px solid transparent;
  border-radius: .35rem;
  background: transparent;
  color: var(--gold-bright);
  font: inherit;
  font-size: .78rem;
  cursor: pointer;
  transform: translateY(-50%);
}

.reveal:hover { background: rgba(230, 197, 138, .1); }

.reveal:focus-visible,
.submit-button:focus-visible,
.brand__link:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.field-hint {
  margin: .35rem 0 0;
  color: #c7c2cc;
  font-size: .76rem;
}

.form-status {
  min-height: 1.5rem;
  margin: 1rem 0 0;
  color: #f4c2bd;
  font-size: .86rem;
}

.form-status:empty { min-height: .35rem; margin-top: .55rem; }

.form-status[data-kind="success"] { color: #bce7c8; }
.form-status[data-kind="info"] { color: #c8d5ea; }

.submit-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 3.4rem;
  margin-top: .45rem;
  padding: .8rem 1.05rem;
  border: 1px solid #efd49f;
  border-radius: .58rem;
  background: linear-gradient(115deg, #e1c28c, #f2dcaf 53%, #cba46b);
  color: #241a20;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 7px 24px rgba(221, 177, 107, .18), inset 0 1px rgba(255, 255, 255, .5);
  transition: filter .15s ease, transform .15s ease, box-shadow .15s ease;
}

.submit-button:hover:not(:disabled) {
  filter: brightness(1.08);
  box-shadow: 0 9px 28px rgba(221, 177, 107, .28), inset 0 1px rgba(255, 255, 255, .65);
  transform: translateY(-1px);
}

.submit-button:disabled { cursor: wait; filter: saturate(.65); opacity: .75; }

.submit-button__arrow { font-size: 1.2rem; line-height: 1; }

.privacy-note {
  margin: 1.15rem 0 0;
  color: #beb9c3;
  font-size: .76rem;
  text-align: center;
}

.page-footer {
  display: flex;
  grid-column: 1;
  grid-row: 3;
  align-items: center;
  gap: .8rem;
  align-self: end;
  color: rgba(255, 249, 241, .78);
  font-size: .76rem;
  letter-spacing: .08em;
  text-shadow: 0 2px 10px rgba(5, 6, 12, .9);
}

.page-footer__divider { width: 2rem; height: 1px; background: var(--gold); }

@media (max-width: 760px) {
  .scene::before {
    background-image:
      linear-gradient(0deg, rgba(8, 9, 16, .96) 0%, rgba(8, 9, 16, .78) 48%, rgba(8, 9, 16, .2) 100%),
      url("/assets/sirion-background.png");
    background-position: center, 42% 23%;
  }

  .scene::after { background: linear-gradient(90deg, rgba(9, 10, 18, .2), rgba(9, 10, 18, .02), rgba(9, 10, 18, .2)); }

  .page-shell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 1fr auto;
    row-gap: clamp(1.25rem, 4vh, 2.25rem);
    width: min(100%, 35rem);
    padding: max(1.1rem, env(safe-area-inset-top)) 1rem max(1.1rem, env(safe-area-inset-bottom));
  }

  .brand { grid-column: 1; grid-row: 1; align-items: center; }
  .brand__caption { margin-left: 0; }
  .registration-card { grid-column: 1; grid-row: 2; padding: 1.55rem 1.35rem; }
  .page-footer { grid-column: 1; grid-row: 3; justify-content: center; }
}

@media (max-width: 380px) {
  .registration-card { padding: 1.3rem 1.05rem; }
  .brand__link { gap: .6rem; }
  .brand__caption { font-size: .7rem; }
  .reveal { right: .35rem; }
  .password-control input { padding-right: 5.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
