/* ========================================================================== 
   Variables
   ========================================================================== */

:root {
  /* Colors */
  --color-bg: #050b1a; /* deep navy background */
  --color-surface: #0f172a; /* elevated surface for cards/sections */
  --color-surface-alt: #111827; /* subtle variation for stripes/alt rows */
  --color-text: #e5e7eb; /* primary text */
  --color-text-muted: #9ca3af; /* secondary text */
  --color-primary: #2563eb; /* primary action (CTA) */
  --color-primary-soft: rgba(37, 99, 235, 0.12);
  --color-success: #22c55e; /* soft green accents for positive states */
  --color-warning: #f59e0b;
  --color-danger: #ef4444;

  --color-border-subtle: #1f2937;
  --color-border-strong: #374151;

  /* Neutral grays (graphite-inspired) */
  --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: #1f2937;
  --gray-900: #111827;

  /* 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-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-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-full: 9999px;

  /* Shadows */
  --shadow-soft: 0 10px 25px rgba(0, 0, 0, 0.25);
  --shadow-subtle: 0 4px 12px rgba(15, 23, 42, 0.3);
  --shadow-focus: 0 0 0 2px rgba(15, 23, 42, 1),
    0 0 0 4px rgba(37, 99, 235, 0.7);

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

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  :root {
    --transition-fast: 0s;
    --transition-normal: 0s;
    --transition-slow: 0s;
  }

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

/* ========================================================================== 
   Reset / Normalize
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html,
body {
  height: 100%;
}

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

body {
  -webkit-font-smoothing: antialiased;
}

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

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

/* Remove default focus styles so we can re-add accessible ones */
: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);
}

main {
  display: block;
}

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

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.025em;
  margin-bottom: var(--space-3);
}

h3 {
  font-size: var(--font-size-2xl);
  letter-spacing: -0.02em;
  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-1);
}

p {
  margin-bottom: var(--space-3);
  max-width: 70ch;
}

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

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

a:hover {
  color: #3b82f6;
}

a:active {
  color: #1d4ed8;
}

strong {
  font-weight: 600;
}

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

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

/* ========================================================================== 
   Accessibility
   ========================================================================== */

:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}

/* For elements that should use a subtle focus ring instead of full shadow */
.is-focus-outline-only:focus-visible {
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.8);
}

/* 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
   ========================================================================== */

/* Page container for a centered, grid-based layout */
.container {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: var(--space-4);
}

@media (min-width: 1024px) {
  .container {
    padding-inline: var(--space-6);
  }
}

/* Simple vertical page rhythm */
.section {
  padding-block: var(--space-10);
}

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

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

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

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

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

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

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

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

.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 for comparison-style layouts */
.grid {
  display: grid;
}

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

/* Alignment helpers */
.text-left {
  text-align: left;
}

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

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

/* Spacing utilities (commonly used) */
.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); }
.mb-8 { margin-bottom: var(--space-8); }

.pt-4 { padding-top: var(--space-4); }
.pb-4 { padding-bottom: var(--space-4); }
.pt-6 { padding-top: var(--space-6); }
.pb-6 { padding-bottom: var(--space-6); }

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

/* Buttons - primary CTAs emphasize trust & clarity */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: var(--font-size-sm);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
  white-space: nowrap;
}

.btn--primary {
  background: linear-gradient(135deg, var(--color-primary), #1d4ed8);
  color: #f9fafb;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.3);
}

.btn--primary:hover {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.35);
}

.btn--primary:active {
  transform: translateY(0);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.25);
}

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

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

.btn--muted {
  background-color: var(--color-surface-alt);
  color: var(--color-text-muted);
  border-color: var(--color-border-subtle);
}

.btn--muted:hover {
  background-color: rgba(17, 24, 39, 0.9);
}

.btn--success {
  background: linear-gradient(135deg, var(--color-success), #16a34a);
  color: #022c22;
}

.btn--success:hover {
  background: linear-gradient(135deg, #4ade80, #16a34a);
}

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

.btn--full {
  width: 100%;
}

/* Inputs - consistent, understated, accessible */
.input,
select,
textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-subtle);
  background-color: rgba(15, 23, 42, 0.95);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  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: rgba(37, 99, 235, 0.9);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.9), 0 0 0 4px rgba(37, 99, 235, 0.22);
}

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

.input[aria-invalid="true"]:focus-visible,
.input--error:focus-visible {
  box-shadow: 0 0 0 1px var(--color-danger), 0 0 0 4px rgba(239, 68, 68, 0.28);
}

.label {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-1);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.helper-text {
  margin-top: var(--space-1);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.helper-text--error {
  color: var(--color-danger);
}

/* Card - for comparison-style betting offers */
.card {
  position: relative;
  background: radial-gradient(circle at top left, rgba(34, 197, 94, 0.12), transparent 55%),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.12), transparent 60%),
    var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(55, 65, 81, 0.9);
  padding: var(--space-4);
  box-shadow: var(--shadow-subtle);
  transition: border-color var(--transition-normal),
    box-shadow var(--transition-normal),
    transform var(--transition-normal),
    background-color var(--transition-normal);
}

.card:hover {
  border-color: rgba(56, 189, 248, 0.6);
  box-shadow: var(--shadow-soft);
  transform: translateY(-2px);
}

.card--compact {
  padding: var(--space-3);
}

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

.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__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.card__footer {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-3);
}

/* Tag / badge for highlighting trust, verification, etc. */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(148, 163, 184, 0.7);
  font-size: var(--font-size-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  background-color: rgba(15, 23, 42, 0.9);
}

.badge--verified {
  border-color: rgba(34, 197, 94, 0.9);
  color: #bbf7d0;
  background: rgba(22, 163, 74, 0.16);
}

.badge--warning {
  border-color: rgba(245, 158, 11, 0.9);
  color: #fed7aa;
  background: rgba(245, 158, 11, 0.16);
}

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

.score-pill__value {
  font-weight: 600;
  color: #e5e7eb;
}

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

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

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

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

/* Subtle striped background for sections containing multiple cards */
.section--striped {
  background: radial-gradient(circle at top, rgba(37, 99, 235, 0.16), transparent 55%),
    linear-gradient(to bottom, #020617, #020617);
}

/* Responsible gambling notice / disclaimer */
.notice {
  border-radius: var(--radius-md);
  border: 1px dashed rgba(148, 163, 184, 0.8);
  background: rgba(15, 23, 42, 0.9);
  padding: var(--space-3);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.notice--warning {
  border-style: solid;
  border-color: rgba(245, 158, 11, 0.8);
  background: rgba(24, 16, 5, 0.96);
}

/* ========================================================================== 
   Utility Text & Color Helpers (lightweight)
   ========================================================================== */

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

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

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

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

.bg-surface {
  background-color: var(--color-surface);
}

.bg-surface-alt {
  background-color: var(--color-surface-alt);
}

.border-subtle {
  border: 1px solid var(--color-border-subtle);
}

.border-strong {
  border: 1px solid var(--color-border-strong);
}

.rounded-md {
  border-radius: var(--radius-md);
}

.rounded-lg {
  border-radius: var(--radius-lg);
}

.shadow-soft {
  box-shadow: var(--shadow-soft);
}

/* ========================================================================== 
   End
   ========================================================================== */
