:root {
  --sky-top: #5ea8e0;
  --sky-low: #bfe4f6;
  --sand: #e7c98f;
  --sand-dark: #c9a467;
  --parchment: #f6e7c4;
  --parchment-edge: #e2c891;
  --ink: #3a2216;
  --ink-soft: #6b4a32;
  --frame: #5a3820;
  --link: #9a3f12;
  --link-hover: #c2561c;
  --cream: #fbefd2;
  --pixel: 4px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--frame);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  font: 18px/1.65 Georgia, "Palatino Linotype", "Book Antiqua", Palatino, serif;
  background: linear-gradient(180deg, var(--sky-top) 0, var(--sky-low) 420px, var(--sky-low) 100%);
}

img.pixel,
.pixel img {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

a {
  color: var(--link);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:hover,
a:focus-visible {
  color: var(--link-hover);
}

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

.sky {
  position: relative;
  overflow: hidden;
  padding: 40px 16px 28px;
  text-align: center;
}

.cloud {
  position: absolute;
  image-rendering: pixelated;
  opacity: 0.95;
  animation: drift linear infinite;
}

.cloud.a {
  top: 26px;
  left: -10%;
  width: 210px;
  animation-duration: 140s;
}

.cloud.b {
  top: 120px;
  left: -20%;
  width: 144px;
  animation-duration: 190s;
  animation-delay: -80s;
}

.cloud.c {
  top: 60px;
  left: -30%;
  width: 140px;
  animation-duration: 230s;
  animation-delay: -150s;
}

@keyframes drift {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(140vw);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cloud {
    animation: none;
  }
  .cloud.a {
    left: 8%;
  }
  .cloud.b {
    left: 70%;
  }
  .cloud.c {
    left: 52%;
  }
}

.logo {
  position: relative;
  display: inline-block;
}

.logo img {
  display: block;
  width: 270px;
  height: auto;
}

.sky.small {
  padding: 28px 16px 20px;
}

.sky.small .logo img {
  width: 180px;
}

.tagline {
  position: relative;
  margin: 18px auto 0;
  max-width: 640px;
  font-size: 1.2rem;
  font-style: italic;
  color: #23405a;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}

main {
  flex: 1;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 8px 16px 48px;
}

.scene {
  margin: 0 0 32px;
  padding: 8px;
  background: url("../img/wood.png") 0 0 / 128px 48px;
  image-rendering: pixelated;
  border: var(--pixel) solid var(--frame);
  box-shadow: 0 6px 0 rgba(58, 34, 22, 0.35);
}

.scene img {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  border: var(--pixel) solid var(--ink);
}

.scene figcaption {
  padding: 8px 4px 0;
  color: var(--cream);
  font-size: 0.95rem;
  text-align: center;
}

.panel {
  position: relative;
  padding: 32px clamp(18px, 5vw, 48px);
  background: var(--parchment);
  border: var(--pixel) solid var(--frame);
  box-shadow:
    inset 0 0 0 var(--pixel) var(--parchment-edge),
    0 6px 0 rgba(58, 34, 22, 0.35);
}

.panel + .panel {
  margin-top: 28px;
}

h1,
h2,
h3 {
  line-height: 1.25;
  color: var(--frame);
}

h1 {
  margin: 0 0 4px;
  font-size: clamp(1.7rem, 4vw, 2.3rem);
}

h2 {
  margin: 2em 0 0.4em;
  font-size: 1.35rem;
  padding-bottom: 6px;
  border-bottom: 3px dotted var(--sand-dark);
}

h3 {
  margin: 1.4em 0 0.3em;
  font-size: 1.1rem;
}

.updated {
  margin: 0 0 24px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.summary {
  margin: 0 0 8px;
  padding: 16px 20px;
  background: var(--cream);
  border-left: 6px solid var(--sand-dark);
}

.summary ul {
  margin: 0;
  padding-left: 1.2em;
}

ul {
  padding-left: 1.3em;
}

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

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.stores li {
  margin: 0;
  padding: 8px 16px;
  background: var(--frame);
  color: var(--cream);
  border: var(--pixel) solid var(--ink);
  font-size: 0.95rem;
}

.ground {
  height: 24px;
  background:
    linear-gradient(180deg, #7aa84a 0 8px, #5e8a38 8px 12px, var(--sand) 12px 100%);
  border-top: var(--pixel) solid #3f6326;
}

footer {
  background: url("../img/wood.png") 0 0 / 128px 48px;
  image-rendering: pixelated;
  color: var(--cream);
  border-top: var(--pixel) solid var(--ink);
  padding: 22px 16px 26px;
  text-align: center;
  font-size: 0.95rem;
}

footer > * {
  image-rendering: auto;
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 22px;
  margin-bottom: 10px;
}

footer a {
  color: var(--cream);
}

footer a:hover,
footer a:focus-visible {
  color: #ffd98a;
}

footer a:focus-visible {
  outline-color: var(--cream);
}

footer a[aria-current="page"] {
  text-decoration: none;
  font-weight: bold;
}

.flags {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 2;
  display: flex;
  gap: 10px;
}

.flags a {
  display: block;
  line-height: 0;
  border: 3px solid transparent;
  opacity: 0.8;
  transition: transform 0.1s, opacity 0.1s;
}

.flags a:hover,
.flags a:focus-visible {
  opacity: 1;
  transform: translateY(-2px);
}

.flags a[aria-current] {
  opacity: 1;
  border-color: #ffd98a;
  box-shadow: 0 0 0 2px var(--ink);
}

.flags img {
  display: block;
  width: 44px;
  height: 30px;
}

.copy {
  margin: 0;
  color: #e9d2a6;
  font-size: 0.85rem;
}

@media (max-width: 560px) {
  body {
    font-size: 17px;
  }
  .sky {
    padding-top: 24px;
  }
  .flags {
    position: relative;
    top: auto;
    right: auto;
    justify-content: center;
    margin-bottom: 18px;
  }
  .logo img {
    width: 180px;
  }
  .sky.small .logo img {
    width: 135px;
  }
  .cloud.a,
  .cloud.c {
    width: 140px;
  }
  .cloud.b {
    width: 96px;
  }
  .scene {
    padding: 4px;
  }
}
