/* ===========================================================================
   Variables
   ======================================================================== */
:root {
  /* Colors */
  --color-background: #0b1220; /* deep blue background */
  --color-surface: #0f172a; /* darker surface for cards/sections */
  --color-surface-alt: #111827;
  --color-text: #e5e7eb; /* light gray text */
  --color-text-muted: #9ca3af;
  --color-primary: #3b82f6; /* primary CTA blue */
  --color-primary-soft: rgba(59, 130, 246, 0.12);
  --color-success: #22c55e; /* soft green accents */
  --color-warning: #facc15;
  --color-danger: #ef4444;

  /* Neutral grays (graphite) */
  --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, "Segoe UI", 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-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-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-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;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Shadows (subtle, trustworthy) */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.5);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.45);
  --shadow-lg: 0 18px 45px rgba(15, 23, 42, 0.6);

  /* Borders */
  --border-subtle: 1px solid rgba(148, 163, 184, 0.2);
  --border-strong: 1px solid rgba(148, 163, 184, 0.4);

  /* Transitions */
  --transition-fast: 120ms ease-out;
  --transition-normal: 180ms ease-out;
  --transition-slow: 250ms ease-out;

  /* Layout */
  --container-max-width: 1120px;
}

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

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

body {
  margin: 0;
}

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

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

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

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

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

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

textarea {
  resize: vertical;
}

:root {
  color-scheme: dark;
}

/* ===========================================================================
   Base Styles
   ======================================================================== */
body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  background: radial-gradient(circle at top, #1e293b 0, #020617 55%, #020617 100%);
  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: #f9fafb;
}

h1 {
  font-size: clamp(2rem, 3vw, 2.5rem);
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  letter-spacing: -0.02em;
}

h3 {
  font-size: 1.25rem;
}

h4 {
  font-size: 1.125rem;
}

p {
  margin-top: 0;
  margin-bottom: var(--space-4);
  color: var(--color-text-muted);
}

strong {
  font-weight: 600;
}

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

/* Links */
a {
  position: relative;
  cursor: pointer;
  transition: color var(--transition-fast),
              opacity var(--transition-fast),
              transform var(--transition-fast);
}

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

a:active {
  transform: translateY(1px);
}

/* ===========================================================================
   Accessibility & Motion
   ======================================================================== */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

@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;
  }
}

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

/* ===========================================================================
   Layout Utilities
   ======================================================================== */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

@media (min-width: 960px) {
  .container {
    padding-left: var(--space-6);
    padding-right: var(--space-6);
  }
}

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

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

/* 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-col {
  display: flex;
  flex-direction: column;
}

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

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

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

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

/* Grid helpers */
.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(3, minmax(0, 1fr));
  gap: var(--space-4);
}

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

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

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

.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }

/* ===========================================================================
   Components
   ======================================================================== */
/* Buttons: primary CTA for offers, secondary for details */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    background-color var(--transition-normal),
    color var(--transition-normal),
    border-color var(--transition-normal),
    box-shadow var(--transition-normal),
    transform var(--transition-fast),
    opacity var(--transition-fast);
}

.button--primary {
  background: linear-gradient(135deg, var(--color-primary), #2563eb);
  color: #0b1120;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.45);
}

.button--primary:hover {
  background: linear-gradient(135deg, #60a5fa, #2563eb);
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.6);
  transform: translateY(-1px);
}

.button--primary:active {
  transform: translateY(0);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.5);
}

.button--secondary {
  background: rgba(15, 23, 42, 0.9);
  color: var(--color-text);
  border-color: rgba(148, 163, 184, 0.5);
}

.button--secondary:hover {
  background: rgba(30, 64, 175, 0.45);
  border-color: rgba(129, 140, 248, 0.8);
}

.button--ghost {
  background: transparent;
  color: var(--gray-200);
  border-color: rgba(148, 163, 184, 0.4);
}

.button--ghost:hover {
  background: rgba(15, 23, 42, 0.8);
}

.button--success {
  background: rgba(34, 197, 94, 0.14);
  color: #bbf7d0;
  border-color: rgba(34, 197, 94, 0.6);
}

.button:disabled,
.button[aria-disabled='true'] {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.button:focus-visible {
  outline: 2px solid #e0f2fe;
  outline-offset: 3px;
}

/* Form controls for responsible messaging & filters */
.input,
.select,
.textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(148, 163, 184, 0.4);
  background-color: rgba(15, 23, 42, 0.9);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
  transition: border-color var(--transition-fast),
              box-shadow var(--transition-fast),
              background-color var(--transition-fast);
}

.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.6);
}

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

/* Offer / comparison card */
.card {
  position: relative;
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  background: radial-gradient(circle at top left, #1f2937 0, #020617 55%, #020617 100%);
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at top right, rgba(52, 211, 153, 0.16), transparent 55%);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.card:hover::before {
  opacity: 1;
}

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

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

.card-subtitle {
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
}

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

@media (max-width: 768px) {
  .card {
    padding: var(--space-4);
  }

  .card-body {
    grid-template-columns: minmax(0, 1fr);
  }
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border: 1px solid rgba(148, 163, 184, 0.6);
  color: var(--color-text-muted);
  background: rgba(15, 23, 42, 0.8);
}

.badge--brand {
  border-color: rgba(59, 130, 246, 0.8);
  color: #dbeafe;
  background: rgba(30, 64, 175, 0.4);
}

.badge--verified {
  border-color: rgba(34, 197, 94, 0.9);
  color: #bbf7d0;
  background: rgba(21, 128, 61, 0.35);
}

.badge--risk {
  border-color: rgba(251, 191, 36, 0.9);
  color: #fef3c7;
  background: rgba(180, 83, 9, 0.35);
}

/* Trust / responsible gaming notes */
.notice {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.9);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.notice--success {
  border-color: rgba(34, 197, 94, 0.7);
  background: rgba(21, 128, 61, 0.28);
  color: #bbf7d0;
}

.notice--warning {
  border-color: rgba(250, 204, 21, 0.8);
  background: rgba(161, 98, 7, 0.28);
  color: #fef3c7;
}

/* Rating pill for offer comparison */
.rating-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.6);
  font-size: var(--font-size-xs);
}

.rating-pill__score {
  font-weight: 600;
  color: #e5e7eb;
}

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

/* Offer grid wrapper for home page list */
.offer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-5);
  align-items: stretch;
}

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

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

/* Comparison table-like list inside cards */
.compare-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  row-gap: 0.4rem;
  column-gap: var(--space-4);
  font-size: var(--font-size-sm);
}

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

.compare-list__value {
  text-align: right;
  font-weight: 500;
  color: var(--gray-50);
}

/* Header / nav baseline for aggregator context */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.7), transparent);
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: var(--font-size-xs);
  color: #e5e7eb;
}

.site-logo__mark {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 0.6rem;
  background: radial-gradient(circle at 20% 0, rgba(52, 211, 153, 0.6), rgba(59, 130, 246, 1));
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.6), 0 10px 26px rgba(37, 99, 235, 0.6);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-size: var(--font-size-sm);
}

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

.site-nav a[aria-current='page'] {
  color: #e5e7eb;
}

.site-nav a:hover {
  color: var(--gray-50);
}

/* Footer baseline for responsible disclaimers */
.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.35);
  padding-top: var(--space-6);
  padding-bottom: var(--space-8);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.site-footer__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-4);
}

.site-footer__disclaimer {
  max-width: 40rem;
  line-height: var(--line-height-relaxed);
}

@media (max-width: 640px) {
  .site-footer__meta {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ===========================================================================
   End base.css
   ======================================================================== */
