/* ── paper: the launch edition ─────────────────────────────────
   Newsprint, ink, one shade of red. Everything else is typography. */

:root {
  --paper: #f5f0e3;
  --paper-deep: #ece5d3;
  --ink: #1c1712;
  --ink-soft: #4a4238;
  --ink-faint: #857a68;
  --red: #a32c26;
  --rule: #1c1712;
  --serif-display: "Playfair Display", "Georgia", serif;
  --serif-body: "Old Standard TT", "Georgia", serif;
  --blackletter: "UnifrakturCook", "Playfair Display", serif;
  --measure: 62ch;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--paper-deep);
  color: var(--ink);
  font-family: var(--serif-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* the sheet of newsprint, laid on a darker desk */
.sheet {
  position: relative;
  max-width: 1080px;
  margin: 28px auto 64px;
  padding: 40px clamp(20px, 5vw, 64px) 48px;
  background:
    radial-gradient(ellipse 120% 90% at 50% 0%, rgba(255,255,255,.45), transparent 60%),
    var(--paper);
  box-shadow:
    0 1px 2px rgba(28,23,18,.25),
    0 12px 40px rgba(28,23,18,.28),
    inset 0 0 120px rgba(120,100,70,.10);
}
/* paper grain */
.sheet::before {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.42 0 0 0 0 0.36 0 0 0 0 0.26 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
}
.sheet > * { position: relative; }

/* ── github ribbon ── */
.ribbon {
  position: fixed;
  top: 0; right: 0;
  z-index: 20;
  width: 220px;
  text-align: center;
  transform: translate(62px, 40px) rotate(45deg);
  background: var(--red);
  color: #f5f0e3;
  font-family: var(--serif-display);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  padding: 9px 0;
  text-decoration: none;
  border-top: 1px dashed rgba(245,240,227,.6);
  border-bottom: 1px dashed rgba(245,240,227,.6);
  box-shadow: 0 4px 14px rgba(28,23,18,.35);
  transition: filter .15s ease;
}
.ribbon:hover { filter: brightness(1.12); }

/* ── rules ── */
.rule { border-top: 1px solid var(--rule); border-bottom: 3px double var(--rule); height: 6px; }
.rule-heavy { transform-origin: left; animation: press-rule 1s cubic-bezier(.77,0,.18,1) both; }
.rule-thin { border-top: 1px solid var(--ink); margin: 6px 0 12px; }
@keyframes press-rule { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ── masthead ── */
.ears {
  display: flex; justify-content: space-between;
  font-style: italic; color: var(--ink-soft);
  font-size: .85rem; margin-bottom: 8px;
}
.title {
  font-family: var(--blackletter);
  font-weight: 700;
  text-align: center;
  font-size: clamp(4.2rem, 13vw, 8.5rem);
  line-height: 1.05;
  letter-spacing: .01em;
  margin: 6px 0 2px;
  text-shadow: 2px 2px 0 rgba(28,23,18,.08);
}
.dateline {
  text-align: center;
  font-size: .82rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 4px 0 10px;
}
.red { color: var(--red); }

/* ── lead story ── */
.lead { margin-top: 38px; text-align: center; }
.intro {
  max-width: 58ch;
  margin: 0 auto 30px;
  font-size: 1.08rem;
  line-height: 1.65;
}
.headline {
  font-family: var(--serif-display);
  font-weight: 900;
  text-align: center;
  font-size: clamp(2rem, 5.4vw, 3.6rem);
  line-height: 1.06;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.deck {
  text-align: center;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ink-soft);
  margin: 10px 0 26px;
}
.deck::before, .deck::after { content: ""; }

.sc { font-variant: small-caps; letter-spacing: .04em; }

/* ── subscribe box (the classified ad) ── */
.subscribe {
  max-width: 460px;
  margin: 0 auto;
  text-align: left;
  border: 2px solid var(--ink);
  outline: 1px solid var(--ink);
  outline-offset: 3px;
  padding: 16px 16px 14px;
  background: rgba(255,255,255,.35);
  transition: transform .18s ease, box-shadow .18s ease;
}
.subscribe:hover {
  transform: translateY(-2px) rotate(-.3deg);
  box-shadow: 4px 6px 0 rgba(28,23,18,.18);
}
.subscribe-kicker {
  font-size: .72rem; letter-spacing: .3em; text-align: center;
  color: var(--red); font-weight: 700;
}
.subscribe pre {
  font-family: "SFMono-Regular", ui-monospace, "Menlo", monospace;
  font-size: .72rem;
  line-height: 1.7;
  background: var(--ink);
  color: #f0e9d8;
  padding: 12px 12px;
  overflow-x: auto;
  margin: 4px 0 10px;
}
.subscribe pre code::before { content: "$ "; color: #b8a97f; }
.copy {
  width: 100%;
  font-family: var(--serif-body);
  font-style: italic;
  font-size: .85rem;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
  padding: 7px 10px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.copy:hover { background: var(--ink); color: var(--paper); }
.gh {
  display: block;
  margin-top: 12px;
  text-align: center;
  font-size: .8rem;
  letter-spacing: .05em;
  color: var(--red);
  text-decoration: none;
  border-top: 1px solid rgba(28,23,18,.3);
  padding-top: 10px;
}
.gh:hover { text-decoration: underline; }

/* ── dinkus ── */
.dinkus {
  text-align: center;
  color: var(--ink-faint);
  margin: 34px 0 26px;
  letter-spacing: .4em;
  font-size: .8rem;
}

/* ── photographs ── */
.photo { margin: 36px auto 0; max-width: 940px; }
.photo-print { max-width: 720px; }
.photo img {
  display: block;
  width: 100%;
  border: 1px solid rgba(28,23,18,.55);
  padding: 8px;
  background: #fbf8ef;
  box-shadow: 0 8px 26px rgba(28,23,18,.18);
  filter: sepia(.08) contrast(1.02);
}
.photo figcaption {
  font-size: .82rem;
  font-style: italic;
  color: var(--ink-soft);
  text-align: center;
  margin-top: 10px;
}

/* ── colophon ── */
.colophon { margin-top: 40px; text-align: center; }
.colophon p { margin-top: 14px; font-size: .85rem; font-style: italic; color: var(--ink-soft); }
.colophon a { color: var(--red); }
.end {
  letter-spacing: .5em;
  font-size: .7rem !important;
  font-style: normal !important;
  color: var(--ink-faint) !important;
  margin-top: 10px !important;
}

/* ── load choreography ── */
.reveal { animation: rise .9s cubic-bezier(.2,.7,.2,1) both; }
.d1 { animation-delay: .15s; }
.d2 { animation-delay: .3s; }
.d3 { animation-delay: .45s; }
.d4 { animation-delay: .6s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal, .rule-heavy { animation: none; }
}

/* ── smaller presses ── */

@media (max-width: 620px) {
  body { font-size: 16px; }
  .ribbon { display: none; }
  .sheet { margin: 0; padding: 24px 18px 40px; }
  .ears { font-size: .72rem; }
}
