/* Kowboys brand colors: Athletic Royal Blue (PMS 661 C) and Athletic Gold (PMS 123 C). */
:root {
  --primary: #003594;
  --primary-hover: #002870;
  --accent: #FFC72C;
  --accent-hover: #e6b020;
  --dark: #121824;
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #121824;
  --muted: #475569;
  --border: #e2e8f0;
  --link: #003594;
  --radius: 10px;
  --max: 1080px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a { color: var(--link); }
img { max-width: 100%; display: block; }

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

/* Header and navigation */
.site-header { background: var(--primary); color: #fff; }
.site-header .wrap {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: 16px; padding-top: 12px; padding-bottom: 12px;
}
.site-header .nav { justify-content: center; }
@media (max-width: 720px) {
  .site-header .wrap { grid-template-columns: 1fr; justify-items: center; gap: 8px; }
  .site-header .wrap > span { display: none; }
}
.brand { color: #fff; text-decoration: none; font-weight: 800; font-size: 1.15rem; letter-spacing: .02em; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a {
  color: #fff; text-decoration: none; padding: 8px 12px; border-radius: 6px; font-weight: 600; font-size: .95rem;
}
.nav a:hover, .nav a[aria-current="page"] { background: rgba(255,255,255,.14); }
.nav a.give { background: var(--accent); color: var(--dark); }
.nav a.give:hover { background: var(--accent-hover); }

/* Hero */
.hero { background: linear-gradient(160deg, var(--primary), #001c50); color: #fff; padding: 64px 0 56px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.15; margin: 0 0 12px; }
.hero p { font-size: 1.15rem; max-width: 640px; margin: 0 0 24px; opacity: .92; }

/* Buttons */
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 8px; font-weight: 700;
  text-decoration: none; border: 2px solid transparent;
}
.btn-primary { background: var(--accent); color: var(--dark); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-outline { border-color: currentColor; color: inherit; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* Sections */
section { padding: 48px 0; }
section h2 { font-size: 1.75rem; margin: 0 0 8px; color: var(--primary); }
.lead { color: var(--muted); max-width: 720px; margin: 0 0 24px; }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px;
}

.event { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .event { grid-template-columns: 1.3fr 1fr; align-items: center; } }
.event dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; }
.event dt { font-weight: 700; color: var(--muted); }
.event dd { margin: 0; }

/* Tier cards */
.tiers { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.card.tier { background: var(--primary); border: 0; border-top: 4px solid var(--accent); color: #fff; }
.tier h3 { margin: 0; font-size: 1.05rem; text-transform: uppercase; letter-spacing: .05em; color: #fff; }
.tier .price { font-size: 1.8rem; font-weight: 800; color: var(--accent); margin: 4px 0 12px; }
.tier p { color: rgba(255, 255, 255, 0.85); }
.tier ul { margin: 0; padding-left: 18px; }
.tier li { margin-bottom: 4px; }

/* Footer */
.site-footer { background: var(--dark); color: #c9d0db; padding: 32px 0; font-size: .92rem; }
.site-footer a { color: #fff; }
.site-footer .cols { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.site-footer h4 { color: #fff; margin: 0 0 6px; }
.fine { font-size: .82rem; color: var(--muted); }
.site-footer .fine { color: #94a3b8; margin-top: 20px; }

.placeholder {
  border: 2px dashed var(--border); border-radius: var(--radius); padding: 32px; text-align: center; color: var(--muted);
}

/* Sponsor logos */
.sponsor-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.sponsor-card { margin: 0; text-align: center; }
.sponsor-card figcaption { margin-top: 8px; font-size: .9rem; color: var(--muted); font-weight: 600; }
.sponsor-tile {
  display: flex; align-items: center; justify-content: center;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  height: 160px; padding: 16px;
}
.sponsor-tile.dark { background: #e7ebf0; }
.sponsor-tile img { max-height: 100%; max-width: 100%; object-fit: contain; }
a.sponsor-tile:hover { border-color: var(--primary); }

/* Rotating sponsor banner */
.sponsor-strip { background: #eef2f7; border-bottom: 3px solid var(--accent); padding: 14px 0 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.marquee-track { display: flex; width: max-content; animation: marquee var(--marquee-duration, 30s) linear infinite; }
.marquee-copy { display: flex; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee { padding: 6px 0 10px; }
.marquee .sponsor-tile {
  width: 220px; height: 120px; padding: 14px; margin-right: 18px; flex: none;
  background: #e7ebf0; border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 4px 14px rgba(18, 24, 36, 0.10);
}
.marquee .sponsor-tile.dark { background: #e7ebf0; }
/* Logos with white backgrounds blend into the gray card; Terry's (transparent, white "E") is left as is. */
.marquee .sponsor-tile:not(.dark) img { mix-blend-mode: multiply; }
@media (max-width: 720px) { .marquee .sponsor-tile { width: 170px; height: 96px; margin-right: 14px; } }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee { mask-image: none; }
  .marquee-track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
  .marquee-copy { display: none; }
}

/* Club logo */
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand img { height: 44px; width: auto; }
.hero-grid { display: grid; gap: 32px; align-items: center; }
.hero-logo { display: none; width: 100%; max-width: 300px; height: auto; justify-self: end; filter: drop-shadow(0 8px 24px rgba(0,0,0,.35)); }
@media (min-width: 860px) {
  .hero-grid { grid-template-columns: 1fr auto; }
  .hero-logo { display: block; }
}

/* Wordmark */
.split { display: grid; gap: 24px; align-items: center; }
.split .wordmark { width: 100%; max-width: 360px; height: auto; justify-self: center; }
@media (min-width: 760px) { .split { grid-template-columns: 1fr auto; } }

/* Phone action bar */
.action-bar { display: none; }
@media (max-width: 720px) {
  .action-bar {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    background: var(--dark); box-shadow: 0 -4px 16px rgba(0,0,0,.25);
  }
  .action-bar a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    min-height: 52px; border-radius: 10px; text-decoration: none; font-weight: 800; font-size: .85rem;
    color: #fff; background: rgba(255,255,255,.08);
  }
  .action-bar a span { font-size: 1.1rem; line-height: 1; }
  .action-bar a.primary { background: var(--accent); color: var(--dark); }
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
}

/* Footer sponsor strip */
.footer-sponsors { border-bottom: 1px solid rgba(255,255,255,.08); padding: 4px 0 24px; margin: -8px 0 24px; }
.footer-sponsors-label { text-transform: uppercase; letter-spacing: .1em; font-size: .75rem; font-weight: 800; color: var(--accent); margin-bottom: 12px; text-align: center; }
.footer-sponsors .sponsor-tile { border-radius: 8px; }

/* Campaign progress */
.campaign { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 16px; }
.campaign-head { display: flex; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 10px; }
.campaign-name { font-weight: 800; color: var(--primary); }
.campaign-status { color: var(--muted); font-size: .95rem; }
.campaign-status strong { color: var(--text); }
.meter { height: 14px; background: #e2e8f0; border-radius: 999px; overflow: hidden; }
.meter-fill { height: 100%; background: linear-gradient(90deg, var(--accent), #ffdb70); border-radius: 999px; }
.campaign-blurb { margin: 10px 0 0; color: var(--muted); font-size: .92rem; }
.zeffy-thermometer { display: block; width: 100%; height: 120px; border: 0; }

/* Give section */
.give-section { background: var(--surface); }
.trust-line { background: rgba(0, 53, 148, 0.06); border-left: 4px solid var(--primary); border-radius: 6px; padding: 12px 16px; margin-bottom: 16px; }
.give-grid { display: grid; gap: 20px; }
@media (min-width: 900px) { .give-grid { grid-template-columns: 1fr 320px; align-items: start; } }
.zeffy-embed { position: relative; height: 780px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #fff; }
.zeffy-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.give-side { display: grid; gap: 16px; }
.give-side h3 { margin: 0 0 6px; }
.give-side p { margin: 0 0 8px; }

/* Sponsorship tiers */
.tier-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
.tier-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.tier-table th, .tier-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); text-align: center; }
.tier-table tbody th { text-align: left; font-weight: 600; }
.tier-table thead th { background: var(--primary); color: #fff; font-size: 1rem; text-transform: uppercase; letter-spacing: .04em; }
.tier-table thead th span { display: block; color: var(--accent); font-size: 1.3rem; font-weight: 900; letter-spacing: 0; text-transform: none; }
.tier-table thead th.top { background: var(--dark); }
.tier-table tbody tr:last-child th, .tier-table tbody tr:last-child td { border-bottom: 0; }
.tier-table td.yes { color: #17663a; font-weight: 900; font-size: 1.1rem; }
.tier-table td.no { color: #cbd5e1; }
.sub-h { color: var(--primary); margin: 32px 0 4px; }
.needs { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin-top: 12px; }
.need h4 { margin: 4px 0 6px; }
.need p { margin: 0; color: var(--muted); font-size: .92rem; }
.need-price { font-size: 1.5rem; font-weight: 900; color: var(--primary); }
.need.legacy { border: 2px solid var(--accent); }
.cta-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 28px; padding: 24px; border-radius: var(--radius); background: var(--primary); color: #fff; }
.cta-card h3 { margin: 0 0 4px; }
.cta-card p { margin: 0; max-width: 620px; opacity: .92; }

/* Events */
.events { display: grid; gap: 16px; }
.event-card { display: grid; grid-template-columns: 80px 1fr; gap: 20px; align-items: start; }
.ev-date { background: var(--primary); color: #fff; border-radius: 10px; text-align: center; padding: 10px 0; }
.ev-date span { display: block; text-transform: uppercase; font-size: .8rem; font-weight: 800; color: var(--accent); }
.ev-date strong { font-size: 1.8rem; line-height: 1.1; }
.ev-date.tba { background: #e2e8f0; color: var(--dark); }
.ev-date.tba span { color: var(--muted); }
.ev-date.tba strong { font-size: 1.2rem; }
.ev-body h3 { margin: 0 0 4px; color: var(--primary); }
.ev-when { font-weight: 700; }
.ev-where, .ev-price { color: var(--muted); }
.ev-body p { margin: 8px 0 12px; }
.btn-ghost { border-color: var(--border); color: var(--primary); background: #fff; }
.btn-ghost:hover { border-color: var(--primary); }
@media (max-width: 520px) {
  .event-card { grid-template-columns: 1fr; }
  .ev-date { display: inline-block; width: 80px; }
}
.zeffy-loading { position: absolute; top: 40px; left: 0; right: 0; text-align: center; color: var(--muted); padding: 0 24px; }
