@font-face {
  font-family: "Fredoka";
  src: url("assets/fonts/fredoka.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

@font-face {
  font-family: "Nunito";
  src: url("assets/fonts/nunito.woff2") format("woff2");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --ink: #1d3a2b;
  --ink-soft: #3d5a49;
  --green-dark: #1f4d36;
  --green: #2f7d35;
  --green-deep: #246a2a;
  --leaf: #6cbf4a;
  --wood: #9a5b24;
  --cream: #fff9ec;
  --mint: #eaf5dc;
  --sky-pale: #e5f3fc;
  --blush: #fdedf1;
  --sky-top: #6db9f0;
  --sky-bottom: #9ad2fb;
  --radius: 24px;
  --shadow: 0 12px 32px rgb(31 77 54 / 0.14);
  --heading: "Fredoka", "Nunito", system-ui, sans-serif;
  --header-height: 68px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-padding-top: calc(var(--header-height) + 12px);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
h4 {
  font-family: var(--heading);
  font-weight: 600;
  line-height: 1.15;
  color: var(--green-dark);
  margin: 0 0 0.6em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
  font-size: 1.35rem;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--green);
}

:focus-visible {
  outline: 3px solid var(--green-dark);
  outline-offset: 3px;
}

/* Keep the focus ring visible on the dark footer and screenshot viewer. */
.site-footer :focus-visible,
.lightbox :focus-visible {
  outline-color: var(--cream);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--green-dark);
  color: var(--cream);
  border-radius: 12px;
}

.skip-link:focus {
  top: 1rem;
}

.container {
  width: min(1160px, 100%);
  margin: 0 auto;
}

.narrow {
  width: min(760px, 100%);
  text-align: center;
}

.section {
  padding: clamp(4rem, 9vw, 7rem) 1.5rem;
}

.section-head {
  max-width: 720px;
  margin: 0 auto 2.5rem;
  text-align: center;
}

.eyebrow {
  margin-bottom: 0.4rem;
  font-family: var(--heading);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--wood);
}

.lead {
  font-size: 1.25rem;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75em 1.5em;
  border: 3px solid var(--green-dark);
  border-radius: 999px;
  font-family: var(--heading);
  font-weight: 600;
  font-size: 1.1rem;
  line-height: 1.2;
  text-decoration: none;
  box-shadow: 0 5px 0 var(--green-dark);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 0 var(--green-dark);
}

.btn:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--green-dark);
}

.btn-primary {
  color: #fffbea;
  background: linear-gradient(var(--green), var(--green-deep));
}

.btn-secondary {
  color: var(--green-dark);
  background: var(--cream);
}

.btn-large {
  font-size: 1.3rem;
  font-weight: 700;
  padding: 0.8em 1.8em;
}

.btn-small {
  font-size: 0.95rem;
  padding: 0.5em 1.1em;
  border-width: 2px;
  box-shadow: 0 3px 0 var(--green-dark);
}

.btn-small:hover {
  box-shadow: 0 5px 0 var(--green-dark);
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: var(--header-height);
  padding: 0 clamp(1rem, 3vw, 2rem);
  background: rgb(255 249 236 / 0.92);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 12px rgb(31 77 54 / 0.12);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--heading);
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--green-dark);
  text-decoration: none;
  flex-shrink: 0;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 2px solid var(--green-dark);
}

.site-header nav {
  margin-left: auto;
}

.site-header nav ul {
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-header nav a {
  display: inline-block;
  padding: 0.5rem 0;
  font-family: var(--heading);
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
}

.site-header nav a:hover {
  color: var(--green);
}

@media (max-width: 760px) {
  .site-header nav {
    display: none;
  }

  .site-header .btn {
    margin-left: auto;
  }
}

/* Hero */

.hero {
  text-align: center;
  background: linear-gradient(var(--sky-top), var(--sky-bottom));
}

.hero-intro {
  padding: clamp(2rem, 5vw, 3.5rem) 1.5rem 0;
  position: relative;
  z-index: 1;
}

.hero h1 {
  margin: 0 auto;
  width: min(600px, 92%);
}

.hero-logo {
  width: 100%;
  filter: drop-shadow(0 8px 14px rgb(31 77 54 / 0.25));
}

.hero-tagline {
  max-width: 40ch;
  margin: 0.5rem auto 1.5rem;
  font-family: var(--heading);
  font-weight: 500;
  font-size: clamp(1.2rem, 2.4vw, 1.55rem);
  line-height: 1.35;
  color: var(--green-dark);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

/* The note overlaps the top of the hero art, so it gets its own backdrop for legible contrast. */
.hero-note {
  display: inline-block;
  margin: 1rem 0 0;
  padding: 0.2rem 0.9rem;
  border-radius: 999px;
  background: rgb(255 249 236 / 0.85);
  font-family: var(--heading);
  font-weight: 500;
  color: var(--green-dark);
}

.hero-art {
  width: 100%;
  height: clamp(240px, 32.3vw, 1100px);
  margin-top: clamp(-5rem, -4vw, -1rem);
  object-fit: cover;
  object-position: 50% 70%;
  mask-image: linear-gradient(transparent, #000 22%);
}

/* Welcome */

.welcome {
  position: relative;
  margin-top: -2.5rem;
  border-radius: 40px 40px 0 0;
  background: var(--cream);
}

.promises {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.promises li {
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  background: var(--mint);
  border: 2px solid #cfe7b6;
  font-family: var(--heading);
  font-weight: 500;
  color: var(--green-dark);
}

/* Pals */

.pals {
  background: var(--mint);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  max-width: 760px;
  margin: 0 auto 3rem;
  text-align: center;
}

.stats div {
  display: flex;
  flex-direction: column-reverse;
  padding: 1rem 0.5rem;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.stats dd {
  margin: 0;
  font-family: var(--heading);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 2.75rem);
  line-height: 1.1;
  color: var(--green);
}

.stats dt {
  font-weight: 700;
  color: var(--ink-soft);
}

.roster {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pal {
  padding: 0.75rem 0.75rem 1rem;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform 0.2s ease;
}

.pal img {
  width: 100%;
  aspect-ratio: 1;
  margin-bottom: 0.75rem;
  border-radius: 18px;
}

.pal h3 {
  margin-bottom: 0.2rem;
}

.pal p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.badge {
  display: inline-block;
  vertical-align: middle;
  padding: 0.15em 0.6em;
  border-radius: 999px;
  background: #f6d7ee;
  color: #7a2a63;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

@media (prefers-reduced-motion: no-preference) {
  .pal:hover {
    transform: translateY(-6px) rotate(-1.5deg);
  }

  .pal:nth-child(even):hover {
    transform: translateY(-6px) rotate(1.5deg);
  }
}

.growth {
  max-width: 760px;
  margin: 3rem auto 0;
  text-align: center;
  font-size: 1.15rem;
}

/* Image + text features */

.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
}

.feature-reverse .feature-media {
  order: 2;
}

.feature-media {
  margin: 0;
}

.feature-media img {
  width: 100%;
  border: 8px solid #fff;
  border-radius: 28px;
  box-shadow: var(--shadow);
  transform: rotate(-1.5deg);
}

.feature-reverse .feature-media img {
  transform: rotate(1.5deg);
}

.feature-text p:last-child {
  margin-bottom: 0;
}

@media (max-width: 900px) {
  .feature {
    grid-template-columns: 1fr;
  }

  .feature-reverse .feature-media {
    order: 0;
  }
}

.minds {
  background: var(--cream);
}

/* Adventure */

.adventure {
  background: var(--sky-pale);
}

.subhead {
  margin: 4.5rem 0 1.5rem;
  text-align: center;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
}

.subhead-text {
  max-width: 640px;
  margin: -0.75rem auto 1.75rem;
  text-align: center;
}

.biomes,
.knacks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.biome {
  overflow: hidden;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  border-top: 8px solid var(--biome-color);
}

.biome img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.biome h4 {
  margin: 1rem 1.25rem 0.3rem;
  font-size: 1.5rem;
  color: var(--biome-color);
}

.biome p {
  margin: 0 1.25rem 1.25rem;
}

.biome-meadow {
  --biome-color: #3c8a35;
}

.biome-lagoon {
  --biome-color: #1f7d8c;
}

.biome-highlands {
  --biome-color: #4f5f7a;
}

.difficulty {
  margin: 2rem 0 0;
  text-align: center;
  font-family: var(--heading);
  font-weight: 500;
  font-size: 1.15rem;
}

.pill {
  display: inline-block;
  margin: 0.25rem;
  padding: 0.3rem 1rem;
  border-radius: 999px;
  border: 2px solid var(--green-dark);
  background: #fff;
}

.knacks li {
  padding: 1.5rem;
  border-radius: var(--radius);
  background: #fff;
  border: 3px dashed #b9d7ec;
  text-align: center;
}

.knacks h4 {
  font-size: 1.4rem;
  margin-bottom: 0.3rem;
}

.knacks p {
  margin: 0;
}

@media (max-width: 760px) {
  .biomes,
  .knacks {
    grid-template-columns: 1fr;
  }
}

/* Wild friends, cards, home */

.wild {
  background: var(--cream);
}

.duo {
  background: var(--blush);
}

.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.card {
  padding: clamp(1.75rem, 4vw, 2.75rem);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.card h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
}

.card p:last-child {
  margin-bottom: 0;
}

.card-family {
  border-top: 8px solid #e88aa6;
}

.card-compete {
  border-top: 8px solid #f0b13c;
}

@media (max-width: 760px) {
  .cards {
    grid-template-columns: 1fr;
  }
}

.home {
  background: var(--mint);
}

/* Key features */

.features {
  background: var(--cream);
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 1rem 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  position: relative;
  padding: 1rem 1.25rem 1rem 3.25rem;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 4px 14px rgb(31 77 54 / 0.08);
}

/* A small leaf as the bullet. */
.feature-list li::before {
  content: "";
  position: absolute;
  left: 1.2rem;
  top: 1.35rem;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 0 100% 0 100%;
  background: linear-gradient(135deg, var(--leaf), var(--green));
}

/* Screenshots */

.screenshots {
  background: var(--sky-pale);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.gallery a {
  display: block;
  overflow: hidden;
  border-radius: 18px;
  border: 5px solid #fff;
  box-shadow: var(--shadow);
}

.gallery img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 0.3s ease;
}

@media (prefers-reduced-motion: no-preference) {
  .gallery a:hover img {
    transform: scale(1.05);
  }
}

/* Lightbox */

.lightbox {
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  margin: 0;
  padding: 1rem 4.5rem;
  border: 0;
  background: transparent;
  color: var(--cream);
}

.lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox::backdrop {
  background: rgb(16 34 25 / 0.9);
}

.lightbox figure {
  margin: 0;
  text-align: center;
}

.lightbox img {
  max-height: 82vh;
  margin: 0 auto;
  border-radius: 14px;
}

.lightbox figcaption {
  margin-top: 0.75rem;
  font-family: var(--heading);
  font-size: 1.15rem;
}

.lightbox button {
  position: absolute;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 2px solid var(--cream);
  border-radius: 50%;
  background: rgb(31 77 54 / 0.85);
  color: var(--cream);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox button:hover {
  background: var(--green);
}

.lightbox-prev {
  left: 1rem;
  top: 50%;
  translate: 0 -50%;
}

.lightbox-next {
  right: 1rem;
  top: 50%;
  translate: 0 -50%;
}

.lightbox-close {
  top: 1rem;
  right: 1rem;
}

@media (max-width: 760px) {
  .lightbox {
    padding: 4.5rem 0.75rem;
  }

  .lightbox-prev,
  .lightbox-next {
    top: auto;
    bottom: 1rem;
    translate: none;
  }
}

/* Wishlist call to action */

.wishlist {
  background:
    linear-gradient(rgb(255 249 236 / 0.15), rgb(255 249 236 / 0.15)),
    url("assets/img/meadow.webp") center / cover;
}

.wishlist-card {
  width: min(640px, 100%);
  padding: clamp(2rem, 5vw, 3.5rem);
  border-radius: 32px;
  background: rgb(255 249 236 / 0.94);
  box-shadow: var(--shadow);
  text-align: center;
}

.wishlist-card p {
  font-size: 1.15rem;
  margin-bottom: 1.75rem;
}

/* Footer */

.site-footer {
  padding: 2.5rem 1.5rem;
  background: var(--green-dark);
  color: #e8f0e0;
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}

.footer-inner p {
  margin: 0;
}

.legal {
  font-size: 0.8rem;
  color: #b9cdb4;
}

.site-footer .brand {
  color: var(--cream);
}

.site-footer .brand img {
  border-color: var(--cream);
}

@media (max-width: 560px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .roster {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.9rem;
  }
}

/* The smallest phones can't fit the header name beside the wishlist button, or the
   full-size wishlist button inside the closing card, on one line. */
@media (max-width: 400px) {
  .site-header .brand span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .wishlist-card {
    padding-inline: 1.25rem;
  }

  .btn-large {
    padding-inline: 1.2em;
  }
}
