/* ============================================================
   Leader Academy — Shared Design System
   Extends the approved homepage mockup across all pages.
   ============================================================ */

/* ---- Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* ---- Tokens ---- */
:root {
  /* Brand navy */
  --header-navy: #0a2c54;
  --band-navy: #0e3a6b;
  --navy-grad-1: #0c3360;
  --navy-grad-2: #07223f;

  /* Accent blue (headings / links / icons) */
  --blue: #1d72be;
  --blue-dark: #155a96;
  --blue-soft: #e8f1fb;

  /* Yellow CTA */
  --yellow: #f6c11d;
  --yellow-dark: #e3ac00;

  /* Neutrals */
  --grey-bg: #eef2f7;
  --grey-bg-2: #f5f8fb;
  --ink: #0f2742;
  --text: #515c69;
  --text-soft: #7b8694;
  --line: #e3e9f0;
  --white: #ffffff;

  /* Effects */
  --radius: 16px;
  --radius-sm: 12px;
  --radius-lg: 22px;
  --shadow-sm: 0 6px 18px rgba(13, 40, 72, .06);
  --shadow: 0 14px 38px rgba(13, 40, 72, .10);
  --shadow-lg: 0 26px 60px rgba(13, 40, 72, .16);

  /* Layout */
  --maxw: 1200px;
  --gutter: clamp(20px, 5vw, 48px);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--white);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5 {
  font-family: 'Poppins', sans-serif;
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 .5em;
  font-weight: 700;
  letter-spacing: -.01em;
  text-wrap: balance;
}

p { margin: 0 0 1em; text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* ---- Generic section rhythm ---- */
.section { padding-block: clamp(56px, 8vw, 110px); }
.section--grey { background: var(--grey-bg); }
.section--grey2 { background: var(--grey-bg-2); }
.section--navy {
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(46, 110, 180, .35), transparent 60%),
    linear-gradient(160deg, var(--navy-grad-1), var(--navy-grad-2));
  color: #d7e2f0;
}
.section--navy h1, .section--navy h2, .section--navy h3 { color: #fff; }

.eyebrow {
  color: var(--blue);
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin: 0 0 .8rem;
}
.section--navy .eyebrow { color: var(--yellow); }

.h-blue { color: var(--blue); }
.h-yellow { color: var(--yellow); }

.lead { font-size: 1.06rem; color: var(--text); }
.section--navy .lead { color: #c2d2e6; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .7em;
  font-family: inherit;
  font-weight: 600;
  font-size: .95rem;
  border: none;
  border-radius: 999px;
  padding: .85em 1.5em;
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .2s ease, color .2s ease;
  line-height: 1;
  white-space: nowrap;
}
.btn .arrow {
  display: inline-flex;
  width: 1.55em; height: 1.55em;
  align-items: center; justify-content: center;
  border-radius: 50%;
  transition: transform .3s var(--ease);
}
/* iOS Safari refuses to compute SVG dimensions when the SVG is
   injected into an element inside an opacity:0 ancestor (.reveal,
   inactive carousel slide, etc.) — the SVG renders 0×0 and stays
   that way even after the ancestor becomes visible. Forcing an
   explicit size on every arrow's child SVG side-steps the bug
   and is harmless on other browsers. */
.btn .arrow > svg { width: 100%; height: 100%; display: block; }
.btn:hover .arrow { transform: translateX(3px); }

.btn--yellow { background: var(--yellow); color: var(--ink); }
.btn--yellow .arrow { background: rgba(15,39,66,.12); }
.btn--yellow:hover { background: var(--yellow-dark); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(227, 172, 0, .4); }

.btn--blue { background: var(--blue); color: #fff; }
.btn--blue .arrow { background: rgba(255,255,255,.2); }
.btn--blue:hover { background: var(--blue-dark); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(29,114,190,.35); }

.btn--ghost { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.4); }
.btn--ghost:hover { background: rgba(255,255,255,.1); border-color: #fff; }

.btn--outline { background: #fff; color: var(--blue); border: 1.5px solid var(--line); }
.btn--outline:hover { border-color: var(--blue); transform: translateY(-2px); box-shadow: var(--shadow-sm); }

/* ============================================================
   Inline-icon utility
   ------------------------------------------------------------
   For use with `<span class="la-icon" data-icon="foo"></span>`
   inside meta lines, breadcrumbs, list rows, etc. Sized to the
   surrounding text (1em square) and inherits currentColor via
   the SVGs in icons.js. Variants .la-icon--lg / --xl bump up
   when the icon needs to read as a button affordance.
   ============================================================ */
.la-icon { display: inline-flex; width: 1em; height: 1em; vertical-align: -.125em; line-height: 0; }
.la-icon svg { width: 100%; height: 100%; display: block; }
.la-icon--md { width: 1.15em; height: 1.15em; }
.la-icon--lg { width: 1.35em; height: 1.35em; }
.la-icon--xl { width: 1.65em; height: 1.65em; }

/* Belt-and-braces against the iOS Safari opacity:0-ancestor SVG
   sizing bug — every element that icons.js fills via data-icon (the
   social row, feature glyphs, audience cards, .ic chips, etc.) gets
   an SVG sized to its container regardless of visibility. Without
   this, any data-icon span sitting inside .reveal (opacity:0 before
   scroll triggers .in) would inject an SVG that iOS Safari never
   measures, leaving it 0×0 once the ancestor becomes visible. */
[data-icon] > svg { width: 100%; height: 100%; display: block; }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-navy);
  transition: box-shadow .3s ease;
}
.site-header.scrolled { box-shadow: 0 6px 26px rgba(0,0,0,.28); }
.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 72px;
}
.brand { display: flex; align-items: center; gap: .6rem; flex-shrink: 0; }
.brand svg { width: 34px; height: auto; }
.brand .wordmark { display: flex; flex-direction: column; line-height: .92; }
.brand .wm-1 { font-weight: 800; font-size: 1.18rem; letter-spacing: .02em; color: #fff; }
.brand .wm-2 { font-weight: 300; font-size: 1.02rem; letter-spacing: .26em; color: #cdd9e8; }

/* Brand-logo image variant — overrides the inline-SVG sizing above
   so the full wordmarked logo gets enough horizontal room. */
.brand--logo { gap: 0; }
.brand-logo { display: block; height: 56px; width: auto; max-width: 280px; }
.brand-logo--light { /* used on navy header */ }
.brand-logo--dark  { height: 46px; max-width: 220px; /* footer scale */ }
@media (max-width: 720px) {
  .brand-logo       { height: 44px; max-width: 210px; }
  .brand-logo--dark { height: 40px; max-width: 190px; }
}

.main-nav { margin-left: auto; }
.main-nav ul { display: flex; align-items: center; gap: clamp(.5rem, 1.6vw, 1.6rem); list-style: none; margin: 0; padding: 0; }
.main-nav a {
  color: #d4deeb;
  font-size: .9rem;
  font-weight: 500;
  padding: .4rem 0;
  position: relative;
  transition: color .2s ease;
  white-space: nowrap; /* multi-word labels stay on one line */
}
.main-nav a::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -4px;
  height: 2px; background: var(--yellow);
  transform: scaleX(0); transform-origin: left;
  transition: transform .28s var(--ease);
}
.main-nav a:hover, .main-nav a.active { color: #fff; }
.main-nav a:hover::after, .main-nav a.active::after { transform: scaleX(1); }

.header-tools { display: flex; align-items: center; gap: .9rem; }
.icon-btn {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: #cdd9e8; border: none; cursor: pointer;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.icon-btn:hover { background: var(--yellow); color: var(--ink); transform: translateY(-1px); }
.icon-btn svg { width: 18px; height: 18px; }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: #fff; border-radius: 2px; transition: .3s var(--ease); }
.nav-toggle span + span { margin-top: 5px; }
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   Page hero (inner pages)
   ============================================================ */
.page-hero {
  position: relative;
  background: linear-gradient(120deg, var(--navy-grad-2) 0%, var(--navy-grad-1) 55%, #123e72 100%);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image: var(--hero-img);
  background-size: cover; background-position: center;
  opacity: .34;
  mix-blend-mode: luminosity;
  z-index: -1;
}
.page-hero::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(7,34,63,.92) 0%, rgba(7,34,63,.55) 60%, rgba(18,62,114,.25) 100%);
  z-index: -1;
}
/* Uniform hero floor + explicit padding inside. With box-sizing
   border-box, min-height *includes* the padding, so:
     - short content (webinars, our team) gets pushed up to the floor
       → all those heroes render identical
     - dense content (course detail) still has padding above/below the
       title; only edge-case overflow grows the hero
   The section.* selector outranks per-page .page-hero overrides so
   we never have to special-case templates. */
section.page-hero,
section.detail-hero {
  min-height: clamp(440px, 38vw, 560px);
  padding: clamp(64px, 6vw, 96px) 0;
  display: flex;
  align-items: center;
  overflow: hidden;
}
section.page-hero .container,
section.detail-hero .container { padding-block: 0; position: relative; width: 100%; }

/* Mobile: shrink the floor + drop the vertical padding so long titles
   can flow without clipping when the viewport gets narrow. */
@media (max-width: 640px) {
  section.page-hero, section.detail-hero { min-height: 340px; padding: 40px 0; }
}
.page-hero .breadcrumb,
.detail-hero .breadcrumb { font-size: .85rem; color: #b9cbe2; margin-bottom: 1rem; display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.page-hero .breadcrumb a,
.detail-hero .breadcrumb a { color: var(--yellow); text-decoration: none; font-weight: 600; }
.page-hero .breadcrumb a:hover,
.detail-hero .breadcrumb a:hover { text-decoration: underline; }
.page-hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); color: #fff; max-width: 24ch; }
.page-hero p { color: #c6d6ea; max-width: 52ch; font-size: 1.08rem; }

/* ============================================================
   Cards (shared)
   ============================================================ */
.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(227,233,240,.8);
  overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card__media { aspect-ratio: 16 / 11; background: var(--grey-bg); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .card__media img { transform: scale(1.05); }
.card__body { padding: 1.4rem 1.5rem 1.6rem; }
.card__body h3 { color: var(--blue); font-size: 1.18rem; margin-bottom: .5rem; }
.card__body p { font-size: .92rem; color: var(--text); margin: 0; }

.grid { display: grid; gap: 1.6rem; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* feature icon row item */
.feature {
  display: flex; gap: 1rem; align-items: flex-start;
}
.feature__icon {
  flex-shrink: 0; width: 54px; height: 54px;
  display: grid; place-items: center;
  color: var(--blue);
}
.feature__icon svg { width: 40px; height: 40px; }
.feature h3 { color: var(--blue); font-size: 1.18rem; margin: .15rem 0 .15rem; }
.feature p { margin: 0; font-size: .92rem; }

/* pill list with circular icons (navy band) */
.icon-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.icon-list li { display: flex; align-items: center; gap: .9rem; font-weight: 500; color: #fff; font-size: 1.05rem; }
.icon-list .dot {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--blue); color: #fff;
  display: grid; place-items: center; flex-shrink: 0;
}
.icon-list .dot svg { width: 20px; height: 20px; }

/* badge / tag */
.tag {
  display: inline-flex; align-items: center; gap: .4em;
  font-size: .72rem; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase;
  padding: .4em .8em; border-radius: 999px;
  background: var(--blue-soft); color: var(--blue-dark);
}
.tag--yellow { background: #fdf3d4; color: #97700a; }
.tag--green { background: #e2f5ea; color: #1f7d4d; }

/* ============================================================
   Contact band (shared, from homepage)
   ============================================================ */
.contact-band { display: grid; grid-template-columns: 1fr 1fr; }
.contact-band__left {
  position: relative;
  color: #fff;
  padding: clamp(48px, 6vw, 84px) clamp(28px, 5vw, 72px);
  background: linear-gradient(150deg, #0c3360, #07223f);
  overflow: hidden;
  isolation: isolate;
}
.contact-band__left::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background-image: var(--contact-img); background-size: cover; background-position: center;
  opacity: .22; mix-blend-mode: luminosity;
}
.contact-band__left h2 { color: #fff; font-size: clamp(1.7rem, 3vw, 2.3rem); }
.contact-band__left p { color: #c2d2e6; max-width: 42ch; }
.contact-band__right {
  background: var(--grey-bg);
  padding: clamp(40px, 5vw, 72px) clamp(28px, 5vw, 64px);
}
.social-row { display: flex; gap: .7rem; margin-top: 2rem; }
.social-row a {
  width: 38px; height: 38px; border-radius: 8px;
  background: rgba(255,255,255,.12); color: #fff;
  display: grid; place-items: center;
  transition: background .2s ease, transform .2s ease;
}
.social-row a:hover { background: var(--yellow); color: var(--ink); transform: translateY(-2px); }
.social-row svg { width: 18px; height: 18px; }

/* ---- Forms ---- */
.form-grid { display: grid; gap: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { position: relative; display: flex; flex-direction: column; gap: .35rem; }
.field label { font-size: .82rem; font-weight: 600; color: var(--ink); }
.field .req { color: #d64545; }
.input, .select, .textarea {
  width: 100%;
  font-family: inherit; font-size: .95rem; color: var(--ink);
  background: #fff; border: 1.5px solid var(--line);
  border-radius: 10px; padding: .85em 1em;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.input::placeholder, .textarea::placeholder { color: #9aa6b3; }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(29,114,190,.12);
}
.textarea { min-height: 120px; resize: vertical; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%237b8694' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.6rem; }
.field.invalid .input, .field.invalid .select, .field.invalid .textarea { border-color: #d64545; box-shadow: 0 0 0 4px rgba(214,69,69,.1); }
.field .error-msg { font-size: .76rem; color: #d64545; display: none; }
.field.invalid .error-msg { display: block; }
.form-note { font-size: .8rem; color: var(--text-soft); }
.form-success {
  display: none; align-items: center; gap: .7rem;
  background: #e2f5ea; color: #1f7d4d; border-radius: 12px;
  padding: 1rem 1.2rem; font-weight: 500; font-size: .92rem;
}
.form-success.show { display: flex; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { background: #fff; border-top: 1px solid var(--line); padding-block: clamp(40px, 5vw, 64px); }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; align-items: start; }
.footer-brand svg { width: 38px; }
.footer-brand .wm-1 { color: var(--ink); font-weight: 800; font-size: 1.2rem; letter-spacing: .02em; }
.footer-brand .wm-2 { color: var(--text-soft); font-weight: 300; font-size: 1.04rem; letter-spacing: .26em; }
.footer-brand p { margin-top: 1rem; font-size: .88rem; color: var(--text-soft); max-width: 32ch; }
.footer-col h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink); margin-bottom: 1rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .65rem; }
.footer-col a { font-size: .9rem; color: var(--text); transition: color .2s ease, padding .2s ease; }
.footer-col a:hover { color: var(--blue); padding-left: 4px; }
.footer-bottom {
  margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  font-size: .82rem; color: var(--text-soft);
}
.footer-social { display: flex; gap: .6rem; }
.footer-social a { width: 34px; height: 34px; border-radius: 8px; background: var(--grey-bg); color: var(--text); display: grid; place-items: center; transition: .2s ease; }
.footer-social a:hover { background: var(--blue); color: #fff; transform: translateY(-2px); }
.footer-social svg { width: 16px; height: 16px; }

/* ============================================================
   Reveal-on-scroll
   ============================================================ */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1040px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .main-nav {
    position: fixed; inset: 72px 0 auto 0;
    background: var(--header-navy);
    margin: 0; padding: 1rem var(--gutter) 1.5rem;
    border-top: 1px solid rgba(255,255,255,.08);
    transform: translateY(-130%);
    transition: transform .4s var(--ease);
    box-shadow: 0 20px 40px rgba(0,0,0,.3);
  }
  .nav-open .main-nav { transform: none; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .main-nav li { border-bottom: 1px solid rgba(255,255,255,.07); }
  .main-nav a { display: block; padding: .9rem 0; font-size: 1rem; }
  .main-nav a::after { display: none; }
  .nav-toggle { display: block; }
  /* Mobile: logo on the left, support + menu icons on the right.
     margin-left:auto pushes the whole tools cluster to the right
     edge of the header. Dropped the previous order:-1 which moved
     it to the left of the logo. */
  .header-tools { margin-left: auto; gap: .6rem; }
  .contact-band { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 680px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-bottom { justify-content: flex-start; }
}
