/* ==================================================================
   Variables
   ================================================================== */
:root {
  /* Colors */
  --color-background: #f5f7fb;
  --color-surface: #ffffff;
  --color-text: #111827;
  --color-text-muted: #6b7280;

  --color-primary: #1d4ed8; /* calm, trustworthy blue */
  --color-primary-soft: #e0e7ff;
  --color-primary-strong: #1e40af;

  --color-success: #16a34a;
  --color-warning: #f59e0b;
  --color-danger: #dc2626;

  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2933;
  --gray-900: #111827;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --font-serif: "Georgia", "Times New Roman", serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  --font-size-xs: 0.75rem;   /* 12px */
  --font-size-sm: 0.875rem;  /* 14px */
  --font-size-base: 1rem;    /* 16px */
  --font-size-lg: 1.125rem;  /* 18px */
  --font-size-xl: 1.25rem;   /* 20px */
  --font-size-2xl: 1.5rem;   /* 24px */
  --font-size-3xl: 1.875rem; /* 30px */
  --font-size-4xl: 2.25rem;  /* 36px */

  --line-height-tight: 1.2;
  --line-height-snug: 1.35;
  --line-height-normal: 1.6;
  --line-height-relaxed: 1.75;

  /* Spacing scale (0–96px) */
  --space-0: 0;
  --space-1: 0.25rem;  /* 4px */
  --space-2: 0.5rem;   /* 8px */
  --space-3: 0.75rem;  /* 12px */
  --space-4: 1rem;     /* 16px */
  --space-5: 1.25rem;  /* 20px */
  --space-6: 1.5rem;   /* 24px */
  --space-8: 2rem;     /* 32px */
  --space-10: 2.5rem;  /* 40px */
  --space-12: 3rem;    /* 48px */
  --space-16: 4rem;    /* 64px */
  --space-20: 5rem;    /* 80px */
  --space-24: 6rem;    /* 96px */

  /* Radius */
  --radius-sm: 0.25rem;    /* 4px */
  --radius-md: 0.5rem;     /* 8px */
  --radius-lg: 0.75rem;    /* 12px */
  --radius-xl: 1rem;       /* 16px */
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 15px 35px rgba(15, 23, 42, 0.12);

  /* Transitions */
  --transition-fast: 120ms ease-out;
  --transition-base: 180ms ease-out;
  --transition-slow: 240ms ease-out;

  /* Layout */
  --layout-max-width: 1120px;
  --layout-gutter: 1.5rem;
}

/* Respect prefers-color-scheme if a dark variant is added later */
@media (prefers-color-scheme: dark) {
  :root[data-theme="dark"] {
    --color-background: #020617;
    --color-surface: #020617;
    --color-text: #e5e7eb;
    --color-text-muted: #9ca3af;
    --gray-50: #020617;
    --gray-100: #020617;
    --gray-900: #f9fafb;
  }
}

/* ==================================================================
   Reset / Normalize
   ================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
  padding: 0;
  margin: 0;
}

body {
  min-height: 100vh;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

button {
  background: none;
  border: none;
  padding: 0;
}

textarea {
  resize: vertical;
}

/* Remove default link underline and color inherit by default */
a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

/* ==================================================================
   Base Styles
   ================================================================== */
body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  background-color: var(--color-background);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  min-height: 60vh;
}

/* Headings: clean, scalable, with controlled margins */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: var(--line-height-tight);
  color: var(--gray-900);
}

h1 {
  font-size: clamp(2rem, 2.4vw + 1.4rem, var(--font-size-4xl));
  letter-spacing: -0.03em;
  margin-bottom: var(--space-4);
}

h2 {
  font-size: clamp(1.5rem, 1.6vw + 1rem, var(--font-size-3xl));
  letter-spacing: -0.02em;
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
}

h3 {
  font-size: var(--font-size-2xl);
  margin-top: var(--space-6);
  margin-bottom: var(--space-2);
}

h4 {
  font-size: var(--font-size-xl);
  margin-top: var(--space-5);
  margin-bottom: var(--space-2);
}

h5 {
  font-size: var(--font-size-lg);
  margin-top: var(--space-4);
  margin-bottom: var(--space-1);
}

h6 {
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-top: var(--space-4);
  margin-bottom: var(--space-1);
}

p {
  margin-top: 0;
  margin-bottom: var(--space-3);
  }

p:last-child {
  margin-bottom: 0;
}

small {
  font-size: var(--font-size-sm);
}

strong {
  font-weight: 600;
}

code,
pre {
  font-family: var(--font-mono);
}

/* Text utilities for readability in dense comparison tables */
.lead {
  font-size: var(--font-size-lg);
  line-height: var(--line-height-relaxed);
  color: var(--gray-700);
}

.muted {
  color: var(--color-text-muted);
}

/* Links: accessible, clearly interactive in a betting guide context */
a {
  color: var(--color-primary);
  font-weight: 500;
}

a:hover {
  color: var(--color-primary-strong);
}

a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Lists */
ul,
ol {
  padding-left: 1.25rem;
  margin-top: 0;
  margin-bottom: var(--space-3);
}

li + li {
  margin-top: 0.25rem;
}

/* ==================================================================
   Utilities
   ================================================================== */

/* Layout container */
.container {
  width: 100%;
  max-width: var(--layout-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--layout-gutter);
  padding-right: var(--layout-gutter);
}

.section {
  padding-top: var(--space-10);
  padding-bottom: var(--space-10);
}

.section--muted {
  background-color: var(--gray-50);
}

/* Flex helpers */
.flex {
  display: flex;
}

.inline-flex {
  display: inline-flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-column {
  display: flex;
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.gap-2 {
  gap: var(--space-2);
}

.gap-3 {
  gap: var(--space-3);
}

.gap-4 {
  gap: var(--space-4);
}

/* Grid helpers for rankings & comparison tables */
.grid {
  display: grid;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-6);
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Width helpers */
.w-full {
  width: 100%;
}

.max-w-readable {
  max-width: 72ch;
}

/* Alignment */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

/* Screen-reader only (for accessibility labels, legal notes, etc.) */
.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;
}

/* Spacing utilities (common subset) */
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }

.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }

.py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }
.py-6 { padding-top: var(--space-6); padding-bottom: var(--space-6); }
.py-8 { padding-top: var(--space-8); padding-bottom: var(--space-8); }

.px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }
.px-6 { padding-left: var(--space-6); padding-right: var(--space-6); }

/* ==================================================================
   Components
   ================================================================== */

/* Buttons: clear primary CTA for bonus guides & rankings */
.button,
button,
input[type="button"],
input[type="submit"],
input[type="reset"] {
  --btn-bg: var(--color-primary);
  --btn-bg-hover: var(--color-primary-strong);
  --btn-color: #ffffff;
  --btn-border: transparent;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--btn-border);
  background-color: var(--btn-bg);
  color: var(--btn-color);
  font-weight: 600;
  font-size: var(--font-size-sm);
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition:
    background-color var(--transition-base),
    color var(--transition-base),
    box-shadow var(--transition-base),
    transform var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.button:hover,
button:hover,
input[type="button"]:hover,
input[type="submit"]:hover,
input[type="reset"]:hover {

  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.button:active,
button:active,
input[type="button"]:active,
input[type="submit"]:active,
input[type="reset"]:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.button:focus-visible,
button:focus-visible,
input[type="button"]:focus-visible,
input[type="submit"]:focus-visible,
input[type="reset"]:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.button[disabled],
button[disabled],
input[type="button"][disabled],
input[type="submit"][disabled],
input[type="reset"][disabled],
.button.is-disabled {
  cursor: not-allowed;
  opacity: 0.65;
  box-shadow: none;
}

.button--ghost {
  --btn-bg: transparent;
  --btn-bg-hover: var(--color-primary-soft);
  --btn-color: var(--color-primary);
  --btn-border: var(--color-primary-soft);
  box-shadow: none;
}

.button--outline {
  --btn-bg: transparent;
  --btn-bg-hover: rgba(37, 99, 235, 0.04);
  --btn-color: var(--color-primary);
  --btn-border: var(--color-primary);
}

/* Inputs: consistent, calm styling for forms & search */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="tel"],
input[type="number"],
input[type="password"],
select,
textarea {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-300);
  background-color: #ffffff;
  color: var(--color-text);
  font-size: var(--font-size-sm);
  line-height: 1.4;
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base),
    background-color var(--transition-base);
}

input::placeholder,
textarea::placeholder {
  color: var(--color-text-muted);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2);
}

input[disabled],
select[disabled],
textarea[disabled] {
  background-color: var(--gray-100);
  cursor: not-allowed;
}

/* Card: used for operator summaries, bonus boxes, FAQs */
.card {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-md);
}

.card--soft {
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
}

.card__header {
  margin-bottom: var(--space-3);
}

.card__title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.card__meta {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.card__body {
  font-size: var(--font-size-sm);
}

/* Table: for structured comparisons */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}

th,
td {
  padding: 0.75rem 0.5rem;
  text-align: left;
  vertical-align: top;
}

th {
  font-weight: 600;
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-200);
}

tbody tr:nth-child(even) {
  background-color: var(--gray-50);
}

/* Badges for status / legal info / responsible betting */
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-full);
  padding: 0.125rem 0.6rem;
  font-size: var(--font-size-xs);
  font-weight: 500;
  background-color: var(--gray-100);
  color: var(--gray-700);
}

.badge--success {
  background-color: rgba(22, 163, 74, 0.08);
  color: var(--color-success);
}

.badge--warning {
  background-color: rgba(245, 158, 11, 0.08);
  color: var(--color-warning);
}

.badge--danger {
  background-color: rgba(220, 38, 38, 0.08);
  color: var(--color-danger);
}

/* ==================================================================
   Accessibility & Motion
   ================================================================== */

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
