/* ============================================================
   Debt Free Millionaire — public site stylesheet
   Used by: index.html (homepage), login, register, payment,
   store, checkout, account, admin, payment-success/cancelled.
   The game itself (play.html) does NOT load this file.
   ============================================================ */

:root {
  --navy-900: #081426;
  --navy-800: #0B1D3A;
  --navy-700: #10294F;
  --navy-600: #16345F;
  --card: #0F2347;
  --card-edge: rgba(255, 255, 255, 0.09);
  --gold: #F2B33D;
  --gold-deep: #D99A1B;
  --green: #23C483;
  --red: #E4574F;
  --ink: #F4F7FC;
  --ink-dim: #A9B7CE;
  --ink-faint: #6E7F9C;
  --radius: 14px;
  --shadow: 0 10px 32px rgba(3, 8, 18, 0.45);
  --font-display: 'Montserrat', 'Poppins', system-ui, sans-serif;
  --font-body: 'Poppins', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body.site {
  font-family: var(--font-body);
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(35, 196, 131, 0.12), transparent 60%),
    radial-gradient(1000px 500px at -10% 20%, rgba(242, 179, 61, 0.10), transparent 55%),
    var(--navy-900);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.6;
}

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 22px; }

/* ---------------- Nav ---------------- */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(8, 20, 38, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--card-edge);
}
.site-nav .nav-inner {
  display: flex; align-items: center; gap: 26px;
  height: 64px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 800;
  font-size: 1.06rem; letter-spacing: 0.02em;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.brand .coin {
  width: 30px; height: 30px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #FFD97A, var(--gold) 55%, var(--gold-deep));
  color: #37260a; font-weight: 800; font-size: 1rem;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(242, 179, 61, 0.45);
}
.nav-links { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.nav-links a { color: var(--ink-dim); text-decoration: none; font-size: 0.93rem; }
.nav-links a:hover { color: var(--ink); }
/* .nav-links a outranks .btn-gold on specificity, so the nav's gold
   button needs its dark text restated or it renders gray-on-gold. */
.nav-links a.btn-gold, .nav-links a.btn-gold:hover { color: #33230a; }
.nav-toggle { display: none; background: none; border: 0; color: var(--ink); font-size: 1.5rem; margin-left: auto; cursor: pointer; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-block; border: 0; cursor: pointer;
  font-family: var(--font-body); font-weight: 600; font-size: 0.95rem;
  padding: 12px 26px; border-radius: 10px; text-decoration: none;
  text-align: center; transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-gold {
  background: linear-gradient(180deg, #FFCE63, var(--gold) 55%, var(--gold-deep));
  color: #33230a; box-shadow: 0 4px 16px rgba(242, 179, 61, 0.35);
}
.btn-gold:hover { box-shadow: 0 6px 22px rgba(242, 179, 61, 0.5); }
.btn-green { background: linear-gradient(180deg, #37DE9B, var(--green)); color: #05301e; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--card-edge); }
.btn-ghost:hover { border-color: var(--ink-dim); }
.btn-danger { background: var(--red); color: #fff; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; border-radius: 8px; }
.btn-block { display: block; width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* ---------------- Hero ---------------- */
.hero { padding: 84px 0 60px; text-align: center; }
.hero h1 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.1rem, 5vw, 3.4rem); line-height: 1.15;
  max-width: 850px; margin: 0 auto 20px;
}
.hero h1 .gold { color: var(--gold); }
.hero p.lede {
  color: var(--ink-dim); font-size: 1.12rem; max-width: 700px; margin: 0 auto 34px;
}
.hero .cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.eyebrow {
  display: inline-block; font-size: 0.78rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--gold); font-weight: 700; margin-bottom: 16px;
}

/* ---------------- Sections ---------------- */
.section { padding: 64px 0; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.section-head h2 { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.5rem, 3.2vw, 2.2rem); margin-bottom: 12px; }
.section-head p { color: var(--ink-dim); }

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 22px; }
/* Four-up variant (the programs section): a 2×2 grid of near-square
   cards — taller image, one short paragraph, CTA pinned to the bottom
   so all four buttons align. Single column on phones. */
.card-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card-grid.four .card { display: flex; flex-direction: column; }
/* flex children stretch by default — keep the pill and button shrink-wrapped */
.card-grid.four .program-tag { align-self: flex-start; }
.card-grid.four .card-img { height: 250px; }
.card-grid.four .card p { margin-bottom: 20px; }
.card-grid.four .card-cta { margin-top: auto; align-self: flex-start; }
@media (max-width: 700px) {
  .card-grid.four { grid-template-columns: 1fr; }
  .card-grid.four .card-img { height: 190px; }
}

.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.00)), var(--card);
  border: 1px solid var(--card-edge); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow);
}
.card h3 { font-family: var(--font-display); font-size: 1.2rem; margin-bottom: 10px; }
.card p { color: var(--ink-dim); font-size: 0.94rem; }
.card .icon { font-size: 2rem; margin-bottom: 14px; display: block; }
.card ul { margin: 14px 0 20px; padding-left: 0; list-style: none; }
.card ul li { color: var(--ink-dim); font-size: 0.9rem; padding: 5px 0 5px 26px; position: relative; }
.card ul li::before { content: '✓'; position: absolute; left: 2px; color: var(--green); font-weight: 700; }
.card .card-cta { margin-top: 6px; }
.program-tag {
  display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; padding: 4px 10px; border-radius: 20px;
  background: rgba(35, 196, 131, 0.14); color: var(--green); margin-bottom: 14px;
}

/* ---------------- Pricing ---------------- */
.price-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; max-width: 860px; margin: 0 auto; }
.price-card { position: relative; text-align: center; padding-top: 38px; }
.price-card .flag {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--gold); color: #33230a; font-size: 0.72rem; font-weight: 800;
  letter-spacing: 0.08em; text-transform: uppercase; padding: 5px 14px; border-radius: 20px;
}
.price { font-family: var(--font-display); font-size: 2.6rem; font-weight: 800; margin: 8px 0 2px; }
.price .per { font-size: 0.95rem; color: var(--ink-faint); font-weight: 500; }

/* ---------------- Forms ---------------- */
.form-card { max-width: 460px; margin: 56px auto; }
.form-card.wide { max-width: 640px; }
.form-card h2 { font-family: var(--font-display); margin-bottom: 6px; }
.form-card .sub { color: var(--ink-dim); font-size: 0.92rem; margin-bottom: 22px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.84rem; color: var(--ink-dim); margin-bottom: 6px; font-weight: 600; }
.field input, .field select {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--card-edge); background: var(--navy-800);
  color: var(--ink); font-family: var(--font-body); font-size: 0.95rem;
}
.field input:focus { outline: 2px solid rgba(242, 179, 61, 0.5); border-color: transparent; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0; font-size: 0.86rem; color: var(--ink-dim); }
.check input { margin-top: 4px; }
.form-note { font-size: 0.82rem; color: var(--ink-faint); margin-top: 14px; text-align: center; }
.form-note a, .card p a, .sub a { color: var(--gold); }

.alert { border-radius: 10px; padding: 12px 16px; font-size: 0.9rem; margin-bottom: 16px; display: none; }
.alert.show { display: block; }
.alert-error { background: rgba(228, 87, 79, 0.14); border: 1px solid rgba(228, 87, 79, 0.4); color: #FFB3AE; }
.alert-ok { background: rgba(35, 196, 131, 0.13); border: 1px solid rgba(35, 196, 131, 0.4); color: #8FE8C6; }
.alert-info { background: rgba(242, 179, 61, 0.12); border: 1px solid rgba(242, 179, 61, 0.4); color: #FFD98A; }

/* ---------------- Tables (admin, orders) ---------------- */
.table-scroll { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 0.87rem; }
table.data th {
  text-align: left; color: var(--ink-faint); font-weight: 600; font-size: 0.76rem;
  text-transform: uppercase; letter-spacing: 0.06em;
  padding: 10px 12px; border-bottom: 1px solid var(--card-edge); white-space: nowrap;
}
table.data td { padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,0.05); vertical-align: top; }
table.data tr:hover td { background: rgba(255,255,255,0.025); }

.pill { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 0.74rem; font-weight: 700; }
.pill-paid, .pill-active { background: rgba(35,196,131,0.15); color: var(--green); }
.pill-pending, .pill-none { background: rgba(242,179,61,0.15); color: var(--gold); }
.pill-canceled, .pill-paused { background: rgba(228,87,79,0.15); color: var(--red); }
.pill-admin { background: rgba(120,150,255,0.18); color: #A9BCFF; }

/* ---------------- Admin layout ---------------- */
.tabs { display: flex; gap: 8px; margin: 26px 0 20px; flex-wrap: wrap; }
.tab-btn {
  background: transparent; color: var(--ink-dim); border: 1px solid var(--card-edge);
  border-radius: 10px; padding: 9px 20px; font-family: var(--font-body);
  font-weight: 600; font-size: 0.9rem; cursor: pointer;
}
.tab-btn.active { background: var(--gold); border-color: var(--gold); color: #33230a; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat { background: var(--card); border: 1px solid var(--card-edge); border-radius: 12px; padding: 16px 18px; }
.stat .n { font-family: var(--font-display); font-size: 1.7rem; font-weight: 800; }
.stat .l { color: var(--ink-faint); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; }

.bar-row { display: flex; align-items: center; gap: 10px; margin: 6px 0; font-size: 0.85rem; }
.bar-row .bl { flex: 0 0 220px; color: var(--ink-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .bar { flex: 1; height: 14px; background: rgba(255,255,255,0.06); border-radius: 7px; overflow: hidden; }
.bar-row .bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--green), #37DE9B); border-radius: 7px; }
.bar-row.gold .bar > i { background: linear-gradient(90deg, var(--gold-deep), var(--gold)); }
.bar-row .bn { flex: 0 0 56px; text-align: right; color: var(--ink); font-weight: 600; }

.spark { display: flex; align-items: flex-end; gap: 3px; height: 90px; padding: 10px 0; }
.spark > i { flex: 1; background: linear-gradient(180deg, var(--gold), var(--gold-deep)); border-radius: 3px 3px 0 0; min-height: 2px; }

/* ---------------- Account page ---------------- */
.program-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin: 24px 0; }
.member-banner { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }

/* ---------------- Footer ---------------- */
.site-footer { border-top: 1px solid var(--card-edge); margin-top: 60px; padding: 44px 0 34px; }
.footer-cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; }
.footer-cols h4 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-faint); margin-bottom: 14px; }
.footer-cols ul { list-style: none; }
.footer-cols li { margin: 8px 0; }
.footer-cols a { color: var(--ink-dim); text-decoration: none; font-size: 0.9rem; }
.footer-cols a:hover { color: var(--ink); }
.footer-cols p { color: var(--ink-faint); font-size: 0.86rem; max-width: 300px; }
.copyright { color: var(--ink-faint); font-size: 0.78rem; margin-top: 30px; text-align: center; }

/* ---------------- Audience switcher ---------------- */
.aud-switch {
  display: flex; gap: 8px; justify-content: center; align-items: center;
  flex-wrap: wrap; margin-bottom: 36px;
}
.aud-label { color: var(--ink-faint); font-size: 0.86rem; margin-right: 4px; }
.aud-btn {
  background: transparent; border: 1px solid var(--card-edge); color: var(--ink-dim);
  padding: 9px 18px; border-radius: 999px; cursor: pointer;
  font-family: var(--font-body); font-weight: 600; font-size: 0.88rem;
  transition: color 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}
.aud-btn:hover { color: var(--ink); border-color: var(--ink-dim); }
.aud-btn.active {
  background: linear-gradient(180deg, #FFCE63, var(--gold) 55%, var(--gold-deep));
  border-color: transparent; color: #33230a;
  box-shadow: 0 4px 14px rgba(242, 179, 61, 0.35);
}
.price-card.recommended {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold), var(--shadow);
}
.rec-chip {
  display: inline-block; margin-top: 14px; padding: 5px 14px; border-radius: 20px;
  background: rgba(242, 179, 61, 0.14); color: var(--gold);
  font-size: 0.78rem; font-weight: 700;
}

/* Hub variant (launch.html, the Xogos landing page): three equal cards
   with their CTAs aligned along the bottom regardless of copy length. */
.card-grid.hub .card { display: flex; flex-direction: column; }
.card-grid.hub .program-tag { align-self: flex-start; }
.card-grid.hub .card-img { height: 200px; }
.card-grid.hub .card-cta { margin-top: auto; align-self: flex-start; }

/* ---------------- Site imagery ----------------
   Every image slot carries an onerror handler in the HTML that
   removes itself, so a not-yet-generated file never shows a broken
   icon — the pages read cleanly with or without the artwork. */
.card-img {
  width: 100%; height: 170px; object-fit: cover; display: block;
  border-radius: 10px; margin-bottom: 18px; background: var(--navy-800);
}
.hero-figure { max-width: 880px; margin: 46px auto 0; }
.hero-figure img {
  width: 100%; display: block; border-radius: 16px;
  border: 1px solid var(--card-edge); box-shadow: var(--shadow);
}
.banner-figure { max-width: 1100px; margin: 0 auto 40px; }
.banner-figure img {
  width: 100%; height: 300px; object-fit: cover; display: block;
  border-radius: 16px; border: 1px solid var(--card-edge); box-shadow: var(--shadow);
}
.book-cover {
  width: 170px; max-width: 60%; display: block; margin: 0 auto 18px;
  border-radius: 8px; box-shadow: 0 10px 26px rgba(3, 8, 18, 0.5);
}

/* ---------------- Misc ---------------- */
.center { text-align: center; }
.muted { color: var(--ink-faint); }
.gold-text { color: var(--gold); }
.spacer { height: 24px; }
.divider-label { display: flex; align-items: center; gap: 14px; color: var(--ink-faint); font-size: 0.8rem; margin: 22px 0; }
.divider-label::before, .divider-label::after { content: ''; flex: 1; height: 1px; background: var(--card-edge); }

@media (max-width: 760px) {
  .nav-links {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--navy-800); border-bottom: 1px solid var(--card-edge); padding: 10px 22px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; width: 100%; }
  .nav-toggle { display: block; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .bar-row .bl { flex-basis: 130px; }
  .field-row { grid-template-columns: 1fr; }
}

/* "Signed in and ready" chip on the hub card whose program the launch
   token actually belongs to (launch.html). */
.signed-chip {
  align-self: flex-start;
  display: inline-block; margin-bottom: 14px;
  padding: 5px 14px; border-radius: 20px;
  background: rgba(35, 196, 131, 0.14); color: var(--green);
  font-size: 0.78rem; font-weight: 700;
}
