:root {
  color-scheme: dark;
  font-family: "Segoe UI", system-ui, sans-serif;
  background: #131f1e;
  color: #f5eee0;
  --muted: #bdc7bd;
  --gold: #efc491;
  --line: #3e534b;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
.gate { min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(420px, 500px); }
.village {
  position: relative;
  background: linear-gradient(0deg,#142120e8 0%,transparent 26%),
              url("./brambleford-at-dusk.png") 43% center / cover;
}
.location { position: absolute; left: clamp(24px, 4vw, 65px); bottom: 28px; color: #f4d6b0; font: 1.2rem Georgia, serif; }
.location span { color: #a48968; padding: 0 8px; }
.entry {
  margin: auto 0;
  padding: 48px clamp(28px, 5vw, 70px);
  background: linear-gradient(140deg,#1b2a25,#131f1e 65%);
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-left: 1px solid var(--line);
}
.crest { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid #8b6a46; transform: rotate(45deg); margin: 6px 0 24px 8px; }
.crest span { width: 15px; height: 21px; border: 2px solid var(--gold); border-radius: 8px 8px 2px 2px; transform: rotate(-45deg); border-bottom-width: 4px; }
.brand { margin: 0; text-transform: uppercase; letter-spacing: .18em; font-size: .75rem; color: var(--gold); font-weight: 700; }
h1, h2 { font-family: Georgia, serif; font-weight: 400; }
h1 { font-size: clamp(2.2rem, 3.6vw, 3.15rem); line-height: 1.04; letter-spacing: -.04em; margin: 8px 0 12px; }
.intro, .existing, .success p { color: var(--muted); line-height: 1.55; }
.intro { margin: 0 0 24px; }
form { display: grid; }
label { font-size: .88rem; font-weight: 650; margin-bottom: 6px; }
input, button { font: inherit; width: 100%; border-radius: 5px; min-height: 46px; }
input { background: #101d1a; color: #fcf5e9; border: 1px solid #4a6257; padding: 8px 11px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.help { font-size: .78rem; color: var(--muted); margin: 6px 0 15px; }
button {
  margin-top: 19px; padding: 10px 14px; color: #211c15; border: 1px solid #f2ca95;
  cursor: pointer; font-weight: 700; background: #d6ae79; display: flex; justify-content: space-between; align-items: center;
}
button:hover { background: #efc491; }
button:disabled { opacity: .65; cursor: wait; }
.existing { margin: 22px 0 0; font-size: .85rem; }
.error { color: #ffc1af; margin: 12px 0 0; font-size: .9rem; }
.success { padding: 14px 16px; border: 1px solid #77936c; background: #243b2a; border-radius: 5px; }
.success h2 { margin: 0 0 6px; }
.success p { margin: 0; }
@media (max-width: 740px) {
  .gate { display: flex; flex-direction: column; }
  .village { min-height: clamp(150px, 30svh, 260px); background-position: 43% 54%; }
  .location { bottom: 12px; left: 23px; margin: 0; font-size: .92rem; }
  .entry { border: 0; padding: 26px max(24px, 7vw) 35px; }
  .crest { display: none; }
}
