/* ---- Ajo entry gate ---- */

body.ajo-locked > *:not(#ajo-gate) {
  display: none !important;
}

body.ajo-locked {
  overflow: hidden;
}

.ajo-gate {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background:
    radial-gradient(circle at 50% 62%, rgba(201, 155, 74, 0.16), transparent 55%),
    #0a0f0a;
  overflow-y: auto;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.ajo-gate::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.ajo-gate.ajo-gate-unlocking {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.ajo-gate-inner {
  max-width: 520px;
  width: 100%;
  text-align: center;
  margin: auto;
}

.ajo-gate-eyebrow {
  color: #c99b4a;
  letter-spacing: 0.18em;
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 14px;
  font-family: 'Inter', sans-serif;
}

.ajo-gate-title {
  font-family: 'Playfair Display', serif;
  color: #f5efe4;
  font-size: clamp(28px, 6vw, 42px);
  margin: 0 0 14px;
}

.ajo-gate-sub {
  color: #b9c2b9;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  max-width: 360px;
  margin: 0 auto 40px;
}

.ajo-wheel {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

.ajo-wheel-badge {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 108px;
  height: 108px;
  margin: 0 auto 32px;
}

.ajo-wheel-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: ajo-ring-spin 18s linear infinite;
}

@keyframes ajo-ring-spin {
  to { transform: rotate(360deg); }
}

.ajo-wheel-badge-title {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  color: #f5efe4;
  font-size: 22px;
  line-height: 1;
}

.ajo-wheel-badge-sub {
  color: #c99b4a;
  font-family: 'Inter', sans-serif;
  font-size: 9.5px;
  letter-spacing: 0.14em;
  font-weight: 600;
  text-transform: uppercase;
}

.ajo-node-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 480px) {
  .ajo-node-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.ajo-node {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  border-radius: 14px;
  border: 1px solid rgba(201, 155, 74, 0.3);
  background: rgba(255, 255, 255, 0.03);
  color: #e7e2d6;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform var(--ease-premium, 0.4s ease);
}

.ajo-node:nth-child(2n) { transform: rotate(0.6deg); }
.ajo-node:nth-child(3n) { transform: rotate(-0.7deg); }
.ajo-node:nth-child(2n+1) { transform: rotate(-0.3deg); }

.ajo-node:nth-child(4n) {
  background: rgba(201, 155, 74, 0.05);
  border-color: rgba(201, 155, 74, 0.45);
}

.ajo-node-mark {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 14px;
  font-weight: 700;
  color: #c99b4a;
  background: rgba(201, 155, 74, 0.1);
  border: 1px solid rgba(201, 155, 74, 0.3);
}

.ajo-node-label {
  flex: 1;
  text-align: left;
}

.ajo-node:hover {
  border-color: rgba(201, 155, 74, 0.7);
  background: rgba(201, 155, 74, 0.1);
  transform: rotate(0deg) translateY(-2px);
}

.ajo-node:active {
  transform: scale(0.97);
}

.ajo-node.ajo-node-wrong {
  animation: ajo-shake 0.4s ease;
  border-color: #b5504a;
}

.ajo-node.ajo-node-correct {
  border-color: #c99b4a;
  background: rgba(201, 155, 74, 0.18);
  color: #f5efe4;
  transform: rotate(0deg);
}
.ajo-node.ajo-node-correct .ajo-node-mark {
  background: #c99b4a;
  color: #1a1206;
}

@keyframes ajo-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.ajo-gate-hint {
  margin-top: 32px;
  color: #7d8a7d;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
}

.ajo-gate-hint.ajo-hint-success {
  color: #c99b4a;
  font-weight: 600;
  font-size: 15px;
}
