/* Academy microsite (NEXWAY et al.) — loaded only by academy.html, on top of the
   shared styles.css. Reuses the existing --brand/--fg/--bg/--muted/--line tokens
   (already wired to admin-configured branding by site.js's applyBranding()) so an
   academy page stays visually coherent with the rest of the network chrome while
   its OWN content — hero imagery, tagline, services, team, offices — carries the
   distinct identity. Data-driven throughout: every section below hides itself
   when the academy has not filled it in, so this is the same template for every
   academy, not a NEXWAY-only page. */

.academy-page { --ap-ink-soft: color-mix(in srgb, var(--fg) 72%, transparent);
  --ap-surface: color-mix(in srgb, var(--brand) 4%, #fff);
  --ap-surface-2: color-mix(in srgb, var(--brand) 8%, #fff);
  --ap-line: color-mix(in srgb, var(--brand) 14%, var(--line));
  --ap-shadow: 0 12px 32px -16px color-mix(in srgb, var(--brand) 35%, transparent);
}

.academy-page .container { max-width: 1120px; }

/* ── Motion: a single, cheap fade-up on load — deliberately NOT an
   IntersectionObserver scroll-reveal. That was tried first and dropped: content
   far below the fold never got its callback before a full-page capture (and, more
   importantly, would stay genuinely invisible for a fast flick-scroll or any
   browser quirk that skips a frame), which is a correctness bug, not a style
   choice — a visitor must never see a permanently blank section. A pure CSS
   keyframe animates once, ties to nothing but load, and always finishes: content
   below the fold is simply already fully visible by the time anyone scrolls to
   it. Off entirely for anyone who asked for less motion (`.ap-reveal` is 100%
   opaque unless the media query below applies), staggered per-parent via
   `nth-child` so a grid's own items settle in sequence, not all at once. */
.ap-reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: no-preference) {
  .ap-reveal { opacity: 0; transform: translateY(14px); animation: ap-fade-up .55s ease forwards; }
  .ap-reveal:nth-child(2) { animation-delay: .06s; }
  .ap-reveal:nth-child(3) { animation-delay: .12s; }
  .ap-reveal:nth-child(4) { animation-delay: .18s; }
  .ap-reveal:nth-child(5) { animation-delay: .24s; }
  .ap-reveal:nth-child(6) { animation-delay: .3s; }
  .ap-reveal:nth-child(n+7) { animation-delay: .34s; }
  @keyframes ap-fade-up { to { opacity: 1; transform: none; } }
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.ap-hero { position: relative; overflow: hidden; border-radius: 0 0 28px 28px; color: #fff;
  background: linear-gradient(155deg, var(--brand) 0%, color-mix(in srgb, var(--brand) 55%, #0b1f3a) 100%); }
.ap-hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center;
  opacity: .28; filter: saturate(1.05); }
.ap-hero-scrim { position: absolute; inset: 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 60%, #0b1f3a 40%) 0%, transparent 45%,
    color-mix(in srgb, var(--brand) 70%, #0b1f3a 30%) 100%); }
.ap-hero-inner { position: relative; padding: 76px 0 64px; text-align: center; }
.ap-hero-logo { max-height: 76px; max-width: 240px; margin: 0 auto 22px; display: block;
  filter: drop-shadow(0 6px 18px rgba(0,0,0,.25)); }
.ap-hero h1 { font-size: clamp(1.9rem, 4.4vw, 3.1rem); font-weight: 800; margin: 0 0 10px;
  text-wrap: balance; letter-spacing: -.01em; }
.ap-hero .ap-tagline { font-size: clamp(1rem, 1.6vw, 1.2rem); font-weight: 600; opacity: .92;
  letter-spacing: .02em; margin: 0 0 20px; }
.ap-hero .ap-hero-msg { max-width: 680px; margin: 0 auto 30px; font-size: 1.05rem; line-height: 1.75;
  opacity: .95; text-wrap: pretty; }
.ap-hero-ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.ap-btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 26px; border-radius: 999px;
  font-weight: 700; font-size: .96rem; border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, opacity .15s ease; }
.ap-btn:hover { transform: translateY(-1px); text-decoration: none; }
.ap-btn-primary { background: #fff; color: var(--brand); }
.ap-btn-primary:hover { opacity: .92; }
.ap-btn-ghost { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.55); backdrop-filter: blur(2px); }
.ap-btn-ghost:hover { background: rgba(255,255,255,.16); }

/* ── Network badge — the platform relationship, stated once, understated ───── */
.ap-network { display: flex; align-items: center; gap: 10px; justify-content: center; flex-wrap: wrap;
  max-width: 640px; margin: 34px auto 0; padding: 12px 20px; border-radius: 999px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); font-size: .86rem; }
.ap-network b { font-weight: 700; }

/* ── Section shell ────────────────────────────────────────────────────────── */
.ap-section { padding: 56px 0; }
.ap-section-alt { background: var(--ap-surface); }
.ap-eyebrow { display: inline-block; font-size: .74rem; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--brand); margin: 0 0 8px; }
.ap-section h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin: 0 0 12px; letter-spacing: -.01em; }
.ap-section > .container > p.ap-lead { color: var(--muted); max-width: 680px; margin: 0 0 30px; font-size: 1.02rem; line-height: 1.7; }

/* ── About / Vision ───────────────────────────────────────────────────────── */
.ap-about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.ap-about-grid .ap-card { height: 100%; }
@media (max-width: 760px) { .ap-about-grid { grid-template-columns: 1fr; } }

/* ── Cards, shared by about/team/offices/partners ────────────────────────── */
.ap-card { background: #fff; border: 1px solid var(--ap-line); border-radius: 16px; padding: 24px;
  box-shadow: 0 1px 2px rgba(20,33,61,.04); transition: box-shadow .2s ease, transform .2s ease; }
.ap-card h3 { margin: 0 0 8px; font-size: 1.08rem; }
.ap-card p { color: var(--muted); margin: 0; line-height: 1.65; font-size: .95rem; }

/* ── Services: a showcase grid, not a wall of identical boxes — accent rail
   distinguishes it from an ordinary card grid without resorting to numbering
   (this is a set, not a sequence). ── */
.ap-services { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.ap-service { position: relative; padding: 20px 20px 20px 24px; background: #fff; border: 1px solid var(--ap-line);
  border-radius: 12px; font-weight: 600; font-size: .98rem; transition: transform .2s ease, box-shadow .2s ease; }
.ap-service::before { content: ''; position: absolute; inset-inline-start: 0; top: 14px; bottom: 14px; width: 3px;
  border-radius: 3px; background: var(--brand); opacity: .55; }
.ap-service:hover { transform: translateY(-3px); box-shadow: var(--ap-shadow); }

/* ── Courses (existing data/logic — only the shell is elevated here) ────────── */
.ap-courses .card { border-radius: 16px; box-shadow: 0 1px 2px rgba(20,33,61,.04); transition: box-shadow .2s ease, transform .2s ease; }
.ap-courses .card:hover { transform: translateY(-3px); box-shadow: var(--ap-shadow); }

/* ── Team ─────────────────────────────────────────────────────────────────── */
.ap-team { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.ap-team-card { text-align: center; text-decoration: none; color: inherit; display: block; }
.ap-team-photo, .ap-team-avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; margin: 0 auto 14px;
  border: 3px solid var(--ap-surface-2); }
.ap-team-avatar { display: flex; align-items: center; justify-content: center; background: var(--ap-surface-2);
  color: var(--brand); font-weight: 800; font-size: 1.6rem; }
.ap-team-card h3 { margin: 0 0 2px; font-size: 1rem; }
.ap-team-card .ap-role { color: var(--muted); font-size: .85rem; }

/* ── Offices ──────────────────────────────────────────────────────────────── */
.ap-offices { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.ap-office-type { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--brand); margin-bottom: 6px; }
.ap-office-line { color: var(--muted); font-size: .92rem; margin: 2px 0; }

/* ── Partners ─────────────────────────────────────────────────────────────── */
.ap-partners { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.ap-partner-logo { max-height: 40px; max-width: 100%; margin-bottom: 10px; }
.ap-partner-rel { display: inline-block; font-size: .72rem; color: var(--brand); font-weight: 700; margin-top: 6px; }

/* ── Contact ──────────────────────────────────────────────────────────────── */
.ap-contact-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 32px; align-items: start; }
@media (max-width: 760px) { .ap-contact-grid { grid-template-columns: 1fr; } }
.ap-contact-list { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 10px; }
.ap-contact-list li { display: flex; align-items: center; gap: 10px; font-size: .96rem; }
.ap-contact-list a { color: var(--fg); font-weight: 600; }
.ap-social { display: flex; gap: 10px; flex-wrap: wrap; }
.ap-social a { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px;
  border-radius: 50%; background: var(--ap-surface-2); color: var(--brand); font-size: .95rem; font-weight: 700; }
.ap-social a:hover { background: var(--brand); color: #fff; text-decoration: none; }
.ap-qr-card { text-align: center; background: #fff; border: 1px solid var(--ap-line); border-radius: 16px; padding: 24px; }
.ap-qr-card img { width: 168px; height: 168px; border-radius: 10px; margin-bottom: 12px; }
.ap-qr-card p { color: var(--muted); font-size: .88rem; margin: 0; }

.ap-empty-note { color: var(--muted); font-size: .92rem; }

@media (max-width: 640px) {
  .ap-hero-inner { padding: 56px 0 44px; }
  .ap-section { padding: 40px 0; }
  .ap-about-grid, .ap-contact-grid { gap: 20px; }
}
