@font-face { font-family: "Nunito"; src: url("fonts/Nunito-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("fonts/Nunito-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("fonts/Nunito-Black.ttf") format("truetype"); font-weight: 900; font-display: swap; }

:root {
  --sky: #DDEEFF;
  --sky-deep: #BFE0FF;
  --leaf: #1F6B42;
  --meadow: #86C266;
  --soil: #3B2A1E;
  --bark: #7A4E2D;
  --sun: #FFD54F;
  --paper: #FBFDFF;
  --measure: 66ch;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--soil);
  background: var(--paper);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--leaf); text-underline-offset: 0.18em; }
a:hover { color: var(--soil); }
:focus-visible { outline: 3px solid var(--leaf); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1080px, 100% - 2.5rem); margin-inline: auto; }

/* Top bar: sits over the sky of each hero. */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 0; }
.brand { font-weight: 900; font-size: 1.15rem; color: var(--soil); text-decoration: none; letter-spacing: -0.01em; }
.brand small { display: block; font-weight: 700; font-size: 0.8rem; color: var(--bark); letter-spacing: 0; }
.bar nav a { font-weight: 700; text-decoration: none; margin-left: 1.2rem; color: var(--soil); }
.bar nav a:hover { color: var(--leaf); }

/* Home hero: the APCB Apps banner (art/apps_banner.py), then the intro text. */
.hero { background: var(--sky-deep); }
.intro h1 {
  font-weight: 900;
  font-size: clamp(2.3rem, 6vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 1.5rem 0 0.6rem;
  max-width: 14ch;
  color: var(--leaf);
}
.intro { padding-top: 2.5rem; }
.intro p.lede { font-size: 1.2rem; max-width: 46ch; margin: 0; }
.hero-art { width: 100%; aspect-ratio: 2400 / 900; object-fit: cover; }

/* The shelf: each app sits on a wooden plank. */
.shelf { padding: 2.5rem 0 1rem; }
.shelf h2, .section h2 { font-weight: 900; font-size: 1.8rem; letter-spacing: -0.02em; margin: 0 0 1.4rem; }
.app {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.4rem;
  padding: 0 0.5rem 1.4rem;
  border-bottom: 14px solid var(--bark);
  border-radius: 0 0 4px 4px;
  box-shadow: 0 10px 0 -4px #5C3A20;
}
.app img.icon { width: 112px; height: 112px; border-radius: 26px; box-shadow: 0 6px 14px rgba(59, 42, 30, 0.22); }
.app h3 { font-weight: 900; font-size: 1.6rem; margin: 0; line-height: 1.15; }
.app h3 a { color: inherit; text-decoration: none; }
.app h3 a:hover { color: var(--leaf); }
.app p { margin: 0.25rem 0 0; max-width: 48ch; }
.shelf-note { color: var(--bark); margin: 2.2rem 0 0; }

/* Store buttons */
.stores { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.store {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.65rem 1.1rem;
  border-radius: 14px;
  background: var(--soil); color: #fff;
  font-weight: 700; text-decoration: none; line-height: 1.15;
}
.store small { display: block; font-weight: 400; font-size: 0.75rem; opacity: 0.85; }
.store:hover { background: var(--leaf); color: #fff; }
.store[aria-disabled="true"] { background: transparent; color: var(--bark); box-shadow: inset 0 0 0 2px #D8C3AE; pointer-events: none; }
.store svg { width: 22px; height: 22px; flex: none; }

/* Game page */
.game-hero { background: linear-gradient(var(--sky-deep), var(--sky) 60%, var(--paper)); padding-bottom: 2.5rem; }
.game-head { display: flex; gap: 1.6rem; align-items: center; margin-top: 1.5rem; }
.game-head img { width: 132px; height: 132px; border-radius: 30px; box-shadow: 0 8px 20px rgba(59, 42, 30, 0.25); }
.game-head h1 { font-weight: 900; font-size: clamp(2.4rem, 6vw, 3.8rem); line-height: 1; letter-spacing: -0.03em; margin: 0; color: var(--leaf); }
.game-head p { margin: 0.35rem 0 0; font-size: 1.15rem; }
.game-hero .stores { margin-top: 1.8rem; }

.shots {
  display: flex; gap: 1rem;
  overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 0.5rem 1.25rem 1.5rem;
  margin: 0;
  list-style: none;
}
.shots li { flex: none; scroll-snap-align: center; }
.shots img { width: 230px; aspect-ratio: 9 / 16; border-radius: 20px; box-shadow: 0 8px 18px rgba(59, 42, 30, 0.18); }
.shots li:first-child { margin-left: auto; } .shots li:last-child { margin-right: auto; }
@media (min-width: 1100px) { .shots img { width: 200px; } }

.section { padding: 3rem 0; }
.section.soft { background: #F2F8EC; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 2rem; }
.cols h3 { font-weight: 900; font-size: 1.2rem; margin: 0 0 0.3rem; color: var(--leaf); }
.cols p { margin: 0; }

/* Text pages (privacy, support) */
.doc { max-width: var(--measure); padding: 1rem 0 4rem; }
.doc h1 { font-weight: 900; font-size: clamp(2rem, 5vw, 2.8rem); letter-spacing: -0.02em; line-height: 1.1; color: var(--leaf); margin: 1.5rem 0 0.4rem; }
.doc h2 { font-weight: 900; font-size: 1.3rem; margin: 2.2rem 0 0.4rem; }
.doc .updated { color: var(--bark); margin-top: 0; }
details { border-bottom: 2px solid #E4EEF7; padding: 0.9rem 0; }
details summary { font-weight: 700; cursor: pointer; font-size: 1.1rem; }
details p { margin: 0.6rem 0 0; }
.contact-card { margin-top: 2.5rem; padding: 1.4rem 1.6rem; background: #FFF6D6; border-radius: 18px; }
.contact-card h2 { margin-top: 0; }

footer { background: var(--soil); color: #EADBC9; padding: 2.2rem 0; font-size: 0.95rem; }
footer a { color: #fff; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
footer p { margin: 0; }

@media (max-width: 640px) {
  .app { grid-template-columns: auto 1fr; align-items: start; }
  .app .stores { grid-column: 1 / -1; }
  .app img.icon { width: 84px; height: 84px; border-radius: 20px; }
  .game-head img { width: 96px; height: 96px; border-radius: 22px; }
  .bar nav a { margin-left: 0.9rem; }
  .brand small { display: none; }
}
