/* 321 CEO — one stylesheet for the whole site.
 *
 * The audience includes people with Down syndrome, so accessibility is the
 * brief, not a finishing pass. Concretely that means: body text starts at
 * 20px and never drops below 18px, line length is capped near 65 characters,
 * every text/background pair clears WCAG AA and most clear AAA, focus rings
 * are visible and thick, targets are at least 44px, and nothing moves unless
 * the visitor scrolled it into view themselves.
 *
 * Colours are lifted from the Animal Escape board so the site and the app
 * look like the same thing.
 */

:root {
  --ink: #12251b;
  --ink-soft: #3d5347;
  --paper: #fbf8f0;
  --paper-2: #f2ece0;
  --forest: #2c5138;
  --forest-deep: #14281f;
  --moss: #4e7a4a;
  --amber: #b96b0a;
  --line: #ddd5c4;

  --measure: 34rem;
  --step: clamp(1rem, 0.6rem + 1.6vw, 1.75rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f0ece1;
    --ink-soft: #bcc7bd;
    --paper: #101b14;
    --paper-2: #17271d;
    --forest: #9fd2a8;
    --forest-deep: #d6ead9;
    --moss: #8dbb87;
    --amber: #f0b35c;
    --line: #2b3f32;
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.25rem/1.65 ui-rounded, "SF Pro Rounded", -apple-system,
        BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  /* Long words never force a horizontal scrollbar on a small phone. */
  overflow-wrap: break-word;
}

/* Keyboard users must be able to jump the nav. Visible the moment it's focused. */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--forest-deep);
  color: var(--paper);
  padding: 0.85rem 1.25rem;
  z-index: 10;
  border-radius: 0 0 0.5rem 0;
}
.skip:focus { left: 0; }

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

.wrap {
  width: 100%;
  max-width: 46rem;
  margin-inline: auto;
  padding-inline: var(--step);
}

/* ---- header ---- */

.site-head {
  border-bottom: 2px solid var(--line);
  background: var(--paper-2);
}
.site-head .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.1rem;
}
.brand {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.brand span { color: var(--moss); }
.site-head nav { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.site-head nav a { font-size: 1.05rem; }

/* ---- type ---- */

h1 {
  font-size: clamp(2.1rem, 1.5rem + 3vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  color: var(--forest-deep);
}
h2 {
  font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 2.75rem 0 0.75rem;
  color: var(--forest-deep);
}
h3 { font-size: 1.25rem; margin: 2rem 0 0.5rem; }

p, li { max-width: var(--measure); }
p { margin: 0 0 1.15rem; }
ul { padding-left: 1.3rem; }
li { margin-bottom: 0.6rem; }

.lede {
  font-size: clamp(1.35rem, 1.15rem + 0.9vw, 1.6rem);
  line-height: 1.5;
  color: var(--ink-soft);
}

a { color: var(--forest); text-underline-offset: 0.2em; text-decoration-thickness: 2px; }
a:hover { color: var(--amber); }

main { padding-block: 3rem 4rem; }

/* ---- pieces ---- */

.hero { padding-block: 1rem 0.5rem; }

.card {
  background: var(--paper-2);
  border: 2px solid var(--line);
  border-radius: 1.25rem;
  padding: clamp(1.25rem, 1rem + 1.5vw, 2rem);
  margin: 2rem 0;
}

.app-head {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
}
.app-head img {
  width: 104px;
  height: 104px;
  border-radius: 23%;
  border: 2px solid var(--line);
}
.app-head h2 { margin: 0 0 0.25rem; }
.app-head p { margin: 0; color: var(--ink-soft); }

/* 44px minimum target, and it stays a button at any text size. */
.btn {
  display: inline-block;
  background: var(--forest-deep);
  color: var(--paper);
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1.1rem;
  text-decoration: none;
  min-height: 44px;
  border: 2px solid transparent;
}
.btn:hover { background: var(--forest); color: var(--paper); }
@media (prefers-color-scheme: dark) {
  .btn { color: var(--paper); background: var(--forest); }
  .btn:hover { background: var(--moss); }
}

.shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
  padding: 0;
  list-style: none;
}
.shots img {
  width: 100%;
  height: auto;
  border-radius: 1rem;
  border: 2px solid var(--line);
  display: block;
}
.shots figcaption {
  font-size: 1rem;
  color: var(--ink-soft);
  margin-top: 0.6rem;
  max-width: none;
}
.shots figure { margin: 0; }

.note {
  border-left: 5px solid var(--moss);
  padding-left: 1.15rem;
  margin: 2rem 0;
}

dl { margin: 1.5rem 0; }
dt { font-weight: 700; margin-top: 1.5rem; }
dd { margin: 0.4rem 0 0; max-width: var(--measure); }

.updated { color: var(--ink-soft); font-size: 1.05rem; }

/* ---- footer ---- */

.site-foot {
  border-top: 2px solid var(--line);
  background: var(--paper-2);
  padding-block: 2.5rem;
  margin-top: 2rem;
}
.site-foot p { font-size: 1.05rem; color: var(--ink-soft); margin-bottom: 0.6rem; }
.site-foot nav { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1.25rem; }

/* Respect the system setting. There is very little motion here to begin with. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Windows high-contrast mode strips background colours; keep the borders. */
@media (forced-colors: active) {
  .card, .btn, .shots img { border: 2px solid CanvasText; }
}
