:root {
  color-scheme: dark;
  font: 16px/1.5 system-ui, sans-serif;
  color: #f7ebce;
  background: #101e1b;
  --gold: #edcf91;
  --sand: #f9e9c2;
  --muted: #d9d1bd;
  --border: #e9c98673;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }

.title-screen {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: max(3rem, 10vh) 1.5rem;
  overflow: hidden;
}

.scenery {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: #152e2b url("./willowmere.webp") 53% 50% / cover no-repeat;
}

.title-screen::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(ellipse 58% 53% at 50% 46%, #0c201ec7, transparent 100%),
    linear-gradient(180deg, #080f10a0 0%, transparent 22%, transparent 65%, #08110ec2 100%);
}

.frame {
  position: absolute;
  inset: clamp(10px, 2.1vw, 32px);
  border: 1px solid #f0c68345;
  pointer-events: none;
}
.frame::before,
.frame::after {
  content: "";
  position: absolute;
  width: 38px;
  height: 38px;
  border-color: #ecc885a8;
  border-style: solid;
}
.frame::before { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.frame::after { right: -1px; bottom: -1px; border-width: 0 1px 1px 0; }

.title-card { width: 100%; text-align: center; margin-top: -6vh; }
.entry-choices { width: min(100%, 26rem); padding: clamp(1.25rem, 5vw, 2.15rem); background: #152522ef; border: 1px solid var(--border); border-radius: 4px; text-align: center; }
.entry-actions { display: grid; justify-items: stretch; gap: .7rem; }
.entry-actions .terms-link { justify-self: center; }

.world-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 2vw, 24px);
  margin: 0 0 1.35rem;
  color: var(--gold);
  font-size: clamp(.68rem, 1.05vw, .86rem);
  font-weight: 650;
  letter-spacing: .26em;
  text-transform: uppercase;
}
.world-label span {
  width: clamp(18px, 4.4vw, 62px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.world-label span:last-child { transform: rotate(180deg); }

h1 {
  margin: 0;
  color: var(--sand);
  font: 700 clamp(2.25rem, 8.7vw, 8.3rem)/.95 Georgia, "Times New Roman", serif;
  letter-spacing: .018em;
  text-transform: uppercase;
  text-wrap: nowrap;
  filter: drop-shadow(0 6px 16px #08110de0);
}
@supports (background-clip: text) {
  h1 {
    background: linear-gradient(#fff5d7 14%, #edcd8a 55%, #c49053 100%);
    background-clip: text;
    color: transparent;
  }
}

.crest {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 1.75rem 0 2.1rem;
}
.crest i { width: clamp(45px, 10vw, 144px); height: 1px; background: linear-gradient(90deg, transparent, #dfbc75a3); }
.crest i:last-child { transform: rotate(180deg); }
.crest b { width: 7px; height: 7px; transform: rotate(45deg); border: 1px solid var(--gold); }

.menu {
  display: flex;
  justify-content: center;
  gap: .75rem;
  flex-wrap: wrap;
}
.menu-button {
  min-height: 3.55rem;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  padding: .85rem 1.45rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  font: 650 .91rem/1.2 system-ui, sans-serif;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .16s, box-shadow .16s;
}
.primary {
  min-width: 13rem;
  color: #201711;
  border-color: #f4d79b;
  background: #edcf91;
  box-shadow: 0 4px 20px #0006, inset 0 0 0 2px #3d271820;
}
.primary:hover { background: #fce5ad; }
.arrow { font-size: 1.2rem; }
.secondary { min-width: 8rem; background: #142322db; color: var(--sand); }
.secondary:hover { background: #304039; }
.menu-button:focus-visible, .close-button:focus-visible {
  outline: 2px solid #fff0c2;
  outline-offset: 4px;
}
.signin-note { margin: 1.05rem 0 0; color: var(--muted); font-size: .84rem; text-shadow: 0 2px 6px #000; }

.title-footer { position: absolute; bottom: clamp(1.2rem, 4vh, 2.6rem); left: 0; right: 0; text-align: center; }
.terms-link { color: var(--sand); background: #101e1bd9; border: 0; padding: .45rem .65rem; font: inherit; text-decoration: underline; text-underline-offset: .25em; cursor: pointer; }
.terms-link:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

dialog {
  width: min(28.5rem, calc(100% - 2rem));
  color: var(--sand);
  background: #142421;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.5rem;
  max-height: calc(100dvh - 2rem);
  overflow: auto;
}
dialog::backdrop { background: #081010c4; }
dialog header, dialog dl div { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
dialog h2 { margin: 0; font: 1.85rem Georgia, serif; }
dialog article { line-height: 1.55; }
dialog article h3 { margin: 0.9rem 0 0; }
dialog article a { color: inherit; text-decoration: underline; }
.policy-dialog[open] { display: flex; flex-direction: column; gap: .85rem; overflow: hidden; }
.policy-dialog header { flex: none; }
.policy-dialog article { min-height: 0; overflow: auto; overscroll-behavior: contain; padding-right: .65rem; }
.close-button {
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: #263833;
  color: var(--sand);
  font-size: 1.45rem;
  cursor: pointer;
}
dialog dl { margin: 1.25rem 0 0; }
dialog dl div { padding: .7rem 0; border-top: 1px solid #e9c9862d; }
dialog dd { margin: 0; text-align: right; color: var(--muted); }
kbd {
  display: inline-block;
  min-width: 1.5rem;
  padding: .05rem .25rem;
  border: 1px solid #e9c9864d;
  border-radius: 2px;
  color: var(--sand);
  text-align: center;
}

@media (max-width: 760px) {
  .scenery { background-position: 78% center; }
}
@media (max-width: 560px) {
  .scenery { background-position: 85% center; }
  .title-screen { padding-inline: 1.2rem; }
  .title-card { margin-top: -3rem; }
  .world-label { letter-spacing: .16em; }
  h1 { font-size: clamp(1.8rem, 8.65vw, 3.45rem); }
  .menu-button { min-height: 3.2rem; }
  .primary { min-width: 11rem; gap: .65rem; }
  .secondary { min-width: 6.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  .menu-button { transition: none; }
}
