/* Kabby Studios — access gate */
:root {
  --kabby-void: #0a0418;
  --kabby-deep: #16082e;
  --kabby-mid: #3b0f6b;
  --kabby-hot: #a855f7;
  --kabby-neon: #d946ef;
  --kabby-ice: #e9d5ff;
  --kabby-glow: rgba(168, 85, 247, 0.55);
  --kabby-display: "Syne", "Avenir Next", sans-serif;
  --kabby-mono: "IBM Plex Mono", ui-monospace, monospace;
}

.kabby-gate {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--kabby-void);
  color: var(--kabby-ice);
  font-family: var(--kabby-display);
  isolation: isolate;
  transition: opacity 0.7s ease, visibility 0.7s ease, filter 0.7s ease;
}

.kabby-gate.is-unlocking {
  opacity: 0;
  visibility: hidden;
  filter: blur(18px) saturate(1.4);
  pointer-events: none;
}

.kabby-gate[hidden] {
  display: none !important;
}

.kabby-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.kabby-aurora {
  position: absolute;
  inset: -20%;
  z-index: 1;
  background:
    radial-gradient(ellipse 50% 40% at 20% 30%, rgba(168, 85, 247, 0.45), transparent 55%),
    radial-gradient(ellipse 45% 50% at 80% 20%, rgba(217, 70, 239, 0.35), transparent 50%),
    radial-gradient(ellipse 60% 45% at 50% 85%, rgba(76, 29, 149, 0.55), transparent 55%),
    radial-gradient(circle at 60% 50%, rgba(124, 58, 237, 0.2), transparent 40%);
  animation: kabbyAurora 14s ease-in-out infinite alternate;
  filter: blur(8px);
  pointer-events: none;
}

@keyframes kabbyAurora {
  0% { transform: translate(-2%, -1%) scale(1) rotate(0deg); }
  50% { transform: translate(3%, 2%) scale(1.08) rotate(4deg); }
  100% { transform: translate(-1%, 3%) scale(1.04) rotate(-3deg); }
}

.kabby-mesh {
  position: absolute;
  inset: 0;
  z-index: 2;
  background-image:
    linear-gradient(rgba(233, 213, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(233, 213, 255, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 20%, transparent 75%);
  animation: kabbyMesh 22s linear infinite;
  pointer-events: none;
}

@keyframes kabbyMesh {
  from { background-position: 0 0, 0 0; }
  to { background-position: 56px 56px, 56px 56px; }
}

.kabby-scan {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(10, 4, 24, 0.12) 2px,
    rgba(10, 4, 24, 0.12) 4px
  );
  mix-blend-mode: multiply;
  opacity: 0.35;
  pointer-events: none;
  animation: kabbyScan 8s linear infinite;
}

@keyframes kabbyScan {
  from { transform: translateY(0); }
  to { transform: translateY(4px); }
}

.kabby-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  z-index: 1;
  pointer-events: none;
  mix-blend-mode: screen;
}

.kabby-orb--a {
  width: min(42vw, 420px);
  height: min(42vw, 420px);
  top: -8%;
  left: -6%;
  background: radial-gradient(circle, rgba(217, 70, 239, 0.7), transparent 70%);
  animation: kabbyFloatA 11s ease-in-out infinite;
}

.kabby-orb--b {
  width: min(36vw, 360px);
  height: min(36vw, 360px);
  right: -4%;
  bottom: 8%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.65), transparent 70%);
  animation: kabbyFloatB 13s ease-in-out infinite;
}

.kabby-orb--c {
  width: min(28vw, 280px);
  height: min(28vw, 280px);
  left: 40%;
  bottom: -10%;
  background: radial-gradient(circle, rgba(192, 132, 252, 0.45), transparent 70%);
  animation: kabbyFloatC 9s ease-in-out infinite;
}

@keyframes kabbyFloatA {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, 60px) scale(1.15); }
}
@keyframes kabbyFloatB {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-50px, -30px) scale(1.2); }
}
@keyframes kabbyFloatC {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-30px, -50px); }
}

.kabby-rings {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(90vw, 720px);
  height: min(90vw, 720px);
  transform: translate(-50%, -50%);
  z-index: 2;
  pointer-events: none;
  opacity: 0.55;
}

.kabby-rings svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.kabby-ring {
  fill: none;
  stroke-linecap: round;
  transform-origin: 50% 50%;
}

.kabby-ring--1 {
  stroke: rgba(217, 70, 239, 0.55);
  stroke-width: 1.2;
  stroke-dasharray: 18 14 4 22;
  animation: kabbySpin 28s linear infinite;
}
.kabby-ring--2 {
  stroke: rgba(168, 85, 247, 0.4);
  stroke-width: 1;
  stroke-dasharray: 6 18;
  animation: kabbySpinRev 38s linear infinite;
}
.kabby-ring--3 {
  stroke: rgba(233, 213, 255, 0.25);
  stroke-width: 0.8;
  stroke-dasharray: 2 10 28 10;
  animation: kabbySpin 52s linear infinite;
}

@keyframes kabbySpin {
  to { transform: rotate(360deg); }
}
@keyframes kabbySpinRev {
  to { transform: rotate(-360deg); }
}

.kabby-noise {
  position: absolute;
  inset: 0;
  z-index: 4;
  opacity: 0.07;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.kabby-gate-inner {
  position: relative;
  z-index: 10;
  width: min(440px, calc(100vw - 40px));
  text-align: center;
  padding: 8px 0 24px;
}

.kabby-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  font-family: var(--kabby-mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(233, 213, 255, 0.7);
}

.kabby-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--kabby-neon);
  box-shadow: 0 0 12px var(--kabby-neon), 0 0 28px rgba(217, 70, 239, 0.6);
  animation: kabbyPulse 1.6s ease-in-out infinite;
}

@keyframes kabbyPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.75); }
}

.kabby-brand {
  margin: 0;
  font-size: clamp(42px, 11vw, 72px);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  background: linear-gradient(
    115deg,
    #fff 10%,
    #f5d0fe 28%,
    #c084fc 48%,
    #fff 62%,
    #e879f9 78%,
    #ddd6fe 100%
  );
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: kabbyShimmer 6s ease-in-out infinite;
  filter: drop-shadow(0 0 28px rgba(168, 85, 247, 0.45));
}

.kabby-brand span {
  display: block;
}

@keyframes kabbyShimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.kabby-tag {
  margin: 18px auto 28px;
  max-width: 28ch;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
  color: rgba(233, 213, 255, 0.72);
  letter-spacing: 0.02em;
}

.kabby-gate-form {
  display: grid;
  gap: 12px;
}

.kabby-field {
  position: relative;
}

.kabby-field::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 14px;
  background: linear-gradient(120deg, #c084fc, #7c3aed, #d946ef, #a855f7);
  background-size: 300% 300%;
  z-index: 0;
  opacity: 0.85;
  animation: kabbyBorder 5s linear infinite;
}

@keyframes kabbyBorder {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.kabby-key {
  position: relative;
  z-index: 1;
  width: 100%;
  appearance: none;
  border: 0;
  border-radius: 13px;
  padding: 16px 18px;
  background: rgba(12, 5, 28, 0.92);
  color: #faf5ff;
  font-family: var(--kabby-mono);
  font-size: 15px;
  letter-spacing: 0.12em;
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.kabby-key::placeholder {
  color: rgba(233, 213, 255, 0.35);
  letter-spacing: 0.08em;
}

.kabby-key:focus {
  box-shadow:
    inset 0 0 0 1px rgba(233, 213, 255, 0.12),
    0 0 0 4px rgba(168, 85, 247, 0.18);
}

.kabby-unlock {
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: 13px;
  padding: 16px 20px;
  background: linear-gradient(135deg, #a855f7 0%, #7c3aed 45%, #d946ef 100%);
  color: #fff;
  font-family: var(--kabby-display);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12) inset,
    0 12px 40px rgba(124, 58, 237, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.kabby-unlock::after {
  content: "";
  position: absolute;
  top: 0;
  left: -40%;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  animation: kabbySheen 3.2s ease-in-out infinite;
}

@keyframes kabbySheen {
  0%, 40% { left: -40%; }
  70%, 100% { left: 140%; }
}

.kabby-unlock:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.16) inset,
    0 16px 48px rgba(168, 85, 247, 0.55);
}

.kabby-unlock:active {
  transform: translateY(1px);
}

.kabby-error {
  margin: 14px 0 0;
  min-height: 1.2em;
  font-family: var(--kabby-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: #fb7185;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.kabby-error.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.kabby-gate.is-shake .kabby-gate-inner {
  animation: kabbyShake 0.45s ease;
}

@keyframes kabbyShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-10px); }
  40% { transform: translateX(10px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}

.kabby-meta {
  margin-top: 28px;
  font-family: var(--kabby-mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(233, 213, 255, 0.35);
}

body.gate-locked {
  overflow: hidden;
}

@media (max-width: 640px) {
  .kabby-brand {
    font-size: clamp(36px, 12vw, 56px);
  }
  .kabby-tag {
    font-size: 14px;
  }
}
