/* SwingCheck AI — shared site styles
   Used by: index.html, features.html, pricing.html, research.html,
            faq.html, licensing.html, contact.html,
            baseball.html, softball.html, athletic-performance.html
   Does NOT apply to: app.html (logged-in app has its own stylesheet) */

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

:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-2: #f5f5f5;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --text: #0f172a;
  --text-2: #475569;
  --text-3: #94a3b8;
  --green: #16a34a;
  --green-dark: #15803d;
  --green-tint: rgba(22,163,74,.08);
  --green-ring: rgba(22,163,74,.25);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 3px rgba(15,23,42,.06);
  --shadow-md: 0 4px 12px rgba(15,23,42,.08);
  --shadow-lg: 0 16px 40px rgba(15,23,42,.12);
  --container: 1140px;
  --nav-h: 64px;
  --footer-h: 52px;
}

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; }
body {
  min-height: 100vh;
  overflow-x: hidden;
  /* Aerial baseball-field hero with a light 45% white wash so the field
     stays crisp and visible behind content. Dark-themed pages (.landing,
     app, admin, weather, etc.) override body background explicitly. */
  background:
    linear-gradient(rgba(255,255,255,0.45), rgba(255,255,255,0.45)),
    url('/site-bg.png') center/cover fixed no-repeat;
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
::selection { background: var(--green-tint); color: var(--green-dark); }

a { color: var(--green-dark); text-decoration: none; }
a:hover { color: var(--green); }
button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4 { color: var(--text); letter-spacing: -0.02em; line-height: 1.15; }
h1 { font-size: clamp(40px, 6vw, 64px); font-weight: 800; }
h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; }
h3 { font-size: clamp(20px, 2.4vw, 24px); font-weight: 700; }
p  { color: var(--text-2); }

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

/* ───────── NAV ───────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: rgba(250, 250, 250, 0.85);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--container); margin: 0 auto; padding: 0 24px;
  height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, #22c55e, #0ea5e9);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px; color: #fff;
  letter-spacing: -0.02em;
}
.brand-name { font-weight: 700; font-size: 17px; letter-spacing: -0.02em; white-space: nowrap; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  color: var(--text-2); font-size: 14px; font-weight: 500;
  padding: 8px 12px; border-radius: 8px;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-cta { display: flex; align-items: center; gap: 10px; margin-left: 6px; }
.nav-cta .signin { font-size: 14px; color: var(--text-2); padding: 8px 12px; }
.nav-cta .signin:hover { color: var(--text); }
.hamburger {
  display: none; background: none; border: none; font-size: 22px; color: var(--text);
  padding: 8px; border-radius: 8px;
}
.hamburger:hover { background: var(--surface-2); }
.nav-mobile {
  display: none; position: fixed; top: var(--nav-h); left: 0; right: 0; z-index: 49;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px 20px;
  flex-direction: column; gap: 4px;
  box-shadow: var(--shadow-md);
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  color: var(--text); font-size: 16px; font-weight: 500;
  padding: 12px; border-radius: 8px;
}
.nav-mobile a:hover { background: var(--surface-2); }
.nav-mobile .btn { margin-top: 8px; }

/* ───────── BUTTONS ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 700; line-height: 1;
  border: none; cursor: pointer; text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--green); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--green-dark); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-secondary { background: #fff; color: var(--text); border: 1px solid var(--border-strong); }
.btn-secondary:hover { color: var(--text); border-color: var(--text-2); background: #fff; }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { color: var(--text); background: var(--surface-2); }
.btn-lg { padding: 16px 28px; font-size: 16px; }

/* ───────── LANDING (dark photo background) ───────── */
/* Mobile default: allow native overflow so pull-to-refresh works.
   Brighter overlay (2-stop 0.15→0.30 gradient) — direct body bg
   instead of ::before/::after pseudo-element split. Pattern lifted
   verbatim from athletic-performance.html (body.ap-page) which is
   the visual reference Rich locked in. */
.landing {
  min-height: 100vh; display: flex; flex-direction: column;
  color: #f1f5f9;
  background:
    linear-gradient(rgba(0,0,0,0.15), rgba(0,0,0,0.30)),
    url('/site-bg.png') center top/cover fixed no-repeat;
  background-color: #020617;
}
/* Desktop: target a 100vh hub but allow natural scroll if the six
   sport cards + hero text don't all fit (e.g. short laptops, zoomed
   browsers). The prior rule used height:100vh + overflow:hidden,
   which clipped the headline on shorter viewports. */
@media (min-width: 768px) {
  .landing { min-height: 100vh; }
}

/* Nav overrides for dark landing */
.landing .nav {
  background: rgba(2, 6, 23, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.landing .nav .brand,
.landing .nav .brand:hover,
.landing .brand-name { color: #f1f5f9; }
.landing .nav-links a { color: #cbd5e1; }
.landing .nav-links a:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.landing .nav-cta .signin { color: #cbd5e1; }
.landing .nav-cta .signin:hover { color: #fff; }
.landing .hamburger { color: #f1f5f9; }
.landing .hamburger:hover { background: rgba(255, 255, 255, 0.08); }
.landing .nav-mobile {
  background: rgba(2, 6, 23, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.landing .nav-mobile a { color: #f1f5f9; }
.landing .nav-mobile a:hover { background: rgba(255, 255, 255, 0.06); }

.landing .hero {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px 24px 20px; gap: 14px; text-align: center;
}
.eyebrow {
  font-size: 12px; font-weight: 700; color: #ffffff;
  letter-spacing: 0.24em; text-transform: uppercase;
}
.landing .hero h1 {
  color: #fff;
  font-size: clamp(22px, 3.6vw, 38px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  max-width: 960px;
  margin: 0;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.45);
}
.hero-cta { margin-top: 4px; }

/* Sport grid */
.sport-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 12px; width: 100%; max-width: 1100px; margin: 0 auto;
}

/* Landing sport cards — photo background + dark gradient overlay.
   Aspect tightened from 4/3 (square-ish) to 5/3 so 6 cards in a
   3×2 grid fit more comfortably in a single 100vh on desktop. */
.landing .sport-card {
  position: relative; display: block; overflow: hidden;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  aspect-ratio: 5/3;
  color: #fff; text-decoration: none;
  box-shadow: 0 14px 36px rgba(2, 6, 23, 0.4);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.landing .sport-card:hover {
  transform: translateY(-4px);
  border-color: var(--green);
  box-shadow: 0 22px 48px rgba(22, 163, 74, 0.35), inset 0 0 0 1px rgba(22, 163, 74, 0.45);
  color: #fff;
}
.sport-card-bg {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
  filter: brightness(1.5);
  transition: transform .4s ease;
}
.landing .sport-card:hover .sport-card-bg { transform: scale(1.05); }
.sport-card-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(2,6,23,.25) 0%, rgba(2,6,23,.82) 70%, rgba(2,6,23,.95) 100%);
}
.landing .sport-card .sport-card-content {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 6px;
  height: 100%;
  padding: 12px 14px 10px;
}
.sport-card-eyebrow {
  font-size: 9px;
  font-weight: 700;
  color: #16a34a;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.landing .sport-card .sport-card-name {
  font-size: 18px; font-weight: 800; letter-spacing: -0.01em;
  color: #fff; line-height: 1.15;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}
.landing .sport-card .sport-card-desc {
  font-size: 11px; color: rgba(255, 255, 255, 0.86);
  line-height: 1.5;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}
.landing .sport-card .sport-card-arrow {
  margin-top: 10px; font-size: 13px; font-weight: 700; color: var(--green);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}

/* Golf (Coming Soon) */
.landing .sport-card.soon { cursor: default; pointer-events: none; }
.landing .sport-card.soon .sport-card-bg { filter: grayscale(1) brightness(1.5); }
.landing .sport-card.soon:hover {
  transform: none;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 14px 36px rgba(2, 6, 23, 0.4);
}
.landing .sport-card.soon .sport-card-arrow { color: rgba(255, 255, 255, 0.55); }
.sport-card-badge {
  position: absolute; top: 14px; right: 14px; z-index: 3;
  font-size: 10px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 6px;
  background: rgba(15, 23, 42, 0.82); color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(6px);
}

/* Landing footer — transparent over photo */
.landing .footer {
  background: transparent;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(203, 213, 225, 0.7);
}
.landing .footer .brand-line { color: rgba(203, 213, 225, 0.82); }

/* PWA install banner — visible by default on mobile, hidden on desktop */
#installBanner { display: flex; }
@media (min-width: 768px) { #installBanner { display: none; } }

/* Landing hero — tighter top padding on mobile */
@media (max-width: 767px) {
  .landing .hero {
    padding-top: 16px;
    gap: 20px;
  }
}

/* ───────── PAGE (scrollable info pages) ───────── */
.page { padding: 56px 0 72px; }
.page h1 { margin-bottom: 8px; }
.page .lede {
  font-size: 18px; color: var(--text-2); max-width: 640px;
  margin-bottom: 40px; line-height: 1.55;
}
.page-section { margin-top: 56px; }
.page-section h2 { margin-bottom: 12px; }
.page-section p { font-size: 15px; max-width: 720px; }

/* Feature card grid (features.html) */
.card-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px; margin-top: 20px;
}
.info-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow-sm);
}
.info-card .ic-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.18em;
  color: var(--green); text-transform: uppercase; margin-bottom: 10px;
}
.info-card h3 { font-size: 18px; margin-bottom: 8px; }
.info-card p { font-size: 14px; color: var(--text-2); line-height: 1.6; }

/* Stat rows */
.stat-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px; margin: 28px 0;
  padding: 28px; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius);
}
.stat {
  text-align: center;
}
.stat .num {
  font-size: 36px; font-weight: 800; color: var(--text);
  letter-spacing: -0.03em; line-height: 1;
}
.stat .num.green { color: var(--green); }
.stat .lbl {
  font-size: 12px; font-weight: 600; color: var(--text);
  margin-top: 8px;
}
.stat .sub { font-size: 11px; color: var(--text-3); margin-top: 2px; }

/* How-it-works */
.steps {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px; margin-top: 24px;
}
.step {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow-sm);
}
.step .step-num {
  font-size: 12px; font-weight: 800; letter-spacing: 0.2em;
  color: var(--green); margin-bottom: 8px;
}
.step h3 { font-size: 19px; margin-bottom: 6px; }
.step p { font-size: 14px; color: var(--text-2); }

/* Pricing tiers */
.tier-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px; margin-top: 24px;
}
.tier {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px 22px;
  display: flex; flex-direction: column; gap: 14px;
  box-shadow: var(--shadow-sm);
}
.tier.featured { border-color: var(--green); box-shadow: 0 12px 32px var(--green-ring); }
.tier-badge {
  align-self: flex-start; font-size: 10px; font-weight: 800;
  letter-spacing: 0.14em; color: var(--green); text-transform: uppercase;
}
.tier h3 { font-size: 22px; }
.tier-price {
  font-size: 36px; font-weight: 800; color: var(--text); letter-spacing: -0.03em;
  line-height: 1;
}
.tier-price .per { font-size: 14px; font-weight: 500; color: var(--text-2); letter-spacing: 0; }
.tier-feats { list-style: none; display: flex; flex-direction: column; gap: 8px; margin: 4px 0; }
.tier-feats li { font-size: 13px; color: var(--text-2); padding-left: 22px; position: relative; }
.tier-feats li::before {
  content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 700;
}
.tier .btn { margin-top: auto; }

/* Family box */
.family-box {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px; margin-top: 32px;
}
.family-box h3 { margin-bottom: 14px; }
.family-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px; margin-top: 12px;
}
.family-opt {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px; text-align: center;
}
.family-opt .p { font-size: 24px; font-weight: 800; color: var(--text); }
.family-opt .l { font-size: 12px; color: var(--text-2); margin-top: 4px; }

/* FAQ accordion */
.faq-list { display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
.faq-item {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden;
}
.faq-q {
  display: flex; width: 100%; align-items: center; justify-content: space-between;
  gap: 16px; padding: 16px 20px;
  background: transparent; border: none; text-align: left;
  font-size: 16px; font-weight: 600; color: var(--text);
}
.faq-q:hover { background: var(--surface-2); }
.faq-q .plus { font-size: 22px; color: var(--text-3); transition: transform .2s ease; line-height: 1; }
.faq-item[open] .faq-q .plus { transform: rotate(45deg); color: var(--green); }
.faq-a {
  max-height: 0; overflow: hidden;
  transition: max-height .25s ease;
}
.faq-item[open] .faq-a { max-height: 500px; }
.faq-a-inner { padding: 0 20px 18px; font-size: 14.5px; color: var(--text-2); line-height: 1.7; }

/* Forms (licensing, contact) */
.form-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px; max-width: 560px;
  box-shadow: var(--shadow-sm);
}
.form-field { margin-bottom: 16px; }
.form-field label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--text); margin-bottom: 6px;
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%; padding: 12px 14px;
  background: #fff; color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  font-size: 14.5px; font-family: inherit; outline: none;
  transition: border-color .15s;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-ring); }
.form-field textarea { resize: vertical; min-height: 90px; }
.form-success {
  margin-top: 14px; padding: 12px;
  background: var(--green-tint);
  border: 1px solid var(--green);
  border-radius: var(--radius-sm);
  color: var(--green-dark); font-size: 14px; font-weight: 600;
  text-align: center; display: none;
}
.form-success.show { display: block; }

/* Placeholder sport pages */
.sport-hero {
  padding: 80px 0 40px; text-align: center;
}
.sport-hero .eyebrow { margin-bottom: 12px; }
.sport-hero h1 { max-width: 900px; margin: 0 auto 14px; }
.sport-hero p { max-width: 620px; margin: 0 auto 28px; font-size: 17px; }
.sport-hero .cta-row {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
}
.coming-note {
  max-width: 620px; margin: 48px auto 0;
  padding: 20px; text-align: center;
  background: #fff; border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-2); font-size: 14px; line-height: 1.6;
}

/* ───────── FOOTER ───────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 18px 24px; text-align: center;
  font-size: 13px; color: var(--text-3);
  background: var(--bg);
}
.footer .brand-line { color: var(--text-2); }
.footer a { color: var(--text-3); margin: 0 8px; font-size: 12px; }
.footer a:hover { color: var(--text-2); }

/* ───────── RESPONSIVE ───────── */
@media (max-width: 900px) {
  .landing .sport-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: min(100%, 420px);
    max-width: 420px;
    margin: 0 auto;
    justify-content: center;
    align-content: start;
  }

  .landing .sport-card {
    display: block;
    width: 100%;
    height: 140px;
    min-height: 140px;
    max-height: 140px;
    align-self: stretch;
  }

  .landing .sport-card .sport-card-content {
    height: 100%;
    min-height: 0;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
  }

  .nav-links { display: none; }
  .nav-cta .signin { display: none; }
  .hamburger { display: inline-flex; align-items: center; justify-content: center; }
  .landing .sport-card .sport-card-name { font-size: 18px; }
}
@media (max-width: 560px) {
  .landing .hero { gap: 18px; padding: 18px 14px; }
  .landing .hero h1 { font-size: clamp(34px, 8vw, 48px); }
  .landing .sport-card { min-height: 150px; }
  .landing .sport-card .sport-card-content { min-height: 150px; padding: 14px; }
  .landing .sport-card .sport-card-name { font-size: 17px; }
  .landing .sport-card .sport-card-desc { font-size: 12px; }
  .btn-lg { padding: 14px 22px; font-size: 15px; }
  .page { padding: 36px 0 56px; }
  .form-card { padding: 22px; }
}
@media (max-width: 400px) {
  .sport-grid { gap: 10px; }
  .landing .sport-card { min-height: 130px; }
  .landing .sport-card .sport-card-content { min-height: 130px; padding: 12px; }
}
