/* =====================================================================
   STARTER KIT — Design System
   Rebrand by editing the tokens in :root, then swap placeholder content.
   ===================================================================== */

:root {
  /* --- Brand colors (TRY Rugby: black + hot pink) --- */
  --primary: #1c1c22;        /* headings, dark bands */
  --primary-dark: #000000;   /* hero/footer gradient bottom */
  --accent: #ff66c4;         /* CTAs, eyebrows, highlights */
  --accent-deep: #e23fa0;    /* button hover */

  /* --- Neutrals --- */
  --charcoal: #16192a;       /* body text */
  --gray: #5c6270;           /* secondary text */
  --off-white: #f7f8fb;      /* page background */
  --white: #ffffff;          /* alt sections, cards */
  --line: #e4e6ee;           /* borders / dividers */

  /* --- Shape & scale --- */
  --radius: 8px;
  --max-width: 1120px;
  --font-sans: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--charcoal);
  background: var(--off-white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ---------- Layout ---------- */

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

.section { padding: 76px 0; }

/* Background banding: alternate .section (off-white) and .section-alt (white).
   Use ONE .band per page for your strongest / highest-impact section. */
.section-alt {
  background: var(--white);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.band {
  background: var(--primary-dark);
  color: var(--white);
}
.band .eyebrow { color: var(--accent); filter: brightness(1.3); }
.band h2 { color: var(--white); }
.band .lede { color: rgba(255,255,255,0.88); }

.section.tint { background: #fdeef7; border-top: 1px solid #f6dcec; border-bottom: 1px solid #f6dcec; }

/* ---------- Program spotlight card ---------- */
.program-card {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 44px;
  align-items: center;
  margin-top: 2rem;
  padding: 44px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 40px rgba(28, 28, 34, 0.07);
}
.program-logo { display: flex; align-items: center; justify-content: center; }
.program-logo img { width: 100%; max-width: 280px; height: auto; }
.program-info p { color: var(--gray); font-size: 1.05rem; line-height: 1.6; margin: 0 0 1.6rem; }

@media (max-width: 720px) {
  .program-card { grid-template-columns: 1fr; text-align: center; padding: 32px 24px; gap: 28px; }
  .program-logo img { max-width: 220px; }
}

/* ---------- Typography ---------- */

h1, h2, h3, h4 { font-weight: 700; line-height: 1.25; margin: 0 0 0.5em; }
h2 { font-size: clamp(1.65rem, 3vw, 2.2rem); margin-bottom: 0.7em; }
h3 { font-size: 1.08rem; font-weight: 600; }
p { margin: 0 0 1em; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 0.75em;
}

.lede {
  font-size: 1.1rem;
  color: var(--gray);
  max-width: 68ch;
}

.why-text { font-size: 1.1rem; max-width: 68ch; color: var(--gray); }

.statement {
  font-size: clamp(1.2rem, 2.4vw, 1.5rem);
  font-weight: 600;
  color: var(--primary);
  text-align: center;
  margin: 0;
}
.statement-section {
  padding: 56px 0;
  background: var(--white);
  border-top: 1px solid var(--line);
}

.inline-highlight { color: var(--accent-deep); font-weight: 800; }

/* ---------- Header / nav ---------- */

.scroll-progress {
  position: fixed; top: 0; left: 0;
  height: 3px; width: 0%;
  background: var(--accent);
  z-index: 100;
  transition: width 0.1s linear;
}

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 248, 251, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 12px; padding-bottom: 12px;
}
.wordmark-main { font-size: 1.15rem; font-weight: 700; color: var(--primary); letter-spacing: -0.01em; }

/* Brand logo images */
.logo-img { display: block; height: 34px; width: auto; }
.hero-logo { display: block; width: min(460px, 82%); height: auto; margin: 0 0 1.4rem; }
.footer-logo { display: block; height: 46px; width: auto; }

.site-nav { display: flex; gap: 28px; }
.site-nav a { font-size: 0.9rem; font-weight: 500; color: var(--charcoal); }
.site-nav a:hover { color: var(--accent); }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 36px; height: 36px; background: none; border: none; cursor: pointer; padding: 0;
}
.nav-toggle span { display: block; height: 2px; background: var(--primary); border-radius: 2px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block; padding: 13px 28px; border-radius: var(--radius);
  font-weight: 600; font-size: 0.95rem; border: 2px solid transparent;
  transition: transform 0.12s ease, background 0.15s ease, color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #111; }
.btn-primary:hover { background: var(--accent-deep); color: var(--white); }
.btn-ghost { background: transparent; border-color: rgba(255,255,255,0.5); color: var(--white); }
.btn-ghost:hover { background: rgba(255,255,255,0.12); border-color: var(--white); }
.section .btn-ghost { border-color: var(--primary); color: var(--primary); }
.section .btn-ghost:hover { background: var(--primary); color: var(--white); }

.actions { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  background:
    linear-gradient(180deg, rgba(18,18,24,0.52) 0%, rgba(18,18,24,0.70) 100%),
    url('../img/photos/photo-4.jpg') center 26% / cover no-repeat;
  color: #fff;
  padding: 134px 0;
}
.hero-inner { max-width: 760px; }
.hero .eyebrow { color: var(--accent); filter: brightness(1.12); }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); color: #fff; margin-bottom: 0.4em; font-weight: 800; text-shadow: 0 2px 18px rgba(0,0,0,0.25); }
.hero-sub { font-size: 1.2rem; color: rgba(255,255,255,0.92); max-width: 56ch; margin-bottom: 2em; }
.hero .btn-ghost { border-color: rgba(255,255,255,0.65); color: #fff; }
.hero .btn-ghost:hover { background: rgba(255,255,255,0.15); color: #fff; border-color: #fff; }
.hero .scroll-cue { border-color: rgba(255,255,255,0.45); }

.scroll-cue {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  width: 22px; height: 36px; border: 2px solid rgba(255,255,255,0.4); border-radius: 12px;
}
.scroll-cue span {
  display: block; width: 4px; height: 8px; margin: 6px auto 0; border-radius: 2px;
  background: var(--accent); animation: scroll-cue-move 1.8s ease infinite;
}
@keyframes scroll-cue-move {
  0% { opacity: 0; transform: translateY(0); }
  35% { opacity: 1; }
  70% { opacity: 0; transform: translateY(12px); }
  100% { opacity: 0; transform: translateY(0); }
}
@media (max-width: 640px) { .scroll-cue { display: none; } }

/* ---------- Reveal-on-scroll ---------- */

.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.grid .reveal:nth-child(3) { transition-delay: 0.2s; }
.grid .reveal:nth-child(4) { transition-delay: 0.3s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Icon badges ---------- */

.icon-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255, 102, 196, 0.16); color: var(--accent-deep); margin-bottom: 16px;
}
.icon-badge svg { width: 22px; height: 22px; }
.icon-badge-good { background: rgba(46, 139, 87, 0.12); color: #2e8b57; }
.icon-badge-bad { background: rgba(92, 98, 112, 0.12); color: var(--gray); }

/* ---------- Pillars (chrome-less columns) ---------- */

.pillar-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px;
  margin: 2.25rem 0 0;
}
.pillar h3 { color: var(--primary); margin-bottom: 0.4em; }
.pillar p { color: var(--gray); font-size: 0.96rem; margin: 0; }

/* ---------- Logo / subject grid ---------- */

.subject-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; margin-top: 2rem; }
.subject { display: flex; flex-direction: column; align-items: center; text-align: center; }
.subject .logo-placeholder {
  height: 52px; width: 100%; max-width: 140px; margin-bottom: 18px;
  display: flex; align-items: center; justify-content: center;
  border: 1px dashed var(--line); border-radius: var(--radius);
  color: var(--gray); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase;
}
.subject p { color: var(--gray); font-size: 0.94rem; margin: 0; }

/* ---------- Cards ---------- */

.card-grid { display: grid; gap: 22px; margin-top: 2.25rem; grid-template-columns: repeat(2, 1fr); }
.card { background: var(--off-white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px; }
.section-alt .card { background: var(--off-white); }
.card h3 { color: var(--primary); }
.card p { color: var(--gray); font-size: 0.96rem; }
.card p:last-child { margin-bottom: 0; }

/* ---------- Two-column "yes / no" lists ---------- */

.needs-grid { display: grid; gap: 24px; grid-template-columns: 1fr 1fr; margin-top: 2.5rem; }
.needs-col { background: var(--off-white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 26px; }
.section-alt .needs-col { background: var(--white); }
.needs-col h4 { font-size: 1.02rem; font-weight: 600; color: var(--primary); margin-bottom: 1em; }
.needs-col ul { margin: 0; padding-left: 1.1em; color: var(--gray); }
.needs-col li { margin-bottom: 0.55em; }
.needs-col li:last-child { margin-bottom: 0; }

/* ---------- Stat trio ---------- */

.stat-trio { display: flex; justify-content: space-between; gap: 12px; margin: 1.6rem 0 0; }
.stat-item { display: flex; flex: 1; flex-direction: column; align-items: center; }
.stat-num { font-size: 2.1rem; font-weight: 800; color: var(--accent); line-height: 1.1; }
.band .stat-num { filter: brightness(1.35); }
.stat-label {
  margin-top: 0.35em; font-size: 0.7rem; font-weight: 500; color: var(--gray);
  text-transform: uppercase; letter-spacing: 0.05em; text-align: center;
}
.band .stat-label { color: rgba(255,255,255,0.7); }

/* ---------- Accordion / FAQ (native <details>) ---------- */

.accordion { max-width: 760px; margin: 1.5rem auto 0; }
.acc-item { border-bottom: 1px solid var(--line); }
.acc-item:last-child { border-bottom: none; }
.acc-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 2px; font-size: 0.95rem; font-weight: 600; color: var(--primary);
  cursor: pointer; list-style: none;
}
.acc-item summary::-webkit-details-marker { display: none; }
.acc-item summary::after {
  content: "+"; flex-shrink: 0; font-size: 1.2rem; font-weight: 400;
  color: var(--accent); transition: transform 0.2s ease;
}
.acc-item[open] summary::after { transform: rotate(45deg); }
.acc-item p { color: var(--gray); font-size: 0.92rem; margin: 0 2px 16px; }

/* ---------- Timeline ---------- */

.timeline { list-style: none; margin: 2.5rem 0 0; padding: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 2rem 32px; }
.timeline li::before {
  content: ""; position: absolute; left: -7px; top: 4px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--accent); border: 2px solid var(--off-white);
}
.timeline li:last-child { padding-bottom: 0; }
.timeline-date { display: block; font-weight: 700; color: var(--primary); font-size: 1rem; margin-bottom: 0.2em; }
.timeline-desc { display: block; color: var(--gray); }

/* ---------- Responsive video embed (16:9) ---------- */

.video-embed {
  margin-top: 2rem; max-width: 860px; aspect-ratio: 16 / 9;
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #000;
}
.video-embed iframe { display: block; width: 100%; height: 100%; border: 0; }

/* ---------- Photos (one consistent frame everywhere) ---------- */

.photo {
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 3 / 2;               /* matches the photos' native ratio — full image, no real crop */
  background: var(--line);
  box-shadow: 0 22px 46px -22px rgba(28, 28, 34, 0.38);
}
.photo img { width: 100%; height: 100%; object-fit: cover; }

/* centered accent beneath a section's copy */
.photo-accent { max-width: 620px; margin: 2.6rem auto 0; }

/* text-beside-photo layout, sharing the same .photo frame */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 52px;
  align-items: center;
}
.split-copy > :first-child { margin-top: 0; }
.split-copy .actions { margin-bottom: 0; }
.split.reverse .split-media { order: -1; }   /* photo on the left on desktop */

@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; gap: 30px; }
  .split.reverse .split-media { order: 0; }  /* stack copy-first on mobile */
  .photo-accent { margin-top: 2.1rem; }
}

/* ---------- Testimonial carousel ---------- */

.carousel { max-width: 720px; margin: 2.75rem auto 0; text-align: center; }
.carousel-slide {
  display: none; margin: 0; position: relative;
  background: var(--white);
  color: var(--primary); border-radius: 16px; padding: 50px 44px 40px;
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(28, 28, 34, 0.08);
}
.carousel-slide.is-active { display: block; animation: fade-in 0.4s ease; }
@keyframes fade-in { from { opacity: 0; transform: translateY(12px) scale(0.99); } to { opacity: 1; transform: none; } }
.carousel-slide::before {
  content: "\201C"; position: absolute; top: 8px; left: 34px;
  font-family: Georgia, "Times New Roman", serif; font-size: 5.5rem; line-height: 1;
  color: var(--accent);
}
.carousel-slide .quote { font-size: 1.3rem; line-height: 1.55; font-weight: 500; color: var(--primary); margin: 0 0 1.5rem; }
.carousel-slide .q-name { display: block; font-weight: 700; color: var(--primary); }
.carousel-slide .q-org { display: block; font-size: 0.85rem; color: var(--accent-deep); margin-top: 3px; }
.carousel-nav { display: flex; justify-content: center; align-items: center; gap: 20px; margin-top: 2.4rem; }
.carousel-btn {
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--white); color: var(--primary); font-size: 1.2rem; line-height: 1;
  cursor: pointer; transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.carousel-btn:hover { background: var(--accent); color: #111; border-color: var(--accent); }
.carousel-count { font-size: 0.85rem; color: var(--gray); font-variant-numeric: tabular-nums; min-width: 48px; }

/* ---------- Schools marquee ---------- */

.schools-section { overflow: hidden; }
.schools-count { color: var(--accent); }

.marquee {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 16px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-row { display: flex; overflow: hidden; }
.marquee-track {
  display: flex;
  gap: 14px;
  flex-shrink: 0;
  padding-right: 14px;
  will-change: transform;
  /* one consistent speed for every row */
  animation: marquee-scroll 200s linear infinite;
}
/* same speed and direction, just offset the starting position so the rows aren't in lockstep */
.track-b { animation-delay: -40s; }
.track-c { animation-delay: -80s; }
.marquee-row.reverse .marquee-track { animation-direction: normal; }
@keyframes marquee-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee:hover .marquee-track { animation-play-state: paused; }

.school-chip {
  flex-shrink: 0;
  white-space: nowrap;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(28, 28, 34, 0.05);
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .marquee-row { overflow-x: auto; }
}

/* ---------- Footer ---------- */

.site-footer { background: var(--primary-dark); color: rgba(255,255,255,0.85); padding: 60px 0 0; }
.footer-inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px;
  padding-bottom: 44px; border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-brand .wordmark-main { color: var(--white); }
.footer-contact h3 {
  font-size: 0.88rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--accent); filter: brightness(1.3); margin-bottom: 0.9em;
}
.footer-contact dl { margin: 0; display: grid; gap: 10px; }
.footer-contact dl > div { display: flex; gap: 10px; font-size: 0.92rem; }
.footer-contact dt { font-weight: 600; color: rgba(255,255,255,0.6); min-width: 70px; }
.footer-contact dd { margin: 0; color: rgba(255,255,255,0.8); }
.footer-contact dd a:hover { color: var(--accent); filter: brightness(1.4); }
.footer-bottom { padding: 20px 24px; font-size: 0.8rem; color: rgba(255,255,255,0.5); }
.footer-bottom p { margin: 0; }

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .pillar-row { grid-template-columns: 1fr 1fr; }
  .subject-grid { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
  .needs-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav-toggle { display: flex; }
  .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--off-white); border-bottom: 1px solid var(--line);
    flex-direction: column; gap: 0; padding: 8px 24px 16px;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .site-nav a:last-child { border-bottom: none; }

  .hero { padding: 76px 0 56px; }
  .section { padding: 52px 0; }
  .pillar-row { grid-template-columns: 1fr; gap: 24px; }
  .subject-grid { grid-template-columns: 1fr; gap: 28px; }
  .card-grid { grid-template-columns: 1fr; }
  .actions { flex-direction: column; }
  .actions .btn { text-align: center; }
}
