@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&family=Space+Mono:wght@400;700&display=swap');

:root {
  --aqua: #00c8d4;
  --aqua-deep: #0098a2;
  --ink: #0a0f14;
  --surface: #f5f7f9;
  --card: #ffffff;
  --text: #475569;
  --text-dim: #94a3b8;
  --border: #e2e8f0;
  --radius: 8px;
  --display: "Space Grotesk", system-ui, sans-serif;
  --ui: "DM Sans", system-ui, sans-serif;
  --mono: "Space Mono", ui-monospace, monospace;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 180ms;
  --dur-slow: 720ms;
}

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

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background: var(--surface);
  color: var(--text);
  font-family: var(--ui);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 6vw, 56px) 20px;
  background:
    radial-gradient(ellipse 55% 40% at 50% 0%, rgba(0, 200, 212, 0.08), transparent 65%),
    var(--surface);
}

.gate__inner {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.gate__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
}

.gate__mark {
  display: block;
  width: 56px;
  height: auto;
}

.gate__wordmark {
  margin: 0;
  font-family: var(--display);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
}

.gate__eyebrow {
  margin: 0 0 14px;
  padding: 5px 12px;
  border: 1px solid rgba(0, 200, 212, 0.35);
  border-radius: 100px;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--aqua-deep);
  background: rgba(0, 200, 212, 0.06);
}

.gate__headline {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.9rem, 6vw, 2.4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.gate__question {
  margin: 12px 0 28px;
  max-width: 32ch;
  font-size: 0.92rem;
  font-weight: 400;
  color: var(--text);
}

.gate__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.btn-yes {
  width: 100%;
  min-height: 52px;
  padding: 14px 24px;
  border: none;
  border-radius: var(--radius);
  font-family: var(--ui);
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  background: var(--ink);
  cursor: pointer;
  transition:
    transform var(--dur-fast) var(--ease-out),
    background var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out);
}

.btn-yes:hover {
  background: var(--aqua-deep);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 200, 212, 0.25);
}

.btn-yes:active { transform: scale(0.99); }

.link-no,
.btn-leave {
  appearance: none;
  width: 100%;
  min-height: 48px;
  padding: 12px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  font-family: var(--ui);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition:
    border-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out);
}

.link-no:hover,
.btn-leave:hover {
  border-color: var(--aqua);
  color: var(--ink);
}

.gate__denied {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.gate__denied h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.gate__denied p {
  margin: 0 0 6px;
  max-width: 30ch;
  font-size: 0.92rem;
  color: var(--text);
}

.back-link {
  appearance: none;
  border: none;
  background: none;
  padding: 0;
  font-family: var(--ui);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--aqua-deep);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.gate__note {
  margin: 28px 0 0;
  width: 100%;
  font-family: var(--mono);
  font-size: 0.62rem;
  line-height: 1.7;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}

body.is-denied .gate__eyebrow,
body.is-denied .gate__headline,
body.is-denied .gate__question,
body.is-denied .gate__actions,
body.is-denied .gate__note { display: none; }

body.is-denied .gate__denied { display: flex; }

.enter-veil {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--ink);
  transform: translateY(100%);
  transition: transform var(--dur-slow) var(--ease-out);
  pointer-events: none;
}

.enter-veil.show {
  transform: translateY(0);
  pointer-events: auto;
}

.enter-veil__text {
  margin: 0;
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
}

.enter-veil__sub {
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--aqua);
}

@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: rise 560ms var(--ease-out) both; }
  .reveal.d1 { animation-delay: 40ms; }
  .reveal.d2 { animation-delay: 140ms; }
  .reveal.d3 { animation-delay: 240ms; }
  .reveal.d4 { animation-delay: 340ms; }

  @keyframes rise {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
  }
}
