:root {
  color-scheme: dark;
  --background: #0b0b0e;
  --surface: #0a0a0d;
  --silver: #f4f1ff;
  --violet: #aa8de7;
  --blue: #3452dc;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; background: var(--background); }

body {
  position: relative;
  isolation: isolate;
  margin: 0;
  min-height: 100svh;
  padding: 24px 30px;
  overflow-x: hidden;
  background:
    radial-gradient(ellipse at 21% 109%, #171d39 0%, transparent 43%),
    radial-gradient(ellipse at 92% 90%, #151323 0%, transparent 38%),
    linear-gradient(170deg, #111113, #0a0a0e 78%);
  color: var(--silver);
  font-family: Arial, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: url("/assets/grain.svg") repeat;
  opacity: .12;
  mix-blend-mode: soft-light;
}

.surface {
  position: relative;
  isolation: isolate;
  min-height: calc(100svh - 48px);
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 2.8%);
  border-radius: 32px;
  background:
    radial-gradient(ellipse at 50% 39%, rgb(20 19 36 / 33%), transparent 43%),
    linear-gradient(180deg, #111112 0%, #0a0a0c 53%, #08080b 100%);
  box-shadow:
    0 1px 0 rgb(255 255 255 / 1%) inset,
    0 -1px 0 rgb(0 0 0 / 50%) inset,
    0 18px 72px -36px rgb(26 39 118 / 35%);
  animation: surface-arrive 850ms cubic-bezier(.16, 1, .3, 1) both;
}

.surface::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 7% 65%, rgb(23 26 47 / 26%), transparent 43%),
    radial-gradient(ellipse at 82% 15%, rgb(39 38 38 / 12%), transparent 45%),
    radial-gradient(ellipse at 50% 58%, transparent 26%, rgb(0 0 0 / 27%) 100%);
}

.surface::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: 1px 0 0 rgb(95 91 191 / 11%) inset;
  background: linear-gradient(180deg, rgb(255 255 255 / 1.3%), transparent 22%);
}

.reference-texture {
  position: absolute;
  inset: -6%;
  z-index: 0;
  width: 112%;
  height: 112%;
  object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
  transition: opacity 1000ms ease-out;
}

.reference-texture.is-loading {
  opacity: 0;
}

.reference-texture.is-loaded {
  opacity: 1;
}

.identity {
  position: absolute;
  z-index: 3;
  top: 48.2%;
  left: 50%;
  width: min(520px, calc(100% - 64px));
  -webkit-touch-callout: none;
  transform: translate(-50%, -50%);
  animation: identity-arrive 1100ms cubic-bezier(.16, 1, .3, 1) 80ms both;
}

.title-light {
  position: absolute;
  z-index: -1;
  inset: -55% -18%;
  opacity: .32;
  pointer-events: none;
  background:
    radial-gradient(ellipse 50% 30% at 53% 50%, rgb(111 70 231 / 34%), transparent 100%),
    radial-gradient(ellipse 32% 29% at 78% 54%, rgb(57 88 249 / 28%), transparent 100%),
    radial-gradient(ellipse 35% 24% at 19% 60%, rgb(173 113 246 / 22%), transparent 100%);
  filter: blur(22px);
  will-change: transform, opacity;
}

h1 { margin: 0; line-height: 0; }

.brand-logo {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  -webkit-user-drag: none;
  filter: drop-shadow(0 12px 26px rgb(10 5 26 / 42%));
}

.caption {
  position: absolute;
  z-index: 3;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  margin: 0;
  color: #ece9f5;
  text-align: center;
  font-size: clamp(17px, 1.65vw, 22px);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -.03em;
  text-shadow: 0 0 16px rgb(167 143 255 / 10%);
  animation: detail-arrive 700ms cubic-bezier(.16, 1, .3, 1) 280ms both;
}

.caption::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 50%;
  width: min(330px, 70%);
  height: 1px;
  transform: translate(-50%, -50%);
  background: linear-gradient(90deg, transparent, rgb(161 145 224 / 9%), transparent);
  box-shadow: 0 0 9px rgb(166 143 242 / 9%);
}

.caption span {
  color: #b4a1f6;
  background: linear-gradient(100deg, #e4d6ff, #8379e7 80%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.disclaimer {
  position: absolute;
  z-index: 6;
  right: 24px;
  bottom: 24px;
  left: 24px;
  margin: 0;
  -webkit-user-select: text;
  user-select: text;
  color: #b7b4c4;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
  text-wrap: balance;
  animation: detail-arrive 700ms cubic-bezier(.16, 1, .3, 1) 380ms both;
}

.ambience {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  contain: layout style;
  animation: light-arrive 1400ms ease-out 100ms both;
}

.ambient-orb {
  position: absolute;
  left: 23%;
  top: 57%;
  width: clamp(280px, 38vw, 540px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  will-change: transform;
  --orb-color: 133 94 241;
  --orb-opacity: .16;
}

.ambient-orb::before {
  content: "";
  position: absolute;
  inset: -25% -10%;
  border-radius: 50%;
  background: radial-gradient(ellipse at 38% 46%, rgb(var(--orb-color) / var(--orb-opacity)), rgb(var(--orb-color) / 6%) 35%, transparent 66%);
  filter: blur(42px);
  transform: rotate(-24deg);
}

.orb-blue {
  left: 77%;
  top: 32%;
  width: clamp(240px, 34vw, 490px);
  --orb-color: 63 101 250;
  --orb-opacity: .14;
}

.orb-pearl {
  left: 67%;
  top: 77%;
  width: clamp(220px, 27vw, 380px);
  --orb-color: 169 148 245;
  --orb-opacity: .1;
}

.ambient-orb::after {
  content: "";
  position: absolute;
  inset: 26% 8%;
  background: radial-gradient(ellipse, rgb(var(--orb-color) / 11%), transparent 70%);
  filter: blur(20px);
  transform: rotate(-32deg) scaleY(.55);
}

.pointer-bloom {
  position: absolute;
  top: 0;
  left: 0;
  width: 480px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(150 117 251 / 15%), rgb(70 86 234 / 8%) 35%, transparent 70%);
  opacity: 0;
  will-change: transform, opacity;
}

.edge-reflection {
  position: absolute;
  z-index: 4;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  pointer-events: none;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
}

.edge-light {
  position: absolute;
  width: 560px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(234 224 255 / 62%), rgb(108 123 250 / 38%) 36%, transparent 70%);
  opacity: 0;
  will-change: transform, opacity;
}

.logo-scene {
  position: relative;
  transform-style: preserve-3d;
  will-change: transform;
}

.logo-gloss {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: .26;
  mix-blend-mode: screen;
  -webkit-mask: url("/assets/logo.png") center / contain no-repeat;
  mask: url("/assets/logo.png") center / contain no-repeat;
}

.gloss-band {
  position: absolute;
  inset: -85%;
  background: linear-gradient(112deg, transparent 36%, rgb(211 209 255 / 4%) 44%, rgb(255 255 255 / 65%) 49%, rgb(143 176 255 / 20%) 51%, transparent 58%);
  will-change: transform;
}

.light-ripple {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  width: 110px;
  aspect-ratio: 1;
  border: 1px solid rgb(201 190 255 / 32%);
  border-radius: 50%;
  box-shadow: 0 0 24px rgb(128 115 255 / 12%) inset, 0 0 20px rgb(128 115 255 / 8%);
  pointer-events: none;
  animation: light-ripple 950ms cubic-bezier(.16, 1, .3, 1) both;
}

@keyframes light-ripple {
  from { transform: translate(-50%, -50%) scale(.2); opacity: .8; }
  to { transform: translate(-50%, -50%) scale(2.3); opacity: 0; }
}

@keyframes surface-arrive {
  from { opacity: 0; transform: translateY(7px) scale(.995); }
  to { opacity: 1; transform: none; }
}

@keyframes identity-arrive {
  from { opacity: 0; transform: translate(-50%, -43%) scale(.97); filter: blur(5px); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); filter: blur(0); }
}

@keyframes detail-arrive {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: none; }
}

@keyframes light-arrive {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-height: 500px) {
  .surface { min-height: 420px; }
}

@media (max-width: 600px) {
  body { padding: 14px; }
  .surface { min-height: calc(100svh - 28px); border-radius: 25px; }
  .identity { top: 47%; width: calc(100% - 36px); }
  .title-light { inset: -70% -8%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .logo-scene { transform: none !important; }
  .light-ripple, .pointer-bloom { display: none; }
  .ambient-orb, .title-light { will-change: auto; }
}

@media (prefers-contrast: more) {
  .surface { border-color: #555160; }
  .disclaimer, .caption { color: #fff; }
  body::after { opacity: .08; }
}


.access-trigger {
  position: absolute;
  z-index: 7;
  top: 24px;
  right: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgb(220 215 248 / 9%);
  border-radius: 12px;
  background: linear-gradient(180deg, rgb(255 255 255 / 3%), transparent), rgb(8 8 12 / 25%);
  color: #c4c0cf;
  font: inherit;
  font-size: 13px;
  line-height: 1;
  text-decoration: none;
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: border-color 220ms ease, color 220ms ease;
}
.access-trigger:hover { border-color: rgb(196 181 242 / 24%); color: #f4f1ff; }
.access-trigger:focus-visible, .login-back:focus-visible, .access-submit:focus-visible, .private-brand:focus-visible { outline: 2px solid #a995d8; outline-offset: 4px; }
.login-surface { display: grid; place-items: center; }
.login-back {
  position: absolute;
  z-index: 4;
  top: 24px;
  left: 24px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 44px;
  padding: 0 8px;
  color: #b7b2c4;
  font-size: 13px;
  text-decoration: none;
  transition: color 180ms ease;
}
.login-back:hover { color: #f4f1ff; }
.login-content { position: relative; z-index: 3; width: min(350px, calc(100% - 48px)); padding: 72px 0 92px; }
.login-content::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 18% -24% 38%;
  pointer-events: none;
  background: radial-gradient(ellipse, rgb(90 72 176 / 10%), transparent 70%);
  filter: blur(35px);
}
.login-wordmark { display: block; width: min(340px, 100%); height: auto; margin: 0 auto 8px; pointer-events: none; -webkit-user-drag: none; }
.login-title { margin: 0 0 32px; color: #d6d0e6; font-size: 20px; line-height: 1.4; font-weight: 400; letter-spacing: -.035em; text-align: center; }
.access-form { display: flex; flex-direction: column; gap: 9px; }
.access-form label { color: #bfb9cf; font-size: 13px; line-height: 1.5; }
.access-form label:not(:first-child) { margin-top: 12px; }
.access-form input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid rgb(218 211 247 / 11%);
  border-radius: 11px;
  background: linear-gradient(180deg, rgb(255 255 255 / 1.8%), transparent), rgb(4 4 8 / 32%);
  box-shadow: 0 1px 0 rgb(255 255 255 / 2%) inset, 0 8px 18px -16px #000;
  backdrop-filter: blur(10px);
  color: #f1eef8;
  font: inherit;
  font-size: 16px;
  caret-color: #c6b3f2;
  color-scheme: dark;
  -webkit-user-select: text;
  user-select: text;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
.access-form input:hover { border-color: rgb(218 211 247 / 20%); }
.access-form input:focus { outline: 1px solid rgb(177 154 231 / 56%); outline-offset: 2px; border-color: rgb(177 154 231 / 38%); box-shadow: 0 0 20px rgb(112 86 206 / 5%); }
.access-submit {
  min-height: 48px;
  margin-top: 19px;
  padding: 0 20px;
  border: 1px solid rgb(201 185 247 / 23%);
  border-radius: 11px;
  background: radial-gradient(ellipse at 50% 120%, rgb(101 76 187 / 16%), transparent 75%), linear-gradient(180deg, rgb(255 255 255 / 5%), rgb(255 255 255 / 1%)), rgb(13 12 19 / 65%);
  color: #e8e2f5;
  box-shadow: 0 1px 0 rgb(255 255 255 / 5%) inset, 0 9px 30px -20px rgb(89 69 185 / 24%);
  font: inherit;
  font-size: 14px;
  letter-spacing: -.01em;
  cursor: pointer;
  transition: border-color 220ms ease, color 220ms ease, box-shadow 220ms ease;
}
.access-submit:hover { color: #fff; border-color: rgb(201 185 247 / 40%); box-shadow: 0 1px 0 rgb(255 255 255 / 8%) inset, 0 9px 30px -16px rgb(89 69 185 / 24%); }
.access-submit:disabled { opacity: .6; cursor: wait; }
.access-error { margin: 6px 0 0; color: #d7a7b4; font-size: 13px; line-height: 1.5; }
.access-note { margin: 20px 0 0; color: #aaa3ba; font-size: 12px; line-height: 1.6; text-align: center; }
.private-brand { position: absolute; z-index: 3; top: 36px; left: 32px; color: #d1ccdf; font-size: 16px; letter-spacing: -.03em; text-decoration: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 600px) {
  .access-trigger { top: 16px; right: 16px; padding: 0 14px; }
  .login-back { top: 16px; left: 16px; }
  .login-content { width: min(350px, calc(100% - 40px)); padding: 88px 0 130px; }
  .login-wordmark { width: min(300px, 100%); }
  .private-brand { top: 31px; left: 24px; }
}
