/* fun.johnbrodish.com — all page styling. Dark only. Base-4 throughout. */

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

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--sans);
  font-size: var(--text-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: var(--space-xs);
  background: var(--ground-2);
  color: var(--text);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--r-card);
  font-family: var(--gro);
  font-size: var(--text-fine);
}
.skip-link:focus { left: var(--space-md); z-index: 10; }

.wrap {
  max-width: var(--page);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

/* ---------- masthead ---------- */

.masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-md);
  padding-top: var(--space-lg);
  padding-bottom: var(--space-lg);
}

.wordmark {
  margin: 0;
  font-family: var(--gro);
  font-weight: 500;
  font-size: var(--text-link);
  letter-spacing: 0.02em;
}
.wordmark .dot { color: var(--accent); }

.masthead .eyebrow { margin: 0; }

.eyebrow {
  font-family: var(--gro);
  font-weight: 500;
  font-size: var(--text-eyebrow);
  line-height: var(--lh-eyebrow);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---------- intro ---------- */

.intro {
  padding-top: var(--space-2xl);
  padding-bottom: var(--space-2xl);
  border-bottom: 1px solid var(--hairline);
}

.intro h1 {
  margin: 0;
  max-width: 20ch;
  font-size: var(--text-display);
  line-height: var(--lh-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.intro .lede {
  margin: var(--space-lg) 0 0;
  max-width: var(--measure);
  font-size: var(--text-lede);
  line-height: var(--lh-lede);
  color: var(--text-2);
}

/* ---------- the shelf ---------- */

.shelf {
  padding-top: var(--space-2xl);
  padding-bottom: var(--space-2xl);
}

.entries {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-2xl);
}

.entry {
  background: var(--ground-2);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  overflow: hidden;
}

/* The art is the whole top of the card and the primary click target. */
.entry-art {
  display: block;
  position: relative;
  background: var(--ground);
  border-bottom: 1px solid var(--hairline);
}

.entry-art img {
  width: 100%;
  height: auto;
  aspect-ratio: 1672 / 941;
  object-fit: cover;
  transform: scale(1.0);
  transition: transform var(--dur-short) var(--ease-out);
}

@media (hover: hover) {
  .entry-art:hover img { transform: scale(1.02); }
}

@media (prefers-reduced-motion: reduce) {
  .entry-art img { transition: none; }
  .entry-art:hover img { transform: none; }
}

.entry-body { padding: var(--space-xl) var(--space-lg) var(--space-lg); }

@media (min-width: 40rem) {
  .entry-body { padding: var(--space-xl); }
}

.entry-kicker {
  margin: 0 0 var(--space-sm);
  font-family: var(--gro);
  font-weight: 500;
  font-size: var(--text-eyebrow);
  line-height: var(--lh-eyebrow);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--entry-accent);
}

.entry h2 {
  margin: 0;
  font-size: var(--text-h2);
  line-height: var(--lh-h2);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.entry h2 a { text-decoration: none; }
.entry h2 a:hover { text-decoration: underline; text-underline-offset: 4px; }

.entry p.blurb {
  margin: var(--space-md) 0 0;
  max-width: var(--measure);
  color: var(--text-2);
}

.entry-meta {
  margin: var(--space-lg) 0 0;
  font-family: var(--gro);
  font-size: var(--text-fine);
  line-height: var(--lh-fine);
  color: var(--text-2);
}
.entry-meta .sep { padding: 0 var(--space-xs); opacity: 0.5; }

.entry-actions {
  margin: var(--space-lg) 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-lg);
}

/* Primary action carries the entry's own color, not the site teal. */
.btn {
  display: inline-block;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--r-card);
  background: var(--entry-accent);
  color: #111A27;
  font-family: var(--gro);
  font-weight: 500;
  font-size: var(--text-link);
  text-decoration: none;
  transition: filter var(--dur-micro) var(--ease-out);
}
.btn:hover { filter: brightness(1.08); }

.link {
  font-family: var(--gro);
  font-size: var(--text-link);
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
}
.link:hover { color: var(--text); }

.note {
  margin: var(--space-md) 0 0;
  font-family: var(--gro);
  font-size: var(--text-fine);
  line-height: var(--lh-fine);
  color: var(--text-2);
}

/* ---------- footer ---------- */

.footer {
  padding-top: var(--space-xl);
  padding-bottom: var(--space-2xl);
  border-top: 1px solid var(--hairline);
}

.footer p {
  margin: 0;
  font-family: var(--gro);
  font-size: var(--text-fine);
  line-height: var(--lh-fine);
  color: var(--text-2);
}
.footer p + p { margin-top: var(--space-xs); }
