:root {
  --black: #000;
  --ink: #111;
  --muted: #6d6d6d;
  --line: #e4e4e4;
  --hover: #f3f3f3;
  --footer: #8e8e8e;
  --charcoal: #2b2c2b;
  --button: #585858;
  --button-hover: #454545;
  --danger: #8f2d2d;
  --link: #1a5dad;
  --font: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #fff;
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button,
input {
  font-family: inherit;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

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

.access {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(280px, 42%) 1fr;
  overflow: auto;
  background: #fff;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  background: #000;
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  opacity: 1;
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.loader-mark {
  position: relative;
  width: min(420px, 72vw);
  aspect-ratio: 1.78 / 1;
  overflow: hidden;
  opacity: 0;
  transform: scale(0.975);
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.75));
  animation: loader-enter 0.95s cubic-bezier(0.33, 0, 0.2, 1) 0.05s forwards;
  transition: opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1), transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.loader-mark img,
.loader-shine {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  transform: translateY(-20%);
}

.loader-mark img {
  height: auto;
}

.loader-shine {
  aspect-ratio: 1 / 1;
  pointer-events: none;
  -webkit-mask-image: url("assets/logo-mask.png?v=16");
  mask-image: url("assets/logo-mask.png?v=16");
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  overflow: hidden;
}

.loader-shine::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 28%;
  height: 100%;
  background: linear-gradient(
    100deg,
    transparent 0%,
    rgba(255, 255, 255, 0.08) 36%,
    rgba(255, 255, 255, 0.7) 50%,
    rgba(255, 255, 255, 0.08) 64%,
    transparent 100%
  );
  transform: translateX(-220%) skewX(-16deg);
  mix-blend-mode: screen;
  animation: loader-shine 1.05s cubic-bezier(0.4, 0, 0.2, 1) 0.55s forwards;
}

.loader.is-done {
  opacity: 0;
  pointer-events: none;
}

.loader.is-done .loader-mark {
  opacity: 0;
  transform: scale(1.015);
  animation: none;
}

@keyframes loader-enter {
  0% {
    opacity: 0;
    transform: scale(0.975);
  }
  70% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes loader-shine {
  0% {
    transform: translateX(-220%) skewX(-16deg);
  }
  100% {
    transform: translateX(420%) skewX(-16deg);
  }
}

.logo-glow {
  width: min(560px, 78%);
  filter:
    drop-shadow(0 8px 14px rgba(0, 0, 0, 0.9))
    drop-shadow(0 16px 34px rgba(0, 0, 0, 0.7))
    drop-shadow(0 28px 56px rgba(0, 0, 0, 0.45))
    drop-shadow(0 0 32px rgba(200, 200, 200, 0.16));
}

.logo-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1.78 / 1;
  overflow: hidden;
  background: #000;
}

.logo-frame img,
.logo-shine {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  transform: translateY(-20%);
}

.logo-frame img {
  z-index: 0;
  height: auto;
}

.logo-shine {
  z-index: 1;
  aspect-ratio: 1 / 1;
  pointer-events: none;
  -webkit-mask-image: url("assets/logo-mask.png?v=16");
  mask-image: url("assets/logo-mask.png?v=16");
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  overflow: hidden;
}

.logo-shine::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 22%;
  height: 100%;
  background: linear-gradient(
    100deg,
    transparent 0%,
    rgba(255, 255, 255, 0.1) 34%,
    rgba(255, 255, 255, 0.55) 48%,
    rgba(255, 255, 255, 0.85) 50%,
    rgba(255, 255, 255, 0.55) 52%,
    rgba(255, 255, 255, 0.1) 66%,
    transparent 100%
  );
  transform: translateX(-220%) skewX(-16deg);
  mix-blend-mode: screen;
  will-change: transform;
}

body.is-ready .logo-shine::before {
  animation: logo-shine 3.2s linear infinite;
}

@keyframes logo-shine {
  0% {
    transform: translateX(-220%) skewX(-16deg);
  }
  100% {
    transform: translateX(620%) skewX(-16deg);
  }
}

.gate {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: 72px 40px 88px;
  background: #fff;
}

.gate-body {
  width: min(670px, 100%);
}

.gate-body h1 {
  margin: 0;
  font-size: clamp(32px, 3.1vw, 44px);
  font-weight: 700;
  letter-spacing: -0.034em;
  line-height: 1.12;
  color: #000;
}

.lede {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 16.5px;
  font-weight: 400;
  letter-spacing: -0.011em;
}

.portals {
  margin-top: 34px;
  border-top: 1px solid var(--line);
}

.portal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 6px;
  border-bottom: 1px solid var(--line);
  color: #000;
  text-decoration: none;
  font-size: 16.5px;
  font-weight: 400;
  letter-spacing: -0.015em;
  transition: background-color 0.16s ease;
}

.portal:hover {
  background: var(--hover);
}

.portal:active {
  background: #ececec;
}

.arrow {
  flex: none;
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  transition: transform 0.16s ease;
}

.portal:hover .arrow {
  transform: translateX(4px);
}

.legal {
  position: absolute;
  right: 0;
  bottom: 28px;
  left: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--footer);
  font-size: 12.5px;
  letter-spacing: 0.01em;
}

.text-link {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.text-link:hover {
  color: #555;
}

.sep {
  color: #c4c4c4;
}

.signin {
  display: none;
  position: fixed;
  inset: 0;
  overflow: auto;
  background: #000;
  color: #d8d8d8;
}

.signin:target {
  display: block;
}

body:has(.signin:target) .access {
  display: none;
}

.back {
  position: absolute;
  top: 22px;
  left: 28px;
  z-index: 2;
  color: #d5d5d5;
  font-size: 13.5px;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.back:hover {
  color: #fff;
}

.signin :focus-visible,
.brand :focus-visible {
  outline-color: #fff;
}

.signin-wrap {
  min-height: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 84px 20px 48px;
}

.signin-logo,
.logo-glow.signin-logo {
  width: min(460px, 100%);
}

.card {
  width: min(460px, 100%);
  padding: 34px 34px 28px;
  color: #e8e8e8;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 28%),
    rgba(18, 18, 18, 0.92);
  border: 1px solid rgba(210, 210, 210, 0.22);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.55),
    0 24px 60px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 9px;
  color: #e4e4e4;
  font-size: 13px;
  letter-spacing: 0.01em;
}

.field input {
  height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0;
  background: rgba(0, 0, 0, 0.45);
  color: #ffffff;
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.field input::placeholder {
  color: #9a9a9a;
}

.field input:hover {
  border-color: rgba(255, 255, 255, 0.28);
}

.field input:focus {
  border-color: rgba(220, 220, 220, 0.55);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.62);
}

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

.error {
  min-height: 1.2em;
  margin: 8px 0 0;
  color: #d98a8a;
  font-size: 13px;
}

.remember {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  color: #e6e6e6;
  font-size: 14px;
  cursor: pointer;
  user-select: none;
}

.remember input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: #cfcfcf;
}

.card .next {
  width: 100%;
  height: 46px;
  margin-top: 24px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 0;
  background: linear-gradient(180deg, #3a3a3a 0%, #222 100%);
  color: #ffffff;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.card .next:hover {
  background: linear-gradient(180deg, #4a4a4a 0%, #2a2a2a 100%);
  border-color: rgba(255, 255, 255, 0.34);
}

.card .next:active {
  transform: translateY(1px);
}

.card .next:disabled {
  cursor: progress;
  opacity: 0.7;
}

.card-legal {
  margin-top: 28px;
  text-align: center;
  color: #c2c2c2;
  font-size: 11.5px;
  line-height: 1.75;
}

.card-legal p {
  margin: 0;
}

.hosted {
  margin-top: 2px;
}

.card-links {
  margin-top: 10px;
}

.card-links a {
  color: #ececec;
  text-decoration: none;
}

.card-links a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.card-links span {
  margin: 0 7px;
  color: #888;
}

.next {
  width: 100%;
  height: 44px;
  margin-top: 22px;
  border: 0;
  border-radius: 2px;
  background: var(--button);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.next:hover {
  background: var(--button-hover);
}

.next:disabled {
  cursor: progress;
  opacity: 0.75;
}

dialog {
  width: min(440px, calc(100% - 32px));
  padding: 28px 28px 24px;
  border: 0;
  border-radius: 2px;
  color: var(--ink);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.46);
}

dialog h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.03em;
}

dialog p {
  margin: 12px 0 0;
  color: #444;
  font-size: 15px;
}

.dialog-close {
  width: auto;
  min-width: 112px;
  margin-top: 22px;
  padding: 0 18px;
}

@media (max-width: 900px) {
  .access {
    display: block;
  }

  .brand {
    min-height: 46vh;
    padding: 48px 24px;
  }

  .logo-glow {
    width: min(340px, 86%);
  }

  .gate {
    min-height: auto;
    align-items: stretch;
    justify-content: flex-start;
    padding: 36px 24px 28px;
  }

  .gate-body {
    width: 100%;
  }

  .legal {
    position: static;
    width: 100%;
    margin-top: 36px;
    flex-wrap: wrap;
    text-align: center;
  }

  .back {
    left: 16px;
    top: 16px;
  }

  .card {
    padding-left: 22px;
    padding-right: 22px;
  }
}

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

  .loader-mark {
    opacity: 1;
    transform: none;
  }
}
