/* Crafted Echo — one stylesheet for the whole site.
   No build step, no dependencies. Every colour is a custom property, so a
   retheme is a change to :root and nothing else. */

:root {
  /* Dark is the design target; the light block below mirrors every token. */
  --bg:         #0d0f12;
  --bg-deep:    #08090b;
  --surface:    #15181d;
  --surface-2:  #1b1f26;
  --border:     #262b34;
  --border-lit: #39404c;
  --text:       #e9ebee;
  --muted:      #98a1ae;
  --faint:      #6b7480;
  --accent:     #d98c3f;
  --accent-lit: #eda85f;
  --accent-bg:  #2a1e12;
  --ok:         #5cc98a;
  --ok-bg:      #10251a;
  --info:       #6aa6e8;
  --info-bg:    #121e2c;

  --maxw: 68rem;
  --radius: 10px;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 24px -12px rgb(0 0 0 / 0.5);

  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto,
          Helvetica Neue, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, Liberation Mono, monospace;

  color-scheme: dark light;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg:         #fbfaf8;
    --bg-deep:    #f2efe9;
    --surface:    #ffffff;
    --surface-2:  #f7f5f1;
    --border:     #e3ded5;
    --border-lit: #cdc6b9;
    --text:       #191c20;
    --muted:      #5c6572;
    --faint:      #838c99;
    --accent:     #a9601b;
    --accent-lit: #8d4f14;
    --accent-bg:  #fbf1e5;
    --ok:         #1f7a4c;
    --ok-bg:      #e8f6ee;
    --info:       #1f5fa8;
    --info-bg:    #e9f1fb;
    --shadow: 0 1px 2px rgb(30 25 15 / 0.05), 0 8px 24px -14px rgb(30 25 15 / 0.18);
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent);
  text-underline-offset: 3px;
}
a:hover { color: var(--accent-lit); text-decoration-color: currentColor; }

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

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

/* ── Skip link ──────────────────────────────────────────────────────────── */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 10;
  background: var(--accent); color: #0d0f12;
  padding: 0.6rem 1rem; border-radius: 0 0 var(--radius) 0;
  font-weight: 600; text-decoration: none;
}
.skip:focus { left: 0; }

/* ── Masthead ───────────────────────────────────────────────────────────── */
.masthead {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--bg-deep), var(--bg));
  border-bottom: 1px solid var(--border);
}

/* The "echo": concentric arcs bleeding off the right edge. Decorative only,
   hidden from assistive tech, and dropped on narrow screens where it would
   only crowd the headline. */
.masthead .echo {
  position: absolute; top: 50%; right: -6rem; translate: 0 -50%;
  width: 34rem; height: 34rem; opacity: 0.5; pointer-events: none;
}
@media (max-width: 52rem) { .masthead .echo { display: none; } }

.masthead-inner { position: relative; padding-block: 4.5rem 3.25rem; }

.brand {
  display: flex; align-items: center; gap: 0.85rem;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 1.5rem;
}
.brand::after { content: ""; flex: 0 1 4rem; height: 1px; background: currentColor; opacity: 0.45; }

.masthead h1 {
  margin: 0;
  font-size: clamp(2.35rem, 6vw, 3.9rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 700;
  max-width: 24ch;
}

.masthead .lede {
  margin: 1.35rem 0 0;
  font-size: clamp(1.02rem, 2vw, 1.18rem);
  color: var(--muted);
  max-width: 54ch;
}

/* ── Sections ───────────────────────────────────────────────────────────── */
main { padding-block: 3.5rem 1rem; }

.section { margin-block: 0 4rem; }

.section > h2 {
  margin: 0 0 0.4rem;
  font-size: 1.32rem;
  letter-spacing: -0.012em;
  display: flex; align-items: baseline; gap: 0.8rem;
}
.section > h2 .count {
  font-size: 0.74rem; font-weight: 600; letter-spacing: 0.1em;
  color: var(--faint); font-variant-numeric: tabular-nums;
}
.section > .section-note {
  margin: 0 0 1.6rem;
  color: var(--muted); font-size: 0.96rem; max-width: 60ch;
}

/* ── Project cards ──────────────────────────────────────────────────────── */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr));
  gap: 1.1rem;
  list-style: none; margin: 0; padding: 0;
}

.card {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem 1.25rem;
  transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}
.card:hover { border-color: var(--border-lit); transform: translateY(-2px); box-shadow: var(--shadow); }

.card h3 { margin: 0; font-size: 1.1rem; letter-spacing: -0.01em; }
.card h3 a { color: var(--text); text-decoration: none; }
.card h3 a:hover { color: var(--accent); }

.card .kind {
  margin: 0.3rem 0 0.85rem;
  font-family: var(--mono);
  font-size: 0.745rem; letter-spacing: 0.02em;
  color: var(--faint);
}

.card p { margin: 0 0 1.1rem; font-size: 0.935rem; color: var(--muted); }
.card p strong { color: var(--text); font-weight: 600; }

.card-foot {
  margin-top: auto; padding-top: 0.35rem;
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.55rem 0.85rem;
}
.card-foot a { font-size: 0.875rem; font-weight: 550; }

/* ── Status badges ──────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.715rem; font-weight: 650; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 0.22rem 0.6rem 0.24rem;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge::before { content: ""; width: 0.42rem; height: 0.42rem; border-radius: 50%; background: currentColor; }

.badge-live   { color: var(--ok);     background: var(--ok-bg);     border-color: color-mix(in srgb, var(--ok) 28%, transparent); }
.badge-play   { color: var(--accent); background: var(--accent-bg); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.badge-dev    { color: var(--info);   background: var(--info-bg);   border-color: color-mix(in srgb, var(--info) 28%, transparent); }
.badge-paused { color: var(--faint);  background: var(--surface-2); border-color: var(--border); }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-foot {
  margin-top: 2rem;
  border-top: 1px solid var(--border);
  background: var(--bg-deep);
  padding-block: 2.5rem 3rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.site-foot .foot-grid {
  display: flex; flex-wrap: wrap;
  gap: 1.5rem 3rem; justify-content: space-between;
}
.site-foot h2 {
  font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--faint); margin: 0 0 0.6rem;
}
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin-bottom: 0.3rem; }
.site-foot .copy {
  margin: 2.25rem 0 0; padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem; color: var(--faint);
}

/* ── Document pages (privacy, support) ──────────────────────────────────── */
.doc { padding-block: 2.5rem 1rem; }

.doc-head {
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.75rem; margin-bottom: 2.25rem;
}
.doc-head .backlink { font-size: 0.875rem; }
.doc-head h1 {
  margin: 1.1rem 0 0;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  letter-spacing: -0.025em; line-height: 1.12;
}
.doc-head .meta { margin: 0.8rem 0 0; font-size: 0.87rem; color: var(--faint); font-family: var(--mono); }

.prose { max-width: 42rem; }
.prose h2 { margin: 2.5rem 0 0.7rem; font-size: 1.18rem; letter-spacing: -0.01em; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--text); }
.prose p { margin: 0 0 1rem; }
.prose ul { margin: 0 0 1.15rem; padding-left: 1.3rem; }
.prose li { margin-bottom: 0.45rem; }
.prose code {
  font-family: var(--mono); font-size: 0.855em;
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 0.1em 0.38em; border-radius: 4px; word-break: break-word;
}

/* A short factual summary above the legal prose. A Play reviewer reads this
   and stops; the detail underneath is for anyone who wants it. */
.callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  padding: 1.15rem 1.3rem 0.35rem;
  margin: 0 0 2.25rem;
}
.callout h2 {
  margin: 0 0 0.7rem;
  font-size: 0.76rem; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--accent);
}
.callout ul { margin: 0 0 1rem; padding-left: 1.2rem; }
.callout li { font-size: 0.95rem; }

.appmeta {
  list-style: none; margin: 0 0 2rem; padding: 1rem 1.2rem;
  background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 6px;
  font-family: var(--mono); font-size: 0.845rem;
}
.appmeta li { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.35rem; color: var(--muted); }
.appmeta li:last-child { margin-bottom: 0; }
.appmeta b { color: var(--faint); font-weight: 400; min-width: 8.5rem; }
.appmeta span { color: var(--text); }

.otherpolicies { list-style: none; margin: 0; padding: 0; }
.otherpolicies li { margin-bottom: 0.4rem; }

@media (max-width: 34rem) {
  body { font-size: 16px; }
  .wrap { padding-inline: 1.15rem; }
  .masthead-inner { padding-block: 3rem 2.5rem; }
  .cards { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .card:hover { transform: none; }
}
