.gate {
  --gate-brass: #c4a779;
  display: flex;
  padding: clamp(12px, 4vw, 52px);
  color: #f3eee2;
  background: radial-gradient(ellipse at 31% 36%, #32372e 0%, #1a1e1b 38%, #101211 78%);
}

.gate-card {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
  flex: none;
  width: min(100%, 818px);
  margin: auto;
  padding: 0;
  text-align: left;
  border: 1px solid #655e4a;
  background: #1c201d;
  box-shadow: 0 26px 65px #0007, 2px 3px 0 #0c0e0c, 3px 4px 0 #514f41;
}

.gate-cover {
  position: relative;
  isolation: isolate;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: clamp(12px, 3vw, 36px);
  min-width: 0;
  min-height: 365px;
  padding: 34px 18px;
  border-right: 1px solid #625b46;
  background:
    linear-gradient(90deg, transparent 0 4%, #14171166 5%, #51544326 6%, transparent 8% 89%, #11170f60 99%),
    repeating-linear-gradient(105deg, #7e89670a 0 1px, transparent 1px 4px),
    radial-gradient(at 31% 20%, #394334, #233124 55%, #1d281f);
}

.gate-cover::before {
  content: "";
  position: absolute;
  inset: 12px 11px 12px 9%;
  z-index: -1;
  border: 1px solid #a5986c72;
  outline: 1px solid #a5986c34;
  outline-offset: -5px;
}

.gate-wordmark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding-left: 4%;
  font: 400 clamp(21px, 2.2vw, 30px)/1.12 var(--serif);
  letter-spacing: -.025em;
  color: #e9e8d7;
}

.gate .gate-logo {
  width: 46px;
  height: 46px;
  object-fit: cover;
  box-shadow: 0 0 0 1px #d8ca9d88;
}

.gate-number {
  display: flex;
  justify-content: center;
  align-items: start;
  padding: 0 0 .1em 4%;
  margin: 0;
  color: var(--gate-brass);
  font: 400 clamp(105px, 10vw, 150px)/.95 var(--serif);
  letter-spacing: -.085em;
  font-variant-numeric: lining-nums;
}

.gate-number span {
  margin: .06em 0 0 .12em;
  font-size: .41em;
  line-height: 1;
  letter-spacing: 0;
}

.gate-page {
  align-self: center;
  min-width: 0;
  padding: clamp(32px, 4.2vw, 60px);
}

.gate h1 {
  margin: 0;
  color: #f2eddf;
  font: 400 clamp(35px, 3.8vw, 54px)/1.02 var(--serif);
  letter-spacing: -.045em;
}

.gate h1 em {
  color: #dec89d;
  font-weight: 400;
}

.gate-prompt,
.gate-message,
.gate-page noscript {
  margin: 15px 0 0;
  color: #d3cdbf;
  font-size: 15px;
  line-height: 1.6;
}

.gate-actions {
  display: grid;
  gap: 4px;
  margin-top: 23px;
}

.gate-actions .button {
  min-height: 46px;
  width: 100%;
  padding: 11px 18px;
  font-size: 14px;
  line-height: 1.35;
}

#confirm-age {
  align-items: center;
  border: 1px solid #d3c39d;
  color: #20251d;
  background: #decdab;
  transition: background-color .2s ease, box-shadow .2s ease;
}

#confirm-age span[aria-hidden] {
  font-size: 19px;
  line-height: 1;
}

#confirm-age:disabled {
  cursor: progress;
  opacity: .9;
}
#refuse-age:disabled { opacity: .55; cursor: wait; }

#refuse-age {
  border: 1px solid transparent;
  color: #d6cbb7;
  background: none;
  text-align: left;
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: #8d846e;
}

.gate-actions .button:focus-visible {
  outline: 2px solid #f4daa0;
  outline-offset: 2px;
}

.gate-message {
  min-height: 0;
  color: #f3cf92;
}

.gate-message:empty {
  margin: 0;
}

.gate-refusal-title,
.gate-card:has(#refuse-age[hidden]) :is(.gate-question-title, .gate-actions, .gate-prompt) {
  display: none;
}

.gate-card:has(#refuse-age[hidden]) .gate-refusal-title {
  display: inline;
}

@media (hover: hover) {
  #confirm-age:hover {
    background-color: #f0debb;
    box-shadow: 0 0 20px #d7be8029;
  }

  #refuse-age:hover {
    color: #fff8ea;
    text-decoration-color: currentColor;
  }
}

@media (prefers-reduced-motion: no-preference) {
  @supports (background-clip: text) {
    .gate-number {
      background-image: linear-gradient(110deg, #c4a779 31%, #f1e0aa 43%, #c4a779 55%);
      background-size: 310% 100%;
      background-position: 0% center;
      background-clip: text;
      color: transparent;
      animation: gate-foil 1.6s ease-out 1 both;
    }
    .gate-number span { color: var(--gate-brass); }
  }
}

@keyframes gate-foil {
  from { background-position: 100% center; }
  to { background-position: 0% center; }
}

@media (max-width: 600px) and (orientation: portrait), (max-width: 470px) {
  .gate-card {
    grid-template-columns: minmax(0, 1fr);
    max-width: 430px;
  }

  .gate-cover {
    min-height: 0;
    padding: 27px 20px 25px;
    gap: 12px;
    border-right: 0;
    border-bottom: 1px solid #625b46;
  }

  .gate-cover::before { inset: 8px; }

  .gate-wordmark {
    flex-direction: row;
    padding: 0;
    gap: 9px;
    font-size: 22px;
  }

  .gate .gate-logo { width: 29px; height: 29px; }
  .gate-number { padding: 0 .04em .02em 0; font-size: 92px; }
  .gate-page { padding: 26px clamp(21px, 7vw, 36px) 20px; }
  .gate h1 { font-size: clamp(33px, 8.8vw, 44px); }
  .gate-actions { margin-top: 16px; }
}

@media (max-height: 480px) and (min-width: 471px) {
  .gate { padding: 10px 14px; }
  .gate-card { max-width: 710px; }
  .gate-cover { min-height: 0; padding: 24px 14px; gap: 12px; }
  .gate-wordmark { font-size: 21px; gap: 6px; }
  .gate .gate-logo { width: 32px; height: 32px; }
  .gate-number { font-size: 82px; }
  .gate-page { padding: 18px clamp(16px, 4vw, 36px); }
  .gate h1 { font-size: clamp(29px, 5vw, 40px); }
  .gate-prompt { margin-top: 8px; }
  .gate-actions { margin-top: 10px; }
}

@media (forced-colors: active) {
  .gate-number, .gate-number span { color: CanvasText; }
  .gate-actions .button { border: 1px solid ButtonText; }
}

/* Keep both choices within reach when the notice takes most of a short screen. */
@media (max-width: 470px) and (max-height: 680px) {
  .gate .gate-cover {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px;
  }
  .gate-cover .gate-wordmark { --mark-height: 42px; --name-size: 22px; gap: 8px; }
  .gate-cover .gate-number { padding: 0; font-size: 36px; }
}

@media (min-width: 471px) and (max-width: 700px) and (max-height: 360px) {
  .gate-card { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
  .gate-page { padding: 10px 16px; }
  .gate-prompt { line-height: 1.45; }
  .gate-wordmark .house-signature { display: block; text-align: center; }
}
