@import url('https://fonts.googleapis.com/css2?family=Caprasimo&family=Inter:wght@400;600;700&display=swap');

:root {
  --green: #1a6400;
  --green-hi: #228000;
  --ink: #000000;
  --white: #ffffff;
  --muted: rgba(255, 255, 255, 0.68);
  --display: "Caprasimo", Georgia, serif;
  --ui: "Inter", 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(--ink);
  color: var(--muted);
  font-family: var(--ui);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.gate {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background:
    radial-gradient(ellipse 60% 45% at 50% 40%, rgba(26, 100, 0, 0.22), transparent 65%),
    var(--ink);
}

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

.gate__logo {
  display: block;
  width: min(280px, 78%);
  height: auto;
  margin: 0 0 28px;
}

.gate__headline {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.4rem, 8vw, 3.1rem);
  font-weight: 400;
  line-height: 1.05;
  color: var(--white);
}

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

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

.btn-yes,
.link-no,
.btn-leave {
  appearance: none;
  width: 100%;
  min-height: 52px;
  padding: 12px 24px;
  font-family: var(--ui);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    background var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out);
}

.btn-yes {
  border: 2px solid var(--green);
  background: var(--green);
  color: var(--white);
}

.btn-yes:hover {
  background: var(--green-hi);
  border-color: var(--green-hi);
  transform: translateY(-1px);
}

.link-no,
.btn-leave {
  border: 2px solid var(--green);
  background: transparent;
  color: var(--white);
}

.link-no:hover,
.btn-leave:hover {
  background: rgba(26, 100, 0, 0.18);
}

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

.gate__denied h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--white);
}

.gate__denied p {
  margin: 0 0 6px;
  color: var(--muted);
}

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

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: 8px;
  background: var(--green);
  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;
  color: var(--white);
}

.enter-veil__sub {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}

@media (prefers-reduced-motion: reduce) {
  .enter-veil { transition: none; }
}

@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: 220ms; }
  .reveal.d4 { animation-delay: 300ms; }

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