/* ========================================================================== 
   Variables
   ========================================================================== */
:root {
  /* Colors */
  --color-background: #050b16; /* deep navy background */
  --color-surface: #0c1524; /* elevated surfaces */
  --color-surface-alt: #111a2b;
  --color-text: #f5f7fb;
  --color-text-muted: #a6adbd;
  --color-border-subtle: #20283a;
  --color-border-strong: #3b4760;
  --color-primary: #1b6eff; /* primary CTA */
  --color-primary-soft: rgba(27, 110, 255, 0.12);
  --color-success: #34c38f; /* soft green accent */
  --color-success-soft: rgba(52, 195, 143, 0.14);
  --color-warning: #f5a623;
  --color-danger: #ff4d4f;

  /* Neutral grays for subtle UI elements */
  --gray-50: #f8fafc;
  --gray-100: #edf2f7;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5f5;
  --gray-400: #a0aec0;
  --gray-500: #718096;
  --gray-600: #4a5568;
  --gray-700: #2d3748;
  --gray-800: #1a202c;
  --gray-900: #050b16;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-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-md: 1.0625rem; /* 17px */
  --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.5;
  --line-height-relaxed: 1.7;

  /* 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-7: 1.75rem;  /* 28px */
  --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-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-subtle: 0 4px 16px rgba(0, 0, 0, 0.25);
  --shadow-focus: 0 0 0 3px rgba(27, 110, 255, 0.5);

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

/* Motion reduction */
@media (prefers-reduced-motion: reduce) {
  :root {
    --transition-fast: 0ms;
    --transition-base: 0ms;
    --transition-slow: 0ms;
  }

  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

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

html,
body {
  margin: 0;
  padding: 0;
}

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

body {
  min-height: 100vh;
}

img,
svg,
video,
canvas,
audio,
iframe {
  max-width: 100%;
  height: auto;
}

img {
  display: block;
}

picture {
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  margin: 0;
}

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

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

a {
  color: inherit;
  text-decoration: none;
}

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

legend {
  padding: 0;
}

/* ========================================================================== 
   Base
   ========================================================================== */
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;
}

main {
  display: block;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: var(--line-height-tight);
  color: var(--gray-50);
}

h1 {
  font-size: var(--font-size-4xl);
  letter-spacing: -0.03em;
  margin-bottom: var(--space-4);
}

h2 {
  font-size: var(--font-size-3xl);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-3);
}

h3 {
  font-size: var(--font-size-2xl);
  letter-spacing: -0.01em;
  margin-bottom: var(--space-3);
}

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

h5 {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-2);
}

h6 {
  font-size: var(--font-size-base);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

p {
  margin-bottom: var(--space-3);
  color: var(--color-text);
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover {
  color: #4e8eff;
}

a:active {
  color: #1755c1;
}

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

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

hr {
  border: none;
  border-top: 1px solid var(--color-border-subtle);
  margin: var(--space-6) 0;
}

/* ========================================================================== 
   Accessibility & Focus
   ========================================================================== */
:focus {
  outline: none;
}

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

button:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a[href]:focus-visible {
  box-shadow: var(--shadow-focus);
}

/* Screen-reader only utility */
.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;
}

/* ========================================================================== 
   Utilities
   ========================================================================== */
/* Layout container, ideal for comparison grids and main layout */
.container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
  max-width: 1120px;
}

@media (min-width: 1200px) {
  .container {
    max-width: 1200px;
  }
}

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

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

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

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

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

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

.items-end {
  align-items: flex-end;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

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

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

.gap-lg {
  gap: var(--space-6);
}

/* Grid helpers for comparison layout */
.grid {
  display: grid;
}

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

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

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

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

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

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

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0 var(--space-2);
  height: 1.5rem;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-xs);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-success {
  background-color: var(--color-success-soft);
  color: var(--color-success);
}

.badge-neutral {
  background-color: rgba(255, 255, 255, 0.06);
  color: var(--color-text-muted);
}

/* Spacing utilities (selected for brevity) */
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: var(--space-2); }
.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-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); }
.p-4  { padding: var(--space-4); }

/* ========================================================================== 
   Components
   ========================================================================== */
/* Buttons - primary CTAs for offers */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: var(--font-size-sm);
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color var(--transition-base),
    color var(--transition-base),
    border-color var(--transition-base),
    box-shadow var(--transition-base),
    transform var(--transition-fast);
}

.button-primary {
  background-color: var(--color-primary);
  color: #ffffff!important;
  box-shadow: 0 10px 20px rgba(27, 110, 255, 0.35);
}

.button-primary:hover {
  background-color: #2a7bff;
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(27, 110, 255, 0.45);
}

.button-primary:active {
  background-color: #1755c1;
  transform: translateY(0);
  box-shadow: 0 6px 18px rgba(27, 110, 255, 0.4);
}

.button-secondary {
  background-color: transparent;
  color: var(--color-text);
  border-color: var(--color-border-strong);
}

.button-secondary:hover {
  background-color: var(--color-surface-alt);
}

.button-ghost {
  background-color: transparent;
  color: var(--color-text-muted);
  border-color: transparent;
}

.button-ghost:hover {
  background-color: rgba(255, 255, 255, 0.04);
  color: var(--color-text);
}

.button-success {
  background-color: var(--color-success);
  color: #0a101b;
}

.button[disabled],
.button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* Inputs for signup / responsible gaming forms */
.input,
select,
textarea {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-subtle);
  background-color: rgba(6, 13, 26, 0.9);
  color: var(--color-text);
  outline: none;
  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 {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-focus);
  background-color: #050b16;
}

.input[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--color-danger);
}

/* Cards - comparison-style offer cards */
.card {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.02);
  box-shadow: var(--shadow-subtle);
  padding: var(--space-5);
  position: relative;
  overflow: hidden;
}

.card--outline {
  box-shadow: none;
  border-color: var(--color-border-subtle);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  flex-direction: column;
}

.card-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
}

.card-subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.card-body {
  display: grid;
  gap: var(--space-3);
}

.card-footer {
  margin-top: var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

/* Offer score / rating chip */
.offer-score {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-xs);
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--color-text);
}

.offer-score--positive {
  background-color: var(--color-success-soft);
  color: var(--color-success);
}

/* Comparison list layout for Betclic, Betsson, Bwin cards */
.offer-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: var(--space-4);
}

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

/* Subtle top label for verified / responsible notes */
.label-subtle {
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
}

/* ========================================================================== 
   Page-level helpers for betting context
   ========================================================================== */
.site-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: linear-gradient(to bottom, #080f1f, rgba(8, 15, 31, 0.94));
  backdrop-filter: blur(18px);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-top: var(--space-4);
  padding-bottom: var(--space-4);
}

.site-main {
  padding-top: var(--space-6);
  padding-bottom: var(--space-8);
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: var(--space-4);
  padding-bottom: var(--space-4);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.responsible-note {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  max-width: 520px;
}

.responsible-note strong {
  color: var(--color-success);
}
