@font-face {
  font-family: "Jersey 10";
  src: url("assets/fonts/Jersey10.ttf") format("truetype");
  font-display: swap;
}

:root {
  --ink: #1e2c3a;
  --ink-soft: #4a5866;
  --sky: #cdd6f0;
  --sky-high: #aebbe2;
  --snow: #f7f9fe;
  --red: #c8232b;
  --red-deep: #8e1419;
  --gold: #ffc23a;
  --gold-ink: #3d2a00;
  --blue: #1da1f2;
  --night: #2b2d5c;
  --night-card: #3a3e7a;
  --pixel: "Jersey 10", ui-monospace, monospace;
  --body: "Atkinson Hyperlegible", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--snow);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

h1, h2, h3 { font-family: var(--pixel); font-weight: 400; margin: 0; line-height: 0.92; letter-spacing: 0.01em; }
h2 { font-size: clamp(2.6rem, 6vw, 4.2rem); }
h3 { font-size: 2rem; }
p { margin: 0; }

/* ---------- top bar ---------- */
.top {
  position: absolute; inset: 0 0 auto 0; z-index: 5;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px var(--gutter);
  max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--pixel); font-size: 2rem; }
.brand img { width: 40px; height: 40px; image-rendering: pixelated; border: 3px solid var(--ink); }
.top-cta { font-family: var(--pixel); font-size: 1.5rem; text-decoration: none; padding: 4px 14px; border: 3px solid var(--ink); background: var(--snow); }
.top-cta:hover { background: var(--gold); }

/* ---------- hero ---------- */
.hero {
  background: linear-gradient(var(--sky-high), var(--sky) 70%);
  padding: 120px var(--gutter) 40px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  max-width: none;
}
.hero > * { max-width: 640px; }
.hero-copy { justify-self: end; }
.hero h1 {
  font-size: clamp(3.6rem, 8.4vw, 7.4rem);
  text-shadow: 4px 4px 0 var(--snow);
}
.lede { margin-top: 24px; font-size: 1.25rem; max-width: 34em; }
.actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.fine { margin-top: 14px; font-size: 0.95rem; color: var(--ink-soft); }

.store-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 18px 8px 14px; min-height: 56px;
  background: var(--ink); color: var(--snow);
  border: 3px solid var(--ink);
  font-family: var(--body); font-weight: 700; font-size: 1.25rem; line-height: 1.05;
}
.store-badge small { display: block; font-weight: 400; font-size: 0.72rem; opacity: 0.85; }

.btn {
  display: inline-flex; align-items: center; min-height: 56px; padding: 0 22px;
  background: var(--gold); color: var(--gold-ink);
  border: 3px solid var(--ink); box-shadow: 0 5px 0 var(--ink);
  font-family: var(--pixel); font-size: 1.7rem; text-decoration: none;
  transition: transform 80ms, box-shadow 80ms;
}
.btn:hover { transform: translateY(2px); box-shadow: 0 3px 0 var(--ink); }
.btn:active { transform: translateY(5px); box-shadow: 0 0 0 var(--ink); }
.btn-big { font-size: 2.1rem; min-height: 66px; padding: 0 30px; }

.window { margin: 0; justify-self: start; width: min(100%, 480px); }
.window-frame { position: relative; }
.window img {
  width: 100%; height: auto; aspect-ratio: 1;
  image-rendering: pixelated;
  border: 14px solid #5b3a24;
  outline: 4px solid var(--ink);
  box-shadow: 0 0 0 4px var(--ink) inset, 12px 12px 0 rgba(30, 44, 58, 0.25);
}
.window figcaption { margin-top: 18px; font-size: 0.95rem; color: var(--ink-soft); max-width: 60%; }

/* The catch card, stuck on the corner of the window like in the app. */
.sticker {
  position: absolute; right: -22px; bottom: -26px;
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 14px 12px;
  background: #fff; color: var(--ink);
  border: 4px solid var(--ink);
  box-shadow: 0 0 0 4px var(--gold), 0 10px 0 4px var(--ink);
  transform: rotate(4deg);
  font-family: var(--pixel); line-height: 1;
  animation: pop 700ms cubic-bezier(.2, 1.6, .4, 1) 500ms both;
}
.sticker-tag { font-size: 1.05rem; color: var(--red); letter-spacing: 0.04em; }
.sticker-name { font-size: 1.7rem; }
.sticker-meta { font-size: 1rem; color: var(--ink-soft); }
@keyframes pop {
  from { transform: rotate(-10deg) scale(0.2); opacity: 0; }
  to { transform: rotate(4deg) scale(1); opacity: 1; }
}

/* ---------- the wire ---------- */
.perch {
  background: var(--sky);
  padding: 32px var(--gutter) 72px;
  overflow: hidden;
}
.perch-head {
  max-width: var(--max); margin: 0 auto;
  display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px 24px;
}
.perch h2 { font-size: clamp(2rem, 4vw, 2.8rem); }
.tally { font-family: var(--pixel); font-size: 1.8rem; }
.tally #count { color: var(--red); }

.wire {
  list-style: none; margin: 28px auto 0; padding: 0 0 0;
  max-width: var(--max);
  display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 4px;
  position: relative;
}
/* the wire itself runs under every bird's feet */
.wire::before {
  content: ""; position: absolute; left: -50vw; right: -50vw; top: 104px;
  height: 4px; background: var(--ink);
}
.bird {
  position: relative; width: 100%;
  background: none; border: 0; padding: 0; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 22px;
  font: inherit; color: inherit;
}
.bird canvas {
  display: block; width: 112px; height: 112px; max-width: 100%;
}
.bird span {
  font-family: var(--pixel); font-size: 1.15rem; line-height: 1; text-align: center;
  visibility: hidden;
}
.bird:hover canvas { opacity: 0.8; }
.bird[aria-pressed="true"]:hover canvas { opacity: 1; }
.bird[aria-pressed="true"] span { visibility: visible; }
.bird[aria-pressed="true"]::after {
  content: "Spotted"; position: absolute; top: 0; right: 4%;
  font-family: var(--pixel); font-size: 0.95rem; line-height: 1;
  padding: 2px 6px; background: var(--gold); color: var(--gold-ink); border: 2px solid var(--ink);
  transform: rotate(8deg);
}
.bird.rare[aria-pressed="true"]::after { content: "Rare!"; background: var(--red); color: var(--snow); }
@keyframes hop {
  0% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
  100% { transform: translateY(0); }
}
.perch-done {
  max-width: var(--max); margin: 28px auto 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px;
}
.perch-done p { font-family: var(--pixel); font-size: 2.2rem; color: var(--red-deep); }

/* ---------- questions ---------- */
.faq { max-width: 46rem; margin: 0 auto; padding: 0 var(--gutter) 96px; }
.faq h2 { margin-bottom: 24px; }
.faq details { border: 3px solid var(--ink); background: #fff; margin-top: 12px; }
.faq summary {
  cursor: pointer; list-style: none;
  padding: 14px 18px; font-family: var(--pixel); font-size: 1.7rem; line-height: 1;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 2rem; }
.faq details[open] summary { background: var(--sky); }
.faq details[open] summary::after { content: "-"; }
.faq details p { padding: 4px 18px 16px; color: var(--ink-soft); max-width: 38em; }

/* ---------- how it works ---------- */
.how { padding: 96px var(--gutter); max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; }
.steps {
  list-style: none; padding: 0; margin: 48px 0 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px);
  counter-reset: step;
}
.steps li { counter-increment: step; display: flex; flex-direction: column; gap: 12px; }
.steps img { border: 3px solid var(--ink); border-radius: 14px; margin-bottom: 8px; }
.steps h3::before {
  content: counter(step); display: inline-grid; place-items: center;
  width: 1.15em; height: 1.15em; margin-right: 10px;
  background: var(--ink); color: var(--snow); font-size: 0.8em; vertical-align: 0.08em;
}
.steps p { color: var(--ink-soft); max-width: 32em; }

/* ---------- stories ---------- */
.notes { background: var(--night); color: var(--snow); padding: 96px var(--gutter); }
.notes-copy, .cards { max-width: var(--max); margin: 0 auto; }
.notes-copy p { margin-top: 14px; color: #c9ccf0; font-size: 1.2rem; }
.cards { margin-top: 44px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card {
  background: var(--night-card); border: 3px solid #c9ccf0;
  padding: 20px 22px 26px; display: flex; flex-direction: column; gap: 8px;
}
.card canvas { display: block; width: 120px; height: 120px; margin: -8px 0 4px -6px; }
.card h3 { color: #ffd45c; }
.card p { color: #e4e6fb; }

/* ---------- friends ---------- */
.friends {
  max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto;
  padding: 96px var(--gutter);
  display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 88px); align-items: center;
}
.friends img {
  border: 3px solid var(--ink); border-radius: 14px; max-width: 360px;
  /* the store image is very tall: show its top, where the headline and friends list are */
  width: 100%; max-height: 620px; object-fit: cover; object-position: top;
}
.friends p { margin-top: 18px; font-size: 1.25rem; color: var(--ink-soft); max-width: 30em; }

/* ---------- last call ---------- */
.last {
  background: var(--red); color: var(--snow);
  padding: 96px var(--gutter);
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
}
.last h2 { font-size: clamp(2.8rem, 7vw, 5.2rem); text-shadow: 4px 4px 0 var(--red-deep); max-width: 14ch; }
.last p { font-size: 1.25rem; margin-bottom: 14px; }

/* ---------- footer ---------- */
.foot { background: var(--ink); color: #c7d0d9; padding: 40px var(--gutter); display: grid; gap: 14px; justify-items: center; text-align: center; font-size: 0.98rem; }
.foot a { color: var(--snow); }
.foot nav { display: flex; gap: 24px; }
.credit { max-width: 46em; }
.copy { color: #8d99a5; }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 100px; }
  .hero-copy, .window { justify-self: start; }
  .window { width: min(100% - 24px, 360px); }
  .sticker { right: -12px; }
  .window figcaption { margin-top: 44px; max-width: none; }
  .sticker-name { font-size: 1.4rem; }
  .wire { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 28px; }
  .wire::before { display: none; }
  .bird canvas { border-bottom: 4px solid var(--ink); width: 88px; height: 88px; }
  .bird { gap: 10px; padding-bottom: 8px; }
  .steps, .cards { grid-template-columns: 1fr; }
  .steps img { max-width: 320px; }
  .friends { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .top-cta { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sticker { animation: none; }
  .btn { transition: none; }
}

/* ---------- legal pages (/privacy, /terms) ---------- */
.doc { max-width: 42em; margin: 0 auto; padding: 110px var(--gutter) 80px; }
.doc h1 { font-size: clamp(3rem, 7vw, 4.6rem); }
.doc h2 { font-size: 2.2rem; margin-top: 44px; }
.doc p, .doc li { margin-top: 12px; }
.doc ul { padding-left: 1.2em; }
.doc .updated { color: var(--ink-soft); margin-top: 10px; }

/* ---------- waitlist (LaunchList embed) ---------- */
.waitlist {
  margin-top: 22px; max-width: 30rem;
  --ll-accent: #1e2c3a;
  --ll-focus: #1da1f2;
  --ll-input-radius: 0;
  --ll-card-radius: 0;
  --ll-card-bg: transparent;
  --ll-input-border-color: #1e2c3a;
}
.waitlist-offer { font-size: 1.05rem; font-weight: 700; margin-bottom: 10px; }
.waitlist-on-red {
  width: min(100%, 30rem); margin-top: 0; text-align: left;
  background: #fff; color: var(--ink); padding: 18px 20px;
  border: 4px solid var(--ink); box-shadow: 0 6px 0 var(--red-deep);
}

/* the flex rule above would otherwise show it before the flock is full */
.perch-done[hidden] { display: none; }
