
:root {
  --primary: #B85C38;
  --primary-rgb: 184, 92, 56;
  --secondary: #5C7A47;
  --accent: #D9A566;
  --bg: #FBF7F2;
  --surface: #FFFFFF;
  --text: #2A1E15;
  --muted: #7A6A5A;
  --border: #E8DDD0;
  --radius: 12px;
  --radius-lg: calc(12px * 1.5);
  --radius-xl: calc(12px * 2);
  --shadow-sm: 0 2px 8px rgba(0,0,0,.05);
  --shadow-md: 0 10px 30px rgba(var(--primary-rgb), .14);
  --shadow-lg: 0 20px 60px rgba(var(--primary-rgb), .18);
  --shadow-glow: 0 0 0 3px rgba(var(--primary-rgb), .12);
  --ease: cubic-bezier(.4,0,.2,1);
  --gradient-brand: linear-gradient(135deg, var(--primary), var(--secondary));
  --gradient-brand-diag: linear-gradient(120deg, var(--primary) 0%, var(--secondary) 100%);
  --gradient-hero: radial-gradient(120% 80% at 15% 20%, rgba(var(--primary-rgb),.85) 0%, rgba(var(--primary-rgb),.15) 55%, transparent 100%), linear-gradient(135deg, var(--primary), var(--secondary));
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Top accent stripe — iGaming/tech signature */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 45%, var(--accent) 100%);
  z-index: 999;
  pointer-events: none;
}

h1, h2, h3, h4 {
  font-family: 'Poppins', 'Lato', sans-serif;
  font-weight: 700;
  line-height: 1.22;
  color: var(--text);
  margin-top: 2em;
  margin-bottom: 0.6em;
  letter-spacing: -.015em;
}

h1 { font-size: clamp(2rem, 4vw + .5rem, 2.75rem); letter-spacing: -.025em; margin-top: 0.3em; }
h2 { font-size: clamp(1.45rem, 1.6vw + .8rem, 1.8rem); }
h3 {
  font-size: 1.2rem;
  margin-top: 1.6em;
  margin-bottom: 0.5em;
  color: var(--secondary);
  position: relative;
  padding-left: 14px;
  letter-spacing: -.005em;
}
h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35em;
  bottom: 0.35em;
  width: 4px;
  border-radius: 4px;
  background: var(--gradient-brand);
}

p { margin: 0 0 1.1em; }

a { color: var(--primary); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--secondary); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; }

.container { max-width: 900px; margin: 0 auto; padding: 0 20px; }
.container-fluid { max-width: 1400px; margin: 0 auto; padding: 0 32px; }

/* ============ HEADER — glass ============ */
.site-header {
  position: sticky;
  top: 3px;
  z-index: 100;
  background: rgba(255,255,255,.72);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(var(--primary-rgb), .1);
  box-shadow: 0 1px 24px rgba(0,0,0,.03);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 76px;
}

.brand { display: inline-flex; align-items: center; text-decoration: none; transition: opacity .2s var(--ease); }
.brand:hover { opacity: .85; text-decoration: none; }
.brand-logo { height: 44px; width: auto; display: block; }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; flex-wrap: wrap; }
.main-nav a {
  display: block;
  padding: 10px 14px;
  border-radius: var(--radius);
  color: var(--text);
  font-weight: 500;
  font-size: 0.94rem;
  letter-spacing: .005em;
  position: relative;
  transition: background .25s var(--ease), color .25s var(--ease);
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 6px;
  height: 2px;
  background: var(--gradient-brand);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}
.main-nav a:hover,
.main-nav a[aria-current="page"] {
  background: rgba(var(--primary-rgb), .07);
  color: var(--primary);
  text-decoration: none;
}
.main-nav a:hover::after,
.main-nav a[aria-current="page"]::after { transform: scaleX(1); }

.nav-toggle-checkbox { display: none; }
.nav-toggle-label { display: none; }

@media (max-width: 991px) {
  .nav-toggle-label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    z-index: 10;
  }
  .nav-toggle-label span {
    display: block;
    width: 26px;
    height: 3px;
    background: var(--text);
    border-radius: 2px;
    transition: transform .3s var(--ease), opacity .3s var(--ease);
  }
  .main-nav {
    position: absolute;
    top: 76px;
    left: 0; right: 0;
    background: rgba(255,255,255,.98);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    max-height: 0;
    overflow: hidden;
    transition: max-height .4s var(--ease);
  }
  .nav-toggle-checkbox:checked ~ .main-nav { max-height: 640px; }
  .nav-toggle-checkbox:checked ~ .nav-toggle-label span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav-toggle-checkbox:checked ~ .nav-toggle-label span:nth-child(2) { opacity: 0; }
  .nav-toggle-checkbox:checked ~ .nav-toggle-label span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  .main-nav ul { flex-direction: column; padding: 12px 20px 24px; gap: 2px; }
  .main-nav a { padding: 12px 14px; }
  .main-nav a::after { display: none; }
}

/* ============ ARTICLE ============ */
.article { padding: 48px 20px 72px; }
.article-header h1 { margin-bottom: 0.2em; }
.byline { color: var(--muted); font-size: .93rem; margin: 0 0 28px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.byline::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 2px;
  background: var(--gradient-brand);
  border-radius: 1px;
}
.byline a { color: var(--muted); border-bottom: 1px dotted var(--muted); }

/* Breadcrumbs */
.breadcrumbs { padding: 24px 20px 0; font-size: .88rem; max-width: 900px; margin: 0 auto; }
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; color: var(--muted); }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs .sep { margin: 0 4px; opacity: 0.5; }

/* Hero with layered gradient + subtle inner glow */
.article-hero {
  margin: 28px -20px 40px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
  background: var(--gradient-hero);
  box-shadow: var(--shadow-lg);
  isolation: isolate;
}
.article-hero::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(45deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.06) 40%, rgba(255,255,255,0) 100%);
  pointer-events: none;
  z-index: 2;
}
.article-hero::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(0,0,0,.28) 100%);
  pointer-events: none;
  z-index: 2;
}
.article-hero img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  z-index: 1;
  position: relative;
}

.article-intro { position: relative; }
.article-intro p { font-size: 1.12rem; color: var(--text); }
.article-intro p:first-child::first-letter {
  font-family: 'Poppins', serif;
  font-weight: 700;
  float: left;
  font-size: 3.8rem;
  line-height: 1;
  padding: 4px 12px 0 0;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Content sections — accent underline animation on H2 */
.content-section { margin-top: 2.4em; }
.content-section h2 {
  padding-bottom: .35em;
  position: relative;
  display: inline-block;
  max-width: 100%;
}
.content-section h2::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: var(--gradient-brand);
  border-radius: 3px;
  transform: scaleX(.14);
  transform-origin: left;
  transition: transform .6s var(--ease);
}
.content-section:hover h2::after { transform: scaleX(.4); }

/* Content images — gradient border effect */
.content-image {
  margin: 28px -20px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  background: var(--gradient-brand);
  padding: 2px;
  box-shadow: var(--shadow-sm);
}
.content-image img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: calc(var(--radius-lg) - 2px); }

/* Table of Contents — modernized card */
.toc {
  background: linear-gradient(135deg, rgba(var(--primary-rgb),.06) 0%, var(--surface) 60%);
  border: 1px solid rgba(var(--primary-rgb), .12);
  border-radius: var(--radius-xl);
  padding: 26px 30px;
  margin: 40px 0;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.toc::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 3px;
  background: var(--gradient-brand);
}
.toc-heading {
  margin: 0 0 14px;
  font-size: 1rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 700;
}
.toc-list {
  list-style: none;
  counter-reset: toc-counter;
  column-count: 2;
  column-gap: 36px;
  column-rule: 1px solid var(--border);
  margin: 0;
  padding: 0;
}
.toc-list li {
  counter-increment: toc-counter;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  padding: 9px 0 9px 42px;
  position: relative;
  transition: transform .2s var(--ease);
}
.toc-list li:hover { transform: translateX(3px); }
.toc-list li::before {
  content: counter(toc-counter, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 9px;
  color: var(--secondary);
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: -.02em;
}
.toc-list a { color: var(--text); font-weight: 500; }
.toc-list a:hover { color: var(--primary); text-decoration: none; }

@media (max-width: 700px) {
  .toc-list { column-count: 1; column-rule: none; }
}

/* Steps — alternating zigzag + glowing numbers */
.steps {
  list-style: none;
  padding: 0;
  margin: 52px 0 56px;
  position: relative;
}
.steps li:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  bottom: -66px;
  width: 2px;
  transform: translateX(-50%);
  background: repeating-linear-gradient(to bottom, var(--border) 0 5px, transparent 5px 10px);
}
.steps li {
  position: relative;
  margin: 0 0 28px;
  min-height: 76px;
  display: flex;
  align-items: center;
}
.step-num {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: #fff;
  border: 4px solid var(--bg);
  box-shadow: 0 0 0 1px rgba(var(--primary-rgb), .2), 0 10px 24px rgba(var(--primary-rgb), .38);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.step-num::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--primary-rgb),.28) 0%, transparent 70%);
  z-index: -1;
  opacity: 0;
  transition: opacity .3s var(--ease);
}
.steps li:hover .step-num { transform: translate(-50%, -50%) scale(1.06); }
.steps li:hover .step-num::after { opacity: 1; }

.step-body {
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  text-align: left;
  position: relative;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.steps li:hover .step-body {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(var(--primary-rgb), .28);
}
.step-body strong { color: var(--primary); font-weight: 700; }

@media (min-width: 992px) {
  .steps li { padding: 0 46px; }
  .steps li:nth-child(odd) .step-body {
    width: calc(50% - 46px);
    margin-right: auto;
  }
  .steps li:nth-child(odd) .step-body::after {
    content: "";
    position: absolute;
    right: -8px;
    top: 50%;
    width: 14px; height: 14px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    border-top: 1px solid var(--border);
    transform: translateY(-50%) rotate(45deg);
    transition: border-color .3s var(--ease);
  }
  .steps li:hover:nth-child(odd) .step-body::after { border-color: rgba(var(--primary-rgb), .28); }
  .steps li:nth-child(even) .step-body {
    width: calc(50% - 46px);
    margin-left: auto;
  }
  .steps li:nth-child(even) .step-body::after {
    content: "";
    position: absolute;
    left: -8px;
    top: 50%;
    width: 14px; height: 14px;
    background: var(--surface);
    border-left: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    transform: translateY(-50%) rotate(45deg);
    transition: border-color .3s var(--ease);
  }
  .steps li:hover:nth-child(even) .step-body::after { border-color: rgba(var(--primary-rgb), .28); }
}

@media (max-width: 991px) {
  .steps li:not(:last-child)::before { left: 24px; }
  .steps li { padding-left: 68px; }
  .step-num { left: 24px; }
  .step-body { width: 100%; }
}

/* FAQ — polished with left accent bar on open */
.faq-section details {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 12px;
  background: var(--surface);
  interpolate-size: allow-keywords;
  transition: box-shadow .25s var(--ease), border-color .25s var(--ease);
  position: relative;
  overflow: hidden;
}
.faq-section details::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--gradient-brand);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .3s var(--ease);
}
.faq-section details[open] {
  border-color: rgba(var(--primary-rgb), .28);
  box-shadow: var(--shadow-sm);
}
.faq-section details[open]::before { transform: scaleY(1); }
.faq-section summary {
  padding: 20px 60px 20px 26px;
  position: relative;
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  font-size: 1.02rem;
  transition: color .25s var(--ease);
}
.faq-section summary:hover { color: var(--primary); }
.faq-section summary::-webkit-details-marker { display: none; }

.faq-section summary::before,
.faq-section summary::after {
  content: "";
  position: absolute;
  right: 26px;
  top: 50%;
  width: 14px; height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: transform .35s var(--ease);
}
.faq-section summary::before { transform: translateY(-50%) rotate(0deg); }
.faq-section summary::after { transform: translateY(-50%) rotate(90deg); }
.faq-section details[open] summary::after { transform: translateY(-50%) rotate(0deg); }

.faq-section details::details-content {
  height: 0;
  opacity: 0;
  overflow: clip;
  transition: height .4s var(--ease), opacity .3s ease-out, content-visibility .4s allow-discrete;
}
.faq-section details[open]::details-content { height: auto; opacity: 1; }

.faq-section details > *:not(summary) {
  padding: 0 26px 22px;
  animation: faqSlideDown .35s var(--ease);
}
@keyframes faqSlideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Author box — modernized card with gradient border */
.author-box {
  display: flex;
  gap: 22px;
  align-items: flex-start;
  padding: 28px;
  border-radius: var(--radius-xl);
  margin: 56px 0 0;
  background: linear-gradient(135deg, rgba(var(--primary-rgb),.06) 0%, var(--surface) 60%);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.author-box::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient-brand);
}
.author-box img {
  width: 120px; height: 120px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px rgba(var(--primary-rgb), .2), 0 12px 28px rgba(var(--primary-rgb), .18);
}
.author-box h3 { margin: 0 0 6px; font-size: 1.2rem; }
.author-role { color: var(--muted); margin: 0 0 12px; font-size: .9rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.author-box p { margin: 0; font-size: .98rem; line-height: 1.65; }

@media (max-width: 560px) {
  .author-box { flex-direction: column; text-align: center; }
  .author-box img { margin: 0 auto; }
}

/* Buttons — sheen animation on hover */
.btn {
  display: inline-block;
  padding: 14px 26px;
  border-radius: var(--radius);
  background: var(--gradient-brand);
  color: #fff !important;
  font-weight: 600;
  text-decoration: none !important;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(var(--primary-rgb), .28);
  isolation: isolate;
}
.btn::before {
  content: "";
  position: absolute;
  top: 0; left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.32) 50%, transparent 100%);
  transition: left .6s var(--ease);
  z-index: -1;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(var(--primary-rgb), .38);
}
.btn:hover::before { left: 100%; }

/* Legal article */
.legal-article { max-width: 780px; }
.legal-article p { font-size: 1rem; }

/* ============ FOOTER ============ */
.site-footer {
  background: #402013;
  color: rgba(255,255,255,.82);
  padding: 64px 0 28px;
  margin-top: 96px;
  position: relative;
}
.site-footer::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 44px;
}
.footer-brand img { margin-bottom: 16px; filter: brightness(0) invert(1); opacity: 0.95; }
.footer-tagline { font-size: .96rem; margin: 0 0 16px; line-height: 1.55; }
.footer-legal { font-size: .82rem; color: rgba(255,255,255,.55); line-height: 1.75; }
.footer-col h3 {
  color: #fff;
  font-size: .95rem;
  margin: 0 0 16px;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 700;
  position: relative;
  padding-bottom: 10px;
}
.footer-col h3::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 28px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 9px; }
.footer-col a {
  color: rgba(255,255,255,.7);
  font-size: .92rem;
  transition: color .2s var(--ease), padding-left .2s var(--ease);
  position: relative;
}
.footer-col a:hover { color: #fff; text-decoration: none; padding-left: 6px; }
.footer-col a:hover::before {
  content: "›";
  position: absolute;
  left: -6px;
  color: var(--accent);
}
.footer-bottom {
  margin-top: 44px;
  padding-top: 26px;
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  align-items: center;
}
.footer-age { font-size: .85rem; color: rgba(255,255,255,.68); display: flex; align-items: center; gap: 12px; }
.age-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #fff;
  color: #B85C38;
  font-weight: 800;
  font-size: .8rem;
  box-shadow: 0 0 0 3px rgba(255,255,255,.14);
}
.copyright { font-size: .78rem; color: rgba(255,255,255,.5); margin: 0; }

@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; gap: 32px; } }

/* Selection */
::selection {
  background: rgba(var(--primary-rgb), .18);
  color: var(--text);
}

/* Focus states — accessibility + polish */
a:focus-visible, summary:focus-visible, .btn:focus-visible, .main-nav a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: var(--radius);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
