
/* ============================================================
   RESET & CUSTOM PROPERTIES
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --color-bg: #000000;
  --color-surface: #0d0d0d;
  --color-surface2: #141414;
  --color-border: #2a2a2a;
  --color-text: #f0f0f0;
  --color-muted: #888888;
  --color-accent: #ffffff;
  --color-neon: #ffd700;
  --color-neon2: #ff6b35;
  --font-display: 'Cinzel', 'Georgia', serif;
  --font-body: 'Josefin Sans', 'Helvetica Neue', Arial, sans-serif;
  --header-h: 72px;
  --max-w: 1240px;
  --radius-card: 18px;
  --transition: 0.25s ease;
}

html {
  font-size: 17px;
  line-height: 1.65;
  scroll-behavior: smooth;
  background: var(--color-bg);
  color: var(--color-text);
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  overflow-x: hidden;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-accent);
}

h1 { font-size: clamp(1.75rem, 5vw, 3.25rem); letter-spacing: 0.01em; }
h2 { font-size: clamp(1.3rem, 3vw, 2rem); margin-top: 2.5rem; margin-bottom: 0.5rem; }
h3 { font-size: 1.15rem; margin-top: 1.75rem; margin-bottom: 0.35rem; }
h4 { font-size: 1rem; margin-top: 1.25rem; }

p { margin-bottom: 1.1rem; }
a { color: var(--color-neon); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--color-neon2); }

strong { font-weight: 600; color: var(--color-accent); }
em { font-style: italic; }

ul, ol { padding-left: 1.5rem; margin-bottom: 1.1rem; }
li { margin-bottom: 0.4rem; }

blockquote {
  border-left: 4px solid var(--color-neon);
  margin: 2rem 0;
  padding: 1.25rem 1.75rem;
  background: var(--color-surface2);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  font-size: 1.15rem;
  font-style: italic;
  color: var(--color-neon);
}

blockquote p { margin: 0; }

figure { margin: 2rem 0; }
figcaption { font-size: 0.82rem; color: var(--color-muted); margin-top: 0.5rem; text-align: center; }

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.94rem;
}

th {
  background: var(--color-surface2);
  font-family: var(--font-display);
  font-weight: 600;
  text-align: left;
  padding: 0.65rem 1rem;
  border-bottom: 2px solid var(--color-neon);
  color: var(--color-neon);
}

td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

tr:nth-child(even) td { background: var(--color-surface); }
tr:hover td { background: var(--color-surface2); }

code, kbd {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.88em;
  background: var(--color-surface2);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 0.1em 0.4em;
}

hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2.5rem 0;
}

/* ============================================================
   LAYOUT WRAPPER
   ============================================================ */
.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background: rgba(0,0,0,0.96);
  border-bottom: 1px solid var(--color-border);
  z-index: 1000;
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--color-neon) !important;
  text-decoration: none !important;
  letter-spacing: 0.05em;
  flex-shrink: 0;
  white-space: nowrap;
}

.brand:hover { color: var(--color-accent) !important; }

/* Nav */
.primary-nav {
  flex: 1;
  overflow: hidden;
}

.primary-nav p {
  display: flex;
  gap: 0.25rem;
  flex-wrap: nowrap;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
}

.primary-nav p::-webkit-scrollbar { display: none; }

.nav-link {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted) !important;
  text-decoration: none !important;
  padding: 0.5rem 0.6rem;
  border-radius: 4px;
  white-space: nowrap;
  min-height: 44px;
  display: flex;
  align-items: center;
  transition: color var(--transition), background var(--transition);
}

.nav-link:hover, .nav-link--active {
  color: var(--color-accent) !important;
  background: var(--color-surface2);
}

/* CTA buttons */
.header-ctas {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
  align-items: center;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 1.1rem;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-decoration: none !important;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}

.cta-signup {
  background: var(--color-neon);
  color: #000 !important;
  box-shadow: 0 0 12px rgba(255,215,0,0.35);
}

.cta-signup:hover {
  background: #ffe55a;
  box-shadow: 0 0 22px rgba(255,215,0,0.6);
  color: #000 !important;
}

.cta-login {
  background: transparent;
  color: var(--color-neon) !important;
  border: 1px solid var(--color-neon);
}

.cta-login:hover {
  background: var(--color-neon);
  color: #000 !important;
}

/* Nav toggle (mobile) */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  width: 44px;
  height: 44px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
}

.burger {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-accent);
  position: relative;
  transition: background var(--transition);
}

.burger::before, .burger::after {
  content: '';
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-accent);
  position: absolute;
  left: 0;
  transition: transform var(--transition), top var(--transition);
}

.burger::before { top: -6px; }
.burger::after  { top: 6px; }

.nav-toggle[aria-expanded="true"] .burger { background: transparent; }
.nav-toggle[aria-expanded="true"] .burger::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .burger::after  { top: 0; transform: rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  margin-top: var(--header-h);
  min-height: 45vh;
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  overflow: hidden;
}

.hero-copy {
  padding: 3rem 1.25rem 2rem;
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
}

.hero-media {
  width: 100%;
  max-height: 320px;
  overflow: hidden;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-neon);
  border: 1px solid var(--color-neon);
  border-radius: 3px;
  padding: 0.2rem 0.65rem;
  margin-bottom: 1rem;
}

.hero-lead {
  font-size: 1.05rem;
  color: var(--color-muted);
  max-width: 680px;
  margin-top: 0.75rem;
}

/* Stage label */
.stage-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.15rem 0.55rem;
  border-radius: 3px;
  margin-bottom: 0.75rem;
}
.stage-awareness  { background: #1a3a1a; color: #5adf5a; }
.stage-consideration { background: #1a2a3a; color: #5aaaff; }
.stage-decision   { background: #3a1a1a; color: #ff7a5a; }

/* Breadcrumb */
.breadcrumb {
  font-size: 0.8rem;
  color: var(--color-muted);
  margin-bottom: 0.75rem;
}
.breadcrumb a { color: var(--color-muted); text-decoration: underline; }
.breadcrumb span { font-weight: 500; }

/* ============================================================
   MAIN CONTENT AREA
   ============================================================ */
main {
  flex: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
  padding: 2.5rem 1.25rem;
}

.content-with-aside {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2.5rem;
  align-items: start;
}

.content-main { min-width: 0; }

/* Drop caps */
.drop-cap > p:first-of-type::first-letter,
.content-main.drop-cap p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-size: 4.2rem;
  font-weight: 700;
  float: left;
  line-height: 0.82;
  margin-right: 0.1em;
  margin-top: 0.08em;
  color: var(--color-neon);
}

/* Subtitle pattern (h2 + p.subtitle) */
.content-main h2 + p.subtitle,
.topic-body h2 + p.subtitle,
.home-body h2 + p.subtitle,
.children-section h2 + p.subtitle,
.author-section h2 + p.subtitle,
.topic-table-section h2 + p.subtitle {
  color: var(--color-muted);
  font-size: 0.9rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  margin-top: -0.2rem;
  margin-bottom: 1.25rem;
}

/* ============================================================
   ASIDE
   ============================================================ */
.content-aside {
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.aside-heading {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-neon);
  margin-bottom: 0.75rem;
  margin-top: 0;
}

.aside-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.aside-links li { margin-bottom: 0.5rem; }

.aside-links a {
  font-size: 0.88rem;
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  display: inline-block;
  padding: 0.25rem 0;
}

.aside-links a:hover { color: var(--color-neon); }

.rg-box { border-color: rgba(255,107,53,0.3) !important; }

.rg-notice {
  font-size: 0.75rem;
  color: var(--color-muted);
  line-height: 1.5;
  margin: 0;
}

/* ============================================================
   GLASSMORPHISM CARDS
   ============================================================ */
.glass {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-card);
  backdrop-filter: blur(6px);
  padding: 1.35rem 1.5rem;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
}

.glass:hover {
  background: rgba(255,255,255,0.07);
  box-shadow: 0 8px 32px rgba(255,215,0,0.08);
  transform: translateY(-2px);
}

.aside-box { padding: 1.1rem 1.25rem; }

/* ============================================================
   CARD GRID (home / topic children)
   ============================================================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.card { display: flex; flex-direction: column; }
.card-body { display: flex; flex-direction: column; flex: 1; }

.card-title {
  font-size: 1rem;
  margin-top: 0;
  margin-bottom: 0.35rem;
}

.card-title a { color: var(--color-accent); text-decoration: none; }
.card-title a:hover { color: var(--color-neon); }

.card-date {
  font-size: 0.75rem;
  color: var(--color-muted);
  display: block;
  margin-bottom: 0.5rem;
}

.card-desc {
  font-size: 0.88rem;
  color: var(--color-muted);
  flex: 1;
  line-height: 1.55;
}

.card-read {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-neon);
  text-decoration: none;
  transition: color var(--transition);
}

.card-read:hover { color: var(--color-neon2); }

/* ============================================================
   CHILDREN TABLE
   ============================================================ */
.children-section,
.topic-table-section { margin-top: 3rem; }

.children-table th:first-child,
.topic-table th:first-child { width: 40%; }

.children-table td:nth-child(3),
.children-table th:nth-child(3) { width: 140px; white-space: nowrap; }

/* ============================================================
   BYLINE
   ============================================================ */
.byline {
  font-size: 0.82rem;
  color: var(--color-muted);
  margin-top: 0.65rem;
  margin-bottom: 0;
  font-weight: 300;
  letter-spacing: 0.03em;
}

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

/* ============================================================
   ABOUT PAGE — AUTHOR SECTION
   ============================================================ */
.author-section { margin-top: 3rem; }

.author-card { display: flex; flex-direction: column; gap: 0.5rem; }

.author-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-neon);
  margin: 0;
}

.author-credentials {
  font-size: 0.85rem;
  color: var(--color-muted);
  font-style: italic;
  margin: 0;
}

.author-bio {
  font-size: 0.95rem;
  line-height: 1.65;
  margin: 0;
}

/* ============================================================
   TRUST LINKS / RESPONSIBLE GAMBLING
   ============================================================ */
.trust-link {
  font-size: 0.82rem;
  color: var(--color-muted);
  text-decoration: underline;
  display: inline-block;
  padding: 0.25rem 0;
}
.trust-link:hover { color: var(--color-accent); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 2.5rem 1.25rem 1.25rem;
}

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

.footer-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-neon);
  margin-bottom: 0.5rem;
}

.footer-col p { font-size: 0.82rem; color: var(--color-muted); line-height: 1.65; margin-bottom: 0.4rem; }
.footer-col small { font-size: 0.78rem; color: var(--color-muted); }
.footer-col-head { font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.72rem !important; color: var(--color-accent) !important; margin-bottom: 0.6rem !important; }

.footer-link {
  color: var(--color-muted);
  text-decoration: underline;
  font-size: 0.82rem;
  display: inline-block;
  padding: 0.25rem 0;
}
.footer-link:hover { color: var(--color-accent); }

.rg-footer {
  display: block;
  margin-top: 0.65rem;
  font-size: 0.74rem;
  color: var(--color-muted);
  line-height: 1.55;
}

.footer-copy {
  text-align: center;
  border-top: 1px solid var(--color-border);
  padding-top: 1rem;
  max-width: var(--max-w);
  margin: 0 auto;
}

.footer-copy small { font-size: 0.78rem; color: var(--color-muted); }

/* Footer minimal structure: only p + small inside .site-footer (no ul, no nav, no dl) */

/* ============================================================
   SECTIONS SPACING
   ============================================================ */
.child-cards, .children-section, .topic-table-section { margin-top: 3rem; }

.home-body, .topic-body, .article-body, .inner-body {
  width: 100%;
}

/* ============================================================
   REVEAL ON SCROLL ANIMATION
   ============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.reveal {
  animation: fadeUp 0.5s ease both;
}

.stagger-item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.stagger-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   INNER PAGE HERO (no image)
   ============================================================ */
.inner-hero {
  min-height: 28vh;
  border-bottom: 1px solid var(--color-border);
}

/* ============================================================
   MOBILE NAV (≤768px)
   ============================================================ */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
    order: 2;
  }

  .primary-nav {
    display: none;
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.97);
    overflow-y: auto;
    z-index: 999;
    padding: 1.5rem 1.25rem;
  }

  .primary-nav.is-open {
    display: block;
  }

  .primary-nav p {
    flex-direction: column;
    flex-wrap: nowrap;
    overflow: visible;
  }

  .nav-link {
    font-size: 1rem;
    min-height: 52px;
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid var(--color-border);
    letter-spacing: 0.04em;
    color: var(--color-text) !important;
  }

  .header-ctas {
    order: 3;
    gap: 0.4rem;
  }

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

  .brand { order: 1; }

  .content-with-aside {
    grid-template-columns: 1fr;
  }

  .content-aside {
    position: static;
  }

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

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

  .hero-copy {
    padding: 2rem 1rem 1.5rem;
  }

  /* Ensure all footer links, trust links, aside links meet 44px tap target on mobile */
  .footer-link,
  .trust-link,
  .aside-links a,
  .card-read,
  .breadcrumb a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding-top: 0;
    padding-bottom: 0;
  }

  /* Ensure table links in children/topic tables meet tap target */
  .children-table td a,
  .topic-table td a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}

/* ============================================================
   SMALL MOBILE (≤480px)
   ============================================================ */
@media (max-width: 480px) {
  html { font-size: 16px; }
  h1 { font-size: 1.65rem; }
  h2 { font-size: 1.25rem; }
  .cta { padding: 0 0.6rem; font-size: 0.68rem; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .stagger-item { opacity: 1; transform: none; }
}

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