@font-face {
  font-family: 'Fredoka';
  src: url('/fonts/Fredoka-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: 'Fredoka';
  src: url('/fonts/Fredoka-Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}

:root {
  --sky: #7cc6f8;
  --sky-light: #c4e8fd;
  --brown: #5b3415;
  --brown-soft: #7a5233;
  --honey: #ffc93c;
  --honey-deep: #f39a1a;
  --cream: #fff9ec;
  --font-round: 'Fredoka', ui-rounded, system-ui, sans-serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
}

body {
  color: var(--brown);
  font-family: var(--font-body);
  line-height: 1.6;
  background: linear-gradient(var(--sky), var(--sky-light)) fixed;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--honey-deep);
}

:focus-visible {
  outline: 3px solid var(--brown);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Home: the meadow fills the page, the logo and text sit in its sky. */

.home {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  background-color: #6fc0f5;
  background-image: image-set(url('/img/meadow-960.webp') 1x, url('/img/meadow-1774.webp') 2x);
  background-position: center bottom;
  background-size: cover;
  background-repeat: no-repeat;
}

@media (min-width: 900px) {
  .home {
    background-image: url('/img/meadow-1774.webp');
  }
}

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(16px, 4vh, 48px) 16px 32px;
}

.hero h1 {
  margin: 0;
}

.logo {
  display: block;
  width: min(440px, 80vw);
  height: auto;
  filter: drop-shadow(0 6px 12px rgba(40, 80, 120, 0.3));
}

/* The game's wooden panel (assets/ui/panel@3x.png), cap insets 21pt. A box-shadow rather than a
   drop-shadow filter, which would rasterise the text inside and soften it. */
.sign {
  max-width: 460px;
  margin-top: 4px;
  padding: 22px 30px 24px;
  border: 21px solid transparent;
  border-image: url('/img/panel.webp') 63 fill / 21px;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(40, 60, 30, 0.35);
}

@media (max-width: 420px) {
  .sign {
    padding: 18px 10px 20px;
  }
}

:where(.sign) p {
  margin: 0;
}

.tagline {
  font-family: var(--font-round);
  font-weight: 600;
  font-size: 1.3rem;
  line-height: 1.3;
}

.soon {
  margin-top: 10px;
  font-size: 1.05rem;
  line-height: 1.45;
}

.waitlist {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 16px 0 6px;
}

.waitlist[hidden] {
  display: none;
}

.waitlist input[type='email'] {
  width: 100%;
  padding: 11px 18px;
  border: 3px solid var(--brown);
  border-radius: 999px;
  background: #fff;
  color: var(--brown);
  font: 600 1.1rem var(--font-round);
}

.waitlist input[type='email']::placeholder {
  color: #a8876a;
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  font-size: 0.98rem;
  line-height: 1.3;
  cursor: pointer;
}

.check input {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--honey-deep);
}

/* The game's honey button (assets/ui/buttonHoney@3x.png), cap insets 21pt left and right. */
.waitlist button {
  padding: 11px 8px 13px;
  border-style: solid;
  border-width: 0 21px;
  border-image: url('/img/buttonHoney.webp') 0 63 fill / 0 21px;
  background: none;
  font: 700 1.25rem/1.2 var(--font-round);
  color: var(--brown);
  cursor: pointer;
}

.waitlist button:active {
  transform: translateY(2px);
}

.waitlist button:disabled {
  opacity: 0.6;
  cursor: progress;
}

.fine {
  font-size: 0.85rem;
  color: var(--brown-soft);
}

.waitlist-status:empty {
  display: none;
}

.waitlist-status {
  margin: 14px 0 6px;
  font-family: var(--font-round);
  font-weight: 700;
  font-size: 1.2rem;
}

.waitlist-status.error {
  font-size: 1rem;
  color: #b3261e;
}

/* The honeypot field: off screen for people, still in the form for bots. */
.hp {
  position: absolute;
  left: -10000px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.contact {
  margin-top: 12px;
  font-family: var(--font-round);
  font-weight: 600;
  font-size: 1.05rem;
}

/* Big screens: scale the logo and sign up so they don't look lost in the meadow. */
@media (min-width: 1400px) and (min-height: 900px) {
  .logo {
    width: 560px;
  }

  .sign {
    max-width: 560px;
    padding: 28px 40px 30px;
  }

  .tagline {
    font-size: 1.65rem;
  }

  .soon {
    font-size: 1.2rem;
  }

  .waitlist button {
    font-size: 1.45rem;
  }

  .contact {
    font-size: 1.2rem;
  }
}

.site-footer {
  padding: 14px 20px 18px;
  background: var(--cream);
  border-top: 4px solid #d98a32;
  text-align: center;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 24px;
  font-family: var(--font-round);
  font-weight: 600;
  font-size: 1.1rem;
}

.site-footer p {
  margin: 6px 0 0;
  font-size: 0.95rem;
  color: var(--brown);
}

/* Legal and support pages: a cream card on the sky. */

.page-header {
  display: flex;
  justify-content: center;
  padding: 28px 20px 8px;
}

.page-header img {
  display: block;
  width: 200px;
  height: auto;
  filter: drop-shadow(0 4px 8px rgba(40, 80, 120, 0.25));
}

.card {
  max-width: 760px;
  margin: 16px auto 40px;
  padding: clamp(12px, 4vw, 36px);
  border: 21px solid transparent;
  border-image: url('/img/panel.webp') 63 fill / 21px;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(40, 80, 120, 0.2);
}

@media (max-width: 800px) {
  .card {
    margin-inline: 12px;
  }
}

.card h1,
.card h2 {
  font-family: var(--font-round);
  line-height: 1.2;
}

.card h1 {
  margin: 0 0 4px;
  font-size: clamp(1.8rem, 5vw, 2.4rem);
}

.card h2 {
  margin: 2em 0 0.4em;
  font-size: 1.3rem;
}

.card .updated {
  margin: 0 0 1.5em;
  color: var(--brown-soft);
}

.card ul {
  padding-left: 1.3em;
}

.card li + li {
  margin-top: 0.3em;
}

.card address {
  font-style: normal;
}

.page .site-footer {
  background: transparent;
  border: 0;
}

/* Gallery: the intro card, then each image in a wooden frame. Full-width figures span both columns. */

.wide {
  max-width: 1120px;
  margin: 0 auto 40px;
  padding: 0 12px;
}

.wide .intro {
  margin-bottom: 28px;
}

.card h3 {
  margin: 1.4em 0 0.2em;
  font-family: var(--font-round);
  font-size: 1.05rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  align-items: stretch;
}

.gallery .full {
  grid-column: 1 / -1;
}

@media (max-width: 760px) {
  .gallery {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
}

.gallery figure {
  margin: 0;
  border: 21px solid transparent;
  border-image: url('/img/panel.webp') 63 fill / 21px;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(40, 80, 120, 0.2);
}

.gallery a {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  cursor: zoom-in;
}

.gallery img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.3s ease;
}

.gallery a:hover img {
  transform: scale(1.02);
}

.gallery figcaption {
  padding: 14px 6px 4px;
}

.gallery h2 {
  margin: 6px 0 2px;
  font-family: var(--font-round);
  font-size: 1.3rem;
  line-height: 1.2;
}

.gallery figcaption p {
  margin: 0;
}

.tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--honey);
  font: 700 0.8rem/1.5 var(--font-round);
  letter-spacing: 0.02em;
}

.viewer {
  max-width: 96vw;
  max-height: 96vh;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: zoom-out;
}

.viewer::backdrop {
  background: rgba(30, 50, 70, 0.8);
}

.viewer img {
  display: block;
  max-width: 96vw;
  max-height: 90vh;
  border-radius: 12px;
}

.viewer form {
  display: flex;
  justify-content: center;
  padding-top: 10px;
}

.viewer button {
  padding: 6px 18px;
  border: 3px solid var(--brown);
  border-radius: 999px;
  background: var(--cream);
  color: var(--brown);
  font: 700 1rem var(--font-round);
  cursor: pointer;
}

/* Press kit */

.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 20px;
  margin: 0;
}

.facts dt {
  font-family: var(--font-round);
  font-weight: 700;
}

.facts dd {
  margin: 0;
}

.card .downloads {
  list-style: none;
  padding: 0;
}

.downloads li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
}

.downloads a {
  font-family: var(--font-round);
  font-weight: 700;
  font-size: 1.1rem;
}

.downloads span {
  color: var(--brown-soft);
  font-size: 0.95rem;
}

.card .swatches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  list-style: none;
  padding: 0;
}

.card .swatches li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  font-family: var(--font-round);
  font-weight: 600;
}

.swatches span {
  display: block;
  height: 56px;
  border: 3px solid rgba(91, 52, 21, 0.2);
  border-radius: 12px;
}

.swatches code {
  font-size: 0.9rem;
  color: var(--brown-soft);
}
