/* Puzzle Panels' web identity: every page under /puzzle-panels/ links this file and wears the
   app's pop-art comic theme. The studio site's Archivo/cyan system stays at the root. */

/* Self-hosted, latin subset - the app's three faces. Licenses sit beside the files. */
@font-face {
  font-family: "Bangers";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("/puzzle-panels/assets/fonts/bangers-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Comic Neue";
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url("/puzzle-panels/assets/fonts/comic-neue-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/puzzle-panels/assets/fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}

:root {
  color-scheme: light dark;

  /* Pop Art Panels - DESIGN.md in the app. Role names are the app's. */
  --paper: #FFFCF0;
  --paper-raised: #FFFFFF;
  --ink: #111111;
  --ink-muted: #4A4A52;
  --outline: #111111;
  --shadow-hard: #111111;
  --caption: #FFD21F;
  --caption-ink: #111111;
  --dots: rgba(0, 174, 239, 0.28);
  --pen: #E8203F;

  --font-display: "Bangers", Impact, sans-serif;
  --font-lettering: "Comic Neue", "Comic Sans MS", cursive;
  --font-body: "Inter Variable", Inter, system-ui, -apple-system, sans-serif;

  --measure: 60rem;
}

/* Midnight inks: a deep blue-black ground with light outlines, not an inverted theme. */
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0E1230;
    --paper-raised: #182052;
    --ink: #F6F3E8;
    --ink-muted: #BBBFDA;
    --outline: #F6F3E8;
    --shadow-hard: #000000;
    --dots: rgba(0, 174, 239, 0.22);
    --pen: #FF5A6E;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--caption);
  color: var(--caption-ink);
}

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

h1, h2 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 1px;
  line-height: 1.2;
  margin: 0;
}

p { margin: 0; }

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

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 1.5rem;
  top: 1.5rem;
  z-index: 50;
  background: var(--caption);
  color: var(--caption-ink);
  padding: 0.625rem 1rem;
  border: 3px solid var(--outline);
  box-shadow: 3px 3px 0 var(--shadow-hard);
  font-weight: 700;
  text-decoration: none;
}

/* ---------------------------------------------------------------
   Masthead - the app's top bar: page ground closed by a heavy rule,
   then a Ben-Day gutter. Dots sit in the gutter, never behind text.
   --------------------------------------------------------------- */

.rail {
  border-bottom: 3px solid var(--outline);
}

.rail-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.75rem;
}

.rail-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.rail-brand img {
  display: block;
  width: 36px;
  height: 36px;
  border: 3px solid var(--outline);
}

.wordmark {
  font-family: var(--font-display);
  font-size: 1.75rem;
  line-height: 1.3;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink);
}

.rail-by {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-muted);
  text-decoration: none;
}

.rail-by:hover {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

.gutter {
  height: 16px;
  background-image: radial-gradient(circle, var(--dots) 3px, transparent 3.4px);
  background-size: 12px 12px;
  background-position: 6px 2px;
  border-bottom: 3px solid var(--outline);
}

/* ---------------------------------------------------------------
   Footer
   --------------------------------------------------------------- */

body > footer {
  border-top: 4px solid var(--outline);
  padding-block: 2.5rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

body > footer a {
  color: var(--ink);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

body > footer a:hover {
  background: var(--caption);
  color: var(--caption-ink);
}

/* ---------------------------------------------------------------
   Doc pages: one reading column on the comic stock.
   --------------------------------------------------------------- */

.doc {
  max-width: 46rem;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 5rem;
}

.doc a {
  color: var(--ink);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

.doc a:hover {
  background: var(--caption);
  color: var(--caption-ink);
}

.doc h1 {
  margin-bottom: 1.25rem;
  font-size: clamp(2.25rem, 7vw, 2.75rem);
  text-transform: uppercase;
  text-wrap: balance;
}

.doc h2 {
  margin: 3rem 0 1rem;
  padding-top: 1.25rem;
  border-top: 3px solid var(--outline);
  font-size: 1.75rem;
  text-transform: uppercase;
}

.doc p { margin: 0 0 1rem; }

.doc strong { font-weight: 700; }

.doc ul { padding-left: 1.5rem; }

.doc li { margin-bottom: 0.5rem; }

/* The app's caption box: yellow, outlined, hard shadow, Comic Neue Bold. */
.doc .meta {
  display: inline-block;
  margin: 0 6px 2.5rem 0;
  padding: 0.375rem 0.75rem;
  background: var(--caption);
  color: var(--caption-ink);
  border: 3px solid var(--outline);
  box-shadow: 3px 3px 0 var(--shadow-hard);
  font-family: var(--font-lettering);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.4;
}

@media (max-width: 30rem) {
  .rail-by { display: none; }
}
