/* ─────────────────────────────────────────────────────────────────────────
   Tactiq Components
   Reusable building blocks. All visual atoms live here so they can be
   lifted 1:1 into a React/Next.js component library.
   ───────────────────────────────────────────────────────────────────────── */

/* ── Top nav ─────────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: var(--z-nav);
  background: rgba(8, 8, 8, 0.78);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.nav__brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 18px; letter-spacing: -0.02em;
  flex-shrink: 0;
}
.nav__brand img { width: 28px; height: 28px; border-radius: 6px; }
.nav__brand-dot { color: var(--gold); }
.nav__links {
  display: flex; gap: var(--sp-7);
  font-size: 14px; font-weight: 500; color: var(--fg-dim);
}
.nav__links a { transition: color var(--d-fast); }
.nav__links a:hover { color: var(--fg); }
.nav__right { display: flex; align-items: center; gap: var(--sp-4); min-width: 0; }
/* Language <select> in the nav (markup uses .lang-select). Native control,
   styled to match the dark theme and constrained so it never overlaps the
   brand on narrow screens. */
.lang-select {
  appearance: none; -webkit-appearance: none;
  max-width: 150px;
  padding: 8px 12px;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-2);
  color: var(--fg-dim);
  font-family: var(--font-sans); font-size: 13px; font-weight: 500;
  cursor: pointer;
  transition: background var(--d-fast), color var(--d-fast);
}
.lang-select:hover { background: var(--bg-elev); color: var(--fg); }
.nav__lang {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px;
  background: transparent; border: 1px solid var(--line-strong);
  border-radius: var(--r-2);
  color: var(--fg-dim); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: background var(--d-fast), color var(--d-fast);
}
.nav__lang:hover { background: var(--bg-elev); color: var(--fg); }
.nav__lang-caret { opacity: 0.5; }

@media (max-width: 900px) {
  .nav__links { display: none; }
}
@media (max-width: 560px) {
  /* Tighten the nav so brand + language picker + CTA fit without overlap */
  .nav__inner { gap: var(--sp-3); }
  .nav__right { gap: var(--sp-2); }
  .lang-select { max-width: 116px; font-size: 12px; padding: 7px 9px; }
  .nav__brand span { font-size: 16px; }
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px;
  border-radius: var(--r-2);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background var(--d-fast), color var(--d-fast), border-color var(--d-fast), transform var(--d-fast);
  white-space: nowrap;
}
.btn:active { transform: translateY(0.5px); }

.btn--primary {
  background: var(--gold);
  color: var(--gold-on);
}
.btn--primary:hover { background: var(--gold-hover); }
.btn--primary:active { background: var(--gold-press); }

.btn--secondary {
  background: transparent;
  color: var(--fg);
  border-color: var(--line-strong);
}
.btn--secondary:hover { background: var(--bg-elev); border-color: var(--line-bright); }

.btn--ghost {
  background: transparent;
  color: var(--fg-dim);
}
.btn--ghost:hover { color: var(--fg); }

.btn--lg { padding: 16px 24px; font-size: 15px; }
.btn--sm { padding: 8px 14px; font-size: 13px; }

/* ── Chip / Badge ────────────────────────────────────────────────────────── */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 600;
  letter-spacing: var(--ls-mono); text-transform: uppercase;
  border: 1px solid;
}
.chip--gold { color: var(--gold); background: var(--gold-soft); border-color: rgba(201,168,76,0.32); }
.chip--purple { color: var(--purple); background: var(--purple-soft); border-color: rgba(110,39,181,0.36); }
.chip--live {
  color: var(--live);
  background: rgba(248,113,113,0.12);
  border-color: rgba(248,113,113,0.36);
}
.chip__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip__dot--pulse { animation: pulse 1.4s infinite; }
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.35; transform: scale(1.4); }
}

/* ── Card ────────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-4);
  padding: var(--sp-7);
  transition: border-color var(--d-base), background var(--d-base), transform var(--d-base);
}
.card--hover:hover {
  border-color: var(--line-strong);
  background: var(--bg-elev-2);
  transform: translateY(-2px);
}
.card--gold-accent { box-shadow: var(--ring-inset), 0 0 0 1px rgba(201,168,76,0.32); }
.card--padded-sm { padding: var(--sp-5); }
.card--padded-lg { padding: var(--sp-8); }

/* ── Phone mockup ────────────────────────────────────────────────────────── */
.phone {
  position: relative;
  width: 360px;
  max-width: 100%;
  aspect-ratio: 9/19;
  border-radius: 52px;
  background: linear-gradient(180deg, #1a1a1a 0%, #0a0a0a 100%);
  padding: 8px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6), inset 0 0 0 1.5px rgba(255,255,255,0.1);
}
.phone__screen {
  width: 100%; height: 100%;
  background: var(--bg);
  border-radius: 44px;
  overflow: hidden;
  position: relative;
}
.phone__notch {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 110px; height: 28px;
  background: #000;
  border-radius: 18px;
  z-index: 5;
}
.phone__statusbar {
  position: absolute; top: 0; left: 0; right: 0;
  height: 50px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  font-size: 13px; font-weight: 600;
  color: var(--fg);
  z-index: 3;
}
.phone__statusbar > :last-child { opacity: 0.7; }
.phone__content {
  padding: 60px 22px 22px 22px;
  height: 100%;
  overflow: hidden;
}

/* ── Probability bar (component used inside phone + hero stats) ──────────── */
.probbar {
  display: flex;
  width: 100%; height: 12px;
  background: var(--bg-elev-2);
  border-radius: 6px;
  overflow: hidden;
}
.probbar__seg { height: 100%; }
.probbar__seg--home { background: var(--gold); }
.probbar__seg--draw { background: var(--fg); opacity: 0.95; }
.probbar__seg--away { background: var(--purple); }

.probbar-legend {
  display: flex; justify-content: space-between;
  margin-top: var(--sp-3);
  font-family: var(--font-mono); font-size: 14px; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.probbar-legend > :nth-child(1) { color: var(--gold); }
.probbar-legend > :nth-child(2) { color: var(--fg); }
.probbar-legend > :nth-child(3) { color: var(--purple); }

/* ── Stats row (under hero) ──────────────────────────────────────────────── */
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border-radius: var(--r-3);
  overflow: hidden;
  border: 1px solid var(--line);
}
.stat-row__item {
  padding: var(--sp-6) var(--sp-5);
  background: var(--bg-elev);
  text-align: left;
}
.stat-row__num {
  font-family: var(--font-sans);
  font-size: 38px;
  font-weight: 700;
  letter-spacing: var(--ls-snug);
  line-height: 1;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}
.stat-row__num--gold { color: var(--gold); }
.stat-row__label {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-dim-2);
  letter-spacing: var(--ls-mono);
  text-transform: uppercase;
}
@media (max-width: 720px) {
  .stat-row { grid-template-columns: repeat(2, 1fr); }
}

/* ── Feature grid (tweakable density) ────────────────────────────────────── */
.feature-grid {
  display: grid;
  gap: var(--sp-4);
}
.feature-grid[data-density="4"] { grid-template-columns: repeat(4, 1fr); }
.feature-grid[data-density="3"] { grid-template-columns: repeat(3, 1fr); }
.feature-grid[data-density="list"] { grid-template-columns: 1fr; gap: 0; }

@media (max-width: 1024px) {
  .feature-grid[data-density="4"],
  .feature-grid[data-density="3"] { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .feature-grid[data-density="4"],
  .feature-grid[data-density="3"] { grid-template-columns: 1fr; }
}

.feature-card {
  padding: var(--sp-7);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  transition: border-color var(--d-base), background var(--d-base), transform var(--d-base);
}
.feature-card:hover { border-color: var(--line-strong); background: var(--bg-elev-2); transform: translateY(-2px); }

.feature-card__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--r-2);
  background: var(--gold-soft);
  color: var(--gold);
  margin-bottom: var(--sp-5);
}
.feature-card__title {
  font-size: 17px; font-weight: 600;
  letter-spacing: var(--ls-snug);
  color: var(--fg);
  margin: 0 0 var(--sp-3) 0;
}
.feature-card__title-row {
  display: flex; align-items: center; gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}
.feature-card__body {
  color: var(--fg-dim);
  font-size: var(--fs-small);
  line-height: var(--lh-base);
  margin: 0;
}
.feature-card__tag {
  display: inline-flex;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: var(--ls-mono);
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: var(--purple-soft);
  color: var(--purple);
}

/* List view of features */
.feature-grid[data-density="list"] .feature-card {
  border-radius: 0;
  border-left: 0; border-right: 0; border-top: 0;
  background: transparent;
  padding: var(--sp-6) 0;
  display: grid;
  grid-template-columns: 48px 1fr 0.7fr;
  gap: var(--sp-7);
  align-items: start;
}
.feature-grid[data-density="list"] .feature-card:first-child { border-top: 1px solid var(--line); }
.feature-grid[data-density="list"] .feature-card:hover { transform: none; background: transparent; border-color: var(--line); }
.feature-grid[data-density="list"] .feature-card__icon { margin-bottom: 0; }
.feature-grid[data-density="list"] .feature-card__title { font-size: 18px; margin-bottom: 4px; }
.feature-grid[data-density="list"] .feature-card__body { padding-top: 6px; font-size: 14px; }
@media (max-width: 720px) {
  .feature-grid[data-density="list"] .feature-card {
    grid-template-columns: 40px 1fr;
    gap: var(--sp-4);
  }
  .feature-grid[data-density="list"] .feature-card__body { grid-column: 1 / -1; padding-top: 0; }
}

/* ── How it works (numbered steps) ───────────────────────────────────────── */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-5);
  counter-reset: step;
}
.step {
  position: relative;
  padding: var(--sp-7);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
}
.step__num {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: var(--ls-mono);
}
.step__title { font-size: 18px; font-weight: 600; margin: var(--sp-3) 0 var(--sp-3); }
.step__body { color: var(--fg-dim); font-size: 14px; line-height: var(--lh-base); margin: 0; }
@media (max-width: 1024px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .steps { grid-template-columns: 1fr; }
}

/* ── Pricing ─────────────────────────────────────────────────────────────── */
.plans {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(228px, 1fr)); gap: var(--sp-5);
}
@media (max-width: 1024px) { .plans { grid-template-columns: repeat(2, 1fr); max-width: 640px; margin: 0 auto; } }
@media (max-width: 560px) { .plans { grid-template-columns: 1fr; max-width: 380px; } }
/* macOS pricing has 3 cards: below the 3-col breakpoint, switch to flex so a wrapped lone card centers itself (grid leaves it in the left track). Desktop keeps the normal 3-col grid. */
@media (max-width: 1024px) {
  #pricing-mac .plans { display: flex; flex-wrap: wrap; justify-content: center; max-width: 640px; margin: 0 auto; }
  #pricing-mac .plans .plan { flex: 0 1 300px; }
}

.plan {
  position: relative;
  padding: var(--sp-8);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-4);
  display: flex; flex-direction: column;
}
.plan--featured {
  background: linear-gradient(180deg, rgba(201,168,76,0.06), transparent 50%), var(--bg-elev);
  border-color: rgba(201,168,76,0.4);
  box-shadow: 0 0 0 1px rgba(201,168,76,0.2), 0 20px 50px rgba(0,0,0,0.4);
}
.plan__ribbon {
  position: absolute; top: -10px; left: var(--sp-8);
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 700;
  letter-spacing: var(--ls-mono);
  text-transform: uppercase;
  color: var(--gold-on);
  background: var(--gold);
  padding: 4px 10px;
  border-radius: var(--r-pill);
}
.plan__name {
  font-size: 14px; font-weight: 600;
  color: var(--fg-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: var(--font-mono);
  margin: 0 0 var(--sp-4) 0;
}
.plan__price {
  font-size: 56px; font-weight: 800;
  letter-spacing: var(--ls-tight);
  line-height: 1;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}
.plan__price-period {
  font-size: 14px; color: var(--fg-dim);
  font-weight: 500;
  margin-top: var(--sp-3);
  margin-bottom: var(--sp-7);
}
.plan__features {
  list-style: none; padding: 0; margin: 0 0 var(--sp-7) 0;
  flex: 1;
}
.plan__features li {
  display: grid; grid-template-columns: 18px 1fr;
  gap: 10px; align-items: start;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--fg-dim);
  line-height: 1.45;
}
.plan__features li:first-child { border-top: 0; }
.plan__check {
  color: var(--gold);
  width: 18px; height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ── FAQ (generator outputs <details.faq-item><summary.faq-q><div.faq-a>) ──── */
.faq-list { display: flex; flex-direction: column; gap: var(--sp-3); }
.faq-item {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  overflow: hidden;
  transition: border-color var(--d-fast);
}
.faq-item[open] { border-color: var(--gold-soft); }
/* question */
.faq-item > .faq-q {
  list-style: none; cursor: pointer; display: block;
  padding: var(--sp-5) var(--sp-9) var(--sp-5) var(--sp-6);
  position: relative;
  color: var(--gold);
  font-weight: 600; font-size: 17px;
  letter-spacing: var(--ls-snug);
  transition: color var(--d-fast);
}
.faq-item > .faq-q::-webkit-details-marker { display: none; }
.faq-item > .faq-q:hover { color: var(--gold-hover); }
.faq-item > .faq-q::after {
  content: '+';
  position: absolute; right: var(--sp-6); top: 50%; transform: translateY(-50%);
  color: var(--gold); font-size: 22px; font-weight: 400; line-height: 1;
}
.faq-item[open] > .faq-q::after { content: '\2212'; }
html[dir="rtl"] .faq-item > .faq-q { padding: var(--sp-5) var(--sp-6) var(--sp-5) var(--sp-9); }
html[dir="rtl"] .faq-item > .faq-q::after { right: auto; left: var(--sp-6); }
/* answer: brighter (near-white) for readability + breathing room */
.faq-item > .faq-a {
  padding: 0 var(--sp-6) var(--sp-5);
  color: var(--fg);
  font-size: 15px; line-height: 1.7;
  max-width: 820px;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding-top: var(--sp-10);
  padding-bottom: var(--sp-7);
  margin-top: var(--sp-10);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--sp-9);
}
@media (max-width: 900px) { .footer__grid { grid-template-columns: 1fr 1fr; gap: var(--sp-7); } }

.footer__brand-tagline {
  margin-top: var(--sp-4);
  color: var(--fg-dim);
  font-size: 14px;
  max-width: 320px;
  line-height: 1.55;
}
.footer__heading {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: var(--ls-mono);
  text-transform: uppercase;
  color: var(--fg-dim-2);
  margin: 0 0 var(--sp-5) 0;
}
.footer__list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.footer__list a { color: var(--fg-dim); font-size: 14px; transition: color var(--d-fast); }
.footer__list a:hover { color: var(--fg); }

.footer__compliance {
  margin-top: var(--sp-9);
  padding-top: var(--sp-7);
  border-top: 1px solid var(--line);
  color: var(--fg-dim-2);
  font-size: 12px; line-height: 1.7;
  max-width: 920px;
}
.footer__bottom {
  margin-top: var(--sp-6);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--sp-4);
  font-size: 12px;
  color: var(--fg-dim-3);
}

/* ── Store badges row (download CTA) ─────────────────────────────────────── */
.badges {
  display: flex; flex-wrap: wrap; gap: var(--sp-4);
  align-items: center; justify-content: center;
}
.badges img { height: 56px; width: auto; }

/* ── Section: cross-platform matrix ──────────────────────────────────────── */
.matrix {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-4);
  padding: var(--sp-7);
}
.matrix__row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--sp-5);
  align-items: center;
  padding: var(--sp-5) 0;
  border-top: 1px solid var(--line);
}
.matrix__row:first-child { border-top: 0; padding-top: 0; }
.matrix__row > div:nth-child(2) {
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--fg-dim-2);
}
.matrix__cell-strong { font-weight: 600; color: var(--fg); font-size: 15px; }
.matrix__cell-strong > .mono { font-size: 13px; color: var(--gold); margin-left: 6px; }
.matrix__caption {
  margin-top: var(--sp-5);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--line);
  color: var(--fg-dim);
  font-size: 13px;
  line-height: 1.55;
}

/* ── League pills (used in League section) ───────────────────────────────── */
.league-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.league-pill {
  padding: 4px 10px;
  font-size: 12px;
  background: var(--bg-elev-2);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  color: var(--fg-dim);
}

/* ── xG calculator promo strip ───────────────────────────────────────────── */
.xg-promo {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--sp-7);
  align-items: center;
  padding: var(--sp-8);
  background: linear-gradient(135deg, rgba(110,39,181,0.10), transparent 55%), var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-4);
}
@media (max-width: 900px) { .xg-promo { grid-template-columns: 1fr; } }
.xg-promo__chip { color: var(--purple); background: var(--purple-soft); border-color: rgba(110,39,181,0.36); }

/* ── Leagues coverage grid (homepage #leagues) ───────────────────────────────
   Was an inline `repeat(3, 1fr)` that could not be overridden by media queries
   and overflowed narrow viewports horizontally. minmax(0,1fr) lets columns
   shrink below their content min-width; collapses 3->2->1 responsively. */
.leagues-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-5);
}
@media (max-width: 900px) { .leagues-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .leagues-grid { grid-template-columns: 1fr; } }
.league-region-list {
  font-size: 14px;
  line-height: 1.55;
  color: var(--fg-dim);
  overflow-wrap: anywhere;
}
