/* Top Comic Books - editorial design system
   Visual language: ink, panel gutters, halftone texture, collector-shelf palette.
   Original system only - no publisher trade dress, characters, or cover art. */

:root {
  --ink: #14162b;
  --ink-soft: #2a2d4d;
  --paper: #f8f6f2;
  --paper-dim: #efece4;
  --accent: #e94f37;
  --accent-ink: #b93a28;
  --line: #dcd7cc;
  --focus: #2f7dd1;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(20, 22, 43, 0.08);
  --shadow-md: 0 8px 24px rgba(20, 22, 43, 0.12);
  --max-w: 1180px;
  --font-display: Georgia, 'Iowan Old Style', 'Palatino Linotype', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(rgba(20,22,43,0.05) 1px, transparent 1px) 0 0/16px 16px,
    var(--paper);
  line-height: 1.6;
}

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

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

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper);
  padding: 0.75rem 1rem; z-index: 100; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

a { color: var(--accent-ink); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 2px;
}

.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 1.25rem; }

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; color: var(--ink); }
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); margin-top: 2.5rem; }
h3 { font-size: 1.2rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(248, 246, 242, 0.92);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 3px solid var(--ink);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding-block: 0.85rem; gap: 1rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--ink); font-weight: 700; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.2rem; height: 2.2rem; border-radius: 6px; background: var(--ink); color: var(--paper);
  font-family: var(--font-display); font-size: 0.85rem; letter-spacing: 0.02em;
}
.brand-name { font-family: var(--font-display); font-size: 1.15rem; }

.nav-toggle {
  display: inline-flex; flex-direction: column; gap: 4px; width: 2.4rem; height: 2.4rem;
  align-items: center; justify-content: center; background: none; border: 2px solid var(--ink);
  border-radius: 8px; cursor: pointer;
}
.nav-toggle span { display: block; width: 1.2rem; height: 2px; background: var(--ink); }

.primary-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 1.25rem; margin: 0; padding: 0; }
.primary-nav a { text-decoration: none; color: var(--ink); font-weight: 600; padding: 0.3rem 0; border-bottom: 2px solid transparent; }
.primary-nav a:hover, .primary-nav a[aria-current="page"] { border-color: var(--accent); }

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .primary-nav {
    position: absolute; inset-inline: 0; top: 100%; background: var(--paper);
    border-bottom: 3px solid var(--ink); padding: 1rem 1.25rem;
    display: none;
  }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; gap: 0.9rem; }
}
@media (min-width: 761px) { .nav-toggle { display: none; } }

/* Hero */
.hero {
  border-bottom: 3px solid var(--ink);
  background: linear-gradient(180deg, var(--paper-dim), var(--paper));
  padding-block: clamp(2.5rem, 6vw, 5rem);
}
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 2.5rem; align-items: center; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }
.hero-eyebrow {
  display: inline-block; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  font-size: 0.78rem; color: var(--accent-ink); margin-bottom: 0.75rem;
}
.hero-lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 52ch; }
.hero-actions { display: flex; gap: 0.9rem; flex-wrap: wrap; margin-top: 1.5rem; }
.hero-media { border: 3px solid var(--ink); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 700; text-decoration: none;
  padding: 0.7rem 1.3rem; border-radius: 999px; border: 2px solid var(--ink); color: var(--ink);
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-cta { background: var(--accent); color: #fff; border-color: var(--accent-ink); }
.btn-cta:hover { background: var(--accent-ink); }
.btn-outline { background: transparent; }

/* Sections */
section { padding-block: clamp(2rem, 4vw, 3.5rem); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.section-head h2 { margin-top: 0; }
.section-lede { color: var(--ink-soft); max-width: 62ch; }

/* Hub grid */
.hub-grid, .card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; margin-top: 1.75rem; }
.hub-card, .guide-card {
  display: block; text-decoration: none; color: var(--ink); background: #fff;
  border: 2px solid var(--line); border-radius: var(--radius); padding: 1.4rem;
  box-shadow: var(--shadow-sm); transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.hub-card:hover, .guide-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--accent); }
.hub-card h3, .guide-card h3 { margin: 0 0 0.4rem; }
.hub-card p, .guide-card p { color: var(--ink-soft); margin: 0; }
.tag { display: inline-block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent-ink); margin-bottom: 0.5rem; }

/* Product cards */
.product-card {
  background: #fff; border: 2px solid var(--line); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.product-card-media { display: block; border-bottom: 2px solid var(--line); }
.product-card-body { padding: 1.1rem 1.2rem 1.4rem; }
.product-card h3 a { text-decoration: none; color: var(--ink); }

/* Article */
.article-head { border-bottom: 3px solid var(--ink); padding-block: 2rem 1.5rem; background: var(--paper-dim); }
.article-meta { display: flex; gap: 1rem; flex-wrap: wrap; color: var(--ink-soft); font-size: 0.92rem; margin-top: 0.6rem; }
.article-body { max-width: 74ch; margin: 0 auto; padding-block: 2rem; }
.article-body figure { margin: 2rem 0; }
.article-body figure img { border: 2px solid var(--ink); border-radius: 10px; }
.article-body figcaption { font-size: 0.88rem; color: var(--ink-soft); margin-top: 0.5rem; }
.article-body h2 { border-bottom: 2px dashed var(--line); padding-bottom: 0.35rem; }
.article-body ul, .article-body ol { padding-left: 1.3rem; }
.toc { background: #fff; border: 2px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.4rem; max-width: 74ch; margin: 1.5rem auto 0; }
.toc h2 { margin: 0 0 0.5rem; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.04em; }
.toc ol { margin: 0; padding-left: 1.2rem; }
.faq details { border-bottom: 1px solid var(--line); padding: 0.9rem 0; }
.faq summary { cursor: pointer; font-weight: 700; }
.inline-cta { text-align: center; padding: 1.5rem; background: var(--paper-dim); border-radius: var(--radius); border: 2px dashed var(--accent-ink); }

/* Breadcrumbs */
.breadcrumbs { font-size: 0.85rem; color: var(--ink-soft); }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0; margin: 0.75rem 0 0; }
.breadcrumbs li:not(:last-child)::after { content: '/'; margin-left: 0.4rem; color: var(--line); }
.breadcrumbs a { color: var(--ink-soft); }

/* Methodology / trust */
.method-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; margin-top: 1.5rem; }
.method-step { background: #fff; border: 2px solid var(--line); border-radius: var(--radius); padding: 1.3rem; }
.method-step .num { font-family: var(--font-display); font-size: 1.6rem; color: var(--accent-ink); }

.callout { background: #fff; border-left: 6px solid var(--accent); border-radius: 10px; padding: 1.1rem 1.3rem; box-shadow: var(--shadow-sm); }

/* Footer */
.site-footer { border-top: 3px solid var(--ink); background: var(--ink); color: var(--paper); margin-top: 3rem; }
.footer-inner { display: grid; grid-template-columns: 1.3fr repeat(3, 1fr); gap: 2rem; padding-block: 2.5rem; }
@media (max-width: 760px) { .footer-inner { grid-template-columns: 1fr; } }
.footer-brand p { color: #cfd0e0; max-width: 42ch; }
.footer-nav h2 { color: var(--paper); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 0.75rem; }
.footer-nav ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.55rem; }
.footer-nav a { color: #cfd0e0; text-decoration: none; }
.footer-nav a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.15); padding-block: 1.1rem; font-size: 0.82rem; color: #9d9fbd; }

/* Reveal-on-scroll (progressive enhancement only) */
.reveal { opacity: 1; transform: none; }
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.5s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* Legal / plain pages */
.prose { max-width: 74ch; margin: 0 auto; padding-block: 2rem; }
.prose h2 { margin-top: 2rem; }

/* 404 */
.error-page { text-align: center; padding-block: 5rem; }
