/*
  styles.css
  - Mobile-first, responsive layout
  - Dark theme via data-theme="dark" on <html>
  - BEM naming, CSS variables, accessible focus states
*/

:root {
  /* Theme tokens */
  --color-bg: #0f1115;
  --color-surface: #161a22;
  --color-text: #e6e8ee;
  --color-muted: #9aa3b2;
  --color-primary: #ff5a1f;
  --color-primary-contrast: #ffffff;
  --color-outline: #7aa2ff;
  --radius: 12px;
  --radius-sm: 8px;
  --container: 1120px;
}

/* Light theme overrides */
html[data-theme="light"] {
  --color-bg: #ffffff;
  --color-surface: #f6f7f9;
  --color-text: #0f1115;
  --color-muted: #4c5566;
  --color-primary: #ce2c00;
  --color-primary-contrast: #ffffff;
  --color-outline: #1a4cff;
}

/* Base reset */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Arial, 'Apple Color Emoji', 'Segoe UI Emoji';
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Particles full-screen layer behind content */
#particles-js {
  position: fixed; inset: 0; z-index: -1;
}

img { max-width: 100%; height: auto; display: block; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 16px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 8px; top: -40px;
  background: var(--color-primary);
  color: var(--color-primary-contrast);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  z-index: 1000;
}
.skip-link:focus { top: 8px; }

/* Header */
.site-header {
  position: sticky; /* Fix header on mobile and desktop */
  top: 0; z-index: 50;
  background: rgba(22, 26, 34, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 2px; /* extra-thin header */
}
.brand img { display: block; width: 96px; height: auto; }

.site-nav__list {
  display: none; /* hidden on mobile */
  list-style: none; margin: 0; padding: 0;
  gap: 16px;
}
.site-nav__list a {
  color: var(--color-text);
  text-decoration: none;
  padding: 4px 6px;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
}
.site-nav__list a:focus-visible { outline: 2px solid var(--color-outline); outline-offset: 2px; }

/* Breadcrumbs */
.breadcrumbs {
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: var(--color-surface);
}
.breadcrumbs__list {
  display: flex; gap: 8px; flex-wrap: wrap;
  list-style: none; margin: 0; padding: 8px 16px;
}
.breadcrumbs__item a, .breadcrumbs__item span { color: var(--color-muted); text-decoration: none; }
.breadcrumbs__item + .breadcrumbs__item::before { content: "/"; color: var(--color-muted); margin-inline: 4px; }

/* Hero */
.hero { position: relative; isolation: isolate; }
.hero__img { width: 100%; height: clamp(260px, 45vw, 520px); object-fit: cover; display: block; }
.hero__cta {
  position: absolute; inset: 0;
  display: grid; place-content: center;
  padding: 24px; text-align: center;
}
.hero__cta::before {
  /* semi-transparent centered block */
  content: ""; position: absolute; inset: 0;
  margin: auto; width: min(92%, 720px); height: auto; aspect-ratio: 16/7;
  background: rgba(0,0,0,0.45);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}
.hero__title, .hero__subtitle, .hero .btn { position: relative; z-index: 1; }
.hero__title { margin: 0 0 6px; font-size: clamp(24px, 4vw, 44px); }
.hero__subtitle { margin: 0 0 16px; color: var(--color-muted); font-size: clamp(14px, 2.2vw, 18px); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 10px 16px; border-radius: 999px;
  font-weight: 600; border: 1px solid transparent; cursor: pointer;
  text-decoration: none;
}
.btn--primary { background: var(--color-primary); color: var(--color-primary-contrast); }
.btn--primary:hover { filter: brightness(1.05); }
.btn--secondary { background: var(--color-surface); color: var(--color-text); border-color: rgba(255,255,255,0.12); }
.btn--secondary:hover { background: rgba(255,255,255,0.06); }
.btn--ghost { background: transparent; color: var(--color-text); border-color: rgba(255,255,255,0.16); padding: 4px 8px; font-size: 0.88rem; }
.btn:focus-visible { outline: 2px solid var(--color-outline); outline-offset: 2px; }

/* Play button for casino cards */
.btn--play {
  background: #1b7f2a;
  border-color: rgba(0,0,0,0.2);
  color: #eaffee;
  padding: 10px 14px; min-width: 90px; height: 44px;
  border-radius: 50%;
  transition: transform 120ms ease, filter 160ms ease, box-shadow 160ms ease;
}
.btn--play span { font-weight: 700; letter-spacing: 0.25px; }
.btn--play:hover { filter: brightness(1.08); box-shadow: 0 6px 14px rgba(27,127,42,0.35); transform: translateY(-1px); }
.btn--play:active { transform: translateY(0); filter: brightness(0.98); }

/* Casino grid */
.casinos { padding-block: 28px; }
.casino-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 16px; list-style: none; padding: 0; margin: 12px 0 0;
}
.casino-card {
  background: var(--color-surface);
  padding: 16px; border-radius: var(--radius);
  display: grid; gap: 14px; border: 1px solid rgba(255,255,255,0.08);
  grid-template-rows: 110px 1fr auto; /* fixed logo band, spacer, button */
  align-items: start; justify-items: center;
  min-height: 280px; /* equal card height so buttons align */
}
.casino-card img { max-height: 100%; object-fit: contain; align-self: center; justify-self: center; }
.casino-card .btn--play { align-self: end; }

/* Content */
.content { padding-block: 24px 40px; }
.content h1, .content h2 { line-height: 1.2; }
.content .meta-inline { color: var(--color-muted); }
/* Ensure floats don't overlap section headings */
.content h2 { clear: both; margin-top: 24px; }

/* Inline media placed inside text blocks */
.inline-media { margin: 12px 0; background: var(--color-surface); border-radius: var(--radius); overflow: hidden; border: 1px solid rgba(255,255,255,0.08); }
.inline-media img { width: 100%; height: auto; display: block; }
@media (min-width: 1024px) {
  .inline-media--right { float: right; width: min(36%, 480px); margin: 6px 0 12px 20px; }
}

/* (Reverted) remove device mockups */

/* Table: responsive wrapper turns into stacked rows on small screens */
.table-wrap { margin-block: 16px 24px; background: var(--color-surface); border-radius: var(--radius); overflow: hidden; border: 1px solid rgba(255,255,255,0.08); }
.data-table { width: 100%; border-collapse: collapse; }
.data-table caption { text-align: left; padding: 12px 16px; color: var(--color-muted); }
.data-table th, .data-table td { padding: 10px 12px; border-top: 1px solid rgba(255,255,255,0.08); }
.data-table thead th { background: rgba(255,255,255,0.04); text-align: left; }
.data-table tbody tr:nth-child(even) { background: rgba(255,255,255,0.02); }

/* Mobile stack for table */
@media (max-width: 640px) {
  /* Ensure mobile banner uses full intrinsic image size (no reduction/cropping) */
  .hero__img { height: auto; object-fit: contain; }
  .data-table thead { display: none; }
  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
  .data-table tr { border-top: 1px solid rgba(255,255,255,0.08); padding: 8px 0; }
  .data-table td { padding: 8px 16px; }
  .data-table td:nth-child(1) { font-weight: 700; }
  .data-table td:nth-child(2) { color: var(--color-muted); }
}

/* Screenshots grid */
.screenshots { display: grid; gap: 16px; margin-top: 24px; }
.screenshots figure { margin: 0; background: var(--color-surface); border-radius: var(--radius); overflow: hidden; border: 1px solid rgba(255,255,255,0.08); }
.screenshots figcaption { padding: 8px 12px; color: var(--color-muted); font-size: 0.9rem; }
/* New rows for phone/laptop groups: always 3 in a row across width */
.screenshots__title { margin: 6px 0; font-size: 1.1rem; color: var(--color-muted); }
.screenshots-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.screenshots-row img { width: 100%; height: auto; object-fit: contain; }
.screenshots-row--phones img { height: auto; object-fit: contain; max-height: 260px; }
.screenshots-row--phones img { height: auto; object-fit: contain; }
.screenshots-row--laptops img { height: 170px; object-fit: cover; }

/* Footer */
.site-footer { background: #0b0d11; border-top: 1px solid rgba(255,255,255,0.08); }
.footer__top { display: grid; gap: 20px; padding-block: 20px; align-items: center; }
.payments__list { display: grid; grid-auto-flow: column; gap: 16px; align-items: center; list-style: none; padding: 0; margin: 0; overflow-x: auto; }
.footer-nav ul { display: flex; gap: 12px; list-style: none; padding: 0; margin: 0; flex-wrap: wrap; }
.footer-nav a { color: var(--color-muted); text-decoration: none; }
.footer-nav a:hover { color: var(--color-text); }
.footer__bottom { padding-block: 12px; border-top: 1px solid rgba(255,255,255,0.06); color: var(--color-muted); }

/* Media queries */
@media (min-width: 640px) {
  .site-nav__list { display: flex; }
  .casino-grid { grid-template-columns: repeat(3, 1fr); }
  /* laptops block removed */
}
@media (min-width: 1024px) {
  .casino-grid { grid-template-columns: repeat(6, 1fr); }
  .footer__top { grid-template-columns: 1fr auto; }
  .casino-card { grid-template-rows: 120px 1fr auto; min-height: 300px; }
  .brand img { width: 132px; }
  .btn--ghost { padding: 8px 12px; }
  /* laptops block removed */
}


