/* ============================================================
   PULPIT
   ransom notes from inside the SOC
   ============================================================ */

:root {
  --bg:        #0a0908;
  --paper:     #f4ecd8;
  --paper-2:   #e8dfc0;
  --kraft:     #c9a37a;
  --newsprint: #ddd6c3;
  --ink:       #1a1612;
  --blood:     #8b0000;
  --blood-2:   #b00020;
  --caution:   #f5d547;
  --tape:      #ffd60a;
  --ribbon:    #2b3a55;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background-color: var(--bg);
  background-image:
    /* faint scan lines */
    repeating-linear-gradient(
      0deg,
      rgba(255,255,255,0.015) 0 1px,
      transparent 1px 3px
    ),
    /* grime spots */
    radial-gradient(circle at 12% 18%, rgba(139,0,0,0.08) 0, transparent 22%),
    radial-gradient(circle at 88% 70%, rgba(245,213,71,0.05) 0, transparent 28%),
    radial-gradient(circle at 60% 95%, rgba(255,255,255,0.03) 0, transparent 30%);
  color: var(--paper);
  font-family: 'Special Elite', 'Courier New', monospace;
  min-height: 100vh;
  padding: 0 1rem 4rem;
  overflow-x: hidden;
}

/* ============================================================
   MASTHEAD
   ============================================================ */

.masthead {
  max-width: 980px;
  margin: 0 auto;
  padding: 3rem 0 2rem;
  text-align: center;
  position: relative;
}

.tape {
  background: var(--tape);
  color: var(--ink);
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.35em;
  padding: 0.4rem 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  background-image:
    repeating-linear-gradient(
      -45deg,
      var(--tape) 0 18px,
      var(--ink) 18px 24px,
      var(--tape) 24px 42px
    );
}

.tape-top {
  transform: rotate(-1.2deg) translateY(-10px);
  margin: 0 -5%;
  box-shadow: 0 6px 0 rgba(0,0,0,0.4);
}

/* ----- the title: PULPIT ----- */

.title {
  margin: 3rem 0 2.5rem;
  font-size: clamp(4rem, 12vw, 8.5rem);
  line-height: 1;
  display: inline-block;
  letter-spacing: 0;
}

.title .L {
  display: inline-block;
  padding: 0.05em 0.2em;
  margin: 0 0.04em;
  vertical-align: middle;
  box-shadow:
    2px 3px 0 rgba(0,0,0,0.5),
    inset 0 0 0 2px rgba(0,0,0,0.15);
}

.title .L1 {  /* P */
  font-family: 'UnifrakturMaguntia', serif;
  background: var(--paper);
  color: var(--ink);
  transform: rotate(-7deg) translateY(-6px);
  font-size: 1.15em;
}

.title .L2 {  /* U */
  font-family: 'Anton', sans-serif;
  background: var(--blood);
  color: var(--paper);
  transform: rotate(4deg) translateY(8px);
  font-size: 0.95em;
}

.title .L3 {  /* L */
  font-family: 'Special Elite', monospace;
  background: var(--kraft);
  color: var(--ink);
  transform: rotate(-3deg);
  font-size: 1.05em;
  letter-spacing: -0.05em;
}

.title .L4 {  /* P */
  font-family: 'Playfair Display', serif;
  font-style: italic;
  background: var(--newsprint);
  color: var(--ink);
  transform: rotate(6deg) translateY(-4px);
  font-size: 1.1em;
}

.title .L5 {  /* I */
  font-family: 'Stardos Stencil', sans-serif;
  font-weight: 700;
  background: var(--caution);
  color: var(--ink);
  transform: rotate(-2deg) translateY(4px);
  font-size: 1em;
}

.title .L6 {  /* T */
  font-family: 'Major Mono Display', monospace;
  background: var(--ink);
  color: var(--caution);
  transform: rotate(3deg);
  font-size: 1em;
  border: 2px dashed var(--caution);
  text-transform: lowercase;
}

/* ----- tagline ----- */

.tagline {
  margin: 0.5rem auto 1rem;
  max-width: 800px;
  font-size: clamp(1.4rem, 3.5vw, 2.2rem);
  line-height: 1.6;
  text-align: center;
}

.tagline .w {
  display: inline-block;
  padding: 0.15em 0.4em;
  margin: 0.1em 0.15em;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 1px 2px 0 rgba(0,0,0,0.4);
}

.tagline .w1 {
  font-family: 'Special Elite', monospace;
  transform: rotate(-2deg);
}
.tagline .w2 {
  font-family: 'Anton', sans-serif;
  background: var(--ink);
  color: var(--caution);
  transform: rotate(1.5deg);
  letter-spacing: 0.05em;
}
.tagline .w3 {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  transform: rotate(3deg);
}
.tagline .w4 {
  font-family: 'UnifrakturMaguntia', serif;
  background: var(--newsprint);
  transform: rotate(-1deg);
}
.tagline .w5 {
  font-family: 'Bebas Neue', sans-serif;
  background: var(--blood);
  color: var(--paper);
  transform: rotate(2deg);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.subtagline {
  font-family: 'Major Mono Display', monospace;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: lowercase;
  color: var(--caution);
  opacity: 0.75;
  margin: 1.5rem 0 0;
}

/* ============================================================
   FEED
   ============================================================ */

.feed {
  max-width: 760px;
  margin: 3rem auto 0;
  padding: 0;
}

.post {
  background: var(--paper);
  color: var(--ink);
  margin: 0 0 2.5rem;
  padding: 1.5rem 1.75rem 1.75rem;
  position: relative;
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.15),
    4px 6px 0 rgba(0,0,0,0.55),
    10px 14px 30px rgba(0,0,0,0.4);
  /* slight jagged edge — torn paper */
  clip-path: polygon(
    0% 2%, 3% 0%, 12% 1%, 25% 0%, 38% 1%, 52% 0%, 67% 1%, 80% 0%, 92% 1%, 100% 3%,
    99% 15%, 100% 30%, 99% 50%, 100% 70%, 99% 88%,
    100% 98%, 90% 100%, 75% 99%, 60% 100%, 45% 99%, 30% 100%, 15% 99%, 5% 100%, 0% 97%,
    1% 80%, 0% 60%, 1% 40%, 0% 20%
  );
}

/* alternating post tints, like cut from different sources */
.post:nth-child(3n)   { background: var(--newsprint); transform: rotate(-0.4deg); }
.post:nth-child(3n+1) { background: var(--paper);     transform: rotate(0.3deg); }
.post:nth-child(3n+2) { background: var(--paper-2);   transform: rotate(-0.2deg); }

/* punch a single staple-hole-ish dot in the corner */
.post::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 14px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.3);
}

.post header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: 0 0 1rem 1.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--ink);
}

.sender {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.3rem;
  letter-spacing: 0.08em;
  background: var(--ink);
  color: var(--caution);
  padding: 0.1rem 0.5rem;
  transform: rotate(-1deg);
  display: inline-block;
}

.sender-local { color: var(--caution); }
.sender-host  { color: var(--paper); opacity: 0.7; }

.post header time {
  font-family: 'Major Mono Display', monospace;
  font-size: 0.85rem;
  color: var(--ink);
  background: var(--caution);
  padding: 0.1rem 0.4rem;
  border: 1px solid var(--ink);
  letter-spacing: 0.05em;
}

.body {
  font-family: 'Special Elite', 'Courier New', monospace;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--ink);
}

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

.body p:last-child { margin-bottom: 0; }

/* faint first-letter emphasis like a newspaper drop-cap, but typewriter */
.body p:first-child::first-letter {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-weight: 900;
  font-size: 2.2em;
  line-height: 1;
  float: left;
  margin: 0.05em 0.15em 0 0;
  color: var(--blood);
}

/* ----- empty state ----- */

.post.empty {
  text-align: center;
  background: transparent;
  color: var(--caution);
  box-shadow: none;
  clip-path: none;
  border: 2px dashed var(--caution);
}
.post.empty::before { display: none; }
.post.empty header  {
  border: none;
  justify-content: center;
  margin-left: 0;
}
.post.empty .body { color: var(--caution); }
.post.empty .body p::first-letter {
  font-family: inherit;
  font-style: normal;
  font-weight: normal;
  font-size: inherit;
  float: none;
  margin: 0;
  color: inherit;
}

/* ============================================================
   COLOPHON
   ============================================================ */

.colophon {
  max-width: 760px;
  margin: 4rem auto 0;
  padding: 2rem 1rem 0;
  text-align: center;
  border-top: 2px dashed rgba(245,213,71,0.3);
  color: var(--newsprint);
  opacity: 0.8;
}

.stamp {
  display: inline-block;
  font-family: 'Stardos Stencil', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.2em;
  padding: 0.4rem 1rem;
  border: 3px solid var(--blood-2);
  color: var(--blood-2);
  transform: rotate(-3deg);
  margin-bottom: 1.5rem;
  background: rgba(176,0,32,0.08);
}

.colophon p {
  font-family: 'Special Elite', monospace;
  font-size: 0.9rem;
  margin: 0.4rem 0;
}

.colophon .contact {
  font-family: 'Major Mono Display', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  opacity: 0.6;
  margin-top: 1rem;
}

.colophon code {
  background: rgba(245,213,71,0.15);
  padding: 0 0.3rem;
  color: var(--caution);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 600px) {
  .title .L { padding: 0.05em 0.15em; margin: 0 0.02em; }
  .post {
    padding: 1.25rem 1rem 1.25rem 1rem;
    margin-bottom: 1.75rem;
  }
  .post header { margin-left: 1rem; }
  .post::before { top: 10px; left: 10px; width: 8px; height: 8px; }
  .body p:first-child::first-letter { font-size: 1.8em; }
  .tape-top { font-size: 0.85rem; letter-spacing: 0.25em; }
}

/* respect reduced motion: we use no animation, but reduce skew if requested */
@media (prefers-reduced-motion: reduce) {
  .title .L,
  .tagline .w,
  .post,
  .stamp,
  .sender,
  .tape-top { transform: none !important; }
}
