/* ==================================================================
   Variables
   ================================================================== */
:root {
  /* Colors */
  --color-bg: #050b18;               /* deep blue background */
  --color-surface: #0f172a;          /* elevated surfaces */
  --color-surface-alt: #111827;
  --color-text: #f9fafb;             /* primary text */
  --color-text-muted: #9ca3af;       /* secondary text */
  --color-primary: #2563eb;          /* primary accent (links, CTAs) */
  --color-primary-soft: rgba(37, 99, 235, 0.12);
  --color-success: #22c55e;          /* soft green accent */
  --color-warning: #f59e0b;
  --color-danger: #ef4444;

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

  /* 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-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–24 => 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-9: 2.25rem;  /* 36px */
  --space-10: 2.5rem;  /* 40px */
  --space-11: 2.75rem; /* 44px */
  --space-12: 3rem;    /* 48px */
  --space-14: 3.5rem;  /* 56px */
  --space-16: 4rem;    /* 64px */
  --space-20: 5rem;    /* 80px */
  --space-24: 6rem;    /* 96px */

  /* Radius */
  --radius-xs: 0.125rem;
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-pill: 999px;

  /* Shadows (subtle, trustworthy) */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.4);
  --shadow-sm: 0 4px 10px rgba(15, 23, 42, 0.45);
  --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.55);

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

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

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

body {
  margin: 0;
}

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

ol, ul {
  padding-left: 1.5rem;
}

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

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

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

a {
  color: inherit;
}

/* Remove default focus outline, re-add via :focus-visible below */
:focus {
  outline: none;
}

/* ==================================================================
   Base Styles
   ================================================================== */
body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  background-color: var(--color-bg);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  min-height: 60vh;
}

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

h1 { font-size: var(--font-size-4xl); margin-bottom: var(--space-4); }
h2 { font-size: var(--font-size-3xl); margin-bottom: var(--space-3); }
h3 { font-size: var(--font-size-2xl); 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); margin-bottom: var(--space-1); }

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

strong, b {
  font-weight: 600;
  color: var(--color-gray-50);
}

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

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

a:hover {
  color: #3b82f6;
}

a:active {
  color: #1d4ed8;
}

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

hr {
  border: 0;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  margin: var(--space-6) 0;
}

/* ==================================================================
   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.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !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;
}

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

/* Layout containers */
.container {
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--space-4);
  max-width: 1120px; /* compact for focused offer comparison */
}

@media (min-width: 1024px) {
  .container {
    padding-inline: 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;
}

.gap-xs { gap: var(--space-2); }
.gap-sm { gap: var(--space-3); }
.gap-md { gap: var(--space-4); }
.gap-lg { gap: var(--space-6); }

/* Simple grid helpers for comparison layouts */
.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);
  }
}

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

/* Spacing utilities (subset for common use) */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-sm { margin-top: var(--space-3); }
.mb-sm { margin-bottom: var(--space-3); }
.mt-md { margin-top: var(--space-4); }
.mb-md { margin-bottom: var(--space-4); }
.mt-lg { margin-top: var(--space-6); }
.mb-lg { margin-bottom: var(--space-6); }

.px-md { padding-inline: var(--space-4); }
.py-md { padding-block: var(--space-4); }

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

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

/* Buttons - primary action emphasizes clarity and safety */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding-inline: var(--space-4);
  padding-block: calc(var(--space-2) + 1px);
  border-radius: var(--radius-pill);
  font-size: var(--font-size-sm);
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  border: 1px solid transparent;
  transition:
    background-color var(--transition-normal),
    color var(--transition-normal),
    border-color var(--transition-normal),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
}

.btn-primary {
  background-color: var(--color-primary);
  color: #f9fafb;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background-color: #1d4ed8;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-primary:active {
  background-color: #1e40af;
  box-shadow: var(--shadow-xs);
  transform: translateY(0);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-text);
  border-color: rgba(148, 163, 184, 0.4);
}

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

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

.btn-ghost:hover {
  background-color: rgba(15, 23, 42, 0.7);
  color: var(--color-text);
}

.btn-success {
  background-color: var(--color-success);
  color: #022c22;
}

.btn-success:hover {
  background-color: #16a34a;
}

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

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

/* Form elements - consistent, minimalist */
.input,
select,
textarea {
  width: 100%;
  padding-inline: var(--space-3);
  padding-block: calc(var(--space-2) + 1px);
  background-color: var(--color-surface-alt);
  border-radius: var(--radius-md);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  line-height: 1.4;
  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 {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.55);
}

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

/* Card - used for bookmaker offers & comparisons */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-4);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.96));
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: var(--shadow-sm);
}

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

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

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

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

.card-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--font-size-xs);
}

.card-tag {
  padding-inline: var(--space-2);
  padding-block: calc(var(--space-1) / 1.5);
  border-radius: var(--radius-pill);
  background-color: rgba(34, 197, 94, 0.12);
  color: var(--color-success);
  border: 1px solid rgba(34, 197, 94, 0.4);
  font-weight: 500;
}

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

/* Offer highlight badge (e.g. "Verified", "Top offer") */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding-inline: var(--space-2);
  padding-block: calc(var(--space-1) / 1.2);
  border-radius: var(--radius-pill);
  font-size: var(--font-size-xs);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

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

.badge-neutral {
  background-color: rgba(148, 163, 184, 0.16);
  color: var(--color-gray-300);
}

/* Comparison list wrapper for offers */
.offer-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-4);
}

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

/* Subtle divider used inside cards for sections */
.divider {
  border-top: 1px dashed rgba(148, 163, 184, 0.35);
  margin-block: var(--space-3);
}

/* Label for responsible betting disclaimers */
.notice-text {
  font-size: var(--font-size-xs);
  color: var(--color-gray-400);
  line-height: var(--line-height-relaxed);
}

.notice-strong {
  color: var(--color-gray-300);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
