/* shushcord — the hush.
   A mausoleum at midnight: near-black indigo, antique serif whispered in
   lowercase, censor-bar chips you must dare to touch, gold spent sparingly.
   When the horde walks (body.apoc) the accent rots to zombie green. */

:root {
  --ink:   #eceaf6;
  --muted: #8e8bb0;
  --bg-deep: #100f24;
  --bg-mid:  #1c1b38;
  --bg-card: #201f40;
  --line:  #34315e;
  --bar:   #454279;          /* the censor bar */
  --accent:#fdb927;          /* gold — silence is golden */
  --accent-dim: rgba(253, 185, 39, .55);
}

body.apoc {
  --accent:#9be344;          /* the rot — Zombie role green, brightened for contrast */
  --accent-dim: rgba(155, 227, 68, .55);
  --bar:#3c5530;
}

* { box-sizing: border-box; margin: 0; }

html { color-scheme: dark; }

body {
  background:
    radial-gradient(1200px 700px at 50% -10%, var(--bg-mid) 0%, transparent 60%),
    radial-gradient(900px 600px at 85% 110%, #232050 0%, transparent 55%),
    var(--bg-deep);
  color: var(--ink);
  font: 17px/1.65 "Palatino Linotype", "Iowan Old Style", Palatino, Georgia, serif;
  min-height: 100vh;
  padding: 0 1.25rem 4rem;
}

/* film grain — inline SVG turbulence, zero network requests */
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 2;
  opacity: .05; mix-blend-mode: overlay;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="160" height="160"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="2"/></filter><rect width="160" height="160" filter="url(%23n)"/></svg>');
}

/* ---- horde banner ---------------------------------------------------- */
.apoc-banner {
  margin: 0 -1.25rem 1rem;
  padding: .55rem 1rem;
  text-align: center;
  font-style: italic;
  letter-spacing: .06em;
  color: #0e1405;
  background: repeating-linear-gradient(
    -45deg, var(--accent), var(--accent) 18px, #b9f06b 18px, #b9f06b 36px);
}
body:not(.apoc) .apoc-banner { display: none; }

/* ---- hero ------------------------------------------------------------ */
.hero { text-align: center; padding: 4.5rem 0 3rem; }

.logo {
  border-radius: 26%;
  box-shadow: 0 8px 40px rgba(0,0,0,.55), 0 0 0 1px var(--line);
}

.title {
  margin-top: 1.4rem;
  font-size: clamp(2.6rem, 7vw, 4.2rem);
  font-weight: 400;
  letter-spacing: .04em;
}

.tagline {
  margin-top: .35rem;
  color: var(--accent);
  font-size: .95rem;
  letter-spacing: .55em;
  text-indent: .55em;          /* recenters letterspaced text */
  text-transform: uppercase;
}

.pitch {
  margin: 2rem auto 0;
  max-width: 38rem;
  color: var(--muted);
  font-size: 1.06rem;
}
.pitch em { color: var(--ink); font-style: italic; }

.join {
  display: inline-block;
  margin-top: 2.2rem;
  padding: .8rem 2.4rem;
  border-radius: 3px;
  background: var(--accent);
  color: #181423;
  font-style: italic;
  font-size: 1.05rem;
  text-decoration: none;
  letter-spacing: .05em;
  transition: transform .18s ease, box-shadow .18s ease;
  box-shadow: 0 4px 26px var(--accent-dim);
}
.join:hover { transform: translateY(-2px); box-shadow: 0 8px 34px var(--accent-dim); }
.join--soon { background: var(--bg-card); color: var(--muted); box-shadow: none; cursor: default; }

/* ---- stats strip ------------------------------------------------------ */
.stats {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 1px;
  max-width: 60rem; margin: 0 auto;
  background: var(--line);
  border: 1px solid var(--line); border-radius: 6px;
  overflow: hidden;
}
.stat {
  flex: 1 1 9rem;
  background: var(--bg-card);
  padding: 1.1rem 1.4rem;
  text-align: center;
}
.stat--wide { flex: 2 1 16rem; }
.stat-label { display: block; color: var(--muted); font-size: .78rem; letter-spacing: .18em; }
.stat-value {
  display: block; margin-top: .3rem;
  font-size: 1.55rem;
  font-variant-numeric: tabular-nums;
}
.stat-value--gold { color: var(--accent); }

/* ---- boards ------------------------------------------------------------ */
main { max-width: 60rem; margin: 0 auto; }

.board { margin-top: 4.5rem; }
.board h2 {
  font-weight: 400;
  font-size: 1.5rem;
  letter-spacing: .12em;
  border-bottom: 1px solid var(--line);
  padding-bottom: .5rem;
}
.hint { color: var(--muted); font-style: italic; font-size: .9rem; margin-top: .5rem; }
.empty { color: var(--muted); font-style: italic; padding: 1.5rem 0; }

/* censor chips: the word ships as a solid bar; hover (or focus) reveals it */
.chips { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.4rem; }
.chip {
  display: inline-flex; align-items: baseline; gap: .55rem;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: .42rem .7rem;
  cursor: default;
  transition: border-color .25s ease;
}
.chip:hover, .chip:focus-visible { border-color: var(--accent); outline: none; }
.chip .w {
  font-family: ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace;
  font-size: .95rem;
  color: transparent;
  background: var(--bar);
  border-radius: 2px;
  padding: 0 .15rem;
  transition: color .25s ease, background .25s ease;
  user-select: none;
}
.chip:hover .w, .chip:focus-visible .w { color: var(--accent); background: transparent; user-select: text; }
.chip .d { color: var(--muted); font-size: .72rem; }

/* tombstones */
.tombs {
  display: grid; gap: 1rem; margin-top: 1.6rem;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
}
.tomb {
  background: linear-gradient(180deg, #262357 0%, var(--bg-card) 70%);
  border: 1px solid var(--line);
  border-radius: 110px 110px 6px 6px;   /* the headstone arch */
  padding: 2rem 1.2rem 1.3rem;
  text-align: center;
  transition: transform .2s ease, border-color .2s ease;
}
.tomb:hover { transform: translateY(-3px); border-color: var(--accent); }
body.apoc .tomb { background: linear-gradient(180deg, #2c3a22 0%, var(--bg-card) 70%); }
.tomb-mark { display: block; font-size: 1.3rem; opacity: .8; }
.tomb-name { display: block; margin-top: .5rem; font-size: 1.12rem; }
.tomb-cause { display: block; margin-top: .4rem; color: var(--muted); font-size: .85rem; font-style: italic; }
.tomb-word {
  font-family: ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace;
  color: var(--accent); font-style: normal;
}
.tomb-when { display: block; margin-top: .55rem; color: var(--muted); font-size: .75rem; letter-spacing: .08em; }

/* ---- footer ------------------------------------------------------------ */
footer {
  max-width: 60rem; margin: 5rem auto 0;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .8rem; font-style: italic;
  text-align: center;
}

/* starfield: box-shadow dots scattered across a transparent canvas */
.footer-stars {
  position: relative;
  height: 48px;
  max-width: 600px;            /* dots are hand-placed across 600px — keep centered */
  margin: 0 auto;
  overflow: hidden;
  /* 15 hand-placed stars — sizes 1–3 px, spread across 600 px width */
  --s: color-mix(in srgb, var(--accent) 22%, transparent);  /* tracks apoc green */
  background: transparent;
}
.footer-stars::before,
.footer-stars::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 2px; height: 2px;     /* base dot — box-shadow clones this shape */
  border-radius: 50%;          /* keeps the box-shadow dots circular */
  animation: star-drift 6s linear infinite alternate;
}
/* first layer — larger, sparser dots */
.footer-stars::before {
  box-shadow:
     42px 12px 0 1px var(--s),
    118px 28px 0 1px var(--s),
    201px  8px 0 2px var(--s),
    274px 38px 0 1px var(--s),
    355px 18px 0 1px var(--s),
    448px 32px 0 2px var(--s),
    530px  9px 0 1px var(--s),
    590px 22px 0 1px var(--s);
}
/* second layer — finer, offset timing */
.footer-stars::after {
  box-shadow:
     74px 35px 0 1px var(--s),
    160px 10px 0 1px var(--s),
    238px 42px 0 1px var(--s),
    312px  5px 0 2px var(--s),
    398px 26px 0 1px var(--s),
    475px 14px 0 1px var(--s),
    560px 38px 0 2px var(--s);
  animation-delay: -3s;
}
@keyframes star-drift {
  from { opacity: .4; }
  to   { opacity: 1;  }
}
@media (prefers-reduced-motion: reduce) {
  .footer-stars::before,
  .footer-stars::after { animation: none; opacity: .6; }
}

/* credit line — letterspaced small-caps in dimmed accent */
.footer-credit {
  display: block;
  font-variant: small-caps;
  font-size: .7rem;
  letter-spacing: .38em;
  text-indent: .38em;          /* recenters letterspaced text */
  color: var(--accent);
  opacity: .45;                /* quiet, not loud */
  text-align: center;
  margin-bottom: 1rem;
  transition: opacity .3s ease;
}
.footer-credit:hover { opacity: .75; }

.footer-note {
  margin-top: .2rem;
}

/* ---- entrance: a slow, quiet surfacing -------------------------------- */
.reveal { animation: surface .9s ease both; }
.reveal:nth-of-type(2) { animation-delay: .15s; }
main .board:nth-of-type(1) { animation: surface .9s ease .3s both; }
main .board:nth-of-type(2) { animation: surface .9s ease .45s both; }
footer.reveal { animation-delay: .6s; }

@keyframes surface {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal, main .board, footer.reveal { animation: none; }
  .join, .tomb, .chip, .chip .w { transition: none; }
}

@media (max-width: 540px) {
  .hero { padding-top: 3rem; }
  .stat { flex-basis: 100%; }
}
