:root {
  color-scheme: dark;
  color: #f7efe2;
  background: #10100d;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  --cream: #fff9ec;
  --muted: #e2d7c6;
  --gold: #ffd98a;
  --line: rgb(244 215 161 / 32%);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background: linear-gradient(rgb(16 16 13 / 16%), rgb(16 16 13 / 48%)),
    url("/static/images/background1.webp") center / cover fixed no-repeat;
}

[hidden] {
  display: none !important;
}

.page {
  width: min(100%, 980px);
  margin: 0 auto;
  padding: clamp(16px, 5vw, 56px);
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, rgb(255 244 214 / 10%), transparent 42%),
    rgb(22 17 12 / 86%);
  box-shadow: 0 20px 42px rgb(0 0 0 / 26%),
    inset 0 0 0 1px rgb(255 255 255 / 4%);
  backdrop-filter: blur(8px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 3fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(8px, 2vw, 22px);
  padding: clamp(12px, 2vw, 24px);
  margin-bottom: clamp(18px, 3vw, 30px);
  text-align: center;
}

.hero h1 {
  margin: 0;
  color: var(--cream);
  font-size: clamp(1.65rem, 3.8vw, 2.45rem);
  line-height: 1.1;
}

.hero p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  line-height: 1.5;
}

.mascot {
  display: block;
  width: 100%;
  height: clamp(80px, 15vw, 176px);
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgb(0 0 0 / 35%));
}

.workspace {
  width: min(100%, 620px);
  margin: 0 auto;
  padding: clamp(18px, 4vw, 32px);
}

form {
  display: grid;
  gap: 10px;
}

label {
  color: var(--cream);
  font-weight: 700;
}

label span {
  color: var(--muted);
  font-weight: 400;
}

input,
button,
.button {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

input {
  width: 100%;
  min-width: 0;
  padding: 10px 14px;
  background: rgb(255 248 238 / 8%);
  color: var(--cream);
}

input::placeholder {
  color: var(--muted);
}

input + label {
  margin-top: 8px;
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  background: var(--gold);
  color: #241a0e;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

button {
  margin-top: 8px;
  justify-self: start;
}

button:not(:disabled):hover,
.button:hover {
  background: #ffe8b1;
}

button:disabled {
  opacity: 0.65;
  cursor: default;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

[aria-invalid="true"] {
  border-color: #ffb6a8;
}

.error,
.status {
  margin: 0;
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.error {
  color: #ffb6a8;
}

.status {
  color: var(--muted);
}

.error:not(:empty),
.status:not(:empty) {
  margin-top: 10px;
}

.result {
  display: grid;
  justify-items: center;
  gap: 16px;
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.result h2 {
  margin: 0;
  color: #fff4d6;
  font-size: 1.35rem;
}

.qr-image {
  display: block;
  width: min(100%, 320px);
  height: auto;
  background: #fff;
  image-rendering: pixelated;
}

@media (min-width: 1025px) {
  body {
    background:
      linear-gradient(rgb(16 16 13 / 16%), rgb(16 16 13 / 48%)) center / cover fixed,
      url("/static/images/background1.webp") center / min(100vw, 133.3vh) auto fixed no-repeat,
      url("/static/images/desktop-background.webp") center / cover fixed no-repeat;
  }
}

@media (max-width: 600px) {
  .hero {
    grid-template-columns: 1fr 1fr;
    column-gap: 12px;
  }

  .hero-copy {
    grid-area: 2 / 1 / 3 / 3;
  }

  .mascot {
    height: clamp(54px, 16vw, 92px);
  }

  .mascot:first-child {
    grid-area: 1 / 1;
    object-position: right center;
  }

  .mascot:last-child {
    grid-area: 1 / 2;
    object-position: left center;
  }

  button {
    justify-self: stretch;
  }
}

@media (max-width: 1024px) and (orientation: portrait) {
  body {
    background: linear-gradient(rgb(16 16 13 / 16%), rgb(16 16 13 / 48%)),
      url("/static/images/background2.webp") center / cover no-repeat;
  }
}
