@import url('https://fonts.googleapis.com/css2?family=Besley:wght@400;500;600&family=Radio+Canada:wght@400;500;600&display=swap');

:root {
  --cream: #f7f5f0;
  --ink: #1c251f;
  --muted: #647068;
  --forest: #203d2b;
  --forest-deep: #174b2f;
  --line: #3c463f;
  --display: "Besley", Georgia, serif;
  --ui: "Radio Canada", 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.55;
  -webkit-font-smoothing: antialiased;
}

.gate {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(28px, 6vw, 56px) 20px;
}

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

.gate__logo {
  margin: 0 0 28px;
  font-family: var(--display);
  font-size: 1.65rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--forest-deep);
}

.gate__headline {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 7vw, 2.5rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
}

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

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

.btn-yes,
.link-no,
.btn-leave {
  appearance: none;
  width: 100%;
  min-height: 50px;
  padding: 14px 32px;
  border-radius: 999px;
  font-family: var(--ui);
  font-size: 0.9rem;
  font-weight: 600;
  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: none;
  background: var(--forest);
  color: #fff;
}

.btn-yes:hover {
  background: var(--forest-deep);
  transform: translateY(-1px);
}

.link-no,
.btn-leave {
  border: 1px solid var(--muted);
  background: transparent;
  color: var(--line);
}

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

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

.gate__denied h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--ink);
}

.gate__denied p {
  margin: 0 0 8px;
  max-width: 28ch;
  font-size: 0.95rem;
  color: var(--muted);
}

.back-link {
  appearance: none;
  border: none;
  background: none;
  padding: 0;
  font-family: var(--ui);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--forest-deep);
  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(--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: Georgia, "Times New Roman", serif;
  font-size: 1.5rem;
  font-weight: 400;
  color: #fff;
}

.enter-veil__sub {
  font-family: var(--display);
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
}

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