/* ============================================================
   Toca Boca Bet — style.css
   Target: 8–20KB, mobile-first, no external deps beyond fonts
   ============================================================ */

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

/* ---------- Design Tokens ---------- */
:root {
  --color-dark:    #1A1A2E;
  --color-gold:    #E8C547;
  --color-cream:   #F5F0E8;
  --color-mid:     #2D2D4E;
  --color-text:    #1A1A2E;
  --color-muted:   #5a5a7a;
  --color-border:  rgba(232,197,71,0.25);
  --glass-bg:      rgba(255,255,255,0.07);
  --glass-border:  rgba(232,197,71,0.18);
  --radius:        18px;
  --font-serif:    'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans:     'Source Sans 3', system-ui, -apple-system, sans-serif;
  --col-max:       720px;
  --sidebar-w:     220px;
  --gap:           1.5rem;
}

/* ---------- Base ---------- */
html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-cream);
  overflow-x: hidden;
  min-width: 0;
}

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

a {
  color: var(--color-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:hover { color: #b8962a; }

/* ---------- Skip Link ---------- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--color-gold);
  color: var(--color-dark);
  padding: 0.5rem 1rem;
  font-weight: 600;
  z-index: 9999;
  border-radius: 4px;
  text-decoration: none;
}
.skip-link:focus { top: 0.5rem; }

/* ---------- Site Header ---------- */
.site-header {
  background: var(--color-dark);
  color: var(--color-cream);
  position: sticky;
  top: 0;
  z-index: 200;
  border-bottom: 2px solid var(--color-gold);
  width: 100%;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1rem;
  height: 64px;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: nowrap;
  width: 100%;
}

.brand {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--color-gold);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: -0.02em;
}
.brand:hover { color: #fff; }

/* Nav toggle (hamburger) */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: 1.5px solid var(--color-gold);
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
  margin-left: auto;
  order: 2;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-gold);
  transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Main nav */
.main-nav {
  flex: 1;
  order: 3;
}
.main-nav ol {
  list-style: none;
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}
.main-nav ol li a {
  color: var(--color-cream);
  text-decoration: none;
  font-size: 0.88rem;
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  white-space: nowrap;
  display: block;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.main-nav ol li a:hover { color: var(--color-gold); }

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

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 1rem;
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.cta-signup {
  background: var(--color-gold);
  color: var(--color-dark);
  border: 2px solid var(--color-gold);
}
.cta-signup:hover {
  background: #d4af34;
  border-color: #d4af34;
  color: var(--color-dark);
}

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

/* ---------- Mobile nav (≤768px) ---------- */
@media (max-width: 768px) {
  .main-nav {
    display: none;
    order: 5;
    width: 100%;
    background: var(--color-mid);
    padding: 0.75rem 1rem;
  }
  .main-nav.is-open {
    display: block;
  }
  .main-nav ol {
    flex-direction: column;
    gap: 0;
  }
  .main-nav ol li a {
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    font-size: 0.95rem;
    min-height: 44px;
    white-space: normal;
  }
  .header-inner {
    flex-wrap: wrap;
    height: auto;
    min-height: 64px;
    padding: 0.5rem 1rem;
    align-items: center;
  }
  .brand {
    flex: 1;
    font-size: 1rem;
    order: 1;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  .nav-toggle {
    order: 2;
    margin-left: auto;
  }
  .header-cta {
    order: 3;
    gap: 0.4rem;
  }
  .cta {
    font-size: 0.78rem;
    padding: 0 0.65rem;
    min-height: 44px;
  }
  .site-header {
    max-height: none;
  }
}

/* ---------- Page Wrap & Layout ---------- */
.page-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
  width: 100%;
}

/* ---------- Content with Aside ---------- */
.content-with-aside {
  display: flex;
  gap: var(--gap);
  align-items: flex-start;
  width: 100%;
}

/* Aside: left side */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  order: -1;
}

.main-content {
  flex: 1;
  min-width: 0;
  max-width: var(--col-max);
}

/* ---------- Glassmorphism Cards ---------- */
.glass {
  background: rgba(26,26,46,0.82);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.sidebar-card {
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  color: var(--color-cream);
}

.sidebar-heading {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-gold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.sidebar-card hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin-bottom: 0.75rem;
}

.sidebar-links {
  list-style: none;
}

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

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

.sidebar-links a {
  color: var(--color-cream);
  text-decoration: none;
  font-size: 0.88rem;
  display: block;
  padding: 0.5rem 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  line-height: 1.4;
}

.sidebar-links a:hover { color: var(--color-gold); }

/* ---------- Article / Page Sections ---------- */
article {
  width: 100%;
}

section {
  margin-bottom: 2rem;
}

.page-header-section,
.article-header-section,
.hero-section {
  padding: 2rem 0 1.5rem;
  border-bottom: 2px solid var(--color-border);
  margin-bottom: 2rem;
}

.page-type-label,
.stage-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--color-gold);
  color: var(--color-dark);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.75rem;
}

.stage-label {
  background: var(--color-mid);
  color: var(--color-gold);
  border: 1px solid var(--color-gold);
  margin-right: 0.4rem;
}

h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 900;
  line-height: 1.2;
  color: var(--color-dark);
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 3vw, 1.7rem);
  font-weight: 700;
  color: var(--color-dark);
  margin: 2rem 0 0;
  letter-spacing: -0.01em;
}

h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-dark);
  margin: 1.5rem 0 0;
}

/* ---------- Byline ---------- */
.byline {
  font-size: 0.85rem;
  color: var(--color-muted);
  margin: 0.5rem 0 0;
  font-style: italic;
}

.byline time { font-style: normal; font-weight: 600; }

/* ---------- Prose / Body Content ---------- */
.prose {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text);
}

.prose p { margin-bottom: 1.1rem; }

.prose h2 {
  margin-top: 2rem;
  margin-bottom: 0;
}

.prose h2 + hr {
  border: none;
  border-top: 2px solid var(--color-gold);
  margin: 0.4rem 0 1rem;
}

.prose h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.4rem;
}

.prose ul, .prose ol {
  margin: 0.75rem 0 1rem 1.25rem;
}

.prose li { margin-bottom: 0.4rem; }

.prose a {
  color: #7c5c00;
  text-decoration: underline;
}

.prose a:hover { color: var(--color-dark); }

.prose strong { font-weight: 600; }

.prose blockquote {
  border-left: 3px solid var(--color-gold);
  padding-left: 1rem;
  margin: 1rem 0;
  color: var(--color-muted);
  font-style: italic;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 1rem 0;
  overflow-x: auto;
  display: block;
}

.prose table th,
.prose table td {
  padding: 0.6rem 0.75rem;
  border: 1px solid #ddd;
  text-align: left;
}

.prose table th {
  background: var(--color-dark);
  color: var(--color-gold);
}

/* Inline HR after headings */
.prose hr, hr {
  border: none;
  border-top: 2px solid var(--color-gold);
  margin: 0.4rem 0 1rem;
}

/* ---------- Hero (home) ---------- */
.hero-section {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.hero-text { flex: 1; min-width: 0; }

.hero-media {
  flex-shrink: 0;
  width: 280px;
}

.hero-media img {
  border-radius: var(--radius);
  width: 100%;
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 0.5rem;
}

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

/* ---------- Article Hero ---------- */
.article-hero {
  margin-top: 1.25rem;
}

.article-hero-img {
  border-radius: var(--radius);
  width: 100%;
  max-height: 400px;
  object-fit: cover;
}

/* ---------- Section Blocks (cards/links) ---------- */
.section-block {
  margin-top: 2.5rem;
}

.section-block h2 {
  margin-top: 0;
  margin-bottom: 0;
}

.section-block hr {
  margin-bottom: 1.25rem;
}

/* Child-page cards: sibling <a> with <strong> children */
.card-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0;
}

.child-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  background: rgba(26,26,46,0.06);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  text-decoration: none;
  color: var(--color-text);
  flex: 1 1 260px;
  min-width: 0;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.child-card:hover {
  border-color: var(--color-gold);
  box-shadow: 0 4px 18px rgba(232,197,71,0.15);
  color: var(--color-dark);
}

.child-card strong {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-dark);
  line-height: 1.3;
  display: block;
}

.child-card span {
  font-size: 0.82rem;
  color: var(--color-muted);
  line-height: 1.4;
  display: block;
}

.child-card--article { background: rgba(232,197,71,0.07); }

/* ---------- Author Block ---------- */
.author-block {
  padding: 1.5rem;
  margin-bottom: 2rem;
  color: var(--color-cream);
}

.author-block h2 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--color-gold);
  margin-top: 0;
}

.author-block hr {
  border-color: var(--color-border);
  margin: 0.5rem 0 1rem;
}

.author-name {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-gold);
  margin-bottom: 0.25rem;
}

.author-credentials {
  font-size: 0.85rem;
  font-style: italic;
  color: rgba(245,240,232,0.75);
  margin-bottom: 0.75rem;
}

.author-bio {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--color-cream);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-dark);
  color: var(--color-cream);
  padding: 0;
  margin-top: 3rem;
  border-top: 2px solid var(--color-gold);
  width: 100%;
}

.site-footer > section {
  padding: 1.5rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-nav-section {
  border-bottom: 1px solid rgba(232,197,71,0.15);
}

.footer-brand {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-gold);
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.footer-nav-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
}

.footer-nav-list a {
  color: rgba(245,240,232,0.8);
  text-decoration: none;
  font-size: 0.85rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.footer-nav-list a:hover { color: var(--color-gold); }

.footer-trust-section {
  border-bottom: 1px solid rgba(232,197,71,0.15);
}

.footer-trust-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.footer-trust-links a,
.footer-trust-section a {
  color: rgba(245,240,232,0.7);
  text-decoration: underline;
  font-size: 0.85rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.footer-trust-section p { margin-bottom: 0.25rem; }

.footer-trust-links a:hover,
.footer-trust-section a:hover { color: var(--color-gold); }

.footer-legal-section { }

.responsible-gambling {
  font-size: 0.82rem;
  color: rgba(245,240,232,0.55);
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.footer-copy {
  font-size: 0.78rem;
  color: rgba(245,240,232,0.35);
}

/* ---------- Responsive: tablet ---------- */
@media (max-width: 900px) {
  :root { --sidebar-w: 180px; }
}

/* ---------- Responsive: mobile ---------- */
@media (max-width: 768px) {
  .content-with-aside {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    order: 1;
  }

  .main-content {
    order: 2;
    width: 100%;
  }

  .hero-section {
    flex-direction: column;
  }

  .hero-media {
    width: 100%;
  }

  .card-row {
    flex-direction: column;
  }

  .child-card {
    flex: none;
    width: 100%;
  }

  .page-wrap {
    padding: 1.25rem 0.9rem;
    width: 100%;
    overflow-x: hidden;
  }

  h1 { font-size: 1.5rem; }

  .footer-nav-list {
    flex-direction: column;
    gap: 0;
  }

  .footer-nav-list li a {
    padding: 0.35rem 0;
  }

  /* Prevent table overflow */
  .prose table {
    max-width: 100%;
    font-size: 0.82rem;
  }
}

@media (max-width: 480px) {
  .header-inner {
    gap: 0.5rem;
  }
  .brand { font-size: 0.88rem; }
  .cta { font-size: 0.72rem; padding: 0 0.5rem; }
}

/* ---------- Utilities ---------- */
.prose--legal {
  font-size: 0.95rem;
}

.faq-prose .prose {
  font-size: 1rem;
}

/* Ensure no element busts 100vw */
.page-wrap,
.content-with-aside,
.main-content,
.sidebar,
article,
section,
.prose {
  max-width: 100%;
  word-break: break-word;
  overflow-wrap: break-word;
}

/* Prevent pre/code overflow */
pre, code {
  white-space: pre-wrap;
  word-break: break-all;
  max-width: 100%;
}

a[data-cta],button[aria-controls]{min-height:44px;min-width:44px;box-sizing:border-box}main p a{text-decoration:underline}.tbl-scroll{overflow-x:auto;max-width:100%}