/*
 * OddsAnalytikerna — Design System
 * Theme: Dark Precision — built for trust, speed, conversion
 * Palette: Deep charcoal + Lime green accent + clean whites
 */

/* ─── Tokens ─────────────────────────────────────────────── */
:root {
  --bg:          #06080e;
  --surface:     #0f1520;
  --surface-2:   #161e2e;
  --surface-3:   #1d2640;
  --border:      rgba(255,255,255,0.07);
  --border-accent: rgba(181,255,71,0.25);

  --accent:      #b5ff47;
  --accent-dim:  rgba(181,255,71,0.10);
  --accent-glow: rgba(181,255,71,0.20);

  --win:         #34d399;
  --win-dim:     rgba(52,211,153,0.12);
  --loss:        #f87171;
  --loss-dim:    rgba(248,113,113,0.12);
  --push:        #94a3b8;
  --push-dim:    rgba(148,163,184,0.10);
  --pending:     #fbbf24;
  --pending-dim: rgba(251,191,36,0.10);

  --text:        #e8edf4;
  --text-soft:   #9aa3b5;
  --text-muted:  #525d72;

  --font-display: 'Barlow Condensed', 'Impact', sans-serif;
  --font-body:    'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', 'Courier New', monospace;

  --radius-sm:   6px;
  --radius:      10px;
  --radius-lg:   16px;

  --shadow-sm:   0 1px 3px rgba(0,0,0,0.4);
  --shadow:      0 4px 20px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 30px rgba(181,255,71,0.08);

  --container:   1200px;
  --gap:         clamp(1rem, 3vw, 2rem);
}

/* ─── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  background: #05070d;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.1vw, 1.1rem);
  line-height: 1.6;
  min-height: 100dvh;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Subtle noise texture for depth */
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ─── Layout Utilities ───────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

.section { padding-block: clamp(3rem, 6vw, 5rem); }
.section--sm { padding-block: clamp(2rem, 4vw, 3rem); }

/* ─── Typography ─────────────────────────────────────────── */
.display-xl {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.display-lg {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
}

.display-md {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-weight: 600;
  text-transform: uppercase;
}

.label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* ─── Accent Utilities ───────────────────────────────────── */
.text-accent   { color: var(--accent); }
.text-win      { color: var(--win); }
.text-loss     { color: var(--loss); }
.text-pending  { color: var(--pending); }
.text-muted    { color: var(--text-muted); }
.text-soft     { color: var(--text-soft); }

/* ─── Card Base ──────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1rem, 2.5vw, 1.5rem);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  border-color: rgba(255,255,255,0.12);
  box-shadow: var(--shadow);
}

.card--accent {
  border-color: var(--border-accent);
  background: linear-gradient(135deg, var(--surface) 0%, rgba(181,255,71,0.03) 100%);
}

/* ─── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  text-decoration: none;
}

.btn--primary {
  background: var(--accent);
  color: #0b0e13;
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn--primary:hover {
  background: #c4ff5a;
  transform: translateY(-1px);
  box-shadow: 0 0 30px rgba(181,255,71,0.35);
}

.btn--ghost {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--border-accent);
}

.btn--ghost:hover {
  background: var(--accent-dim);
}

.btn--telegram {
  background: #229ED9;
  color: #fff;
}

.btn--telegram:hover {
  background: #1a8fc4;
  transform: translateY(-1px);
}

.btn--lg {
  font-size: 1.2rem;
  padding: 1rem 2rem;
}

/* ─── Badge ───────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  border: 1px solid;
}

.badge--win     { color: var(--win);     background: var(--win-dim);     border-color: rgba(52,211,153,0.25); }
.badge--loss    { color: var(--loss);    background: var(--loss-dim);    border-color: rgba(248,113,113,0.25); }
.badge--pending { color: var(--pending); background: var(--pending-dim); border-color: rgba(251,191,36,0.25); }
.badge--push    { color: var(--push);    background: var(--push-dim);    border-color: rgba(148,163,184,0.25); }
.badge--sport   { color: var(--accent);  background: var(--accent-dim);  border-color: var(--border-accent); }

/* ─── Table ───────────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table thead th {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  background: var(--surface-2);
}

.data-table tbody td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.data-table tbody tr:hover td {
  background: var(--surface-2);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* ─── Stat KPI Cards ─────────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
}

.kpi-card .kpi-value {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
}

.kpi-card .kpi-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

.kpi-card .kpi-sub {
  font-size: 0.78rem;
  color: var(--text-soft);
  margin-top: 0.25rem;
}

/* ─── Divider ─────────────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin-block: 2rem;
}

/* ─── Section Heading ─────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.1;
}

/* ─── Breadcrumb ─────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding-block: 1rem;
  flex-wrap: wrap;
}

.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { opacity: 0.4; }
.breadcrumb .current { color: var(--text-soft); }

/* ─── Internal Link Strip ─────────────────────────────────── */
.nav-strip {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.nav-strip a {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--text-soft);
  transition: all 0.15s;
}

.nav-strip a:hover,
.nav-strip a[aria-current="page"] {
  border-color: var(--border-accent);
  color: var(--accent);
  background: var(--accent-dim);
}

/* ─── Sticky Telegram CTA ────────────────────────────────── */
.sticky-cta {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 100;
  animation: cta-in 0.4s ease both;
  animation-delay: 1.5s;
}

@keyframes cta-in {
  from { opacity: 0; transform: translateY(20px) scale(0.9); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.sticky-cta .btn {
  box-shadow: 0 4px 20px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.05);
}

/* ─── FAQ ─────────────────────────────────────────────────── */
details.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

details.faq-item + details.faq-item { margin-top: 0.5rem; }

details.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  list-style: none;
  transition: background 0.15s;
}

details.faq-item summary:hover { background: var(--surface-2); }
details.faq-item summary::after {
  content: '+';
  font-size: 1.3rem;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform 0.2s;
}
details[open].faq-item summary::after { transform: rotate(45deg); }
details[open].faq-item summary { border-bottom: 1px solid var(--border); }

details.faq-item .faq-body {
  padding: 1rem 1.25rem;
  color: var(--text-soft);
  line-height: 1.7;
  font-size: 0.95rem;
}

/* ─── SEO Text Sections ───────────────────────────────────── */
.seo-section {
  color: var(--text-soft);
  line-height: 1.75;
}

.seo-section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.5vw, 1.7rem);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.seo-section h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.seo-section p + p { margin-top: 0.75rem; }

.seo-section a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 640px) {
  .hide-mobile { display: none !important; }
  .data-table thead th:nth-child(n+4),
  .data-table tbody td:nth-child(n+4) { display: none; }
}

@media (min-width: 641px) {
  .hide-desktop { display: none !important; }
}
