:root {
  color-scheme: dark;
  --navy: #111c34;
  --deep: #0c1428;
  --text: #fff7e8;
  --muted: #bec9df;
  --gold: #efc783;
  --display: Georgia, "Times New Roman", serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 280px; color: var(--text); background: var(--deep); font: 1rem/1.5 var(--body); }
button { font: inherit; }
button:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }

.hero {
  position: relative;
  min-height: 330px;
  min-height: clamp(330px, 51svh, 495px);
  display: grid;
  place-items: center;
  isolation: isolate;
  text-align: center;
  padding: max(45px, env(safe-area-inset-top)) 16px 75px;
  background: #172942 url("/art/winter.webp") center 66% / cover no-repeat;
}
.hero::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, #0d192f75, #10203d20 56%, var(--deep));
  content: "";
}
.hero-copy { text-shadow: 0 2px 18px #0b1325; }
.star { color: var(--gold); font-size: 1.65rem; }
.hero h1 {
  margin: 3px 0 12px;
  font: 400 clamp(2.6rem, 11vw, 6.2rem)/1.02 var(--display);
  letter-spacing: -.055em;
}
.hero h1 em { color: #ffe2ae; font-weight: 400; }
.hero p { margin: 0; font-size: clamp(1rem, 3.6vw, 1.18rem); font-weight: 600; }

.access { width: 100%; min-height: 100svh; padding: 18px; }
.access-card {
  width: min(100%, 390px);
  padding: clamp(20px, 5vw, 32px);
  border: 1px solid #efc78370;
  border-radius: 20px;
  background: #111c34f5;
  box-shadow: 0 16px 50px #081122aa;
}
.access h1 { margin-bottom: 20px; font-size: clamp(2rem, 9vw, 3rem); }
.access-form { display: grid; gap: 9px; text-align: left; }
.access-form input, .access-form button {
  width: 100%;
  min-height: 48px;
  padding: 9px 12px;
  border: 1px solid #697a98;
  border-radius: 9px;
  font: inherit;
}
.access-form input { color: var(--text); background: var(--deep); }
.access-form input:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.access-form button { margin-top: 5px; background: var(--gold); color: var(--deep); font-weight: 650; cursor: pointer; }
.access-form p { color: #ffc0aa; font-size: .93rem; }

main {
  width: min(950px, 100%);
  margin: 0 auto;
  padding: 3px max(16px, env(safe-area-inset-right)) max(34px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}
.heading h2 { margin: 0; font: 400 clamp(1.7rem, 6vw, 2.45rem)/1.2 var(--display); letter-spacing: -.035em; }
.heading p { margin: 4px 0 19px; color: var(--muted); font-size: .92rem; }
.doors {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.door {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  width: 100%;
  min-height: 87px;
  aspect-ratio: 1.05;
  padding: 14px 5px 7px;
  cursor: pointer;
  color: #f3eadc;
  text-align: center;
  border: 1px solid #57617b;
  border-radius: 12px;
  background: radial-gradient(ellipse at 74% 97%, #253d5b, transparent 82%), #1a2842;
  transition: background-color .18s ease, transform .18s ease;
}
.door-star { position: absolute; top: 5px; right: 8px; color: #bfab87; font-size: .8rem; }
.door strong { font: 400 clamp(1.7rem, 7vw, 2.7rem)/1.05 var(--display); }
.door-state { color: var(--muted); font-size: .73rem; }
.door.available { color: #ffe2ae; border-color: #dfab63; background-color: #4a3c36; }
.door.available .door-star, .door.available .door-state { color: #ffdaa0; }
.door:active { transform: translateY(1px); }
@media (hover: hover) { .door:hover { transform: translateY(-2px); background-color: #233451; } }

dialog {
  position: relative;
  width: min(430px, calc(100% - 24px));
  max-height: 89svh;
  padding: 24px clamp(19px, 6vw, 38px) 25px;
  border: 1px solid #b69a68;
  border-radius: 19px;
  color: #202a42;
  background: radial-gradient(ellipse at 60% 0, #fff4d8, #fffaf1 75%);
  box-shadow: 0 21px 70px #070d1d99;
  text-align: center;
}
dialog[open] { animation: appear .24s ease-out; }
dialog::backdrop { background: #071024ae; }
dialog .star { color: #a0651b; }
dialog form { position: absolute; top: 5px; right: 5px; }
.close {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 50%;
  color: #55432e;
  background: transparent;
  cursor: pointer;
  font-size: 1.55rem;
}
dialog h2 { margin: 2px 0 13px; font: 400 2.05rem/1.17 var(--display); letter-spacing: -.035em; }
#message { margin: 0; white-space: pre-line; line-height: 1.65; }
.signature { margin: 17px 0 0; color: #754a20; font: italic 1.12rem/1.4 var(--display); }
.signature span { margin-left: .1em; }

@keyframes appear { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (min-width: 620px) {
  main { padding-inline: 25px; }
  .doors { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
  .door { aspect-ratio: 1.23; }
  .door-state { font-size: .86rem; }
}
@media (min-width: 870px) { .doors { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
