/* ==========================================================================
   SHEPHERDS & SHEEPLE — global styles
   A gritty, high-contrast Golden-Age comic aesthetic.
   ========================================================================== */

:root {
  /* Palette — aged comic paper + ink + spot colors */
  --ink:        #141214;
  --ink-soft:   #2a2628;
  --paper:      #f3ecd8;   /* aged newsprint */
  --panel:      #fbf8ef;   /* panel interior */
  --cream:      #fffdf6;
  --red:        #c8102e;   /* spot red */
  --red-dark:   #8f0b20;
  --blue:       #1c4e80;   /* halftone blue */
  --yellow:     #f5c518;   /* warning yellow */
  --grey:       #6b6a70;
  --line:       #141214;

  /* Type */
  --font-display: "Bangers", "Comic Sans MS", cursive;
  --font-poster:  "Oswald", "Arial Narrow", sans-serif;
  --font-body:    "Libre Franklin", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Layout */
  --maxw: 1180px;
  --gap: clamp(1rem, 3vw, 2rem);
  --radius: 4px;
  --shadow: 8px 8px 0 rgba(20, 18, 20, 0.9);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--paper);
  /* faint halftone across the whole page */
  background-image: radial-gradient(rgba(20,18,20,0.05) 1px, transparent 1.4px);
  background-size: 9px 9px;
}

img, svg { max-width: 100%; height: auto; display: block; }

a { color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--red-dark); }

/* Screen-reader only */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--cream); padding: .75rem 1.25rem;
  font-family: var(--font-poster);
}
.skip-link:focus { left: 0; }

/* ==========================================================================
   Halftone utility (classic comic-dot texture)
   ========================================================================== */
.halftone-red {
  background-color: var(--red);
  background-image: radial-gradient(rgba(255,255,255,0.16) 1px, transparent 1.5px);
  background-size: 7px 7px;
}
.halftone-blue {
  background-color: var(--blue);
  background-image: radial-gradient(rgba(255,255,255,0.16) 1px, transparent 1.5px);
  background-size: 7px 7px;
}

/* ==========================================================================
   Masthead / header
   ========================================================================== */
.masthead {
  border-bottom: 5px solid var(--ink);
  background:
    linear-gradient(180deg, rgba(0,0,0,0) 60%, rgba(200,16,46,0.05)),
    var(--cream);
}
.masthead__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1rem clamp(1rem, 4vw, 2rem);
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: .85rem;
  text-decoration: none;
  color: var(--ink);
}
.brand__mark { width: 58px; height: 58px; flex: none; }
.brand__word {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  line-height: .95;
  letter-spacing: .5px;
  text-transform: uppercase;
}
.brand__word .amp { color: var(--red); }
.brand__tag {
  display: block;
  font-family: var(--font-poster);
  font-size: .72rem;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--grey);
  margin-top: 2px;
}

/* Nav */
.nav { margin-left: auto; }
.nav__list {
  list-style: none; display: flex; gap: .25rem; margin: 0; padding: 0;
}
.nav a {
  display: block;
  font-family: var(--font-poster);
  font-size: .95rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  padding: .55rem .85rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.nav a:hover,
.nav a[aria-current="page"] {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
  box-shadow: 4px 4px 0 rgba(200,16,46,.9);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  background: var(--ink); color: var(--cream);
  border: 2px solid var(--ink);
  font-family: var(--font-poster);
  font-size: .9rem; letter-spacing: 1px; text-transform: uppercase;
  padding: .5rem .8rem; border-radius: var(--radius); cursor: pointer;
}

@media (max-width: 820px) {
  .nav-toggle { display: inline-block; }
  .nav {
    margin-left: 0; flex-basis: 100%;
    display: none;
    border-top: 2px dashed var(--ink);
    padding-top: .75rem;
  }
  .nav.is-open { display: block; }
  .nav__list { flex-direction: column; }
  .nav a { border-color: var(--ink); }
}

/* ==========================================================================
   Layout container
   ========================================================================== */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2rem); }
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section + .section { border-top: 3px double var(--ink); }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: 1px;
  margin: 0 0 .35rem;
  text-transform: uppercase;
}
.section-kicker {
  font-family: var(--font-poster);
  font-size: .8rem; letter-spacing: 3px; text-transform: uppercase;
  color: var(--red);
  margin: 0 0 .35rem;
}
.section-sub {
  max-width: 60ch; color: var(--ink-soft); margin: 0 0 2rem;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-poster);
  font-size: 1rem; letter-spacing: 1.2px; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  padding: .7rem 1.4rem;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: var(--red); color: var(--cream);
  box-shadow: 5px 5px 0 var(--ink);
  transition: transform .1s ease, box-shadow .1s ease, background .12s ease;
}
.btn:hover { background: var(--red-dark); color: #fff; transform: translate(2px,2px); box-shadow: 3px 3px 0 var(--ink); }
.btn--ghost { background: var(--cream); color: var(--ink); }
.btn--ghost:hover { background: var(--yellow); }
.btn--big { font-size: 1.15rem; padding: .9rem 1.8rem; }

/* ==========================================================================
   Hero — featured issue
   ========================================================================== */
.hero { padding-top: clamp(2rem, 5vw, 3.5rem); }
.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}
@media (max-width: 900px) { .hero__grid { grid-template-columns: 1fr; } }

.hero__issue-badge {
  display: inline-block;
  font-family: var(--font-poster);
  letter-spacing: 2px; text-transform: uppercase;
  background: var(--ink); color: var(--yellow);
  padding: .4rem .9rem; border-radius: 999px;
  font-size: .82rem;
}
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  line-height: .9;
  margin: .9rem 0 .6rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.hero__title .hl { color: var(--red); }
.hero__lede { font-size: 1.15rem; max-width: 46ch; color: var(--ink-soft); }
.hero__meta {
  font-family: var(--font-poster);
  text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--grey); font-size: .85rem; margin: 1rem 0 1.5rem;
}
.hero__meta b { color: var(--ink); }
.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* The two-panel featured comic (inline SVG art) */
.comic-frame {
  border: 5px solid var(--ink);
  background: var(--panel);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  overflow: hidden;
}
.comic-frame figcaption {
  font-family: var(--font-poster);
  text-transform: uppercase; letter-spacing: 1px;
  font-size: .78rem; color: var(--grey);
  padding: .6rem .9rem; border-top: 3px solid var(--ink);
  display: flex; justify-content: space-between; gap: 1rem;
}
.comic-frame .art { display: block; width: 100%; background: var(--cream); }

/* ==========================================================================
   Latest issues grid
   ========================================================================== */
.issues-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
}
.issue-card {
  border: 4px solid var(--ink);
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: 6px 6px 0 rgba(20,18,20,.85);
  display: flex; flex-direction: column;
  overflow: hidden;
  transition: transform .12s ease, box-shadow .12s ease;
}
.issue-card:hover { transform: translate(-2px,-2px); box-shadow: 9px 9px 0 var(--red); }
.issue-card__cover {
  aspect-ratio: 4 / 3;
  display: grid; place-items: center;
  border-bottom: 4px solid var(--ink);
  position: relative;
}
.issue-card__cover .num {
  font-family: var(--font-display);
  font-size: clamp(3rem, 9vw, 5rem);
  line-height: 1; color: var(--cream);
  text-shadow: 3px 3px 0 var(--ink);
}
.issue-card__body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .35rem; }
.issue-card__kicker {
  font-family: var(--font-poster); text-transform: uppercase;
  letter-spacing: 1.5px; font-size: .72rem; color: var(--red);
}
.issue-card__title { font-family: var(--font-display); font-size: 1.5rem; line-height: 1; margin: 0; text-transform: uppercase; }
.issue-card__date { font-family: var(--font-poster); text-transform: uppercase; letter-spacing: 1px; font-size: .78rem; color: var(--grey); }
.issue-card__link {
  margin-top: .5rem; font-family: var(--font-poster);
  text-transform: uppercase; letter-spacing: 1px; font-size: .85rem;
  text-decoration: none; color: var(--ink); font-weight: 700;
}
.issue-card__link:hover { color: var(--red); }

/* ==========================================================================
   About teaser (split band)
   ========================================================================== */
.about-band {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem,4vw,3rem);
  align-items: center;
}
@media (max-width: 820px) { .about-band { grid-template-columns: 1fr; } }
.about-band__art { border: 5px solid var(--ink); box-shadow: var(--shadow); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.about-band p { max-width: 55ch; }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  margin-top: 2rem;
  border-top: 5px solid var(--ink);
  background: var(--ink); color: var(--paper);
}
.footer__inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 2.5rem clamp(1rem,4vw,2rem);
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem;
}
@media (max-width: 720px) { .footer__inner { grid-template-columns: 1fr; } }
.footer h3 { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 1px; color: var(--yellow); margin: 0 0 .75rem; font-size: 1.4rem; }
.footer p, .footer a { color: #d9d3c4; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--yellow); text-decoration: underline; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.footer__brand .brand__word { color: var(--cream); }
.footer__brand .brand__word .amp { color: var(--red); }
.footer__bottom {
  border-top: 1px solid #3a3638;
  font-family: var(--font-poster); text-transform: uppercase; letter-spacing: 1px;
  font-size: .72rem; color: #9a948c;
  padding: 1rem clamp(1rem,4vw,2rem);
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between;
}
.disclaimer { font-size: .8rem; color: #b7b0a5; font-style: italic; margin-top: .5rem; }

/* ==========================================================================
   Scroll reveal (progressive enhancement)
   ========================================================================== */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .5s ease, transform .5s ease; }
[data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1 !important; transform: none !important; transition: none; }
}
