/*
  Ghost Zero Sports base styles. Mobile first: every seller screen is built for
  one hand at 375px, then widened. League colors arrive as custom properties
  from the layout: --brand, --on-brand, --brand-ink (brand dark enough for text
  on white), --accent, --on-accent, --accent-ink.

  Component vocabulary (use these, do not invent parallel ones):
    .wrap .wrap-narrow .stack .row .grid-2 .grid-3 .card .card-brand .muted .small
    .btn .btn-primary .btn-accent .btn-ghost .btn-block .btn-sm .btn-danger
    .field (label + input) .field-row .help .check
    .pill .pill-ok .pill-warn .pill-bad .pill-info
    .progress-block .progress .stat .stats
    .flash .flash-ok .flash-error .flash-info .demo-banner
    .table-wrap table.table
    .hero .hero-brand .section .section-title .eyebrow
    .pkg-card .pkg-price .pkg-left .bullets
    .avatar .avatar-initials .player-card
    .sticky-cta (bottom bar on phones)
*/

:root {
  --ink: #15171a;
  --ink-2: #3c4148;
  --muted: #5d636b;
  --line: #dfe2e6;
  --paper: #ffffff;
  --bg: #f5f5f2;
  --ok: #17703a;
  --ok-bg: #e5f4ea;
  --warn: #8a5300;
  --warn-bg: #fdf1dc;
  --bad: #a3261b;
  --bad-bg: #fbe6e3;
  --info: #1b4f8a;
  --info-bg: #e5eef9;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.05);
  --font: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --brand: #1d3557;
  --on-brand: #fff;
  --brand-ink: #1d3557;
  --accent: #f4a261;
  --on-accent: #111;
  --accent-ink: #8a4a12;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
  padding-bottom: 32px;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--brand-ink);
}

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(1.9rem, 6vw, 3rem);
  font-weight: 850;
}

h2 {
  font-size: clamp(1.4rem, 4.5vw, 2rem);
  font-weight: 800;
}

h3 {
  font-size: 1.15rem;
  font-weight: 750;
}

p {
  margin: 0 0 1em;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: -999px;
}

/* Layout */
.wrap {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

.wrap-narrow {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 16px;
}

.stack > * + * {
  margin-top: 16px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.grid-2,
.grid-3 {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

@media (min-width: 720px) {
  .grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.section {
  padding: 32px 0;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.section-title h2 {
  margin: 0;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.875rem;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  min-width: 0;
}

.card-brand {
  background: var(--brand);
  color: var(--on-brand);
  border-color: transparent;
}

.card-brand a {
  color: var(--on-brand);
}

/* Headers */
.site-header,
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 10px 16px;
  padding-top: max(10px, env(safe-area-inset-top));
}

.site-header {
  background: var(--brand);
  color: var(--on-brand);
}

.app-header {
  background: #111418;
  color: #fff;
}

.brand,
.app-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  font-weight: 800;
  min-width: 0;
}

.brand img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
}

.brand-initials,
.app-mark {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 900;
  flex: none;
}

.app-mark {
  width: 32px;
  height: 32px;
  background: #fff;
  color: #111418;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

.brand-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-league {
  color: #b9c0c8;
  font-weight: 600;
}

.site-nav,
.app-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.site-nav a,
.app-nav a {
  color: inherit;
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 8px;
  font-weight: 650;
  font-size: 0.95rem;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}

.site-nav a[aria-current='page'],
.app-nav a[aria-current='page'] {
  background: rgba(255, 255, 255, 0.16);
}

.site-nav a:hover,
.app-nav a:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* Footer */
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  background: var(--paper);
}

.run-on-gz {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 700;
  min-height: 44px;
}

.run-on-gz:hover {
  text-decoration: underline;
}

body.has-sticky .site-footer {
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
}

/* Hero */
.hero {
  padding: 32px 0 24px;
}

.hero-brand {
  background: var(--brand);
  color: var(--on-brand);
  padding: 28px 0 32px;
}

.hero-brand a:not(.btn) {
  color: var(--on-brand);
}

.hero-brand .muted {
  color: inherit;
  opacity: 0.85;
}

.lead {
  font-size: 1.15rem;
  max-width: 60ch;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: 10px;
  border: 2px solid transparent;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  background: #e9ebee;
  color: var(--ink);
  line-height: 1.1;
  text-align: center;
}

.btn-primary {
  background: var(--brand);
  color: var(--on-brand);
}

.btn-accent {
  background: var(--accent);
  color: var(--on-accent);
}

.btn-ghost {
  background: transparent;
  border-color: currentColor;
  color: inherit;
}

.btn-danger {
  background: var(--bad);
  color: #fff;
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-sm {
  min-height: 40px;
  padding: 8px 14px;
  font-size: 0.92rem;
}

.btn:disabled,
.btn[aria-disabled='true'] {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Forms */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.field label,
.field .label {
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  font: inherit;
  font-size: 16px;
  padding: 12px 14px;
  border: 1.5px solid #b9bfc6;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  min-height: 48px;
  width: 100%;
}

.field textarea {
  min-height: 96px;
  resize: vertical;
}

.field input[type='color'] {
  padding: 4px;
  width: 72px;
}

.field input[type='file'] {
  padding: 10px;
}

.field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0 12px;
}

@media (min-width: 560px) {
  .field-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.help {
  font-size: 0.9rem;
  color: var(--muted);
}

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  min-height: 44px;
  padding: 8px 0;
}

.check input {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  flex: none;
}

fieldset {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin: 0 0 16px;
  min-width: 0;
}

legend {
  font-weight: 800;
  padding: 0 6px;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (min-width: 560px) {
  .choice-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.choice {
  position: relative;
}

.choice input {
  position: absolute;
  opacity: 0;
  inset: 0;
}

.choice span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border: 2px solid #b9bfc6;
  border-radius: 10px;
  font-weight: 800;
  background: #fff;
  text-align: center;
  padding: 6px;
}

.choice input:checked + span {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--on-brand);
}

.choice input:focus-visible + span {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* Status */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 750;
  background: #eceef1;
  color: var(--ink-2);
  white-space: nowrap;
}

.pill-ok {
  background: var(--ok-bg);
  color: var(--ok);
}

.pill-warn {
  background: var(--warn-bg);
  color: var(--warn);
}

.pill-bad {
  background: var(--bad-bg);
  color: var(--bad);
}

.pill-info {
  background: var(--info-bg);
  color: var(--info);
}

.flash {
  padding: 14px 16px;
  border-radius: 10px;
  margin: 16px 0;
  font-weight: 600;
}

.flash-ok {
  background: var(--ok-bg);
  color: var(--ok);
}

.flash-error {
  background: var(--bad-bg);
  color: var(--bad);
}

.flash-info {
  background: var(--info-bg);
  color: var(--info);
}

.demo-banner {
  background: #fff4c2;
  color: #5b4300;
  text-align: center;
  padding: 8px 16px;
  font-weight: 700;
  font-size: 0.92rem;
}

/* Progress */
.progress-block {
  margin: 12px 0;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.progress {
  height: 16px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.card-brand .progress,
.hero-brand .progress {
  background: rgba(255, 255, 255, 0.25);
}

.progress span {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  min-width: 4px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (min-width: 720px) {
  .stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.stat {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  min-width: 0;
}

.stat b {
  display: block;
  font-size: 1.5rem;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.stat span {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

table.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.table th,
.table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.table th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  white-space: nowrap;
}

.table tr:last-child td {
  border-bottom: 0;
}

.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Packages */
.pkg-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

@media (min-width: 720px) {
  .pkg-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.pkg-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pkg-card .pkg-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.pkg-price {
  font-size: 1.6rem;
  font-weight: 900;
  white-space: nowrap;
}

.pkg-price small {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  text-align: right;
}

.pkg-left {
  font-weight: 700;
  font-size: 0.9rem;
}

.pkg-card .btn {
  margin-top: auto;
}

.pkg-featured {
  border: 3px solid var(--accent);
}

.bullets {
  margin: 0;
  padding-left: 1.2em;
}

.bullets li {
  margin: 4px 0;
}

.jersey-figure,
.jersey-photo {
  margin: 0;
  text-align: center;
}

.jersey-svg {
  width: 100%;
  max-width: 320px;
  height: auto;
  color: var(--muted);
}

.jersey-figure figcaption,
.jersey-photo figcaption {
  font-size: 0.9rem;
  color: var(--muted);
}

/* People */
.avatar {
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  background: #ddd;
}

.avatar-initials {
  display: inline-grid;
  place-items: center;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 900;
}

.player-card {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.player-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

@media (min-width: 720px) {
  .player-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.logo-wall {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (min-width: 720px) {
  .logo-wall {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.logo-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  min-height: 120px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  text-align: center;
}

.logo-tile img {
  max-height: 64px;
  width: auto;
  object-fit: contain;
}

/* Bottom bar on phones: fixed, slim, never animated. */
.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  gap: 8px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.97);
  border-top: 1px solid var(--line);
}

.sticky-cta .btn {
  flex: 1 1 0;
}

@media (min-width: 900px) {
  .sticky-cta {
    display: none;
  }
  body.has-sticky .site-footer {
    padding-bottom: 20px;
  }
}

.quote {
  border-left: 4px solid var(--accent);
  padding: 4px 0 4px 14px;
  margin: 12px 0;
  font-style: normal;
}

.prose {
  max-width: 68ch;
}

.prose h2 {
  margin-top: 1.4em;
}

.prose li {
  margin: 6px 0;
}

.copy-box {
  background: #f1f2f4;
  border-radius: 10px;
  padding: 14px;
  white-space: pre-wrap;
  font-size: 0.98rem;
  overflow-wrap: anywhere;
}

.qr svg {
  width: 100%;
  max-width: 220px;
  height: auto;
  background: #fff;
}

@media print {
  .site-header,
  .app-header,
  .site-footer .footer-league,
  .no-print,
  .sticky-cta,
  .demo-banner {
    display: none !important;
  }
  body {
    background: #fff;
  }
}

/* Storefront */
.sf-club {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sf-more {
  font-weight: 800;
  color: var(--brand-ink);
  margin-top: auto;
}
.sf-steps {
  padding-left: 1.3em;
  max-width: 60ch;
}
.sf-steps li {
  margin: 10px 0;
}
.sf-player-hero {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}
.sf-player-hero h1 {
  margin-bottom: 4px;
}
.sf-raised {
  font-size: 1.15rem;
  font-weight: 800;
}
.sf-club-head {
  display: flex;
  gap: 14px;
  align-items: center;
}
.sf-club-head img {
  border-radius: 12px;
  background: #fff;
  object-fit: contain;
}
.sf-sponsor-hero {
  background: var(--sp, var(--brand));
  color: #fff;
  padding: 32px 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.sf-sponsor-hero a:not(.btn) {
  color: #fff;
}
.sf-sponsor-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  min-width: 140px;
  min-height: 100px;
  margin-bottom: 16px;
  text-shadow: none;
  color: var(--ink);
  font-weight: 800;
}
.sf-sponsor-logo img {
  max-height: 120px;
  max-width: 260px;
  object-fit: contain;
}
.sf-sponsor-hero .btn-ghost {
  color: #fff;
}
.sf-contact,
.sf-backs {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}
.sf-contact a {
  font-weight: 700;
  overflow-wrap: anywhere;
}
.sf-backs li {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pkg-image {
  border-radius: 10px;
  width: 100%;
  object-fit: cover;
  max-height: 220px;
}
.amount-grid .choice span {
  flex-direction: column;
}
.amount-grid .choice small {
  font-weight: 600;
  font-size: 0.8rem;
}
.sf-delivered {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sf-delivered li {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.sf-delivered li.done {
  color: var(--ok);
}
