/* ========================================================================
   Variables
   ======================================================================== */
:root {
  /* Colors */
  --color-background: #0b1220; /* Deep blue background */
  --color-surface: #0f172a; /* Elevated surfaces */
  --color-surface-alt: #111827;
  --color-text: #f9fafb; /* Main text on dark bg */
  --color-text-muted: #9ca3af; /* Subdued text */
  --color-border-subtle: #1f2933;
  --color-primary: #22c55e; /* Soft green accent */
  --color-primary-soft: rgba(34, 197, 94, 0.12);
  --color-primary-strong: #16a34a;
  --color-success: #22c55e;
  --color-warning: #fbbf24;
  --color-danger: #ef4444;
  --color-info: #38bdf8;
  --color-graphite-900: #111827;
  --color-graphite-800: #1f2937;
  --color-graphite-700: #374151;
  --color-graphite-600: #4b5563;
  --color-graphite-500: #6b7280;
  --color-graphite-400: #9ca3af;
  --color-graphite-300: #d1d5db;
  --color-graphite-200: #e5e7eb;
  --color-graphite-100: #f3f4f6;
  --color-focus-ring: #22c55e;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "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-md: 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.5;
  --line-height-relaxed: 1.7;

  /* Spacing scale (px) */
  --space-0: 0;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* Radii */
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Shadows (subtle, suitable for trustworthy/clean UI) */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.25);
  --shadow-sm: 0 4px 10px rgba(15, 23, 42, 0.35);
  --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.45);

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

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

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

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

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

body {
  margin: 0;
  min-height: 100vh;
}

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

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

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

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

textarea {
  resize: vertical;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* Remove default link styles but keep color inheritance */
a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

/* ========================================================================
   Base styles
   ======================================================================== */
body {
  font-family: var(--font-sans);
  font-size: var(--font-size-md);
  line-height: var(--line-height-relaxed);
  color: var(--color-text);
  background: radial-gradient(circle at top, #1f2937 0, #020617 55%, #020617 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  display: block;
}

p {
  margin-top: var(--space-2);
  margin-bottom: var(--space-4);
  /* Comfortable line length */
  color: var(--color-text-muted);
}

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

h1 {
  font-size: clamp(2.25rem, 2.6vw, 2.75rem);
  letter-spacing: -0.03em;
  margin-bottom: var(--space-4);
}

h2 {
  font-size: clamp(1.75rem, 2.2vw, 2.1rem);
  letter-spacing: -0.02em;
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
}

h3 {
  font-size: clamp(1.35rem, 1.6vw, 1.5rem);
  margin-top: var(--space-6);
  margin-bottom: var(--space-2);
}

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

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

strong {
  font-weight: 600;
}

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

/* Links styled for subtle yet clear CTAs in betting context */
a.link,
a[href] {
  color: #318353;
  text-decoration: none;
  transition: color var(--transition-normal), opacity var(--transition-fast);
}

a.link:hover,
a[href]:hover {
 color: #318353;
}

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

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

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

:focus {
  outline: none;
}

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

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

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

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

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

/* 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-2 {
  gap: var(--space-2);
}

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

.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: 900px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }
}

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

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

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

.badge-inline {
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-full);
  padding: 2px 8px;
  font-size: var(--font-size-xs);
  line-height: 1;
}

.badge-success {
  background-color: rgba(34, 197, 94, 0.12);
  color: #bbf7d0;
}

.badge-neutral {
  background-color: rgba(148, 163, 184, 0.16);
  color: #e5e7eb;
}

/* Utility spacers */
.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); }

.text-xs { font-size: var(--font-size-xs); }
.text-sm { font-size: var(--font-size-sm); }
.text-md { font-size: var(--font-size-md); }
.text-lg { font-size: var(--font-size-lg); }

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

/* ========================================================================
   Components: Buttons
   ======================================================================== */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-full);
  padding: 10px 18px;
  font-size: var(--font-size-sm);
  font-weight: 600;
  line-height: 1.1;
  border: 1px solid transparent;
  background-color: var(--color-primary);
  color: #052e16;
  box-shadow: var(--shadow-xs);
  transition:
    background-color var(--transition-normal),
    box-shadow var(--transition-normal),
    transform var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast);
}

.button:hover {
  background-color: var(--color-primary-strong);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
  color: #052e16;
}

.button:active {
  transform: translateY(0);
  box-shadow: var(--shadow-xs);
}

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

.button--ghost {
  background-color: rgba(237, 242, 255, 0.8);
  border-color: rgba(223, 236, 255, 0.4);
  color: var(--color-text);
  box-shadow: none;
}

.button--ghost:hover {
  background-color: rgba(15, 23, 42, 0.8);
  border-color: rgba(148, 163, 184, 0.7);
}

.button--secondary {
  background-color: #0b1220;
  color: var(--color-text);
  border-color: rgba(148, 163, 184, 0.4);
}

.button--secondary:hover {
  background-color: #020617;
}

.button--sm {
  padding: 7px 14px;
  font-size: var(--font-size-xs);
}

.button--lg {
  padding: 12px 22px;
  font-size: var(--font-size-md);
}

/* CTA specifically for offer comparison cards */
.button-offer {
  width: 100%;
  justify-content: center;
}

/* ========================================================================
   Components: Form elements
   ======================================================================== */
.label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 4px;
}

.input,
.select,
.textarea {
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(148, 163, 184, 0.45);
  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: rgba(148, 163, 184, 0.8);
}

.input:focus-visible,
.select:focus-visible,
.textarea:focus-visible {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.45);
}

.input[disabled],
.select[disabled],
.textarea[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ========================================================================
   Components: Card (comparison-style)
   ======================================================================== */
.card {
  position: relative;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, var(--color-surface), var(--color-surface-alt));
  padding: var(--space-4);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: var(--shadow-xs);
  transition:
    box-shadow var(--transition-normal),
    transform var(--transition-normal),
    border-color var(--transition-normal),
    background-color var(--transition-normal);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: rgba(34, 197, 94, 0.32);
}

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

.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);
  font-size: var(--font-size-sm);
}

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

.card-highlight {
  border-radius: var(--radius-md);
  background-color: rgba(15, 118, 110, 0.32);
  padding: 4px 10px;
  font-size: var(--font-size-xs);
  font-weight: 500;
  color: #e0f2fe;
}

/* Recommended tag for best offer among Betclic / Betsson / Bwin */
.card-flag {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background-color: var(--color-primary-soft);
  color: #bbf7d0;
}

/* ========================================================================
   Components: Offer list layout (grid-based, minimalist)
   ======================================================================== */
.offers-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

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

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

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

.offer-meta-item {
  font-size: var(--font-size-xs);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.offer-meta-label {
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.offer-meta-value {
  color: var(--color-text);
  font-weight: 500;
}

/* Trust / compliance note under cards */
.responsible-note {
  margin-top: var(--space-3);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

/* ========================================================================
   Misc helpers tailored for aggregator context
   ======================================================================== */
.logo-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  opacity: 0.85;
}

.logo-strip img {
  height: 22px;
  width: auto;
  filter: grayscale(0.2);
  opacity: 0.9;
}

.badge-verified {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--radius-full);
  padding: 4px 10px;
  background-color: rgba(34, 197, 94, 0.15);
  color: #bbf7d0;
  font-size: var(--font-size-xs);
  font-weight: 500;
}

.badge-verified::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background-color: var(--color-success);
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.3);
}

/* Minimal divider for structured sections */
.divider {
  border: 0;
  border-top: 1px solid rgba(148, 163, 184, 0.35);
  margin: var(--space-6) 0;
}

