/* School Box Africa — Partnerships page.
   Self-contained, brand tokens mirrored from the main site (same approach as blog.css).
   Deep Space base, Signal Cyan primary, Frequency Violet reserved for the Projects track. */

:root {
  --deep-space: #060810;
  --surface: #0C0F1A;
  --surface-2: #0F1322;
  --border: #141828;
  --mid: #4A5570;
  --light: #E8EEF8;
  --cyan: #00E5FF;
  --violet: #9B6FFF;
  --ghost-stroke: #1E2438;
  --danger: #FF6B6B;

  --font-display: 'Rajdhani', sans-serif;
  --font-body: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-h: 68px;
  --measure: 60rem;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--deep-space);
  color: var(--light);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--cyan); color: var(--deep-space); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: lowercase;
  color: var(--cyan);
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 22px;
}
.eyebrow__index {
  font-weight: 400;
  color: var(--mid);
  letter-spacing: 0.14em;
}
.eyebrow__index::after {
  content: ''; display: inline-block;
  width: 28px; height: 1px;
  background: var(--ghost-stroke);
  vertical-align: middle;
  margin-left: 14px;
}

/* ==========================================================================
   Nav
   ========================================================================== */

.pnav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: rgba(6, 8, 16, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.pnav__inner {
  max-width: var(--measure);
  height: 100%;
  margin: 0 auto;
  padding: 0 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.pnav__brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none;
}
.pnav__mark { width: 30px; height: 30px; flex: none; }
.pnav__name {
  font-family: var(--font-display); font-weight: 700;
  font-size: 19px; letter-spacing: 0.16em; text-transform: uppercase;
}
.pnav__divider { width: 1px; height: 18px; background: var(--ghost-stroke); }
.pnav__full {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--mid);
}
.pnav__back {
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.14em;
  color: var(--mid);
  text-decoration: none;
  transition: color 0.25s;
  white-space: nowrap;
}
.pnav__back:hover { color: var(--cyan); }

/* ==========================================================================
   Hero + intro video
   ========================================================================== */

.phero { padding: 96px 32px 64px; }
.phero__inner { max-width: var(--measure); margin: 0 auto; }

.phero__title {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 0.94;
  font-size: clamp(2.75rem, 8vw, 5.5rem);
  margin-bottom: 24px;
}
.phero__sub {
  max-width: 46rem;
  color: #B9C4D8;
  font-size: clamp(1rem, 1.6vw, 1.125rem);
  margin-bottom: 56px;
}

/* Kept modest and centred — the source encode is 640x360, so a compact frame
   avoids upscaling and keeps it sharp. */
.video { margin: 56px auto 0; max-width: 480px; }
.video__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.video__el {
  display: block;
  width: 100%; height: 100%;
  object-fit: cover;
  background: var(--deep-space);
}

/* Click-to-play facade — sits over the poster until the visitor plays. */
.video__facade {
  position: absolute; inset: 0;
  display: block;
  width: 100%;
  border: 0; padding: 0;
  background: transparent;
  cursor: pointer;
  transition: opacity 0.35s var(--ease-out);
}
.video__facade[hidden] { display: none; }

.video__scrim {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(6,8,16,0.15) 0%, rgba(6,8,16,0.72) 78%),
    linear-gradient(180deg, rgba(6,8,16,0.1) 0%, rgba(6,8,16,0.6) 100%);
  transition: background 0.35s var(--ease-out);
}
.video__facade:hover .video__scrim {
  background:
    radial-gradient(ellipse at center, rgba(6,8,16,0.05) 0%, rgba(6,8,16,0.6) 78%),
    linear-gradient(180deg, rgba(6,8,16,0.05) 0%, rgba(6,8,16,0.5) 100%);
}
.video__badge {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px;
}
.video__play {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border: 1px solid var(--cyan);
  border-radius: 50%;
  color: var(--cyan);
  background: rgba(6, 8, 16, 0.45);
  position: relative;
  transition: background 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.video__facade:hover .video__play { background: var(--cyan); color: var(--deep-space); transform: scale(1.06); }
.video__facade:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.video__play svg { width: 20px; height: 20px; margin-left: 2px; }
.video__play::after {
  content: '';
  position: absolute; inset: -1px;
  border: 1px solid var(--cyan);
  border-radius: 50%;
  animation: ring 2.6s var(--ease-out) infinite;
}
@keyframes ring {
  0%   { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.5); opacity: 0; }
}
.video__label {
  font-family: var(--font-mono);
  font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase;
  color: #C4CEE0;
  text-align: center;
  padding: 0 12px;
  transition: color 0.3s;
}
.video__facade:hover .video__label { color: var(--light); }
.video__corner {
  position: absolute; width: 14px; height: 14px;
  border: 1px solid var(--cyan); opacity: 0.55;
}
.video__corner--tl { top: 9px; left: 9px; border-right: 0; border-bottom: 0; }
.video__corner--br { right: 9px; bottom: 9px; border-left: 0; border-top: 0; }
.video__caption {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.14em;
  color: var(--mid);
  margin-top: 14px;
  text-align: center;
}

/* ==========================================================================
   Fork — track chooser
   ========================================================================== */

.fork { padding: 72px 32px 40px; }
.fork__inner { max-width: var(--measure); margin: 0 auto; }
.fork__heading {
  font-family: var(--font-display); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.02em;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  line-height: 1.05;
  margin-bottom: 14px;
}
.fork__lede { color: var(--mid); max-width: 40rem; margin-bottom: 44px; }

.fork__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.track {
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 14px;
  text-align: left;
  padding: 36px 32px 30px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--light);
  font-family: inherit;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.3s var(--ease-out), transform 0.3s var(--ease-out), background 0.3s;
}
.track::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--cyan);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.4s var(--ease-out);
}
.track:hover, .track:focus-visible { border-color: var(--cyan); transform: translateY(-3px); }
.track:hover::before, .track:focus-visible::before, .track[aria-expanded="true"]::before { transform: scaleX(1); }
.track[aria-expanded="true"] { border-color: var(--cyan); background: var(--surface-2); }

.track--violet::before { background: var(--violet); }
.track--violet:hover, .track--violet:focus-visible,
.track--violet[aria-expanded="true"] { border-color: var(--violet); }
.track--violet .track__index { color: var(--violet); border-color: rgba(155, 111, 255, 0.35); }
.track--violet .track__cta { color: var(--violet); }

.track__index {
  font-family: var(--font-display); font-weight: 700;
  font-size: 15px; letter-spacing: 0.1em;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid rgba(0, 229, 255, 0.35);
  border-radius: 50%;
  color: var(--cyan);
}
.track__title {
  font-family: var(--font-display); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1;
}
.track__desc { color: #9AA6BE; font-size: 15px; line-height: 1.65; }
.track__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.track__tags span {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--mid);
  border: 1px solid var(--ghost-stroke);
  border-radius: 2px;
  padding: 4px 9px;
}
.track__cta {
  margin-top: 8px;
  font-family: var(--font-display); font-weight: 700;
  font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--cyan);
  display: inline-flex; align-items: center; gap: 10px;
}
.track__cta em { font-style: normal; transition: transform 0.3s var(--ease-out); }
.track:hover .track__cta em { transform: translateX(5px); }

/* ==========================================================================
   Forms
   ========================================================================== */

.forms { padding: 24px 32px 96px; }
.forms__inner { max-width: var(--measure); margin: 0 auto; }

.pform {
  border: 1px solid var(--border);
  border-top: 2px solid var(--cyan);
  border-radius: 3px;
  background: var(--surface);
  padding: 44px 40px;
  animation: rise 0.5s var(--ease-out) both;
}
.pform--violet { border-top-color: var(--violet); }
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

.pform__head { margin-bottom: 40px; }
.pform__heading {
  font-family: var(--font-display); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.02em;
  font-size: clamp(1.5rem, 3.2vw, 2.25rem);
  line-height: 1.05;
  margin-bottom: 16px;
}
.pform__switch {
  background: none; border: 0; padding: 0;
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.1em;
  color: var(--mid);
  cursor: pointer;
  border-bottom: 1px solid var(--ghost-stroke);
  padding-bottom: 2px;
  transition: color 0.25s, border-color 0.25s;
}
.pform__switch:hover { color: var(--cyan); border-color: var(--cyan); }

/* honeypot — off-screen, never focusable, never announced */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.pform__set { border: 0; margin-bottom: 38px; }
.pform__legend {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--cyan);
  padding-bottom: 14px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--border);
  width: 100%;
}
.pform--violet .pform__legend { color: var(--violet); }

.pform__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.pform__row, .field { margin-bottom: 20px; }
.pform__row .field { margin-bottom: 0; }

.field { display: block; }
.field__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: #8592AC;
  margin-bottom: 9px;
}
.field__label em { color: var(--cyan); font-style: normal; }
.pform--violet .field__label em { color: var(--violet); }

input[type="text"], input[type="email"], input[type="tel"], input[type="url"],
select, textarea {
  width: 100%;
  background: var(--deep-space);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--light);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 15px;
  padding: 13px 15px;
  transition: border-color 0.25s, box-shadow 0.25s;
}
textarea { resize: vertical; line-height: 1.65; }
select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #6C7894 50%),
                    linear-gradient(135deg, #6C7894 50%, transparent 50%);
  background-position: calc(100% - 19px) calc(50% + 1px), calc(100% - 14px) calc(50% + 1px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 40px;
  cursor: pointer;
}
select option { background: var(--surface); color: var(--light); }

input::placeholder, textarea::placeholder { color: #3E4860; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.1);
}
.pform--violet input:focus, .pform--violet select:focus, .pform--violet textarea:focus {
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(155, 111, 255, 0.12);
}

/* invalid state, only after a submit attempt */
.pform.is-checked input:invalid,
.pform.is-checked select:invalid,
.pform.is-checked textarea:invalid,
.field.is-invalid input, .field.is-invalid select, .field.is-invalid textarea,
.checks.is-invalid {
  border-color: var(--danger);
}
.checks.is-invalid { box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.08); }

.checks {
  display: flex; flex-wrap: wrap; gap: 9px;
  border: 1px solid transparent;
  border-radius: 2px;
  padding: 2px;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.check { cursor: pointer; }
.check input { position: absolute; opacity: 0; width: 0; height: 0; }
.check span {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.1em;
  color: #8592AC;
  border: 1px solid var(--ghost-stroke);
  border-radius: 2px;
  padding: 9px 14px;
  transition: all 0.22s var(--ease-out);
}
.check:hover span { border-color: var(--mid); color: var(--light); }
.check input:checked + span {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(0, 229, 255, 0.07);
}
.pform--violet .check input:checked + span {
  border-color: var(--violet);
  color: var(--violet);
  background: rgba(155, 111, 255, 0.09);
}
.check input:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: 2px; }

.pform__foot {
  border-top: 1px solid var(--border);
  padding-top: 28px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 20px;
}
.pform__note { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; color: var(--mid); }
.pform__actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.pform__status {
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.08em;
  color: var(--mid);
}
.pform__status--error { color: var(--danger); }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700;
  font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 2px;
  padding: 15px 32px;
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s, box-shadow 0.25s, background 0.25s, opacity 0.25s;
}
.btn--primary { background: var(--cyan); color: var(--deep-space); }
.btn--primary:hover { box-shadow: 0 0 32px rgba(0, 229, 255, 0.25); background: var(--light); }
.pform--violet .btn--primary { background: var(--violet); color: var(--deep-space); }
.pform--violet .btn--primary:hover { box-shadow: 0 0 32px rgba(155, 111, 255, 0.28); background: var(--light); }
.btn--ghost { background: transparent; color: var(--mid); border-color: var(--ghost-stroke); }
.btn--ghost:hover { color: var(--light); border-color: var(--light); }
.btn[disabled] { opacity: 0.5; cursor: wait; }

/* ==========================================================================
   Success
   ========================================================================== */

.done {
  text-align: center;
  padding: 88px 32px;
  border: 1px solid var(--border);
  border-top: 2px solid var(--cyan);
  border-radius: 3px;
  background: var(--surface);
  animation: rise 0.5s var(--ease-out) both;
}
.done__mark {
  width: 62px; height: 62px;
  display: grid; place-items: center;
  margin: 0 auto 26px;
  border: 1px solid var(--cyan);
  border-radius: 50%;
  color: var(--cyan);
}
.done__mark svg { width: 26px; height: 26px; }
.done__heading {
  font-family: var(--font-display); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em;
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  margin-bottom: 14px;
}
.done__body { color: var(--mid); max-width: 34rem; margin: 0 auto 34px; }
.done__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ==========================================================================
   Footer
   ========================================================================== */

.pfoot {
  border-top: 1px solid var(--border);
  padding: 52px 32px;
}
.pfoot__inner { max-width: var(--measure); margin: 0 auto; }
.pfoot__brand {
  font-family: var(--font-display); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.16em;
  font-size: 16px;
  margin-bottom: 10px;
}
.pfoot__line { color: var(--mid); font-size: 14px; margin-bottom: 22px; }
.pfoot__links { display: flex; gap: 26px; flex-wrap: wrap; }
.pfoot__links a {
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.12em;
  color: var(--mid);
  text-decoration: none;
  transition: color 0.25s;
}
.pfoot__links a:hover { color: var(--cyan); }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 720px) {
  .pnav__inner, .phero, .fork, .forms, .pfoot { padding-left: 20px; padding-right: 20px; }
  .pnav__full, .pnav__divider { display: none; }
  .phero { padding-top: 60px; }
  .pform { padding: 32px 22px; }
  .done { padding: 64px 22px; }
  .track { padding: 28px 24px; }
  .pform__foot { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .track:hover { transform: none; }
}
