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

:root {
  --teal: #4c8386;
  --teal-soft: rgba(76, 131, 134, 0.4);
  --ink: #20262b;
  --muted: rgba(32, 38, 43, 0.75);
  --legal: rgba(32, 38, 43, 0.55);
  --page: #e8eef0;
  --card: #ffffff;
  --ui: "Instrument Sans", 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(--page);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.gate {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, rgba(76, 131, 134, 0.22), transparent 65%),
    linear-gradient(180deg, #dce6e8 0%, var(--page) 55%, #f3f5f7 100%);
}

.gate__card {
  width: min(560px, 100%);
  padding: 40px;
  background: var(--card);
  border: 1px solid var(--teal-soft);
  border-radius: 22px;
  box-shadow: 0 28px 90px rgba(32, 38, 43, 0.18);
}

.gate__brand {
  display: flex;
  align-items: center;
  padding-bottom: 18px;
  margin-bottom: 22px;
  border-bottom: 1px solid rgba(76, 131, 134, 0.18);
}

.gate__logo {
  display: block;
  width: min(200px, 58%);
  height: auto;
}

.gate__headline {
  margin: 0 0 28px;
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  font-weight: 650;
  line-height: 1.05;
  letter-spacing: -0.045em;
  color: var(--ink);
}

.gate__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 22px;
}

.btn-yes,
.link-no,
.btn-leave {
  appearance: none;
  min-height: 46px;
  padding: 11px 16px;
  border-radius: 999px;
  font-family: var(--ui);
  font-size: 0.94rem;
  font-weight: 650;
  letter-spacing: 0.025em;
  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: 1px solid var(--teal);
  background: var(--teal);
  color: #fff;
}

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

.link-no,
.btn-leave {
  border: 1px solid rgba(76, 131, 134, 0.5);
  background: #fff;
  color: var(--ink);
}

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

.gate__legal {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.55;
  color: var(--legal);
}

.gate__legal a {
  color: var(--ink);
  font-weight: 600;
  text-underline-offset: 2px;
}

.gate__denied {
  display: none;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 22px;
}

.gate__denied h2 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 650;
  letter-spacing: -0.03em;
  color: var(--ink);
}

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

.gate__denied .btn-leave {
  width: 100%;
  max-width: 240px;
}

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

body.is-denied .gate__headline,
body.is-denied .gate__actions,
body.is-denied .gate__legal { 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(--teal);
  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-size: 1.25rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: #fff;
}

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

@media (max-width: 560px) {
  .gate__card { padding: 28px 22px; }

  .gate__actions {
    grid-template-columns: 1fr;
  }
}

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