/* Bear & Parrot: Alan Mrvica's apps and games. No external resources. */
:root {
  --bg: #FBF6EC;
  --surface: #FFFFFF;
  --ink: #2B2420;
  --ink-soft: #5E544C;
  --line: #E6DCCB;
  --accent: #1F7A5C;      /* parrot green */
  --accent-2: #D9542B;    /* parrot red */
  --bear: #7A5134;
  --link: #1F6F8B;
  --shadow: 0 1px 2px rgba(43,36,32,.06), 0 6px 20px rgba(43,36,32,.07);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #191613;
    --surface: #24201C;
    --ink: #F1EAE0;
    --ink-soft: #BDB2A6;
    --line: #3A332C;
    --accent: #5CC59B;
    --accent-2: #F08A63;
    --bear: #C99B74;
    --link: #7CC4DE;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
}
a { color: var(--link); text-underline-offset: 2px; }
img { max-width: 100%; }

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

/* Header */
header.site { border-bottom: 1px solid var(--line); background: var(--bg); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 20px; letter-spacing: .2px; }
.brand .mark { font-size: 26px; line-height: 1; }
nav.site { display: flex; gap: 18px; flex-wrap: wrap; }
nav.site a { color: var(--ink); text-decoration: none; font-weight: 600; }
nav.site a:hover, nav.site a[aria-current="page"] { color: var(--accent); }

main { padding: 32px 0 48px; }
section { margin: 0 0 44px; }
h1 { font-size: 38px; line-height: 1.15; margin: 0 0 12px; letter-spacing: -.3px; }
h2 { font-size: 26px; line-height: 1.25; margin: 0 0 14px; letter-spacing: -.2px; }
h3 { font-size: 19px; margin: 24px 0 6px; }
p, ul, ol { margin: 0 0 14px; }
ul, ol { padding-left: 22px; }
li { margin-bottom: 6px; }
.lead { font-size: 19px; color: var(--ink-soft); max-width: 640px; }
.muted { color: var(--ink-soft); }
.small { font-size: 14px; }

/* Hero */
.hero { padding: 16px 0 8px; }
.hero .mark { font-size: 46px; line-height: 1; margin-bottom: 10px; }

/* Featured game */
.feature { display: grid; grid-template-columns: 1fr 220px; gap: 28px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 24px; box-shadow: var(--shadow); }
.feature .title { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.feature .title img { width: 64px; height: 64px; border-radius: 15px; }
.feature .title h3 { margin: 0; font-size: 24px; }
.feature .shot { width: 220px; border-radius: 20px; border: 1px solid var(--line); display: block; }
.links { display: flex; gap: 14px; flex-wrap: wrap; font-weight: 600; }
.badge { display: inline-block; font-size: 13px; font-weight: 700; color: var(--accent); border: 1.5px solid var(--accent); border-radius: 999px; padding: 1px 10px; margin-left: 6px; vertical-align: middle; }

/* App grid */
.apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.app { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.app:hover { border-color: var(--accent); }
.app img { width: 56px; height: 56px; border-radius: 13px; flex: none; }
.app strong { display: block; font-size: 15px; line-height: 1.3; }
.app span { font-size: 13px; color: var(--ink-soft); }

/* About */
.about { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 24px; box-shadow: var(--shadow); }

/* Legal and support pages */
.doc { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 28px; box-shadow: var(--shadow); }
.doc h2 { font-size: 21px; margin: 30px 0 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.doc h2:first-of-type { border-top: 0; padding-top: 0; }
.updated { font-size: 14px; color: var(--ink-soft); margin-top: -6px; }
.summary { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px 4px; margin: 18px 0; }
.summary h3 { margin-top: 4px; }
.toc { columns: 2; column-gap: 28px; }
details { border-bottom: 1px solid var(--line); padding: 10px 0; }
details summary { cursor: pointer; font-weight: 700; }
details[open] summary { margin-bottom: 6px; }
.contact { margin-top: 26px; background: var(--bg); border: 1.5px solid var(--accent); border-radius: 14px; padding: 14px 18px 4px; }

footer.site { border-top: 1px solid var(--line); padding: 20px 0 36px; font-size: 14px; color: var(--ink-soft); }
footer.site .wrap { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
footer.site a { color: var(--ink-soft); }

@media (max-width: 640px) {
  body { font-size: 16px; }
  h1 { font-size: 30px; }
  h2 { font-size: 23px; }
  .feature { grid-template-columns: 1fr; padding: 18px; }
  .feature .shot { width: 100%; max-width: 280px; margin: 0 auto; }
  .doc, .about { padding: 20px 18px; }
  .toc { columns: 1; }
  nav.site { gap: 14px; }
}
