/* ==========================================================================
   WINNR — BASE
   Resets + shared components (nav, footer, buttons, badges, container).
   Loaded on every page, before the page-specific stylesheet.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink-950);
  color: var(--text-100);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(ellipse 1000px 560px at 50% -12%, var(--lime-500-10), transparent);
  background-repeat: no-repeat;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.02;
  margin: 0;
  text-transform: uppercase;
}

p { margin: 0; }

:focus-visible {
  outline: 2px solid var(--lime-500);
  outline-offset: 3px;
  border-radius: 3px;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.eyebrow {
  font-family: var(--font-data);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lime-500);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.9rem 1.6rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--lime-500);
  color: var(--ink-950);
  box-shadow: 0 0 0 0 var(--lime-500-35);
}
.btn-primary:hover {
  background: var(--lime-400);
  box-shadow: 0 10px 28px -8px var(--lime-500-35);
}

.btn-ghost {
  background: transparent;
  color: var(--text-100);
  border: 1px solid var(--ink-600);
}
.btn-ghost:hover { border-color: var(--lime-500); color: var(--lime-500); }

/* ---- Badges (status tags on tool cards) ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-data);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--ink-700);
  color: var(--text-400);
}
.badge-live {
  color: var(--lime-500);
  border-color: var(--lime-500-35);
  background: var(--lime-500-15);
}
.badge-live::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--lime-500);
  box-shadow: 0 0 0 0 var(--lime-500-35);
  animation: pulse-dot 1.8s infinite;
}
@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 var(--lime-500-35); }
  70% { box-shadow: 0 0 0 6px rgba(182, 242, 58, 0); }
  100% { box-shadow: 0 0 0 0 rgba(182, 242, 58, 0); }
}

/* ---- Real-data warning banner (assets/js/sleeper.js's
   renderDataWarningBanner()) ---- Lives in base.css (not a per-tool
   file) since it's rendered by ONE shared function meant to look
   identical no matter which tool page calls it -- Start/Sit, Team Hub,
   Trade Analyzer, and Waiver Wire all just call renderDataWarningBanner()
   from their own script rather than each carrying a copy of this CSS.
   Uses --grade-f (this site's existing "bad" color) so a real data-
   source failure reads as unambiguously worth noticing, without
   introducing a new color the rest of the site doesn't already use for
   this meaning. */
.real-data-warning-banner {
  background: rgba(242, 82, 58, 0.1);
  border: 1px solid var(--grade-f);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin: var(--space-4) 0;
  color: var(--text-100);
  font-size: var(--text-sm);
}
.real-data-warning-banner p { margin: 0; }
.real-data-warning-banner p + p { margin-top: var(--space-2); }

/* ---- Brand mark (used in nav + footer) ---- */
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  letter-spacing: 0;
  text-transform: uppercase;
}
.brand-mark { display: block; flex-shrink: 0; }

/* ---- Section layout (shared shell used by every page's content sections) ---- */
.section { padding: var(--space-24) 0; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-8);
  margin-bottom: var(--space-12);
}
.section-head h2 { font-size: var(--text-3xl); margin-top: var(--space-3); letter-spacing: -0.015em; }
.section-head p { color: var(--text-400); max-width: 42ch; }
@media (max-width: 640px) {
  .section-head { flex-direction: column; align-items: flex-start; }
}

/* ==========================================================================
   NAV
   ========================================================================== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 15, 14, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: var(--border-hair);
}
.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  font-family: var(--font-data);
  font-size: var(--text-sm);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.nav-links a { color: var(--text-300); transition: color var(--dur-fast); }
.nav-links a:hover, .nav-links a.active { color: var(--text-100); }
.nav-links a.active { color: var(--lime-500); }

.nav-actions { display: flex; align-items: center; gap: var(--space-4); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--ink-600);
  border-radius: var(--radius-sm);
  width: 42px; height: 42px;
  color: var(--text-100);
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav-links {
    position: fixed;
    inset: 72px 0 auto 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--ink-900);
    border-bottom: var(--border-hair);
    padding: var(--space-4) var(--space-6) var(--space-6);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--dur-fast), transform var(--dur-fast);
  }
  .nav-links a { padding: var(--space-3) 0; width: 100%; border-bottom: var(--border-hair); }
  .nav-links.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .nav-toggle { display: block; }
  .nav-actions .btn-ghost { display: none; }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  border-top: var(--border-hair);
  margin-top: var(--space-24);
  padding: var(--space-16) 0 var(--space-8);
  color: var(--text-400);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--space-8);
  padding-bottom: var(--space-12);
  border-bottom: var(--border-hair);
}
.footer-grid h4 {
  font-family: var(--font-data);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  color: var(--text-600);
  margin-bottom: var(--space-4);
  text-transform: uppercase;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.footer-grid a:hover { color: var(--text-100); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-6);
  font-size: var(--text-sm);
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; gap: var(--space-3); text-align: center; }
}

/* ---- "Add to Home Screen" guide (assets/js/nav.js) ----
   Small pill button, bottom-right, mobile only -- tapping it opens a
   step-by-step modal instead of a banner auto-covering part of the page.
   Nothing here sits over page content until the button itself is tapped,
   so it can never block taps on whatever's underneath. */
.a2hs-fab {
  position: fixed;
  right: var(--space-4);
  bottom: calc(env(safe-area-inset-bottom, 0px) + var(--space-4));
  z-index: 500;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--ink-900);
  border: var(--border-hair);
  border-radius: 999px;
  padding: 0.65rem 0.9rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  color: var(--text-100);
  font-family: var(--font-data);
  font-size: var(--text-xs);
  letter-spacing: 0.02em;
  cursor: pointer;
  transform: translateY(calc(100% + var(--space-6)));
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
}
.a2hs-fab.is-visible { transform: translateY(0); opacity: 1; }
.a2hs-fab-icon { width: 16px; height: 16px; flex: 0 0 auto; color: var(--lime-500); }
.a2hs-fab-icon svg { width: 100%; height: 100%; display: block; }
.a2hs-fab-label { white-space: nowrap; }
.a2hs-fab-close {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(245, 247, 245, 0.08);
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: var(--space-1);
}
@media (min-width: 721px) {
  .a2hs-fab { display: none; }
}

.a2hs-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 600;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.a2hs-modal-backdrop.is-open { opacity: 1; pointer-events: auto; }
.a2hs-modal {
  width: 100%;
  max-width: 420px;
  background: var(--ink-900);
  border: var(--border-hair);
  border-radius: 18px 18px 0 0;
  padding: var(--space-6) var(--space-5) calc(env(safe-area-inset-bottom, 0px) + var(--space-6));
  position: relative;
  transform: translateY(24px);
  transition: transform 0.25s ease;
}
.a2hs-modal-backdrop.is-open .a2hs-modal { transform: translateY(0); }
@media (min-width: 500px) {
  .a2hs-modal-backdrop { align-items: center; }
  .a2hs-modal { border-radius: 18px; }
}
.a2hs-modal h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  text-transform: uppercase;
  margin: 0 0 var(--space-5);
  padding-right: var(--space-8);
}
.a2hs-modal-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(245, 247, 245, 0.08);
  color: var(--text-100);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.a2hs-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-4); }
.a2hs-step { display: flex; align-items: flex-start; gap: var(--space-3); }
.a2hs-step-num {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--lime-500-15);
  border: 1px solid var(--lime-500-35);
  color: var(--lime-500);
  font-family: var(--font-data);
  font-size: var(--text-xs);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.a2hs-step-icon { flex: 0 0 auto; width: 20px; height: 20px; color: var(--text-400); margin-top: 1px; }
.a2hs-step-icon svg { width: 100%; height: 100%; display: block; }
.a2hs-step-text { font-size: var(--text-sm); line-height: 1.5; color: var(--text-300); }
.a2hs-step-text strong { color: var(--lime-500); font-weight: 600; }
