@import url('https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:wght@400;700&family=Crimson+Pro:wght@400;500;600;700&display=swap');

/* ===== CSS Custom Properties ===== */
:root {
  --red: #ff0000;
  --pink: #ff006e;
  --ink: #1a1a2e;
  --ink-mid: #16213e;
  --ink-light: #0f3460;
  --cyan: #00ffff;
  --white: #f0f0f0;
  --muted: #8888aa;
  --glow-red: 0 0 8px #ff0000, 0 0 20px #ff000088;
  --glow-pink: 0 0 8px #ff006e, 0 0 20px #ff006e88;
  --glow-cyan: 0 0 8px #00ffff, 0 0 20px #00ffff66;
  --font-head: 'Crimson Pro', Georgia, serif;
  --font-body: 'Atkinson Hyperlegible', system-ui, sans-serif;
  --nav-h: 64px;
  --radius-card: 28px;
  --max-content: 720px;
  --max-wide: 1200px;
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  min-height: 100vh;
  padding-bottom: var(--nav-h);
  overflow-x: hidden;
}

/* ===== CRT Scanlines Overlay ===== */
.scanlines-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(0,0,0,0.18) 2px,
    rgba(0,0,0,0.18) 4px
  );
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.2;
  color: var(--white);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2.1rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.6rem); }

h2 > span, h3 > span {
  display: inline;
  border-bottom: 2px solid var(--red);
  padding-bottom: 2px;
}

p { margin-bottom: 1rem; }

a {
  color: var(--pink);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s, text-shadow 0.2s;
}

a:hover, a:focus {
  color: var(--cyan);
  text-shadow: var(--glow-cyan);
  outline: none;
}

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

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

/* ===== Site Header (top brand bar) ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: rgba(26, 26, 46, 0.96);
  border-bottom: 1px solid var(--red);
  box-shadow: 0 0 16px #ff000044;
  height: 52px;
  display: flex;
  align-items: center;
}

.header-inner {
  width: 100%;
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0 1rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--white);
}

.brand-logo:hover { color: var(--white); text-shadow: none; }

.logo-mark {
  font-size: 1.4rem;
  color: var(--red);
  text-shadow: var(--glow-red);
}

.brand-name {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--white);
  text-shadow: var(--glow-red);
}

/* ===== Bottom Nav Bar ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 300;
  background: rgba(22, 33, 62, 0.98);
  border-top: 2px solid var(--red);
  box-shadow: 0 -4px 24px #ff000044;
  height: var(--nav-h);
}

.bottom-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0 0.75rem;
  gap: 0.25rem;
}

.nav-links-left,
.nav-links-right {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  flex: 1;
}

.nav-links-right { justify-content: flex-end; }

.nav-link {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  padding: 0 0.35rem;
  min-height: 44px;
  display: flex;
  align-items: center;
  transition: color 0.2s;
  white-space: nowrap;
}

.nav-link:hover, .nav-link:focus {
  color: var(--red);
  text-shadow: var(--glow-red);
}

.brand-center-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-mark-nav {
  font-size: 1.6rem;
  color: var(--red);
  text-shadow: var(--glow-red);
}

/* ===== CTA Buttons ===== */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 1rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 6px;
  transition: box-shadow 0.2s, background 0.2s, color 0.2s;
  white-space: nowrap;
  cursor: pointer;
}

.cta-signup {
  background: var(--red);
  color: var(--white);
  border: 2px solid var(--red);
  box-shadow: var(--glow-red);
}

.cta-signup:hover, .cta-signup:focus {
  background: #cc0000;
  color: var(--white);
  box-shadow: 0 0 16px #ff0000cc;
  text-shadow: none;
}

.cta-login {
  background: transparent;
  color: var(--pink);
  border: 2px solid var(--pink);
}

.cta-login:hover, .cta-login:focus {
  background: rgba(255,0,110,0.12);
  color: var(--white);
  text-shadow: none;
  box-shadow: var(--glow-pink);
}

.cta-block {
  display: flex;
  width: 100%;
  margin-top: 1rem;
  justify-content: center;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(160deg, #0f0f23 0%, #1a1a2e 60%, #16213e 100%);
  margin-top: 52px;
  padding: 4rem 1.5rem 8rem;
}

.hero-bg-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-head);
  font-size: clamp(8rem, 25vw, 22rem);
  font-weight: 700;
  color: rgba(255,0,0,0.04);
  letter-spacing: 0.1em;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.25;
}

.hero-media-placeholder {
  background: radial-gradient(ellipse at center, #ff000022 0%, transparent 70%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 860px;
}

.hero-h1 {
  font-size: clamp(2.2rem, 6vw, 4.5rem);
  color: var(--white);
  text-shadow: var(--glow-red);
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
}

.hero-desc {
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto;
}

.hero-curve {
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 80px;
  background: var(--ink);
  clip-path: ellipse(55% 100% at 50% 100%);
  z-index: 2;
}

/* ===== Glitch Effect ===== */
.glitch {
  position: relative;
}

@media (prefers-reduced-motion: no-preference) {
  .glitch::before,
  .glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    overflow: hidden;
    clip-path: inset(0 0 60% 0);
  }

  .glitch::before {
    color: var(--cyan);
    text-shadow: none;
    animation: glitch-top 3.5s infinite linear;
    opacity: 0.7;
  }

  .glitch::after {
    color: var(--pink);
    clip-path: inset(60% 0 0 0);
    text-shadow: none;
    animation: glitch-bot 3.5s infinite linear;
    opacity: 0.7;
  }

  @keyframes glitch-top {
    0%, 90%, 100% { transform: translate(0,0) skewX(0deg); }
    92% { transform: translate(-3px, -1px) skewX(-2deg); }
    94% { transform: translate(3px, 0) skewX(1deg); }
    96% { transform: translate(0,0) skewX(0deg); }
  }

  @keyframes glitch-bot {
    0%, 90%, 100% { transform: translate(0,0) skewX(0deg); }
    92% { transform: translate(3px, 1px) skewX(2deg); }
    94% { transform: translate(-3px, 0) skewX(-1deg); }
    96% { transform: translate(0,0) skewX(0deg); }
  }
}

/* ===== Main Grid (sidebar left + content right) ===== */
.main-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
  align-items: start;
}

/* ===== Sidebar ===== */
.sidebar {
  position: sticky;
  top: 68px;
  background: var(--ink-mid);
  border: 1px solid rgba(255,0,0,0.25);
  border-radius: var(--radius-card);
  box-shadow: 0 0 16px #ff000022;
  overflow: hidden;
}

.sidebar-inner {
  padding: 1.5rem 1.25rem;
}

.sidebar-heading {
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--red);
  text-shadow: var(--glow-red);
  margin-bottom: 1rem;
  font-family: var(--font-body);
  font-weight: 700;
}

.sidebar-heading > span { border-bottom: none; }

.sidebar-nav {
  list-style: none;
  margin-bottom: 0.5rem;
}

.sidebar-nav li { border-bottom: 1px solid rgba(255,255,255,0.05); }

.sidebar-nav li:last-child { border-bottom: none; }

.sidebar-nav a {
  display: block;
  padding: 0.6rem 0.25rem;
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s, padding-left 0.2s;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.sidebar-nav a:hover, .sidebar-nav a:focus {
  color: var(--red);
  padding-left: 0.5rem;
  text-shadow: var(--glow-red);
}

/* ===== Content Section ===== */
.content-section {
  min-width: 0;
}

.neon-accent-figure {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1.5rem;
}

.neon-diamond {
  font-size: 2rem;
  color: var(--red);
  text-shadow: var(--glow-red);
  animation: pulse-glow 2.5s ease-in-out infinite alternate;
}

@media (prefers-reduced-motion: no-preference) {
  @keyframes pulse-glow {
    from { text-shadow: var(--glow-red); }
    to { text-shadow: 0 0 24px #ff0000cc, 0 0 48px #ff000066; }
  }
}

/* ===== Body Copy ===== */
.body-copy {
  max-width: var(--max-content);
}

.body-copy h2 > span,
.body-copy h3 > span {
  border-bottom: 2px solid var(--red);
  padding-bottom: 2px;
}

.body-copy h2,
.body-copy h3 {
  margin: 2rem 0 0.75rem;
}

.body-copy ul,
.body-copy ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.body-copy li { margin-bottom: 0.4rem; }

.body-copy table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
  overflow-x: auto;
  display: block;
}

.body-copy th {
  background: var(--red);
  color: var(--white);
  padding: 0.6rem 0.75rem;
  text-align: left;
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.body-copy td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  color: var(--white);
}

.body-copy tr:nth-child(even) td { background: rgba(255,0,110,0.05); }

.body-copy blockquote {
  border-left: 4px solid var(--red);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  background: rgba(255,0,0,0.06);
  font-style: italic;
  color: var(--muted);
}

.body-copy a {
  color: var(--pink);
  text-decoration: underline;
}

.body-copy a:hover { color: var(--cyan); }

/* ===== Child Cards (home & category) ===== */
.child-cards-section,
.child-list-section,
.tagged-pages-section {
  margin-top: 3rem;
}

.child-cards-section h2,
.child-list-section h2,
.tagged-pages-section h2 {
  margin-bottom: 1.5rem;
}

.child-dl,
.category-dl,
.tag-dl {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  list-style: none;
}

.child-card {
  background: var(--ink-mid);
  border-radius: var(--radius-card);
  border-bottom: 3px solid var(--red);
  padding: 1.25rem 1.25rem 1.5rem;
  box-shadow: 0 2px 16px #ff000018;
  transition: transform 0.18s, box-shadow 0.18s;
}

.child-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 28px #ff00004a;
}

.child-card dt {
  margin-bottom: 0.5rem;
}

.child-card dt a {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--white);
  text-decoration: none;
  line-height: 1.3;
  transition: color 0.2s;
}

.child-card dt a:hover,
.child-card dt a:focus {
  color: var(--red);
  text-shadow: var(--glow-red);
}

.child-card dd {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ===== Category Hero ===== */
.category-hero {
  position: relative;
  padding: 7rem 1.5rem 4rem;
  margin-top: 52px;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(180deg, #0f0f23 0%, var(--ink) 100%);
}

.category-hero-bg-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-head);
  font-size: clamp(5rem, 18vw, 14rem);
  font-weight: 700;
  color: rgba(255,0,110,0.04);
  letter-spacing: 0.12em;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.category-hero-copy { position: relative; z-index: 1; }

.category-h1 {
  color: var(--white);
  text-shadow: var(--glow-pink);
  margin-bottom: 0.75rem;
}

.category-desc {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto;
}

/* ===== Tag Hero ===== */
.tag-hero {
  margin-top: 52px;
  padding: 5rem 1.5rem 3rem;
  text-align: center;
  background: linear-gradient(180deg, #0f0f23 0%, var(--ink) 100%);
  border-bottom: 1px solid rgba(255,0,110,0.2);
}

.tag-hero-eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--pink);
  text-shadow: var(--glow-pink);
  margin-bottom: 0.75rem;
}

.tag-h1 {
  color: var(--white);
  text-shadow: var(--glow-pink);
  margin-bottom: 0.5rem;
}

.tag-desc { color: var(--muted); max-width: 500px; margin: 0 auto; }

/* ===== Article Layout ===== */
.article-main { padding-top: 2rem; }

.article-section { margin-top: 52px; padding-top: 1.5rem; }

.article-hero-figure {
  width: 100%;
  border-radius: var(--radius-card);
  overflow: hidden;
  margin-bottom: 1.5rem;
  min-height: 80px;
  background: var(--ink-mid);
  display: flex;
  align-items: center;
  justify-content: center;
}

img.article-hero-img {
  width: 100%;
  height: auto;
  display: block;
}

.article-hero-neon {
  border: 1px solid rgba(255,0,0,0.2);
  padding: 2rem;
}

.article-meta-aside {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.byline {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--muted);
}

.byline strong { color: var(--white); }

.byline time { color: var(--pink); }

.stage-label {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-weight: 700;
}

.stage-awareness { background: rgba(0,255,255,0.1); color: var(--cyan); border: 1px solid var(--cyan); }
.stage-consideration { background: rgba(255,0,110,0.1); color: var(--pink); border: 1px solid var(--pink); }
.stage-decision { background: rgba(255,0,0,0.1); color: var(--red); border: 1px solid var(--red); }

.article-h1 {
  margin-bottom: 1.5rem;
  color: var(--white);
  text-shadow: 0 0 16px rgba(255,0,0,0.3);
}

.article-dates {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  color: var(--muted);
  font-size: 0.85rem;
}

.article-dates time { color: var(--pink); }

/* ===== Page H1 (about/privacy) ===== */
.page-h1 {
  margin-bottom: 1.5rem;
  color: var(--white);
  text-shadow: 0 0 16px rgba(255,0,110,0.3);
}

/* ===== Author Section ===== */
.author-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid rgba(255,0,0,0.2);
}

.author-section h2 {
  margin-bottom: 1.25rem;
}

.author-card {
  background: var(--ink-mid);
  border-left: 4px solid var(--red);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  padding: 1.5rem;
  box-shadow: 0 0 20px #ff000018;
}

.author-name {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.25rem;
}

.author-credentials {
  font-size: 0.85rem;
  color: var(--pink);
  text-shadow: var(--glow-pink);
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.author-bio {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--ink-mid);
  border-top: 2px solid rgba(255,0,0,0.3);
  padding-bottom: calc(var(--nav-h) + 1rem);
}

.footer-inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.footer-brand-name {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
  text-shadow: var(--glow-red);
  margin-bottom: 0.5rem;
}

.footer-desc {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.footer-address {
  font-style: normal;
  margin-bottom: 1rem;
}

.footer-address a {
  color: var(--muted);
  font-size: 0.85rem;
}

.footer-trust-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.footer-trust-links li a {
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: underline;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.footer-trust-links li a:hover { color: var(--pink); }

/* Footer Nav DL */
.footer-nav-dl {
  display: grid;
  gap: 0;
}

.footer-nav-dl dt {
  margin-top: 0.75rem;
}

.footer-nav-dl dt:first-child { margin-top: 0; }

.footer-nav-dl dt a {
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--white);
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: color 0.2s;
}

.footer-nav-dl dt a:hover { color: var(--red); text-shadow: var(--glow-red); }

.footer-nav-dl dd {
  font-size: 0.82rem;
  color: var(--muted);
  padding-left: 0.5rem;
  border-left: 2px solid rgba(255,0,0,0.2);
  margin-left: 0.25rem;
  line-height: 1.4;
}

/* Footer Bottom */
.footer-bottom {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  text-align: center;
}

.copyright {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0;
}

.rg-notice {
  font-size: 0.78rem;
  color: rgba(136,136,170,0.75);
  margin: 0;
  font-weight: 400;
}

/* ===== Pixel Baseball Icon ===== */
.pixel-baseball {
  font-size: 2.5rem;
  filter: drop-shadow(0 0 8px var(--red));
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .main-grid {
    grid-template-columns: 200px 1fr;
    gap: 1.25rem;
    padding: 2rem 1rem 3rem;
  }
}

@media (max-width: 700px) {
  .main-grid {
    grid-template-columns: 1fr;
    padding: 1.5rem 1rem 3rem;
  }

  .sidebar {
    position: static;
    order: 2;
  }

  .content-section {
    order: 1;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .child-dl,
  .category-dl,
  .tag-dl {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 70vh;
    padding-bottom: 6rem;
  }

  .hero-h1 { font-size: clamp(1.8rem, 8vw, 2.8rem); }
}

@media (max-width: 600px) {
  .bottom-nav-inner {
    padding: 0 0.4rem;
  }

  .nav-link {
    font-size: 0.62rem;
    padding: 0 0.2rem;
  }

  .cta {
    font-size: 0.65rem;
    padding: 0 0.5rem;
    min-height: 44px;
  }

  .brand-center-nav {
    min-width: 36px;
  }
}

/* ===== Parallax Scroll (reduced if prefers-reduced-motion) ===== */
@media (prefers-reduced-motion: no-preference) {
  .hero-bg-text {
    will-change: transform;
  }
}

/* ===== Hover micro-interactions ===== */
.child-card dt a:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
  border-radius: 3px;
}

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

/* ===== Utility ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

a[data-cta],button[aria-controls]{min-height:44px;min-width:44px;box-sizing:border-box}main p a{text-decoration:underline}