/* ==========================================================================
   Homepage hero – "V2 Hero B Centred". Requires tokens.css (+ site-nav.css
   for .tp-btn / .tp-ico).
   ========================================================================== */

.tp-hero {
  position: relative;
  padding: clamp(40px, 2.5vw + 30px, 80px) var(--gutter) clamp(40px, 2.5vw + 24px, 64px);
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  text-align: center;
  -webkit-font-smoothing: antialiased;
}
/* Resets: one-class specificity; component rules come later and win ties */
.tp-hero *,
.tp-hero *::before,
.tp-hero *::after { box-sizing: border-box; }
.tp-hero :where(p, h1, ul) { margin: 0; padding: 0; }
.tp-hero :where(ul) { list-style: none; }
.tp-hero :where(a) { text-decoration: none; }

/* Eyebrow with a gold rule on each side */
.tp-hero__eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-size: var(--text-eyebrow);
  line-height: var(--leading-eyebrow);
  letter-spacing: var(--tracking-eyebrow);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  color: var(--color-accent-text);
}
.tp-hero__eyebrow::before,
.tp-hero__eyebrow::after {
  content: "";
  width: 40px;
  height: 1.5px;
  flex-shrink: 0;
  background: var(--color-accent);
}

.tp-hero__title {
  max-width: 1080px;
  margin: var(--space-3) auto 0;
  font-family: var(--font-sans);
  font-size: var(--text-display);
  line-height: var(--leading-display);
  letter-spacing: var(--tracking-display);
  font-weight: var(--weight-bold);
  color: var(--color-heading);
}
.tp-hero__title em { font-style: normal; color: var(--color-accent); }

.tp-hero__lead {
  max-width: 640px;
  margin: var(--space-3) auto 0;
  font-size: var(--text-lead);
  line-height: var(--leading-lead);
  color: var(--color-text-secondary);
  text-wrap: pretty;
}
.tp-hero__lead strong { font-weight: var(--weight-semibold); color: var(--color-heading); }

/* Buttons */
.tp-hero__ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-5);
}
.tp-btn--lg { height: 52px; padding: 0 var(--space-3); font-size: var(--text-body); }
.tp-btn--lg .tp-ico { width: 18px; height: 18px; }
/* Hero buttons: more compact than the generic large button */
.tp-hero__ctas .tp-btn--lg { height: 46px; padding: 0 20px; font-size: var(--text-body); }
.tp-hero__ctas .tp-btn--lg .tp-ico { width: 16px; height: 16px; }
.tp-btn--glow { box-shadow: var(--shadow-gold); }
.tp-btn--outline { border-color: var(--color-border-strong); background: transparent; color: var(--color-heading); }
.tp-btn--outline:hover { border-color: var(--color-heading); background: var(--color-surface-hover); }

/* Popular programs */
.tp-hero__popular { max-width: 1040px; margin: var(--space-8) auto 0; }
.tp-hero__popular-label { font-size: var(--text-caption); font-weight: var(--weight-semibold); color: var(--color-text-secondary); }
.tp-hero__popular-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: var(--space-1-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg-alt);
  overflow: hidden;
}
.tp-hero__popular-list li + li { border-left: 1px solid var(--color-border); }
.tp-hero__prog {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-1-5);
  height: 100%;
  padding: 20px var(--space-3);
  text-align: left;
  transition: background-color var(--duration-fast);
}
.tp-hero__prog:hover { background: var(--color-surface-hover); }
.tp-hero__prog-body { display: grid; gap: 4px; }
.tp-hero__prog-name { font-size: var(--text-body); font-weight: var(--weight-bold); line-height: 1.3; color: var(--color-heading); }
.tp-hero__prog-tag { font-size: var(--text-caption); line-height: var(--leading-caption); color: var(--color-text-secondary); }
.tp-hero__prog-tag--urgent { color: var(--color-urgency); }
.tp-hero__prog .tp-ico--arrow { color: var(--color-accent); }
.tp-hero__prog:hover .tp-ico--arrow { transform: translateX(3px); }

/* Mobile */
/* Tablet: 2 × 2 */
@media (min-width: 768px) and (max-width: 1023px) {
  .tp-hero__popular-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tp-hero__popular-list li:nth-child(odd) { border-left: 0; }
  .tp-hero__popular-list li:nth-child(n+3) { border-top: 1px solid var(--color-border); }
}

@media (max-width: 767px) {
  .tp-hero__eyebrow { flex-direction: column; gap: var(--space-2); max-width: 300px; margin: 0 auto; }
  .tp-hero__eyebrow::after { display: none; }
  .tp-hero__eyebrow::before { width: 32px; }
  .tp-hero__title { margin-top: var(--space-2); }
  .tp-hero__lead { margin-top: var(--space-2); }
  .tp-hero__ctas { flex-direction: column; margin-top: var(--space-4); }
  .tp-btn--lg { width: 100%; height: 48px; }
  .tp-hero__ctas .tp-btn--lg { height: 48px; }
  .tp-hero__popular { margin-top: var(--space-5); }
  .tp-hero__popular-list { grid-template-columns: 1fr; }
  .tp-hero__popular-list li + li { border-left: 0; border-top: 1px solid var(--color-border); }
  .tp-hero__prog { padding: var(--space-2); }
}

/* ==========================================================================
   Logo strip – "Our learners work at". Dark strip, brand-colour logos on
   white tiles (same treatment as the corporate page ticker)
   ========================================================================== */
.tp-logos {
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  font-family: var(--font-sans);
}
.tp-logos :where(p, ul) { margin: 0; padding: 0; }
.tp-logos :where(ul) { list-style: none; }

.tp-logos__inner {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin: 0 auto;
  padding: var(--space-4) var(--gutter);
}
.tp-logos__label {
  flex-shrink: 0;
  font-size: var(--text-eyebrow);
  line-height: var(--leading-eyebrow);
  letter-spacing: var(--tracking-eyebrow);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--color-text-secondary);
}

.tp-logos__viewport {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  padding: 12px 0; /* room for the hover lift + glow */
  -webkit-mask-image: linear-gradient(to right, transparent, #000 64px, #000 calc(100% - 64px), transparent);
  mask-image: linear-gradient(to right, transparent, #000 64px, #000 calc(100% - 64px), transparent);
}
.tp-logos__track {
  --tp-logo-gap: 16px;
  display: flex;
  align-items: center;
  gap: var(--tp-logo-gap);
  width: max-content;
  padding-right: var(--tp-logo-gap); /* makes the two sets exactly 50% each */
  animation: tp-logos-scroll 45s linear infinite;
}
.tp-logos__viewport:hover .tp-logos__track { animation-play-state: paused; }
.tp-logos__item {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 148px;
  height: 56px;
  padding: 0 var(--space-2);
  border-radius: var(--radius-md);
  background: var(--white);
  transition: box-shadow var(--duration-fast), transform var(--duration-fast);
}
.tp-logos__item:hover { box-shadow: var(--shadow-gold); transform: translateY(-2px); }
.tp-logos__item img {
  display: block;
  width: auto;
  max-height: 28px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

@keyframes tp-logos-scroll {
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .tp-logos__track { animation: none; }
  .tp-logos__viewport { overflow-x: auto; }
}

@media (max-width: 767px) {
  .tp-logos__inner { flex-direction: column; align-items: stretch; gap: var(--space-2); padding: var(--space-4) 0; }
  .tp-logos__label { padding: 0 var(--gutter); }
  .tp-logos__viewport { -webkit-mask-image: none; mask-image: none; }
  .tp-logos__track { --tp-logo-gap: 12px; }
  .tp-logos__item { width: 124px; height: 48px; padding: 0 var(--space-1-5); }
  .tp-logos__item img { max-height: 24px; }
}

/* ==========================================================================
   Motion (hero + logo strip). Transform/opacity only; all switched off
   under prefers-reduced-motion at the end of this section.
   The h1 is never hidden or delayed: it is the LCP element.
   ========================================================================== */
@keyframes tp-rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes tp-rule-grow { from { transform: scaleX(0); } }
@keyframes tp-shine { from { background-position: 100% 0; } to { background-position: 0 0; } }
@keyframes tp-glow-drift {
  0%   { transform: translate(-18%, -4%) scale(1); }
  50%  { transform: translate(10%, 8%) scale(1.15); }
  100% { transform: translate(18%, -6%) scale(.95); }
}
@keyframes tp-glow-pulse { 50% { box-shadow: 0 6px 34px rgba(243,189,0,.55); } }
@keyframes tp-nudge { 50% { transform: translateX(4px); } }
@keyframes tp-ping {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-urgency-fill) 70%, transparent); }
  100% { box-shadow: 0 0 0 7px transparent; }
}

/* 1. Content rises in on load (eyebrow → lead → buttons → programs) */
.tp-hero__eyebrow,
.tp-hero__lead,
.tp-hero__ctas,
.tp-hero__popular { animation: tp-rise 700ms var(--ease-out) both; }
.tp-hero__lead    { animation-delay: 120ms; }
.tp-hero__ctas    { animation-delay: 220ms; }
.tp-hero__popular { animation-delay: 340ms; }

/* 2. Gold rules grow outward from the eyebrow text */
.tp-hero__eyebrow::before,
.tp-hero__eyebrow::after { animation: tp-rule-grow 800ms var(--ease-out) 250ms both; }
.tp-hero__eyebrow::before { transform-origin: right; }
.tp-hero__eyebrow::after  { transform-origin: left; }

/* 3. One light sweep across the gold words */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .tp-hero__title em {
    background: linear-gradient(100deg, var(--color-accent) 0 40%, var(--gold-700) 50%, var(--color-accent) 60% 100%);
    background-size: 300% 100%;
    background-position: 0 0;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: tp-shine 1.6s ease-in-out 900ms both;
  }
}

/* 4. Slow gold glow drifting behind the hero */
.tp-hero { isolation: isolate; overflow: clip; }
.tp-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -20%;
  left: 50%;
  width: min(900px, 130vw);
  aspect-ratio: 1;
  translate: -50% 0;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(243,189,0,.13), rgba(243,189,0,.04) 55%, transparent 75%);
  pointer-events: none;
  will-change: transform;
  animation: tp-glow-drift 18s ease-in-out infinite alternate;
}

/* 5. Buttons: breathing glow, arrow nudges on hover */
.tp-hero .tp-btn--glow { animation: tp-glow-pulse 2.8s ease-in-out infinite; }
.tp-hero__ctas .tp-btn:hover .tp-ico--arrow { animation: tp-nudge 900ms ease-in-out infinite; }

/* 6. Program cards: content lifts, gold bar sweeps in; pulsing urgency dot */
.tp-hero__prog { position: relative; }
.tp-hero__prog-body { transition: transform var(--duration-slow) var(--ease-out); }
.tp-hero__prog:hover .tp-hero__prog-body,
.tp-hero__prog:focus-visible .tp-hero__prog-body { transform: translateY(-2px); }
.tp-hero__prog::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration-slow) var(--ease-out);
}
.tp-hero__prog:hover::after,
.tp-hero__prog:focus-visible::after { transform: scaleX(1); }
.tp-hero__prog-tag--urgent { display: inline-flex; align-items: center; gap: 6px; }
.tp-hero__prog-tag--urgent::before {
  content: "";
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--color-urgency-fill);
  animation: tp-ping 1.8s ease-out infinite;
}

/* 7. Scroll reveal (class added by js/reveal.js; no JS = always visible) */
[data-tp-reveal] { transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); }
[data-tp-reveal].is-pending { opacity: 0; transform: translateY(20px); }

@media (prefers-reduced-motion: reduce) {
  .tp-hero__eyebrow, .tp-hero__lead, .tp-hero__ctas, .tp-hero__popular,
  .tp-hero__eyebrow::before, .tp-hero__eyebrow::after,
  .tp-hero__title em, .tp-hero::before, .tp-hero .tp-btn--glow,
  .tp-hero__ctas .tp-btn:hover .tp-ico--arrow,
  .tp-hero__prog-tag--urgent::before { animation: none; }
  .tp-hero__title em { color: var(--color-accent); background: none; }
  [data-tp-reveal] { transition: none; }
}

@media (max-width: 767px) {
  .tp-hero__eyebrow::before { transform-origin: center; }
}

/* Light mode: soft gold wash behind the hero, outlined logo tiles */
.tp-hero.surface-light { background: radial-gradient(120% 90% at 50% 0%, var(--gold-50), var(--color-bg) 60%); }
.tp-hero.surface-light::before { background: radial-gradient(closest-side, rgba(243,189,0,.18), rgba(243,189,0,.05) 55%, transparent 75%); }
.tp-hero.surface-light .tp-hero__popular-list { background: var(--color-surface); box-shadow: 0 12px 32px -20px rgba(13,15,20,.18); }
.tp-logos.surface-light { background: var(--color-bg-alt); }
.tp-logos.surface-light .tp-logos__item { border: 1px solid var(--color-border); }
