/* lolcode.org — hand-written, no framework.
   Palette sampled from img/logo.png: the mascot is a cube whose front face
   is off-white, whose right face is rust, sitting on warm taupe.  The hero
   band uses that same taupe so the logo's baked-in background disappears
   into it, and the code panels carry a hard rust offset that repeats the
   cube's side face.  Cyan and cream are the site's long-standing colors. */

:root {
  --cream:    #faf6ed;
  --cyan:     #5ac0d6;
  --rust:     #8d2701;
  --taupe:    #504744;
  --taupe-deep: #3a322f;   /* text on cyan: 5.93:1 where plain taupe is only 4.28 */
  --offwhite: #ededed;

  --lolcat: Impact, Haettenschweiler, "Arial Narrow Bold", "Franklin Gothic Bold", sans-serif;
  --text: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --gut: clamp(1.25rem, 4vw, 3rem);
}

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--taupe);
  font-family: var(--text);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--rust); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 3px; }
:focus-visible { outline: 3px solid var(--rust); outline-offset: 3px; }

.band { padding: clamp(2.5rem, 7vw, 5rem) var(--gut); }
.wrap { max-width: 62rem; margin-inline: auto; }

/* ---- hero: taupe, so the logo's own background vanishes into the band ---- */
.hero { background: var(--taupe); color: var(--cream); text-align: center;
        padding-block: clamp(2rem, 5vw, 3.5rem); }
.hero img { width: clamp(140px, 30vw, 220px); height: auto; display: block; }

/* logo.png's background is transparent (flood-filled), so nothing here can
   mismatch the band on a wide-gamut display.  The box is still drawn with a
   flat base and no ground under it — the old site hid that by cropping to a
   circle — so a soft contact shadow sits BEHIND it to ground the shape. */
.mascot { position: relative; display: inline-block; line-height: 0; }
.mascot img { position: relative; z-index: 1; }
.mascot::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -4px;
  transform: translateX(-50%);
  width: 66%;
  height: 20px;
  background: radial-gradient(50% 50% at 50% 50%, rgba(0,0,0,0.40) 0%, rgba(0,0,0,0.18) 45%, rgba(0,0,0,0) 72%);
  pointer-events: none;
}

.wordmark {
  font-family: var(--lolcat);
  font-weight: 400;
  font-size: clamp(3.5rem, 17vw, 9rem);
  line-height: 0.9;
  letter-spacing: 0.06em;
  margin: clamp(1rem, 3vw, 2rem) 0 0;
  color: var(--cream);
}
.tagline {
  margin: 0.75rem 0 0;
  font-size: clamp(1rem, 2.2vw, 1.375rem);
  color: var(--offwhite);
}

/* ---- code band: cyan carries only large text and high-contrast panels,
       because taupe-on-cyan is 4.28:1 — fine large, not for body copy ---- */
.code-band { background: var(--cyan); }
@media (max-width: 30rem) {
  .box { box-shadow: 9px 9px 0 var(--rust); }
  /* at 390px the clone URL needs ~343px inside a ~312px box; wrapping beats
     a horizontally scrolling code block on a phone */
  .box pre { white-space: pre-wrap; overflow-wrap: anywhere; }
}
.panels { display: grid; gap: clamp(2.5rem, 6vw, 3.5rem); grid-template-columns: 1fr; }
@media (min-width: 46rem) { .panels { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.panel h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.25rem, 2.6vw, 1.625rem);
  font-weight: 600;
  color: var(--taupe-deep);
}
.box {
  background: var(--offwhite);
  border: 3px solid var(--taupe);
  box-shadow: 16px 16px 0 var(--rust);   /* the cube's right-hand face */
  padding: clamp(1rem, 3vw, 1.5rem);
  overflow-x: auto;
}
.box pre { margin: 0; font-family: var(--mono); font-size: clamp(0.8125rem, 1.5vw, 0.9375rem); line-height: 1.75; color: var(--taupe); }
.box .kw { color: var(--rust); font-weight: 700; }
.box .str { color: #1f6b3a; }

/* ---- links ---- */
.release { margin: 0 0 clamp(1.5rem, 4vw, 2rem); font-size: 1.0625rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; padding: 0; margin: 0; list-style: none; }
.actions a {
  display: block;
  padding: 0.7rem 1.25rem;
  background: var(--rust);
  color: var(--cream);
  text-decoration: none;
  border: 3px solid var(--taupe);
  font-weight: 600;
}
.actions a:hover, .actions a:focus-visible { background: var(--taupe); }

.elsewhere { margin: clamp(2rem, 5vw, 3rem) 0 0; }
.elsewhere ul { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; padding: 0; margin: 0.5rem 0 0; list-style: none; }

footer { padding: 2rem var(--gut) 3rem; font-size: 0.9375rem; }

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