:root {
  color-scheme: dark;
  --auth-obsidian: #05060a;
  --auth-panel: #08090e;
  --auth-ink: #f3eee7;
  --auth-muted: #9995a5;
  --auth-platinum: #d9d3dc;
  --auth-champagne: #d7b98d;
  --auth-amethyst: #8d6bb2;
  --auth-line: rgba(218, 207, 229, .2);
  --auth-focus: #b79ad7;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; background: var(--auth-obsidian); }

button, input { font: inherit; }

button:focus-visible, input:focus-visible {
  outline: 2px solid var(--auth-focus);
  outline-offset: 3px;
}

.auth-shell {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 56fr) minmax(420px, 44fr);
  overflow: hidden;
  background: var(--auth-obsidian);
  color: var(--auth-ink);
}

.auth-art {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
  background: var(--auth-obsidian) url('assets/auth-hero-desktop-3x4.webp') center 54% / cover no-repeat;
}

.auth-art::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(5, 6, 10, .12), transparent 62%, rgba(5, 6, 10, .58)),
    linear-gradient(180deg, rgba(5, 6, 10, .08), transparent 60%, rgba(5, 6, 10, .56));
}

.auth-lockup {
  position: absolute;
  top: clamp(28px, 4vw, 56px);
  left: clamp(28px, 4vw, 58px);
  width: clamp(215px, 20vw, 330px);
  height: auto;
  object-fit: contain;
}

.auth-art-line {
  position: absolute;
  left: clamp(30px, 4vw, 62px);
  bottom: clamp(32px, 5vw, 66px);
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0;
  color: rgba(243, 238, 231, .82);
  font-size: .73rem;
  font-weight: 500;
  letter-spacing: .28em;
  text-transform: uppercase;
}

.auth-art-line span { width: 38px; height: 1px; background: var(--auth-champagne); }

.auth-panel {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: clamp(38px, 6vw, 96px);
  border-left: 1px solid rgba(211, 191, 238, .22);
  background:
    radial-gradient(circle at 115% 112%, rgba(137, 101, 180, .1), transparent 37%),
    radial-gradient(circle at 90% -10%, rgba(212, 184, 141, .035), transparent 30%),
    var(--auth-panel);
}

.auth-panel::after {
  content: "";
  position: absolute;
  inset: auto -12% -18% 20%;
  height: 42%;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(111, 77, 156, .08), transparent 68%);
}

.auth-content { position: relative; z-index: 1; width: min(100%, 390px); }

.auth-mobile-mark { display: none; }

.auth-heading { margin-bottom: 34px; }

.auth-eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 24px;
  color: #d9bea0;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .32em;
  text-transform: uppercase;
}

.auth-eyebrow span { display: block; width: 54px; height: 1px; background: rgba(215, 185, 141, .56); }
.auth-eyebrow span:first-child { display: none; }

.auth-heading h1 {
  max-width: 520px;
  margin: 0 0 18px;
  color: var(--auth-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.35rem, 5vw, 5.25rem);
  font-weight: 400;
  letter-spacing: -.045em;
  line-height: .94;
}

.auth-heading > p:last-child {
  margin: 0;
  color: var(--auth-muted);
  font-size: 1rem;
  line-height: 1.55;
}

.auth-button {
  width: 100%;
  min-height: 60px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  border-radius: 15px;
  color: var(--auth-ink);
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.auth-button:hover { transform: translateY(-1px); }
.auth-button:active { transform: translateY(0); }
.auth-button:disabled { cursor: wait; opacity: .64; transform: none; }

.auth-button svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.auth-button-primary {
  border: 1px solid rgba(225, 192, 151, .78);
  background:
    linear-gradient(120deg, rgba(134, 100, 173, .23), rgba(255, 255, 255, .035)),
    #12111a;
  box-shadow: 0 14px 42px rgba(40, 24, 61, .28), inset 0 1px rgba(255, 255, 255, .08);
}

.auth-button-primary:hover {
  border-color: rgba(237, 212, 179, .98);
  background:
    linear-gradient(120deg, rgba(147, 108, 190, .31), rgba(255, 255, 255, .055)),
    #15131d;
  box-shadow: 0 17px 48px rgba(52, 30, 78, .36), inset 0 1px rgba(255, 255, 255, .11);
}

.auth-button-secondary {
  min-height: 56px;
  border: 1px solid rgba(205, 199, 218, .34);
  background: rgba(255, 255, 255, .012);
}

.auth-button-secondary:hover { border-color: rgba(183, 154, 215, .72); background: rgba(143, 106, 183, .055); }

.auth-divider { display: flex; align-items: center; gap: 18px; margin: 26px 0; }
.auth-divider span { height: 1px; flex: 1; background: var(--auth-line); }
.auth-divider b { color: #aaa5b2; font-size: .69rem; font-weight: 500; letter-spacing: .28em; }

.auth-invite { display: grid; gap: 12px; margin-top: 14px; animation: auth-reveal 190ms ease both; }
.auth-invite[hidden] { display: none; }

.auth-invite label > span {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.auth-invite input {
  width: 100%;
  height: 54px;
  border: 1px solid rgba(205, 199, 218, .25);
  border-radius: 13px;
  padding: 0 16px;
  background: rgba(255, 255, 255, .018);
  color: var(--auth-ink);
}

.auth-invite input::placeholder { color: #75717d; }
.auth-invite input:user-invalid { border-color: #b87682; }

.auth-status { min-height: 1.4em; margin: 14px 0 0; color: #c8accd; font-size: .82rem; text-align: center; }

.auth-security {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 14px 0 0;
  color: #777482;
  font-size: .78rem;
}

.auth-security svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; }

@keyframes auth-reveal {
  from { opacity: 0; transform: translateY(-7px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 800px) {
  .auth-shell {
    display: block;
    min-height: 100svh;
    overflow: visible;
    background: var(--auth-obsidian) url('assets/auth-hero-mobile-9x16.webp') top center / cover no-repeat;
  }

  .auth-art { display: none; }

  .auth-panel {
    min-height: 100svh;
    align-items: start;
    padding: clamp(300px, 39vh, 370px) 24px max(28px, env(safe-area-inset-bottom));
    border: 0;
    background: linear-gradient(180deg, transparent 0 23%, rgba(5, 6, 10, .34) 32%, rgba(5, 6, 10, .92) 49%, #05060a 74%);
  }

  .auth-panel::after { display: none; }
  .auth-content { max-width: 390px; margin-inline: auto; text-align: center; }

  .auth-mobile-mark {
    display: block;
    width: 92px;
    height: 92px;
    margin: -58px auto 12px;
    object-fit: contain;
    filter: drop-shadow(0 8px 18px rgba(102, 60, 142, .34));
  }

  .auth-heading { margin-bottom: 24px; }
  .auth-eyebrow { justify-content: center; margin-bottom: 16px; font-size: .65rem; }
  .auth-eyebrow span, .auth-eyebrow span:first-child { display: block; width: 32px; }

  .auth-heading h1 {
    margin-bottom: 12px;
    font-size: clamp(2.45rem, 12vw, 3.6rem);
    line-height: .98;
  }

  .auth-heading > p:last-child { max-width: 310px; margin-inline: auto; font-size: .94rem; }
  .auth-button { min-height: 54px; border-radius: 14px; }
  .auth-divider { margin: 21px 0; }
  .auth-security { margin-top: 20px; font-size: .72rem; }
}

@media (max-height: 740px) and (max-width: 800px) {
  .auth-panel { padding-top: 245px; }
  .auth-mobile-mark { width: 76px; height: 76px; margin-top: -44px; }
  .auth-heading h1 { font-size: 2.35rem; }
  .auth-heading { margin-bottom: 18px; }
  .auth-divider { margin: 15px 0; }
}

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