/* Slopper — one stylesheet, no framework (DESIGN §12). The art is the page; everything else is quiet. */

@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('/assets/fonts/bricolage-grotesque-latin-800-normal.woff2') format('woff2');
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  src: url('/assets/fonts/atkinson-hyperlegible-next-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  src: url('/assets/fonts/atkinson-hyperlegible-next-latin-ext-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  src: url('/assets/fonts/atkinson-hyperlegible-next-latin-700-normal.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  src: url('/assets/fonts/atkinson-hyperlegible-next-latin-ext-700-normal.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #f7f2e8;
  --surface: #fffaf1;
  --ink: #1f2433;
  --muted: #5d6070;
  --line: #e2d9c8;
  --accent: #24479a;
  --accent-2: #d93a6e;
  --art-shadow: 0 1px 0 rgb(31 36 51 / 0.06), 0 18px 40px -18px rgb(31 36 51 / 0.35);
  --display: 'Bricolage Grotesque', 'Arial Black', system-ui, sans-serif;
  --text: 'Atkinson Hyperlegible Next', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --measure: 36rem;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17161b;
    --surface: #201f26;
    --ink: #efeae0;
    --muted: #a8a4b0;
    --line: #34323d;
    --accent: #9fbbea;
    --accent-2: #ff7fa6;
    --art-shadow: 0 0 0 1px rgb(255 255 255 / 0.06), 0 18px 40px -18px rgb(0 0 0 / 0.8);
  }
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.125rem/1.55 var(--text);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}
a:hover {
  text-decoration-thickness: 2px;
}
:focus-visible {
  outline: 3px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- frame ---------- */

.top {
  padding: 1.5rem 1rem 0.5rem;
  text-align: center;
}
.wordmark {
  font: 800 1.6rem/1 var(--display);
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
}
.wordmark::after {
  content: '';
  display: inline-block;
  width: 0.34em;
  height: 0.34em;
  margin-left: 0.08em;
  border-radius: 50%;
  background: var(--accent-2);
}

main {
  flex: 1;
  width: 100%;
  max-width: 44rem;
  margin: 0 auto;
  padding: 1rem 1rem 2rem;
}

.bottom {
  padding: 2rem 1rem 2.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}
.bottom nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1.4rem;
}
.bottom a {
  color: var(--muted);
}
.fine {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
}

/* ---------- a slopper ---------- */

.slopper,
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.art {
  position: relative;
  margin: 0.5rem 0 0;
  width: 100%;
  max-width: 560px;
}
.art img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 10px;
  box-shadow: var(--art-shadow);
  background: var(--surface);
}
.replay {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.8rem;
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font: 700 0.9rem/1.4 var(--text);
  cursor: pointer;
}
.replay[hidden] {
  display: none;
}
.replay:hover {
  color: var(--ink);
  border-color: var(--muted);
}
.badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 1;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: var(--accent-2);
  color: #fff;
  font: 700 0.8rem/1.5 var(--text);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.words {
  width: 100%;
  max-width: var(--measure);
  margin-top: 1.4rem;
}
.motto {
  margin: 0;
  font: 800 clamp(2rem, 1.3rem + 3.2vw, 3.1rem)/1.02 var(--display);
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.phrase {
  margin: 0.8rem auto 0;
  font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.35rem);
  line-height: 1.45;
  text-wrap: pretty;
}
.meta {
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}
.meta a {
  color: inherit;
}

.sources {
  margin: 1.6rem auto 0;
  text-align: left;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.sources summary {
  padding: 0.7rem 0;
  cursor: pointer;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.95rem;
  text-align: center;
  list-style-position: inside;
}
.sources ul {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  font-size: 0.98rem;
}
.sources li {
  padding: 0.45rem 0;
}
.sources li + li {
  border-top: 1px dashed var(--line);
}
.via {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
}

.pager {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  width: 100%;
  max-width: var(--measure);
  margin-top: 2rem;
  font-weight: 700;
  font-size: 0.98rem;
}
.pager a {
  text-decoration: none;
}
.pager a:hover {
  text-decoration: underline;
}
.pager > :first-child {
  justify-self: start;
}
.pager > :last-child {
  justify-self: end;
}
.credit {
  margin: 1.2rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}
.credit a {
  color: inherit;
}

.empty {
  padding: 12vh 0 6vh;
}
.empty .phrase {
  max-width: var(--measure);
}

/* ---------- archive ---------- */

.archive {
  text-align: center;
}
.month {
  margin: 2.4rem 0 1rem;
  font: 800 1.35rem/1.2 var(--display);
  letter-spacing: -0.02em;
  text-align: left;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
  gap: 1.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: left;
}
.grid a {
  display: block;
  color: var(--ink);
  text-decoration: none;
}
.grid img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 8px;
  box-shadow: var(--art-shadow);
  background: var(--surface);
  transition: transform 0.15s ease;
}
.grid a:hover img {
  transform: translateY(-2px);
}
.cap {
  display: block;
  margin-top: 0.5rem;
  line-height: 1.3;
}
.cap strong {
  display: block;
  font-size: 0.98rem;
}
.cap span {
  color: var(--muted);
  font-size: 0.82rem;
}

/* ---------- prose (about) ---------- */

.prose {
  max-width: var(--measure);
  margin: 0 auto;
}
.prose h1 {
  font: 800 clamp(2rem, 1.3rem + 3.2vw, 3rem)/1.05 var(--display);
  letter-spacing: -0.035em;
  margin: 0.5rem 0 1rem;
}
.prose h2 {
  font: 800 1.35rem/1.2 var(--display);
  letter-spacing: -0.02em;
  margin: 2rem 0 0.5rem;
}
.prose li + li {
  margin-top: 0.3rem;
}

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