/*
  styles.css — Xon Bet Casino (kasynoxonbet.pl)

  Design goals:
  - Dark theme by default with system preference support
  - Responsive layout, mobile-first
  - Accessible sizes, focus outlines, reduced motion
  - Components: header, nav, hero, slots grid, content, tables, breadcrumbs, footer
  - Comments explain the logic and structure of each block
*/

/* CSS Reset & base scales */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }
img { max-width: 100%; height: auto; display: block; }

/* Fix the screen in the mobile version (prevent layout jump & ensure full-height) */
html, body { min-height: 100%; }
body { overflow-x: hidden; }

/* Color system – dark theme defaults */
:root {
  --bg: #0b0f1a;
  --surface: #101626;
  --elev: #141c2f;
  --text: #e6e9ef;
  --muted: #a8b0c3;
  --primary: #3b82f6; /* blue-500 */
  --primary-contrast: #0b1220;
  --border: #223150;
  --overlay: rgba(0, 0, 0, 0.45);
  --focus: #93c5fd; /* blue-300 */
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #ffffff;
    --surface: #f6f8fb;
    --elev: #ffffff;
    --text: #0b1220;
    --muted: #43526b;
    --primary: #1d4ed8; /* blue-700 */
    --primary-contrast: #ffffff;
    --border: #d7deea;
    --overlay: rgba(255, 255, 255, 0.55);
    --focus: #1d4ed8;
  }
}

/* Optional explicit .theme-dark / .theme-light toggles */
.theme-dark {
  --bg: #0b0f1a;
  --surface: #101626;
  --elev: #141c2f;
  --text: #e6e9ef;
  --muted: #a8b0c3;
  --primary: #3b82f6;
  --primary-contrast: #0b1220;
  --border: #223150;
  --overlay: rgba(0, 0, 0, 0.45);
  --focus: #93c5fd;
}

.theme-light {
  --bg: #ffffff;
  --surface: #f6f8fb;
  --elev: #ffffff;
  --text: #0b1220;
  --muted: #43526b;
  --primary: #1d4ed8;
  --primary-contrast: #ffffff;
  --border: #d7deea;
  --overlay: rgba(255, 255, 255, 0.55);
  --focus: #1d4ed8;
}

/* Typography & base layout */
body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Arial, Helvetica, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

h1, h2, h3, h4 { line-height: 1.25; margin: 1.25rem 0 0.75rem; }
p { margin: 0.75rem 0; color: var(--text); }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Focus visibility and a11y helpers */
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Containers */
.container { width: min(1200px, 100% - 2rem); margin: 0 auto; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 0; gap: 0.75rem; }
.brand img { display: block; }

/* Right-aligned header actions (Rejestracja + theme toggle) */
.header-actions { display: inline-flex; align-items: center; gap: 0.5rem; margin-left: auto; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.6rem 1rem; border-radius: 10px; border: 1px solid transparent; font-weight: 600; cursor: pointer; }
.btn-primary { background: var(--primary); color: #fff; border-color: transparent; }
.btn-primary:hover { filter: brightness(1.05); text-decoration: none; }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--elev); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 0.4rem 0.6rem; }

/* Breadcrumbs */
.breadcrumbs { background: var(--surface); border-bottom: 1px solid var(--border); }
.breadcrumbs ol { list-style: none; display: flex; gap: 0.5rem; padding: 0.5rem 0; margin: 0; flex-wrap: wrap; }
.breadcrumbs li { color: var(--muted); }
.breadcrumbs a { color: var(--text); }
.breadcrumbs li+li::before { content: "/"; opacity: 0.5; margin: 0 0.25rem; }

/* Hero banner */
.hero { position: relative; display: grid; place-items: center; isolation: isolate; }
.hero-media { width: 100%; height: auto; display: block; filter: saturate(1) contrast(1.05); }
.hero-overlay { position: absolute; inset: 0; display: grid; place-items: center; padding: 1rem; }
.hero-cta { width: min(960px, 100%); background: color-mix(in oklab, var(--overlay) 100%, transparent); backdrop-filter: blur(6px); border: 1px solid var(--border); border-radius: 16px; padding: clamp(1rem, 2vw, 2rem); text-align: center; }
.hero-title { margin: 0 0 0.5rem; font-size: clamp(1.3rem, 2.4vw, 2.2rem); }
.hero-subtitle { margin: 0 0 1rem; color: var(--muted); }
.hero-actions { display: inline-flex; gap: 0.75rem; flex-wrap: wrap; justify-content: center; }

/* Sections & content */
.section { padding: 2rem 0; }
.content { font-size: 1rem; }
.content ol { padding-left: 1rem; }
.content li { margin: 0.5rem 0; }

/* Slots grid — 12 images, 6 per row on desktop, responsive on mobile */
.slots-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
@media (min-width: 480px) { .slots-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .slots-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1024px) { .slots-grid { grid-template-columns: repeat(6, 1fr); } }
.slot { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; transition: transform .2s ease; }
.slot:hover { transform: translateY(-2px); text-decoration: none; }
.slot figure { margin: 0; }
.slot img { width: 100%; height: 100%; object-fit: cover; border-radius: 16px; }

/* Responsive tables – convert to cards on small screens */
.table-wrap { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--elev); }
.responsive-table { width: 100%; border-collapse: collapse; }
.responsive-table th, .responsive-table td { padding: 0.75rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.responsive-table thead { background: var(--surface); position: sticky; top: 0; z-index: 1; }
.responsive-table tr:last-child td { border-bottom: none; }

/* Mobile table as stacked cards */
@media (max-width: 700px) {
  .responsive-table thead { display: none; }
  .responsive-table tr { display: grid; grid-template-columns: 1fr; border-bottom: 1px solid var(--border); }
  .responsive-table td { display: grid; grid-template-columns: 10ch 1fr; gap: 0.75rem; padding: 0.6rem 0.75rem; }
  .responsive-table td::before { content: attr(data-label); color: var(--muted); font-weight: 600; }
}

/* Footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); }
.payments { display: grid; grid-auto-flow: column; grid-auto-columns: max-content; gap: 1rem; padding: 1rem 0; overflow-x: auto; align-items: center; }
.payments img { height: 28px; width: auto; filter: saturate(1); opacity: 0.9; }
@media (min-width: 768px) {
  .payments { grid-auto-flow: row; grid-template-columns: repeat(8, minmax(80px, 1fr)); gap: 1rem; overflow: visible; }
  .payments img { justify-self: center; height: 30px; }
}
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.75rem 0 1.25rem; border-top: 1px dashed var(--border); color: var(--muted); }
.footer-link { color: var(--text); }

/* Motion preferences */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}


