/* Birdtopia's site. The colors are the game's: its green, a cream like paper, the sky and the lawn. */

:root {
  color-scheme: light dark;
  --green: #2e8f4a;
  --green-deep: #1f6a35;
  --ink: #1e2b22;
  --muted: #56655b;
  --paper: #fbf7ee;
  --card: #ffffff;
  --line: #e7e0cf;
  --leaf: #e8f3e4;
  --sky: #d8ecf8;
  --shadow: 0 1px 2px rgb(30 43 34 / 0.06), 0 8px 24px rgb(30 43 34 / 0.08);
  --round: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --green: #5cc27a;
    --green-deep: #8fdca5;
    --ink: #eef3ec;
    --muted: #a7b6aa;
    --paper: #101a14;
    --card: #17241c;
    --line: #26372b;
    --leaf: #1a2c20;
    --sky: #142230;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.3);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 var(--body);
}

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

a { color: var(--green); text-underline-offset: 0.15em; }
a:hover { color: var(--green-deep); }

h1, h2, h3 {
  font-family: var(--round);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.2rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }

/* The bar along the top of every page. */
.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.bar .wrap { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none;
  font: 800 1.2rem var(--round);
}
.brand img { width: 34px; height: 34px; border-radius: 9px; box-shadow: var(--shadow); }
.bar nav { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.bar nav a {
  color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.95rem;
  padding: 6px 10px; border-radius: 999px;
}
.bar nav a:hover, .bar nav a[aria-current="page"] { color: var(--ink); background: var(--leaf); }

/* The opening: the yard from the game's intro, with the name over it. */
.hero {
  position: relative;
  min-height: min(78vh, 760px);
  display: grid;
  place-items: end center;
  overflow: hidden;
  color: #fff;
  background: #3b5d33 url("images/hero.jpg") center / cover no-repeat;
}
.hero video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgb(0 0 0 / 0) 35%, rgb(0 0 0 / 0.55) 100%);
}
.hero .words {
  position: relative; z-index: 1;
  text-align: center;
  padding: 0 16px clamp(40px, 8vh, 80px);
}
.name {
  display: inline-flex; align-items: flex-end;
  font: 900 clamp(3.4rem, 11vw, 7.5rem)/1 var(--round);
  letter-spacing: -0.02em;
  text-shadow: 0 4px 18px rgb(0 0 0 / 0.35);
  margin: 0 0 0.25em;
}
/* The feeder from the app icon stands in for the i, its cap the dot, as it does in the game. */
.name img {
  height: 0.84em; width: auto;
  margin: 0 0.02em 0.02em;
  filter: drop-shadow(0 4px 10px rgb(0 0 0 / 0.35));
}
.tagline {
  font: 700 clamp(1.15rem, 2.6vw, 1.6rem)/1.3 var(--round);
  margin: 0 auto 1.2em;
  max-width: 34em;
  text-shadow: 0 2px 10px rgb(0 0 0 / 0.4);
}

.buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.button {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  font: 700 1rem var(--round); text-decoration: none;
  background: var(--green); color: #fff;
  box-shadow: var(--shadow);
}
.button:hover { color: #fff; filter: brightness(1.08); }
.button.light { background: rgb(255 255 255 / 0.92); color: #1e2b22; }
.button.light:hover { color: #1e2b22; }
.soon {
  display: inline-block;
  font-weight: 700; font-size: 0.95rem;
  padding: 6px 14px; border-radius: 999px;
  background: rgb(255 255 255 / 0.18);
  border: 1px solid rgb(255 255 255 / 0.4);
  margin-bottom: 1.2em;
}

section { padding: clamp(48px, 9vw, 96px) 0; }
section.tint { background: var(--leaf); }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 42em; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

/* What the game is, a card at a time. */
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 32px;
}
/* Four across, two by two, or one above another: never three and one left over. */
@media (max-width: 1000px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr; } }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.card .art { height: 110px; display: flex; align-items: flex-end; justify-content: center; gap: 6px; margin-bottom: 12px; }
/* The pictures share the card's width and shrink to fit it, however narrow the card is. */
.card .art img { flex: 0 1 auto; min-width: 0; max-width: 100%; max-height: 110px; height: auto; object-fit: contain; object-position: bottom; }
.card p { color: var(--muted); margin: 0; }

/* Screenshots from the game, side by side and scrolled through. */
.shots {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(78%, 720px);
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 8px 16px 20px;
  margin-top: 28px;
}
.shots figure { margin: 0; scroll-snap-align: center; }
.shots img { border-radius: 18px; box-shadow: var(--shadow); display: block; }
.shots figcaption { color: var(--muted); font-size: 0.95rem; margin-top: 8px; text-align: center; }

/* A row of the birds that come. */
.flock {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end;
  gap: 10px 22px; margin-top: 28px;
}
.flock img { height: 92px; width: auto; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 28px; }
.fact { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.fact strong { display: block; font: 800 1.1rem var(--round); margin-bottom: 4px; }
.fact span { color: var(--muted); }

/* The guide, the privacy policy and support: pages to read. */
.page { padding: 48px 0 80px; }
.page h2 { margin-top: 1.8em; }
.page h3 { margin-top: 1.4em; }
.page ul { padding-left: 1.2em; }
.page li { margin-bottom: 0.4em; }
.updated { color: var(--muted); font-size: 0.95rem; }
.contents {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 16px 22px; margin: 24px 0 8px;
}
.contents ol { margin: 0; padding-left: 1.2em; columns: 2 220px; }
.figure-row { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: flex-end; margin: 12px 0 18px; }
.figure-row img { height: 84px; width: auto; }
.note {
  background: var(--leaf); border-radius: 16px; padding: 14px 18px; margin: 16px 0;
}
table { border-collapse: collapse; width: 100%; margin: 12px 0 20px; font-size: 0.97rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--round); }
details { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 18px; margin: 10px 0; }
summary { font: 700 1.05rem var(--round); cursor: pointer; }
details p { margin: 10px 0 0; color: var(--muted); }

footer {
  border-top: 1px solid var(--line);
  padding: 32px 0 48px;
  color: var(--muted);
  font-size: 0.95rem;
}
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; }
footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
footer .credit { flex-basis: 100%; font-size: 0.88rem; }

@media (prefers-reduced-motion: reduce) {
  .hero video { display: none; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .bar .wrap { height: auto; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
  .bar nav { margin-left: 0; width: 100%; justify-content: flex-start; }
  .contents ol { columns: 1; }
}
