@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;1,500&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --ink: #0a0a0b;
  --ink-2: #060607;
  --panel: #101012;
  --gold: #c2993f;
  --gold-hi: #e8cf8c;
  --gold-deep: #8c6a2b;
  --paper: #f4f1e9;
  --paper-dim: #b3afa4;
  --paper-faint: #76736c;
  --line: rgba(194, 153, 63, 0.26);
  --line-soft: rgba(244, 241, 233, 0.1);
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains 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(--ink);
  color: var(--paper-dim);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.gate {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  min-height: 100vh;
}

.gate__media {
  position: relative;
  background: var(--ink-2);
  border-right: 1px solid var(--line-soft);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(32px, 5vw, 64px);
}

.gate__media::before {
  content: "";
  position: absolute;
  inset: -8% -4%;
  background: radial-gradient(ellipse 52% 46% at 50% 42%, rgba(194, 153, 63, 0.22), transparent 70%);
  filter: blur(8px);
  pointer-events: none;
}

.gate__brand {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 360px;
}

.gate__frame {
  position: relative;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #0e0e10, #080809);
  padding: clamp(36px, 6vw, 56px) clamp(28px, 4vw, 40px);
  margin-bottom: 28px;
}

.gate__frame::before,
.gate__frame::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 1px solid var(--gold);
}

.gate__frame::before {
  top: -1px;
  left: -1px;
  border-right: none;
  border-bottom: none;
}

.gate__frame::after {
  bottom: -1px;
  right: -1px;
  border-left: none;
  border-top: none;
}

.gate__mark {
  width: clamp(120px, 28vw, 180px);
  height: auto;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 0 30px rgba(194, 153, 63, 0.2));
}

.gate__word {
  margin-top: 28px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--paper);
  line-height: 1.7;
  padding-left: 0.42em;
}

.gate__panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 4.4vw, 68px);
}

.gate__inner {
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
}

.gate__headline {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(36px, 4.8vw, 54px);
  line-height: 1.02;
  letter-spacing: -0.01em;
  color: var(--paper);
  margin: 0;
}

.gate__headline em {
  font-style: italic;
  color: var(--gold-hi);
}

.gate__question {
  margin: 22px 0 32px;
  max-width: 38ch;
  font-size: 15px;
  color: var(--paper-dim);
}

.gate__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

.btn-yes {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 30px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 1px solid var(--gold);
  background: var(--gold);
  color: var(--ink);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}

.btn-yes:hover { background: var(--gold-hi); }

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

.btn-yes svg { flex-shrink: 0; }

.link-no {
  appearance: none;
  border: none;
  background: none;
  padding: 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper-faint);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--line);
  transition: color var(--dur-fast) var(--ease-out);
}

.link-no:hover { color: var(--paper-dim); }

.gate__denied {
  display: none;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.gate__denied h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(32px, 4vw, 44px);
  line-height: 1.05;
  color: var(--paper);
  margin: 0;
}

.gate__denied p {
  margin: 0;
  max-width: 38ch;
  font-size: 15px;
  color: var(--paper-dim);
}

.btn-leave {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  padding: 13px 24px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper-dim);
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}

.btn-leave:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.back-link {
  appearance: none;
  border: none;
  background: none;
  padding: 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.back-link:hover { color: var(--gold-hi); }

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

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

.enter-veil {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--gold);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  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 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(36px, 7vw, 72px);
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-align: center;
  margin: 0;
}

.enter-veil__sub {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(10, 10, 11, 0.65);
}

@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: rise 560ms var(--ease-out) both; }
  .reveal.d2 { animation-delay: 100ms; }
  .reveal.d3 { animation-delay: 180ms; }
  .reveal.d4 { animation-delay: 260ms; }

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

@media (max-width: 860px) {
  .gate {
    grid-template-columns: 1fr;
    grid-template-rows: 35vh 1fr;
    min-height: 100vh;
    height: 100vh;
  }

  .gate__media {
    height: 35vh;
    border-right: none;
    border-bottom: 1px solid var(--line-soft);
    padding: 20px 24px;
  }

  .gate__frame {
    margin-bottom: 0;
    padding: 20px 24px;
  }

  .gate__mark {
    width: clamp(72px, 18vw, 100px);
  }

  .gate__word {
    margin-top: 16px;
    font-size: 11px;
  }

  .gate__panel {
    padding: 28px 22px 36px;
    overflow-y: auto;
  }

  .gate__actions { width: 100%; align-items: stretch; }
  .btn-yes { width: 100%; }
  .link-no { align-self: center; }
}
