@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&family=Libre+Bodoni:wght@500;600&display=swap');

:root {
  --forest: #243f3d;
  --forest-deep: #1a302a;
  --sage: #7d9489;
  --mint: #d8efe3;
  --paper: #f2eee5;
  --cream: #fcfcf9;
  --muted: #64746c;
  --line: rgba(36, 63, 61, 0.14);
  --white: #ffffff;
  --radius: 12px;
  --display: "Libre Bodoni", Georgia, "Times New Roman", serif;
  --ui: "Plus Jakarta Sans", Avenir, "Segoe UI", system-ui, sans-serif;
  --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(--cream);
  color: var(--muted);
  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 60% 45% at 50% 0%, rgba(216, 239, 227, 0.85), transparent 65%),
    radial-gradient(ellipse 45% 35% at 90% 95%, rgba(125, 148, 137, 0.12), transparent 55%),
    var(--paper);
}

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

.gate__logo {
  display: block;
  width: min(220px, 64vw);
  height: auto;
  margin-bottom: 28px;
}

.gate__eyebrow {
  margin: 0 0 12px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sage);
}

.gate__headline {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2rem, 6.5vw, 2.55rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--forest);
}

.gate__question {
  margin: 14px 0 28px;
  max-width: 36ch;
  font-size: 0.94rem;
  font-weight: 400;
  color: var(--muted);
}

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

.btn-yes {
  width: 100%;
  min-height: 54px;
  padding: 14px 24px;
  border: none;
  border-radius: var(--radius);
  font-family: var(--ui);
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--white);
  background: var(--forest);
  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(--forest-deep);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(36, 63, 61, 0.28);
}

.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(--line);
  border-radius: var(--radius);
  background: var(--white);
  font-family: var(--ui);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  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(--forest);
  color: var(--forest);
}

.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.65rem;
  font-weight: 600;
  color: var(--forest);
}

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

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

body.is-denied .gate__eyebrow,
body.is-denied .gate__headline,
body.is-denied .gate__question,
body.is-denied .gate__actions { 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(--forest);
  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.6rem;
  font-weight: 600;
  color: var(--mint);
}

.enter-veil__sub {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(216, 239, 227, 0.65);
}

@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; }

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