/* The PressBox Grift Report: production theme
   Crisp, editorial, mobile-first. Light + dark. Zero framework. */

:root {
  --bg: #f6f3ec;
  --bg-elev: #fffcf6;
  --ink: #141210;
  --ink-muted: #5c574e;
  --rule: #d9d3c7;
  --accent: #b42318;
  --accent-hover: #8f1c14;
  --chip: #efebe3;
  --chip-active-ink: #fffaf3;
  --focus: #141210;
  --share-bg: #141210;
  --share-ink: #f6f3ec;
  --font-serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-sans: "Inter", "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --max-article: 42rem;
  --max-wide: 68rem;
  --header-h: 4.25rem;
  --radius: 999px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12110f;
    --bg-elev: #1c1b18;
    --ink: #f3efe6;
    --ink-muted: #a9a297;
    --rule: #2e2c28;
    --accent: #e85d4c;
    --accent-hover: #ff7a6b;
    --chip: #24221e;
    --chip-active-ink: #141210;
    --focus: #f3efe6;
    --share-bg: #f3efe6;
    --share-ink: #141210;
    color-scheme: dark;
  }
}

[data-theme="dark"] {
  --bg: #12110f;
  --bg-elev: #1c1b18;
  --ink: #f3efe6;
  --ink-muted: #a9a297;
  --rule: #2e2c28;
  --accent: #e85d4c;
  --accent-hover: #ff7a6b;
  --chip: #24221e;
  --chip-active-ink: #141210;
  --focus: #f3efe6;
  --share-bg: #f3efe6;
  --share-ink: #141210;
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f6f3ec;
  --bg-elev: #fffcf6;
  --ink: #141210;
  --ink-muted: #5c574e;
  --rule: #d9d3c7;
  --accent: #b42318;
  --accent-hover: #8f1c14;
  --chip: #efebe3;
  --chip-active-ink: #fffaf3;
  --focus: #141210;
  --share-bg: #141210;
  --share-ink: #f6f3ec;
  color-scheme: light;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-hover);
}

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

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  z-index: 100;
  background: var(--ink);
  color: var(--bg);
  padding: 0.5rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.skip-link:focus {
  top: 0.75rem;
}

.wrap {
  width: min(100% - 2rem, var(--max-wide));
  margin-inline: auto;
}

.wrap-article {
  width: min(100% - 2rem, var(--max-article));
  margin-inline: auto;
}

/* Header
   ------------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  min-height: var(--header-h);
  flex-wrap: wrap;
  padding-block: 0.55rem;
}

.wordmark {
  display: inline-flex;
  flex-direction: column;
  gap: 0.08rem;
  color: inherit;
  text-decoration: none;
  line-height: 1;
}

.wordmark:hover {
  color: inherit;
}

.wordmark-name {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.wordmark-tag {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.72rem;
  letter-spacing: 0.01em;
  color: var(--ink-muted);
  text-transform: none;
}

.nav-row {
  display: flex;
  align-items: center;
  gap: 0.15rem 0.2rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 550;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ink);
  background: var(--chip);
}

.theme-toggle {
  appearance: none;
  border: 1px solid var(--rule);
  background: var(--bg-elev);
  color: var(--ink);
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  margin-left: 0.35rem;
  padding: 0;
}

.theme-toggle:hover {
  border-color: var(--ink-muted);
}

.theme-toggle svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Icon shows the theme you will switch to. */
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

/* Main
   ------------------------------------------------------------------ */
.site-main {
  flex: 1;
  padding: 1.75rem 0 4rem;
}

.kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.7rem;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 0.85rem;
}

.kicker .beat {
  color: var(--accent);
  letter-spacing: 0.16em;
}

.headline {
  font-family: var(--font-serif);
  font-weight: 650;
  font-optical-sizing: auto;
  letter-spacing: -0.025em;
  line-height: 1.12;
  margin: 0 0 0.85rem;
  font-size: clamp(1.85rem, 4.6vw, 3.05rem);
  text-wrap: balance;
}

.deck {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.05rem, 2.2vw, 1.28rem);
  line-height: 1.4;
  color: var(--ink-muted);
  margin: 0 0 1.15rem;
  text-wrap: pretty;
}

.byline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  font-size: 0.88rem;
  color: var(--ink-muted);
  margin: 0 0 1.75rem;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid var(--rule);
}

.byline strong {
  color: var(--ink);
  font-weight: 600;
}

/* Article body
   ------------------------------------------------------------------ */
.prose {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  line-height: 1.68;
  font-optical-sizing: auto;
}

.prose > p:first-of-type::first-letter {
  font-weight: 650;
  font-size: 3.15rem;
  float: left;
  line-height: 0.72;
  padding: 0.18em 0.1em 0 0;
  color: var(--ink);
}

.prose p {
  margin: 0 0 1.1em;
}

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

.prose h2,
.prose h3 {
  font-family: var(--font-serif);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 1.6em 0 0.6em;
}

.prose h2 { font-size: 1.45rem; }
.prose h3 { font-size: 1.22rem; }

.prose ul,
.prose ol {
  margin: 0 0 1.1em;
  padding-left: 1.25em;
}

.prose li + li {
  margin-top: 0.35em;
}

.prose blockquote {
  margin: 1.4em 0;
  padding: 0 0 0 1rem;
  border-left: 2px solid var(--accent);
  color: var(--ink-muted);
  font-style: italic;
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 2em 0;
}

.prose a {
  color: var(--ink);
  text-decoration-color: color-mix(in srgb, var(--accent) 70%, transparent);
}

.pull-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.25rem, 2.6vw, 1.65rem);
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 1.75rem 0;
  padding: 0.25rem 0 0.25rem 1.15rem;
  border-left: 3px solid var(--accent);
  text-wrap: pretty;
}

/* Share
   ------------------------------------------------------------------ */
.share-block {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
}

.share-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 0.85rem;
}

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.55rem 0.95rem;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.2;
  background: var(--chip);
  color: var(--ink);
}

.btn:hover {
  color: var(--ink);
  filter: brightness(0.97);
}

.btn-primary {
  background: var(--share-bg);
  color: var(--share-ink);
}

.btn-primary:hover {
  color: var(--share-ink);
  filter: brightness(1.15);
}

.btn-quiet {
  background: transparent;
  border-color: var(--rule);
}

.x-hook {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.x-hook q {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--ink);
}

.share-feedback {
  margin: 0.7rem 0 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  min-height: 1.2em;
}

.share-feedback:empty {
  display: none;
}

/* Recent + archive cards
   ------------------------------------------------------------------ */
.section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 3rem 0 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 700px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .card-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.post-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: 0.85rem;
  padding: 1.15rem 1.2rem 1.2rem;
  min-height: 100%;
}

.post-card h2,
.post-card h3 {
  font-family: var(--font-serif);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.2;
  font-size: 1.2rem;
  margin: 0;
  text-wrap: balance;
}

.post-card h2 a,
.post-card h3 a {
  color: inherit;
  text-decoration: none;
}

.post-card h2 a:hover,
.post-card h3 a:hover {
  color: var(--accent);
}

.post-card .excerpt {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.95rem;
  flex: 1;
}

.post-card .card-meta {
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.post-card .card-meta .beat {
  color: var(--accent);
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.4rem;
}

/* Archive filters
   ------------------------------------------------------------------ */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1.35rem;
}

.filter-btn {
  appearance: none;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius);
  cursor: pointer;
}

.filter-btn:hover {
  border-color: var(--ink-muted);
}

.filter-btn[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.archive-empty,
.filter-empty {
  color: var(--ink-muted);
  font-family: var(--font-serif);
  font-style: italic;
  margin: 1.5rem 0;
}

/* Launching soon
   ------------------------------------------------------------------ */
.launch {
  min-height: calc(80vh - var(--header-h));
  display: grid;
  place-items: center;
  text-align: center;
  padding: 2rem 0 3rem;
}

.launch-inner {
  width: min(100%, 38rem);
}

.launch-mark {
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.78rem;
  margin: 0 0 1.25rem;
}

.launch h1 {
  font-family: var(--font-serif);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.12;
  font-size: clamp(2.1rem, 6.5vw, 3.4rem);
  margin: 0 0 1rem;
  text-wrap: balance;
}

.launch p {
  color: var(--ink-muted);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem;
  margin: 0 0 1.5rem;
}

.launch-beats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  margin: 0 0 1.75rem;
  padding: 0;
  list-style: none;
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.launch-beats li {
  border: 1px solid var(--rule);
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius);
}

.accent-rule {
  width: 3rem;
  height: 3px;
  background: var(--accent);
  margin: 0 auto 1.35rem;
  border: 0;
}

/* About
   ------------------------------------------------------------------ */
.about-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 820px) {
  .about-grid {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: start;
  }
}

.panel {
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: 0.9rem;
  padding: 1.4rem 1.35rem 1.5rem;
}

.panel h1,
.panel h2 {
  font-family: var(--font-serif);
  font-weight: 650;
  letter-spacing: -0.02em;
  font-size: 1.55rem;
  margin: 0 0 0.9rem;
}

.panel p {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.65;
  margin: 0 0 1em;
}

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

.rule-callout {
  margin: 1.15rem 0 0;
  padding: 0.95rem 1rem;
  border-left: 3px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--bg));
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.02rem;
}

.rule-callout strong {
  display: block;
  font-family: var(--font-sans);
  font-style: normal;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
  font-weight: 700;
}

.facts {
  display: grid;
  gap: 0.85rem 1rem;
  margin: 0;
}

.facts > div {
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--rule);
}

.facts > div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.facts dt {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 0.25rem;
}

.facts dd {
  margin: 0;
  font-size: 0.98rem;
}

.page-title {
  font-family: var(--font-serif);
  font-weight: 650;
  letter-spacing: -0.03em;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin: 0 0 0.35rem;
}

.page-intro {
  color: var(--ink-muted);
  font-family: var(--font-serif);
  font-style: italic;
  margin: 0 0 1.5rem;
}

/* Footer
   ------------------------------------------------------------------ */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 1.4rem 0 1.8rem;
  color: var(--ink-muted);
  font-size: 0.82rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem 1.5rem;
}

.site-footer a {
  color: var(--ink-muted);
}

.site-footer p {
  margin: 0;
}

/* 404
   ------------------------------------------------------------------ */
.not-found {
  text-align: center;
  padding: 3rem 0;
}

.not-found h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.03em;
  margin: 0 0 0.6rem;
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media print {
  .site-header, .share-block, .site-footer, .theme-toggle, .card-actions {
    display: none !important;
  }
  body { background: #fff; color: #000; }
  .site-main { padding: 0; }
  .prose { font-size: 12pt; }
}
