﻿:root {
  --bg: #0b0b0b;
  --cell-bg: #d9d9d9;
  --cell-error: #ff3033;
  --cell-success: #28d36b;
  --label: #6f6f6f;
  --text: #000000;
  --cursor: #f2f1ec;
  --transparent: transparent;
  --current-color: currentColor;
  --shadow-strong: rgba(0, 0, 0, 0.48);
  --shadow-soft: rgba(0, 0, 0, 0.24);
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  -webkit-font-smoothing: antialiased;
}

html.has-custom-cursor *,
html.has-custom-cursor *::before,
html.has-custom-cursor *::after {
  cursor: none !important;
}

.cursor-dot {
  position: fixed;
  left: 0;
  top: 0;
  width: 32px;
  height: 34px;
  color: var(--cursor);
  pointer-events: none;
  z-index: 2147483647;
  opacity: 0;
  transform: translate(-100px, -100px);
  transition: background-color 120ms ease, color 120ms ease, opacity 120ms ease;
  mix-blend-mode: normal;
  filter: drop-shadow(0 2px 3px var(--shadow-strong)) drop-shadow(0 6px 10px var(--shadow-soft));
  will-change: transform;
}

.cursor-dot::before {
  content: "";
  position: absolute;
  inset: 5.57% 18.76% 17.45% 3.62%;
  background: var(--current-color);
  -webkit-mask: url("assets/cursor-main.svg") 0 0 / 100% 100% no-repeat;
  mask: url("assets/cursor-main.svg") 0 0 / 100% 100% no-repeat;
}

.cursor-dot.is-visible {
  opacity: 1;
}

.cursor-dot.is-active {
  color: var(--cell-error);
}

.access-page {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.access-form {
  width: min(100%, 752px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
}

.access-label {
  display: flex;
  gap: 8px;
  color: var(--label);
  font-size: 16px;
  line-height: 1.35;
  font-weight: 400;
  letter-spacing: 0;
}

.access-label a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

.access-label a:hover {
  color: var(--cursor);
}

.access-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.access-code {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  padding: 0;
  border: 0;
  background: var(--transparent);
  cursor: text;
  font: inherit;
}

.access-cell {
  position: relative;
  width: 100%;
  height: 143px;
  display: grid;
  place-items: center;
  min-width: 0;
  border-radius: 22px;
  background: var(--cell-bg);
  color: var(--text);
  font-size: 48px;
  line-height: 1;
  font-weight: 400;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  transition: background-color 120ms ease;
}

.access-cell.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2px;
  height: 54px;
  background: var(--text);
  transform: translate(-50%, -50%);
  animation: access-caret-blink 900ms steps(1, end) infinite;
}

.access-cell.has-value.is-active::after {
  left: calc(50% + 20px);
}

.access-form.is-error .access-cell {
  background: var(--cell-error);
}

.access-form.is-success .access-cell {
  background: var(--cell-success);
}

@keyframes access-caret-blink {
  0%,
  46% {
    opacity: 1;
  }

  47%,
  100% {
    opacity: 0;
  }
}

@media (max-width: 760px) {
  .access-form {
    width: min(100%, 520px);
    gap: 18px;
  }

  .access-label {
    font-size: 14px;
  }

  .access-code {
    gap: 10px;
  }

  .access-cell {
    height: clamp(70px, 20vw, 112px);
    border-radius: 16px;
    font-size: clamp(28px, 9vw, 42px);
  }

  .access-cell.is-active::after {
    height: 42px;
  }
}

@media (max-width: 420px) {
  .access-page {
    padding: 16px;
  }

  .access-code {
    gap: 6px;
  }

  .access-cell {
    border-radius: 12px;
  }
}
