/* July — editorial, warmed */
/* =================================================== */

:root {
  --paper: #f6ecd7;
  --paper-2: #ecdec0;
  --ink: #1a1815;
  --ink-2: #33302a;
  --ink-mute: #6d665a;
  --hair: rgba(26, 24, 21, 0.14);
  --hair-strong: rgba(26, 24, 21, 0.32);
  --accent: #b6522b;
  --accent-2: #d4823f;
  --sun-1: #ffcf70;
  --sun-2: #f19648;
  --sun-3: #d6552a;
  --sealed-mark: rgba(26, 24, 21, 0.34);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body { min-height: 100vh; position: relative; overflow-x: hidden; }

/* Sunrise band — top-of-page atmosphere. Slow-shift to breathe. */
.sunrise {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 900px;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(1200px 700px at 22% -10%, rgba(255, 207, 112, 0.55), transparent 55%),
    radial-gradient(1000px 600px at 85% 5%, rgba(214, 85, 42, 0.24), transparent 55%),
    radial-gradient(1400px 900px at 55% 5%, rgba(241, 150, 72, 0.28), transparent 60%),
    linear-gradient(180deg, rgba(255, 207, 112, 0.14) 0%, transparent 60%);
  animation: sunrise-breathe 26s ease-in-out infinite alternate;
}
@keyframes sunrise-breathe {
  from { opacity: 0.85; transform: translateY(-8px) scale(1.01); }
  to   { opacity: 1;    transform: translateY(0)   scale(1.03); }
}

/* Grain */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 2; opacity: 0.28;
  background-image:
    radial-gradient(1px 1px at 15% 25%, rgba(26,24,21,0.09), transparent 50%),
    radial-gradient(1px 1px at 55% 60%, rgba(26,24,21,0.06), transparent 50%),
    radial-gradient(1.2px 1.2px at 78% 30%, rgba(26,24,21,0.08), transparent 50%),
    radial-gradient(1px 1px at 30% 85%, rgba(26,24,21,0.06), transparent 50%);
  background-size: 220px 220px, 280px 280px, 190px 190px, 250px 250px;
  mix-blend-mode: multiply;
}

.page {
  position: relative;
  z-index: 3;
  max-width: 1080px;
  margin: 0 auto;
  padding: 40px 32px 80px;
}

/* Masthead */
.masthead { padding: 24px 0 24px; border-top: 1px solid var(--hair-strong); border-bottom: 1px solid var(--hair-strong); margin-bottom: 40px; }
.masthead-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 32px; }
.rule-eyebrow { font-family: "Inter", sans-serif; font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--ink-mute); font-weight: 500; }

.live-pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 12px;
  border: 1px solid var(--hair-strong);
  border-radius: 999px;
  text-decoration: none;
  font-family: "Inter", sans-serif; font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; font-weight: 600;
  color: var(--ink-2);
  transition: color 0.2s, border-color 0.2s;
}
.live-pill:hover { color: var(--accent); border-color: var(--accent); }
.live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 12px rgba(212, 130, 63, 0.7);
  animation: dotpulse 2.4s ease-in-out infinite;
}
@keyframes dotpulse { 0%,100% { opacity: 0.55; transform: scale(1); } 50% { opacity: 1; transform: scale(1.35); } }

.display {
  font-family: "Fraunces", serif; font-weight: 400;
  font-size: clamp(120px, 22vw, 260px); line-height: 0.85;
  letter-spacing: -0.04em; color: var(--ink); margin: 0 0 24px;
  font-variation-settings: "opsz" 144;
}
.deck {
  font-family: "Fraunces", serif; font-weight: 400; font-style: italic;
  font-size: clamp(22px, 3vw, 30px); line-height: 1.25;
  color: var(--ink-2); margin: 0; max-width: 32ch;
  font-variation-settings: "opsz" 40;
}

/* Poster — the big Day-01 moment */
.poster {
  margin: 40px 0 56px;
  border: 1px solid var(--hair-strong);
  background: rgba(255, 250, 240, 0.75);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.poster::before {
  content: ""; position: absolute; top: -1px; left: -1px;
  width: 10px; height: calc(100% + 2px);
  background: linear-gradient(180deg, var(--sun-3), var(--accent));
}
.poster-link {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 0;
  text-decoration: none; color: inherit;
}
.poster-art {
  aspect-ratio: 1 / 1;
  background:
    radial-gradient(80% 80% at 30% 30%, rgba(255, 255, 255, 0.6), transparent 55%),
    radial-gradient(120% 100% at 80% 70%, var(--sun-3) 0%, var(--sun-2) 45%, var(--sun-1) 100%);
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.poster-art::after {
  content: ""; position: absolute; inset: 0;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.06) 0 2px, transparent 2px 8px);
}
.poster-art-inner {
  position: relative; z-index: 1;
  width: 82%; height: 82%; border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, rgba(255,255,255,0.5), rgba(255,255,255,0.1) 60%, transparent 80%);
  display: grid; place-items: center;
  box-shadow: inset 0 0 60px rgba(214, 85, 42, 0.28), 0 20px 60px rgba(214, 85, 42, 0.28);
}
.poster-glyph {
  font-family: "Fraunces", serif; font-weight: 500;
  font-size: clamp(180px, 20vw, 260px);
  line-height: 1;
  color: var(--ink); letter-spacing: -0.04em;
  font-variation-settings: "opsz" 144;
  text-shadow: 0 8px 40px rgba(255,255,255,0.4);
  font-style: italic;
}
.poster-copy { padding: 40px 40px 32px; display: flex; flex-direction: column; gap: 16px; }
.poster-meta { display: flex; align-items: center; gap: 16px; }
.poster-badge {
  font-family: "Inter", sans-serif; font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase; font-weight: 600;
  color: var(--accent);
}
.poster-badge em { font-style: normal; }
.poster-when {
  font-family: "Inter", sans-serif; font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase; font-weight: 500;
  color: var(--ink-mute);
}
.poster-title {
  font-family: "Fraunces", serif; font-weight: 400;
  font-size: clamp(48px, 6vw, 76px); line-height: 0.95;
  letter-spacing: -0.025em; margin: 0; color: var(--ink);
  font-variation-settings: "opsz" 96;
}
.poster-tagline {
  font-family: "Fraunces", serif; font-weight: 400; font-style: italic;
  font-size: clamp(18px, 2.2vw, 22px); line-height: 1.4;
  color: var(--ink-2); margin: 0; max-width: 40ch;
  font-variation-settings: "opsz" 28;
}
.poster-actions { display: flex; align-items: center; gap: 16px; margin-top: 8px; flex-wrap: wrap; }
.poster-cta {
  font-family: "Inter", sans-serif; font-size: 13px; font-weight: 600; letter-spacing: 0.02em;
  color: var(--accent);
}
.poster-share, .poster-ics {
  font-family: "Inter", sans-serif; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 500;
  background: transparent; border: 1px solid var(--hair-strong); color: var(--ink-2);
  padding: 6px 12px; border-radius: 2px; cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.poster-share:hover, .poster-ics:hover { color: var(--accent); border-color: var(--accent); }
.poster-next {
  border-top: 1px solid var(--hair);
  padding: 14px 40px;
  display: flex; justify-content: space-between; align-items: baseline;
}
.poster-next-label { font-family: "Inter", sans-serif; font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--ink-mute); font-weight: 500; }
.poster-next-time { font-family: "Fraunces", serif; font-weight: 500; font-size: 22px; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; font-variation-settings: "opsz" 32; }

/* Contents */
.contents { border-top: 1px solid var(--hair-strong); padding-top: 8px; }

/* Chapter opener — the big typographic break between weeks */
.chapter {
  padding: 56px 0 24px;
  display: grid;
  grid-template-columns: 220px 1fr auto;
  gap: 40px;
  align-items: baseline;
  border-bottom: 1px solid var(--hair);
  margin-bottom: 8px;
  position: relative;
}
.chapter-num {
  font-family: "Fraunces", serif; font-weight: 300;
  font-size: 148px; line-height: 0.82;
  color: var(--ink); letter-spacing: -0.045em;
  font-variation-settings: "opsz" 144;
}
.chapter-body { padding-top: 8px; }
.chapter-eyebrow {
  font-family: "Inter", sans-serif; font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase; font-weight: 600;
  color: var(--accent);
  margin-bottom: 8px;
}
.chapter-name {
  font-family: "Fraunces", serif; font-weight: 500; font-style: italic;
  font-size: clamp(28px, 3.4vw, 44px); line-height: 1.05;
  color: var(--ink); margin: 0 0 12px; letter-spacing: -0.015em;
  font-variation-settings: "opsz" 60;
}
.chapter-epigraph {
  font-family: "Fraunces", serif; font-weight: 400; font-style: italic;
  color: var(--ink-mute); font-size: 15px; line-height: 1.5; max-width: 44ch;
  font-variation-settings: "opsz" 20;
  margin: 0;
}
.chapter-dates {
  font-family: "Inter", sans-serif; font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--ink-mute); font-weight: 500; white-space: nowrap;
}
.chapter.current .chapter-num { color: var(--accent); }

.row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: baseline;
  padding: 18px 0;
  border-bottom: 1px solid var(--hair);
  gap: 20px;
  color: var(--ink);
  text-decoration: none;
  transition: background 0.15s;
  position: relative;
}
.row:last-child { border-bottom: none; }
.row:hover { background: rgba(214, 85, 42, 0.06); }
.row-num {
  font-family: "Fraunces", serif; font-weight: 400; font-size: 26px;
  color: var(--ink); line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
  font-variation-settings: "opsz" 40;
}
.row-body { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.row-title { font-family: "Fraunces", serif; font-size: 22px; font-weight: 500; color: var(--ink); line-height: 1.15; letter-spacing: -0.01em; font-variation-settings: "opsz" 32; }
.row-title.sealed { color: var(--sealed-mark); font-style: italic; font-weight: 400; }
.row-mark {
  color: var(--sealed-mark);
  font-family: "Fraunces", serif;
  font-size: 22px;
  letter-spacing: 0.12em;
  font-style: italic;
  font-variation-settings: "opsz" 40;
}
.row-dash { color: var(--hair-strong); font-family: "Fraunces", serif; font-size: 22px; font-weight: 300; }
.row-tag { font-family: "Fraunces", serif; font-style: italic; font-weight: 400; color: var(--ink-mute); font-size: 14px; line-height: 1.4; font-variation-settings: "opsz" 20; }
.row-status {
  font-family: "Inter", sans-serif; font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-mute); font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.row-status .cd { font-family: "Fraunces", serif; font-weight: 500; font-size: 15px; letter-spacing: 0; color: var(--ink-2); text-transform: none; font-variation-settings: "opsz" 20; }
.row.opened .row-status { color: var(--accent); font-weight: 600; }
.row.today { background: rgba(214, 85, 42, 0.08); }
.row.today::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); }
.row.today .row-title { color: var(--accent); }
.row.today .row-num { color: var(--accent); }

/* Toast */
.toast {
  position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%);
  padding: 10px 18px; background: var(--ink); color: var(--paper);
  font-family: "Inter", sans-serif; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
  border-radius: 2px; z-index: 40; opacity: 0; pointer-events: none;
  transition: opacity 0.25s;
}
.toast.show { opacity: 1; }

/* Colophon */
.colo { margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--hair-strong); display: flex; justify-content: space-between; align-items: baseline; gap: 24px; flex-wrap: wrap; }
.colo-label { font-family: "Inter", sans-serif; font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--ink-mute); font-weight: 500; margin-right: 12px; }
.colo-value { font-family: "Fraunces", serif; font-style: italic; color: var(--ink-2); font-size: 15px; font-variation-settings: "opsz" 20; }
.colo code { font-family: "JetBrains Mono", ui-monospace, monospace; font-style: normal; font-size: 13px; background: var(--paper-2); padding: 2px 6px; border-radius: 2px; border: 1px solid var(--hair); color: var(--ink); }
.colo-cred { font-family: "Inter", sans-serif; font-size: 12px; color: var(--ink-mute); }
.colo-cred a { color: var(--ink-2); text-decoration: none; border-bottom: 1px solid var(--hair-strong); }
.colo-cred a:hover { color: var(--accent); border-color: var(--accent); }

/* Responsive */
@media (max-width: 820px) {
  .page { padding: 24px 18px 60px; }
  .masthead-top { flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 20px; }
  .poster-link { grid-template-columns: 1fr; }
  .poster-art { aspect-ratio: 1.4 / 1; }
  .poster-copy { padding: 28px 24px; }
  .poster-next { padding: 12px 24px; }
  .chapter { grid-template-columns: 1fr; gap: 4px; padding: 40px 0 20px; }
  .chapter-num { font-size: 92px; }
  .chapter-dates { justify-self: start; }
  .row { grid-template-columns: 40px 1fr; }
  .row-status { grid-column: 2; justify-self: start; margin-top: 2px; }
  .row-body { flex-direction: column; align-items: flex-start; gap: 2px; }
  .row-dash { display: none; }
}
