/* playperch.app: the sticker-album look from the app (Perch/Theme/Theme.swift), with the app's
   night colors after dark. No web fonts: Apple devices get SF Rounded, others their own UI font. */

:root {
  --page: #FBF8F3;
  --card: #FFFFFF;
  --ink: #3A344A;
  --ink-soft: #6B6579;
  --line: #ECE6DC;
  --link: #B23A66;
  --link-hover: #8E2A50;
  --blush: #FFE6EE;
  --button: #3A344A;
  --on-button: #FFFFFF;
  --daily: #FFF4D6;
  --daily-ink: #8A5E00;
  --nest: #EAF5E1;
  --nest-ink: #3F7A3F;
  --drum: #EFE2D2;
  --drum-ink: #8A552B;
  --shadow: 0 14px 34px rgba(58, 52, 74, 0.09);
  --sticker-shadow: drop-shadow(0 8px 12px rgba(58, 52, 74, 0.18));
  --silhouette: brightness(0) opacity(0.12);

  --font: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", sans-serif;
  --width: 1120px;
  --gutter: clamp(16px, 4vw, 24px);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #20244A;
    --card: #2C3160;
    --ink: #F4F1FA;
    --ink-soft: #BDBCD6;
    --line: #434877;
    --link: #FF9DBC;
    --link-hover: #FFC2D6;
    --blush: #4A3760;
    --button: #F4F1FA;
    --on-button: #20244A;
    --daily: #3D3858;
    --daily-ink: #FFD36B;
    --nest: #2D4440;
    --nest-ink: #A8DDB5;
    --drum: #3A3048;
    --drum-ink: #F0B98A;
    --shadow: 0 14px 34px rgba(0, 0, 0, 0.3);
    --sticker-shadow: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.35));
    --silhouette: brightness(0) invert(1) opacity(0.14);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 600;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--link); }
a:hover { color: var(--link-hover); }
img { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; font-weight: 900; line-height: 1.08; letter-spacing: -0.02em; }
p { margin: 0; }

.wrap { max-width: var(--width); margin: 0 auto; padding: 0 var(--gutter); }
.soft { color: var(--ink-soft); }

.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--card); padding: 10px 16px; border-radius: 12px; z-index: 10;
}
.skip:focus { left: 8px; }

/* Header and footer */

.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 4px 24px; padding-top: 16px; padding-bottom: 16px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none;
  font-size: 26px; font-weight: 900; letter-spacing: -0.02em;
}
.brand:hover { color: var(--ink); }
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.nav { display: flex; flex-wrap: wrap; gap: 0 22px; font-size: 15px; font-weight: 800; }
.nav a { color: var(--ink); text-decoration: none; padding: 12px 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--link); }

.site-footer { border-top: 2px solid var(--line); margin-top: 24px; }
.site-footer .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 16px 32px; padding-top: 32px; padding-bottom: 44px;
}
.site-footer .brand { font-size: 20px; }
.site-footer .brand img { width: 36px; height: 36px; border-radius: 9px; }
.site-footer .nav { gap: 0 24px; }
.site-footer .nav a { color: var(--link); }
.site-footer small { display: block; width: 100%; font-size: 14px; color: var(--ink-soft); }

/* Shared pieces */

.eyebrow {
  display: inline-block; border-radius: 999px; padding: 7px 14px;
  background: var(--blush); color: var(--link);
  font-size: 13px; font-weight: 900; letter-spacing: 0.05em; text-transform: uppercase;
}
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border-radius: 999px;
  font-size: 17px; font-weight: 900; text-decoration: none;
}
.pill-solid { background: var(--button); color: var(--on-button); }
.section-title { font-size: clamp(30px, 3.6vw, 42px); text-align: center; }
.lede { font-size: 18px; color: var(--ink-soft); max-width: 36em; }

.rarity { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 0; margin: 0; list-style: none; }
.rarity li { border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 900; }
.rarity .common { background: #7BC47F; color: #233A24; }
.rarity .uncommon { background: #6EA8FE; color: #1C2C4A; }
.rarity .rare { background: #FFAA33; color: #4A2E05; }
.rarity .legendary { background: #FF6FD8; color: #4A1340; }

/* Home: hero. Short words beside the board; on a phone they stack, centered, so the board
   and its stickers show on the first screen. */

.hero {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 56px;
  padding-top: clamp(8px, 3vw, 40px); padding-bottom: clamp(56px, 9vw, 96px);
}
.hero-text { flex: 1 1 380px; min-width: 0; container-type: inline-size; }
/* Each half of the headline keeps to one line. In SF Rounded, "solve a puzzle." is about 6.7
   times the font size wide, so the size follows the column's width to always fit it. */
.hero h1 { font-size: clamp(40px, 6.2vw, 72px); font-size: min(78px, 14.4cqi); line-height: 0.98; letter-spacing: -0.03em; }
.hero h1 span { display: block; white-space: nowrap; }
.hero .lede { margin: 16px 0 28px; font-size: clamp(18px, 2.2vw, 21px); }
.promises { margin-top: 18px; font-size: 15px; font-weight: 800; color: var(--ink-soft); }
@media (max-width: 760px) {
  .hero-text { text-align: center; }
  .hero .lede { margin-left: auto; margin-right: auto; }
}

.album { flex: 1 1 340px; min-width: 0; display: flex; justify-content: center; }
.album-page { position: relative; width: min(100%, 440px); padding: 34px 26px; }
.album-card {
  background: var(--card); border-radius: 30px; padding: 12px;
  box-shadow: 0 18px 40px rgba(58, 52, 74, 0.12); transform: rotate(-2deg);
}
.tape {
  position: absolute; top: 20px; left: 40%; width: 92px; height: 26px; border-radius: 3px;
  background: rgba(255, 228, 160, 0.75); transform: rotate(-6deg);
}
.stuck { position: absolute; filter: var(--sticker-shadow); }
.stuck-1 { top: -6px; left: -14px; width: clamp(84px, 24%, 118px); transform: rotate(-12deg); }
.stuck-2 { bottom: -10px; right: -16px; width: clamp(96px, 30%, 138px); transform: rotate(9deg); }
.stuck-3 { top: 4px; right: -4px; width: clamp(68px, 19%, 90px); transform: rotate(11deg); }

/* A solved board: patch colors from the app, which stay pastel at night like the app's. */
.board {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px;
  padding: 8px; border-radius: 20px; background: #FFFFFF;
}
.board span { aspect-ratio: 1; border-radius: 7px; display: flex; align-items: center; justify-content: center; }
.board img { width: 94%; height: 94%; object-fit: contain; }
.board-small { width: 200px; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 6px; border-radius: 16px; transform: rotate(2deg); box-shadow: var(--shadow); }
.board-small span { border-radius: 6px; }
.pk { background: #FFCDD6; }
.yl { background: #FFE4A0; }
.mt { background: #B2E4DC; }
.pc { background: #FFCEA8; }
.lc { background: #D6C8F5; }
.bl { background: #BEDEF7; }

/* Home: the three games, each with its own art from the app */

.band { background: var(--card); padding: clamp(64px, 9vw, 88px) 0; }
.band .section-title { margin-bottom: 36px; }
.games { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.game { border-radius: 28px; padding: 18px 20px 26px; text-align: center; box-shadow: var(--shadow); }
.game:nth-child(1) { background: var(--daily); }
.game:nth-child(2) { background: var(--nest); }
.game:nth-child(3) { background: var(--drum); }
.game h3 { margin-bottom: 4px; font-size: 22px; }
.game:nth-child(1) h3 { color: var(--daily-ink); }
.game:nth-child(2) h3 { color: var(--nest-ink); }
.game:nth-child(3) h3 { color: var(--drum-ink); }
.game p { font-size: 16px; color: var(--ink-soft); }
.game-art { position: relative; height: 236px; margin-bottom: 10px; display: flex; align-items: center; justify-content: center; }

.nest { width: 230px; filter: var(--sticker-shadow); }
.material { position: absolute; width: 58px; filter: var(--sticker-shadow); }
.material-1 { top: 14px; left: 12%; transform: rotate(-14deg); }
.material-2 { top: 6px; right: 14%; transform: rotate(10deg); }
.material-3 { bottom: 18px; left: 8%; transform: rotate(8deg); }
.material-4 { bottom: 12px; right: 10%; width: 50px; transform: rotate(-6deg); }
.tree { width: 200px; transform: rotate(-2deg); filter: var(--sticker-shadow); }

/* Home: the birds */

.birds { padding-top: clamp(72px, 10vw, 104px); padding-bottom: clamp(64px, 9vw, 96px); }
.birds .rarity { margin: 18px 0 32px; }
.wall {
  max-width: 920px; margin: 0 auto; padding: clamp(14px, 3vw, 28px); list-style: none;
  background: var(--card); border-radius: 32px; box-shadow: var(--shadow);
  display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(84px, 22vw, 140px), 1fr)); gap: 4px;
}
.wall img { width: 100%; aspect-ratio: 1; object-fit: contain; filter: var(--sticker-shadow); }
.wall li:nth-child(3n + 1) img { transform: rotate(-5deg); }
.wall li:nth-child(3n + 2) img { transform: rotate(4deg); }
.wall .missing img { filter: var(--silhouette); }

/* Home: promises */

.kind { padding-bottom: clamp(64px, 9vw, 96px); }
.points {
  margin: 0; padding: clamp(24px, 4vw, 36px); list-style: none;
  background: var(--blush); border-radius: 32px;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 16px 48px;
}
.points li { display: flex; align-items: center; gap: 12px; font-size: clamp(19px, 2.4vw, 24px); font-weight: 900; }
.points svg { flex: none; width: 30px; height: 30px; stroke: var(--link); }
/* A gap in the lines under a slash, so the slash reads as crossing them out. */
.points svg .halo { stroke: var(--blush); stroke-width: 4.4; }

/* Privacy, support and other text pages */

.doc { max-width: 760px; padding-top: clamp(16px, 4vw, 32px); padding-bottom: 72px; }
.doc h1 { font-size: clamp(38px, 6vw, 54px); letter-spacing: -0.025em; }
.doc .updated { margin: 8px 0 32px; font-size: 15px; font-weight: 700; color: var(--ink-soft); }
.doc .intro { font-size: 19px; margin-bottom: 32px; }
.doc h1 + .intro { margin-top: 14px; }
.doc h2 { margin: 44px 0 10px; font-size: 24px; }
.doc p, .doc li { font-size: 17px; line-height: 1.6; color: var(--ink-soft); }
.doc p + p { margin-top: 12px; }
.doc ul { margin: 12px 0 0; padding-left: 22px; }
.doc li + li { margin-top: 6px; }
.doc strong { color: var(--ink); font-weight: 800; }
.summary { background: var(--card); border-radius: 26px; padding: 26px; box-shadow: var(--shadow); }
.summary h2 { margin: 0 0 16px; font-size: 20px; }
.summary ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.summary li { display: flex; gap: 12px; font-size: 17px; font-weight: 700; color: var(--ink); line-height: 1.45; }
.summary li::before { content: ""; flex: none; width: 10px; height: 10px; margin-top: 8px; border-radius: 50%; background: var(--dot); }
.summary li:nth-child(1) { --dot: #FF8FB1; }
.summary li:nth-child(2) { --dot: #FFAA33; }
.summary li:nth-child(3) { --dot: #6EA8FE; }
.summary li:nth-child(4) { --dot: #7BC47F; }

.lost { text-align: center; padding-top: 48px; padding-bottom: 96px; }
.lost img { width: 180px; margin: 0 auto 20px; filter: var(--sticker-shadow); transform: rotate(-6deg); }
.lost h1 { font-size: clamp(34px, 5vw, 48px); margin-bottom: 10px; }
.lost p { margin-bottom: 28px; color: var(--ink-soft); font-size: 18px; }

@media (prefers-reduced-motion: no-preference) {
  .pill, .nav a { transition: color 0.15s ease; }
}
