/* Rally program pages — shared design system.
   Extracted from /coaches so Captains and Court Partners stay identical.
   Palette and type match the coaches page exactly; do not fork these values. */

:root {
  --ink: #10251c;
  --muted: #3d5a4c;
  --leaf: #1a6b4a;
  --leaf-deep: #0f4a34;
  --paper: #eef3ee;
  --line: rgba(16, 37, 28, 0.12);
  --ember: #c45c26;
  --white: #ffffff;
  --card: rgba(255, 255, 255, 0.72);
  --grind: #97705a;
  --grind-bg: rgba(196, 92, 38, 0.06);
  --sun: #d99a2b;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: "Source Sans 3", system-ui, sans-serif;
  line-height: 1.55;
  background:
    radial-gradient(900px 480px at 0% 0%, rgba(26, 107, 74, 0.20), transparent 55%),
    radial-gradient(760px 460px at 100% 8%, rgba(196, 92, 38, 0.13), transparent 52%),
    linear-gradient(165deg, #dce8df 0%, var(--paper) 40%, #e7eee8 100%);
  background-attachment: fixed;
}
h1, h2, h3 { font-family: "Bricolage Grotesque", sans-serif; letter-spacing: -0.03em; line-height: 1.02; margin: 0; }
p { margin: 0; }
a { color: inherit; }
.wrap { width: min(1040px, calc(100% - 40px)); margin: 0 auto; }
section { padding: 64px 0; }

/* header */
header { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(10px);
  background: rgba(238, 243, 238, 0.7); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; }
.word { font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: 1.5rem;
  letter-spacing: -0.05em; color: var(--leaf-deep); text-decoration: none; }
.word span { color: var(--ember); }
.bar nav { display: none; gap: 20px; font-weight: 600; font-size: 0.95rem; }
.bar nav a { text-decoration: none; color: var(--muted); }
.bar nav a:hover, .bar nav a[aria-current] { color: var(--leaf); }
@media (min-width: 860px) { .bar nav { display: flex; } }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 999px;
  font-weight: 700; text-decoration: none; border: 0; cursor: pointer; font-size: 1rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease; }
.btn:hover { transform: translateY(-1px); }
.primary { background: var(--leaf); color: #fff; box-shadow: 0 12px 30px rgba(26, 107, 74, 0.24); }
.primary:hover { box-shadow: 0 16px 38px rgba(26, 107, 74, 0.30); }
.secondary { background: rgba(255,255,255,0.65); color: var(--leaf-deep); border: 1px solid var(--line); }
.btn.sm { padding: 9px 16px; font-size: 0.92rem; }

/* hero */
.hero { padding-top: 40px; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 0.85rem;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--leaf); background: rgba(26,107,74,0.10);
  padding: 6px 12px; border-radius: 999px; margin-bottom: 20px; }
.eyebrow.forming { color: var(--ember); background: rgba(196,92,38,0.10); }
.hero h1 { font-weight: 800; font-size: clamp(2.6rem, 5.6vw, 4rem); color: var(--leaf-deep); margin-bottom: 18px; }
.hero .lede { font-size: 1.22rem; color: var(--muted); max-width: 30rem; margin-bottom: 28px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .fine { margin-top: 16px; font-size: 0.92rem; color: var(--muted); }

/* device shot — real app screenshots */
.shot { justify-self: center; width: 290px; max-width: 100%; border-radius: 34px;
  border: 8px solid #0d1a14; background: #0d1a14;
  box-shadow: 0 30px 60px rgba(15,74,52,0.28); overflow: hidden; display: block;
  animation: rise 0.7s ease both; }
.shot img { display: block; width: 100%; height: auto; }
.shot.pair { display: grid; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* section heads */
.head { max-width: 42rem; margin-bottom: 40px; }
.head h2 { font-weight: 800; font-size: clamp(1.8rem, 3.6vw, 2.5rem); color: var(--leaf-deep); margin-bottom: 12px; }
.head p { font-size: 1.12rem; color: var(--muted); }
.center { text-align: center; margin-left: auto; margin-right: auto; }

/* dark strip */
.strip { background: var(--leaf-deep); color: #eaf3ee; border-radius: 24px; padding: 34px 32px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.strip .q { font-family: "Bricolage Grotesque", sans-serif; font-weight: 700;
  font-size: clamp(1.3rem,3vw,1.9rem); letter-spacing:-0.02em; }
.strip .q b { color: #ffd7a8; font-weight: 700; }
.strip .a { font-size: 1.05rem; opacity: 0.9; max-width: 22rem; }

/* card grid */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 26px; }
.card .ic { width: 46px; height: 46px; border-radius: 12px; background: rgba(26,107,74,0.12);
  display: grid; place-items: center; margin-bottom: 16px; }
.card h3 { font-weight: 800; font-size: 1.2rem; color: var(--ink); margin-bottom: 6px; }
.card p { color: var(--muted); }

/* steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step { background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 24px; }
.step .n { font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; color: var(--ember);
  font-size: 0.95rem; letter-spacing: 0.06em; }
.step h3 { font-weight: 800; font-size: 1.08rem; margin: 10px 0 4px; }
.step p { color: var(--muted); font-size: 0.98rem; }

/* credit split — captain attribution visual */
.split { background: var(--white); border: 1px solid var(--line); border-radius: 22px;
  padding: 28px; box-shadow: 0 24px 60px rgba(15,74,52,0.10); }
.split .who { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.split .who .av { width: 44px; height: 44px; border-radius: 999px; background: rgba(26,107,74,0.14);
  color: var(--leaf-deep); display: grid; place-items: center; font-weight: 800; flex: 0 0 auto; }
.split .who b { font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: 1.15rem; }
.split .who span { color: var(--muted); font-size: 0.96rem; }
.bar-track { display: flex; height: 34px; border-radius: 10px; overflow: hidden; margin: 20px 0 14px; }
.bar-track i { display: grid; place-items: center; font-style: normal; font-weight: 800;
  font-size: 0.86rem; color: #fff; }
.legend { display: grid; gap: 9px; }
.legend div { display: flex; align-items: center; gap: 10px; font-size: 1rem; }
.legend .sw { width: 13px; height: 13px; border-radius: 4px; flex: 0 0 auto; }
.legend .nm { font-weight: 700; }
.legend .why { color: var(--muted); }
.legend .pc { margin-left: auto; font-weight: 800; color: var(--leaf-deep); font-variant-numeric: tabular-nums; }

/* before/after sheet */
.sheet { border: 1px solid var(--line); border-radius: 22px; overflow: hidden;
  background: var(--white); box-shadow: 0 24px 60px rgba(15, 74, 52, 0.10); }
.sheet .colhead, .sheet .tr { display: grid; grid-template-columns: 1fr 1fr; }
.sheet .colhead > div { padding: 16px 24px; font-size: 0.74rem; text-transform: uppercase;
  letter-spacing: 0.14em; font-weight: 700; }
.sheet .colhead .l { color: var(--grind); background: var(--grind-bg); }
.sheet .colhead .r { color: var(--leaf); border-left: 1px solid var(--line); }
.sheet .tr { border-top: 1px solid var(--line); }
.sheet .tr > div { padding: 17px 24px 17px 47px; text-indent: -23px; font-size: 1.02rem; }
.sheet .now { color: var(--grind); background: var(--grind-bg); }
.sheet .now .mk { color: var(--ember); }
.sheet .fix { color: var(--ink); border-left: 1px solid var(--line); }
.sheet .fix b { color: var(--leaf-deep); font-weight: 700; }
.sheet .fix .mk { color: var(--leaf); font-weight: 800; }
.sheet .mk { display: inline-block; width: 23px; text-indent: 0; font-size: 0.95em; }
@media (max-width: 720px) {
  .sheet .colhead { display: none; }
  .sheet .tr { grid-template-columns: 1fr; border-top-width: 2px; }
  .sheet .colhead + .tr { border-top: 0; }
  .sheet .fix { border-left: none; border-top: 1px solid rgba(16, 37, 28, 0.06); }
}

/* honest "not decided yet" block */
.forming-box { background: var(--white); border: 1px dashed rgba(196,92,38,0.45); border-radius: 22px;
  padding: 30px 32px; }
.forming-box h3 { font-weight: 800; font-size: 1.35rem; color: var(--leaf-deep); margin-bottom: 10px; }
.forming-box p { color: var(--muted); margin-bottom: 14px; }
.forming-box ul { margin: 0; padding-left: 20px; color: var(--muted); display: grid; gap: 7px; }
.forming-box ul b { color: var(--ink); }

/* faq */
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 4px 20px; margin-bottom: 12px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--leaf); font-weight: 800; font-size: 1.4rem; }
.faq details[open] summary::after { content: "\2013"; }
.faq p { color: var(--muted); padding: 0 0 18px; }

/* apply */
.apply { background: var(--leaf-deep); color: #eaf3ee; border-radius: 28px; padding: 44px; }
.apply h2 { font-weight: 800; font-size: clamp(1.8rem,3.6vw,2.4rem); color: #fff; margin-bottom: 8px; }
.apply .sub { color: rgba(234,243,238,0.82); margin-bottom: 26px; max-width: 34rem; }
.apply .btn.primary { background: #fff; color: var(--leaf-deep); }
.apply .note { margin-top: 18px; font-size: 0.94rem; color: rgba(234,243,238,0.7); }
/* Numbered apply steps read as a sequence, not three loose notes. */
.apply .apply-step { margin-top: 22px; margin-bottom: 10px; color: rgba(234,243,238,0.92); font-size: 1rem; }
.apply .apply-step b { color: #fff; }

/* Apply section: copy left, loop right. Stacks under 760px. */
.apply-cols { display: grid; grid-template-columns: 1fr 260px; gap: 32px; align-items: start; }
.apply-cols > div:first-child { min-width: 0; }
.loop { margin: 0; }
.loop video {
  width: 100%; border-radius: 18px; display: block;
  background: #0f2a1e; box-shadow: 0 18px 40px -22px rgba(0,0,0,0.7);
}
.loop figcaption {
  margin-top: 10px; font-size: 0.86rem; text-align: center;
  color: rgba(234,243,238,0.65);
}
/* .loop was written for the dark apply panel, so its caption is light-on-dark.
   On a pale section that caption is invisible — this recolours it, nothing else. */
.loop.on-light figcaption { color: var(--muted); }
@media (max-width: 760px) {
  .apply-cols { grid-template-columns: 1fr; }
  .loop { max-width: 260px; margin: 8px auto 0; }
}
@media (prefers-reduced-motion: reduce) {
  /* Autoplay loops are motion the reader did not ask for. */
  .loop video { animation: none; }
}

/* footer */
footer { border-top: 1px solid var(--line); padding: 28px 0; margin-top: 10px; }
.foot { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; justify-content: space-between; color: var(--muted); font-size: 0.95rem; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 18px; font-weight: 600; }
.foot a { text-decoration: none; color: var(--muted); }
.foot a:hover { color: var(--leaf); }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; }
  .shot { grid-row: 1; width: 240px; }
  .grid, .grid.three, .steps, .form { grid-template-columns: 1fr; }
  .strip { flex-direction: column; align-items: flex-start; }
  section { padding: 48px 0; }
}
