/* =========================================================================
   J3 University — MODERN homepage — v3
   Black/red-border buttons, faithful mega-menus, clean 3-photo hero,
   original-style course boxes, uncropped program feature rows,
   testimonial carousel, full founder bios.
   ========================================================================= */

:root {
  --red: #d31e03;
  --red-bright: #e02817;
  --ink: #0f1115;
  --ink-2: #1c1f26;
  --body: #4a5260;
  --muted: #6b7280;
  --bg: #ffffff;
  --bg-soft: #ededed;
  --bg-tint: #fbf3f1;
  --dark: #1b1b1f;
  --dark-soft: #c9ccd2;
  --line: #e2e4e8;
  --line-2: #d4d8de;
  --pill: 999px;
  --maxw: 1180px;
  --shadow-sm: 0 4px 18px -8px rgba(15,17,21,.14);
  --shadow: 0 24px 60px -24px rgba(15,17,21,.22);
  --shadow-dark: 0 30px 70px -28px rgba(0,0,0,.55);
  --font-head: "Poppins", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font-body); color: var(--body);
  background: var(--bg); line-height: 1.65; font-size: 17px;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1,h2,h3,h4,h5 { font-family: var(--font-head); color: var(--ink); margin: 0; line-height: 1.12; font-weight: 600; letter-spacing: -0.02em; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 26px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-head); font-weight: 600; font-size: .78rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--red);
  background: var(--bg-tint); padding: 7px 14px; border-radius: var(--pill);
}
.eyebrow::before { content:""; width:7px; height:7px; border-radius:50%; background: var(--red); }

.section { padding: clamp(64px, 8vw, 120px) 0; }
.section.soft { background: var(--bg-soft); }
.section-head { max-width:720px; margin:0 auto clamp(40px,5vw,64px); text-align:center; }
.section-head .eyebrow { margin-bottom:18px; }
.section-head h2 { font-size: clamp(1.9rem, 1rem + 2.8vw, 2.9rem); }
.section-head h2 .accent { color: var(--red); }
.section-head p { color: var(--muted); font-size: 1.1rem; margin: 16px auto 0; max-width: 560px; }

.uline { width: 64px; height: 4px; border-radius: 4px; background: var(--red); margin: 14px 0 22px; }

/* ---------- Buttons ---------- */
.btn { display:inline-flex; align-items:center; justify-content:center; gap:10px;
  font-family: var(--font-head); font-weight: 600; font-size: 1rem; line-height: 1;
  border-radius: var(--pill); cursor:pointer; border: 1.7px solid transparent;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, border-color .25s; }
.btn-primary { background: #0c0c0e; color:#fff; border-color: var(--red); padding: 9px 10px 9px 26px; box-shadow: 0 10px 26px -14px rgba(0,0,0,.6); }
.btn-primary .arrow { display:inline-grid; place-items:center; width:34px; height:34px; border-radius:50%; background: var(--red); transition: transform .25s var(--ease); }
.btn-primary .arrow svg { width:16px; height:16px; color:#fff; }
.btn-primary:hover { transform: translateY(-3px); background:#000; box-shadow: 0 18px 36px -14px rgba(211,30,3,.5); }
.btn-primary:hover .arrow { transform: translateX(4px); }
.btn-primary.no-arrow { padding: 15px 30px; }
.btn-ghost { background:#fff; color: var(--ink); border-color: var(--ink); padding: 14px 28px; }
.btn-ghost:hover { transform: translateY(-3px); border-color: #cfd4dc; background:#fafbfc; box-shadow: var(--shadow-sm); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index:100; transition: background .3s, box-shadow .3s; }
.site-header.scrolled { background: rgba(255,255,255,.92); backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
.header-inner { display:flex; align-items:center; justify-content:space-between; gap:24px; height: 84px; }
.brand img { height: 46px; }
.main-nav { position: static; display:flex; gap: 4px; margin-left:auto; }
.nav-item { position: static; }
.nav-link { font-family: var(--font-head); font-weight: 500; font-size: .96rem; color: var(--ink); padding: 10px 15px; border-radius: var(--pill); display:inline-flex; gap:7px; align-items:center; cursor:pointer; transition: background .2s, color .2s; }
.nav-link .caret { width:10px; height:10px; opacity:.5; transition: transform .25s var(--ease); }
.nav-item:hover .nav-link, .nav-item.open .nav-link { background: var(--bg-soft); color: var(--red); }
.nav-item:hover .nav-link .caret, .nav-item.open .nav-link .caret { transform: rotate(180deg); }
.header-cta { display:flex; align-items:center; gap:12px; }
.header-cta .portal { font-family: var(--font-head); font-weight: 500; font-size:.95rem; color: var(--ink); }
.hamburger { display:none; background:none; border:0; cursor:pointer; padding:8px; }
.hamburger span { display:block; width:24px; height:2px; background: var(--ink); margin:5px 0; }

/* ---------- Mega menu ---------- */
.mega-wrap { position:absolute; top:100%; left:50%; transform: translateX(-50%) translateY(10px);
  z-index:120; opacity:0; visibility:hidden; pointer-events:none;
  transition: opacity .22s var(--ease), transform .22s var(--ease), visibility .22s; }
/* invisible bridge spanning the gap between the nav bar and the panel so the
   pointer never crosses dead space (belt-and-suspenders with the JS hover-intent) */
.mega-wrap::before { content:""; position:absolute; top:-24px; left:-48px; right:-48px; height:26px; }
.nav-item:hover .mega-wrap, .nav-item.open .mega-wrap { opacity:1; visibility:visible; pointer-events:auto; transform: translateX(-50%) translateY(0); }
.mega { background:#fff; border:1px solid var(--line); border-radius:20px;
  box-shadow: 0 34px 80px -28px rgba(15,17,21,.34); padding: 28px 30px; display:flex; gap:32px;
  max-width: min(94vw, 1000px); }
.mega-intro { flex:0 0 184px; }
.mega-intro h4 { color: var(--red); font-size:1.15rem; text-transform:capitalize; }
.mega-intro p { color: var(--muted); font-size:.9rem; margin-top:10px; line-height:1.55; }
.mega-items { flex:1; display:grid; grid-template-columns: repeat(var(--n,3), minmax(0,1fr)); gap: 24px; }
.mega-col { display:flex; flex-direction:column; min-width:0; }
.mega-col h5 { font-size:.98rem; color:var(--ink); }
.mega-col .uline { width:40px; height:3px; margin:9px 0 10px; }
.mega-col .mc-sub { font-family:var(--font-head); font-weight:600; font-size:.8rem; color:var(--red); margin-bottom:6px; }
.mega-col p { color: var(--muted); font-size:.84rem; margin:0 0 14px; line-height:1.5; }
.mega-col img { width:100%; height:auto; border-radius:11px; margin-top:auto; }
/* feature layout (community / shop): image + link list */
.mega.feature .mega-items { grid-template-columns: .9fr 1.3fr; align-items:start; }
.mega.feature .feat-img { width:100%; height:auto; border-radius:13px; }
.mega.feature .links { display:flex; flex-direction:column; gap:18px; justify-content:center; }
.mega.feature .links .li h5 { margin-bottom:5px; }
.mega.feature .links .li p { margin:0; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(40px,5vw,80px) 0 clamp(60px,7vw,110px); overflow: hidden; }
.hero::before { content:""; position:absolute; top:-30%; right:-15%; width: 760px; height: 760px;
  background: radial-gradient(circle, rgba(211,30,3,.12), transparent 62%); z-index:-1; }
.hero-grid { display:grid; grid-template-columns: 1.05fr .95fr; gap: 60px; align-items: center; }
.hero h1 { font-size: clamp(2.4rem, 1rem + 4.6vw, 3.8rem); margin: 22px 0 22px; letter-spacing: -0.03em; }
.hero h1 .accent { color: var(--red); }
.hero .sub { font-size: clamp(1.1rem,1rem+.5vw,1.3rem); max-width: 500px; margin-bottom: 34px; }
.hero-actions { display:flex; gap:14px; flex-wrap:wrap; margin-bottom: 34px; }
.hero-proof { display:flex; align-items:center; gap: 14px; }
.hero-proof .avatars { display:flex; }
.hero-proof .avatars img { width:38px; height:38px; border-radius:50%; border:2px solid #fff; object-fit:cover; margin-left:-12px; }
.hero-proof .avatars img:first-child { margin-left:0; }
.hero-proof span { font-size:.92rem; color: var(--muted); }
.hero-proof b { color: var(--ink); }
.hero-media { position: relative; }
.hero-collage { display:grid; grid-template-columns: 1.12fr 1fr; grid-template-rows: 1fr 1fr; gap: 12px; }
.hero-collage img { width:100%; height:100%; object-fit:cover; border-radius:16px; box-shadow: var(--shadow); }
.hero-collage .big { grid-row: 1 / span 2; }

/* ---------- Trust strip ---------- */
.trust { border-top:1px solid var(--line); border-bottom:1px solid var(--line); padding: 30px 0; }
.trust .row { display:flex; align-items:center; justify-content:center; gap: clamp(28px,6vw,72px); flex-wrap:wrap; }
.trust .lab { font-family: var(--font-head); font-size:.8rem; letter-spacing:.12em; text-transform:uppercase; color: var(--muted); }
.trust img { height: clamp(40px,5vw,56px); filter: grayscale(1); opacity:.6; transition: .3s; }
.trust img:hover { filter: none; opacity: 1; }

/* ---------- Pathway cards ---------- */
.cards3 { display:grid; grid-template-columns: repeat(3,1fr); gap: 28px; }
.mcard { background:#fff; border:1px solid var(--line); border-radius: 22px; overflow:hidden; transition: transform .35s var(--ease), box-shadow .35s var(--ease); display:flex; flex-direction:column; }
.mcard:hover { transform: translateY(-8px); box-shadow: var(--shadow); }
.mcard .ph { aspect-ratio: 4/3; overflow:hidden; }
.mcard .ph img { width:100%; height:100%; object-fit:cover; transition: transform .6s var(--ease); }
.mcard:hover .ph img { transform: scale(1.07); }
.mcard .bd { padding: 26px; display:flex; flex-direction:column; flex:1; }
.mcard h3 { font-size: 1.35rem; margin-bottom: 8px; }
.mcard .uline { margin: 10px 0 14px; }
.mcard p { color: var(--muted); font-size:.98rem; margin: 0 0 20px; }
.mcard .btn { align-self:flex-start; margin-top:auto; }

/* ---------- Courses ---------- */
.course-box { display:grid; grid-template-columns: 1fr 1fr; gap: clamp(26px,3.5vw,56px);
  align-items:center; border-radius: 30px; overflow:hidden; padding: clamp(26px,3.2vw,52px); margin-bottom: 34px; }
.course-box:last-child { margin-bottom:0; }
.course-box.dark { background: var(--dark); box-shadow: var(--shadow-dark); }
.course-box.light { background: #ffffff; box-shadow: var(--shadow); border:1px solid var(--line); }
.course-box.flip .cb-media { order: 2; }
.cb-media img { width:100%; height:100%; max-height:430px; object-fit:cover; border-radius: 18px; }
.cb-copy h3 { font-size: clamp(1.5rem,1rem+1.5vw,2rem); }
.course-box.dark .cb-copy h3 { color:#fff; }
.cb-lead { margin: 0 0 24px; font-size: 1.02rem; }
.course-box.dark .cb-lead { color: var(--dark-soft); }
.course-box.light .cb-lead { color: var(--body); }
.cb-list { list-style:none; padding:0; margin:0 0 30px; display:grid; gap:18px; }
.cb-list li { display:flex; gap:14px; align-items:flex-start; font-family: var(--font-head); font-weight:500; font-size: 1.02rem; }
.course-box.dark .cb-list li { color:#f2f3f5; }
.course-box.light .cb-list li { color: var(--ink-2); }
.cb-list li .ck { flex-shrink:0; width:24px; height:24px; margin-top:1px; }

/* ---------- Programs (uncropped feature rows) ---------- */
.programs-wrap { display:grid; gap: clamp(28px,4vw,40px); }
.prog-row { display:grid; grid-template-columns: .82fr 1.18fr; gap: clamp(28px,4vw,52px); align-items:center;
  background:#fff; border:1px solid var(--line); border-radius:24px; padding: clamp(22px,3vw,40px); box-shadow: var(--shadow-sm); }
.prog-row.flip { grid-template-columns: 1.18fr .82fr; }
.prog-row.flip .prog-media { order:2; }
.prog-media img { width:100%; height:auto; border-radius:16px; display:block; }
.prog-copy h3 { font-size: clamp(1.5rem,1rem+1.6vw,2.1rem); }
.prog-copy .uline { margin: 12px 0 18px; }
.prog-copy p { color: var(--body); font-size: 1.06rem; margin: 0 0 28px; max-width: 520px; }

/* ---------- Testimonials carousel ---------- */
.tcarousel { position: relative; }
.tc-viewport { overflow: hidden; }
.tc-track { display:flex; gap: 24px; transition: transform .6s var(--ease); will-change: transform; }
.tc-slide { flex: 0 0 calc((100% - 48px) / 3); }
.tcard { height:100%; background:#fff; border:1px solid var(--line); border-radius:20px; padding:28px; box-shadow: var(--shadow-sm); }
.tcard .stars { color:#ffb400; letter-spacing:2px; margin-bottom:14px; }
.tcard p { color: var(--ink-2); margin:0 0 20px; font-size:1.03rem; }
.tperson { display:flex; align-items:center; gap:13px; }
.tperson img { width:48px; height:48px; border-radius:50%; object-fit:cover; }
.tperson .nm { font-family:var(--font-head); font-weight:600; color: var(--ink); font-size:.98rem; }
.tperson .cr { font-size:.83rem; color: var(--muted); }
.tc-controls { display:flex; align-items:center; justify-content:center; gap:20px; margin-top:36px; }
.tc-nav { width:48px; height:48px; border-radius:50%; border:1.7px solid var(--ink); background:#fff; color:var(--ink); cursor:pointer; font-size:20px; display:grid; place-items:center; transition: transform .2s, background .2s, color .2s, border-color .2s; }
.tc-nav:hover { background: var(--ink); color:#fff; transform: translateY(-2px); }
.tc-dots { display:flex; gap:8px; }
.tc-dots button { width:9px; height:9px; border-radius:50%; border:0; background:#cdd2da; cursor:pointer; padding:0; transition: width .3s, background .3s; }
.tc-dots button.on { width:26px; border-radius:999px; background: var(--red); }

/* ---------- Educators ---------- */
.edu { display:grid; grid-template-columns: .82fr 1.18fr; gap: clamp(32px,4vw,56px); align-items:start; background:#fff; border:1px solid var(--line); border-radius:26px; padding: clamp(24px,3vw,44px); margin-bottom:28px; transition: box-shadow .3s; }
.edu:hover { box-shadow: var(--shadow); }
.edu.flip .edu-img { order:2; }
.edu-img { position: sticky; top: 100px; }
.edu-img img { width:100%; border-radius:18px; }
.edu-copy h3 { font-size: clamp(1.7rem,1rem+1.6vw,2.2rem); }
.edu-role { font-family:var(--font-head); font-weight:600; color:var(--red); margin: 6px 0 18px; }
.edu-lead { color: var(--body); font-size:1.03rem; margin: 0 0 22px; }
.edu-sub { font-family: var(--font-head); font-weight:700; font-size:.78rem; letter-spacing:.12em; text-transform:uppercase; color: var(--ink); margin: 22px 0 14px; padding-bottom:10px; border-bottom:1px solid var(--line); }
.edu-milestones { list-style:none; padding:0; margin:0 0 4px; display:grid; gap:12px; }
.edu-milestones li { display:flex; gap:12px; align-items:flex-start; color: var(--ink-2); font-size:1rem; }
.edu-milestones li .ck { flex-shrink:0; width:22px; height:22px; margin-top:1px; }
.edu-grid { display:grid; grid-template-columns: 1fr 1fr; gap:20px; }
.edu-item h4 { font-size:.98rem; margin-bottom:5px; color: var(--ink); }
.edu-item p { margin:0; font-size:.94rem; color: var(--muted); }

/* ---------- CTA ---------- */
.cta-inner { position: relative; background: linear-gradient(125deg, #15171c 0%, #2a0c07 55%, #d31e03 150%); border-radius: 32px; padding: clamp(36px,5vw,72px); overflow:hidden; display:grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items:center; }
.cta-inner::before { content:""; position:absolute; right:-10%; top:-40%; width:520px; height:520px; background: radial-gradient(circle, rgba(255,255,255,.08), transparent 60%); }
.cta-copy .eyebrow { background: rgba(255,255,255,.1); color:#ff9c8c; }
.cta-copy .eyebrow::before { background:#ff9c8c; }
.cta-copy h2 { color:#fff; font-size: clamp(1.8rem,1rem+2.4vw,2.7rem); margin:18px 0; }
.cta-copy p { color: rgba(255,255,255,.8); font-size:1.1rem; margin-bottom:30px; max-width:440px; }
.cta-media img { width:100%; max-width:380px; margin-left:auto; filter: drop-shadow(0 30px 50px rgba(0,0,0,.5)); position: relative; z-index:1; }

/* ---------- Footer ---------- */
.ft { background:#0c0d10; color:#9aa1ab; padding: 64px 0 34px; }
.ft-top { display:flex; justify-content:space-between; gap:30px; flex-wrap:wrap; padding-bottom:30px; border-bottom:1px solid rgba(255,255,255,.08); align-items:center; }
.ft-top img { height: 60px; }
.ft-links { display:flex; gap:26px; flex-wrap:wrap; }
.ft-links a { font-family:var(--font-head); font-size:.92rem; color:#c8cdd4; transition:.2s; }
.ft-links a:hover { color:#fff; }
.ft-bot { display:flex; justify-content:space-between; gap:16px; flex-wrap:wrap; padding-top:24px; font-size:.86rem; }

/* ---------- Motion ---------- */
.reveal { opacity:0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity:1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity:1; transform:none; transition:none; } .tc-track{ transition:none; } }

/* ---------- Responsive ---------- */
@media (max-width: 1040px) {
  .main-nav, .header-cta .portal { display:none; }
  .hamburger { display:block; }
}
@media (max-width: 980px) {
  .hero-grid { grid-template-columns:1fr; gap:40px; }
  .hero-media { max-width:520px; margin:0 auto; }
  .cards3 { grid-template-columns:1fr; max-width:460px; margin:0 auto; }
  .course-box, .course-box.flip { grid-template-columns:1fr; }
  .course-box .cb-media, .course-box.flip .cb-media { order:-1; }
  .cb-media img { max-height:340px; }
  .prog-row, .prog-row.flip { grid-template-columns:1fr; gap:22px; text-align:center; }
  .prog-row.flip .prog-media { order:-1; }
  .prog-media { max-width:440px; margin:0 auto; }
  .prog-copy { text-align:center; }
  .prog-copy .uline { margin-left:auto; margin-right:auto; }
  .prog-copy p { margin-left:auto; margin-right:auto; }
  .tc-slide { flex-basis: calc((100% - 24px) / 2); }
  .edu, .edu.flip { grid-template-columns:1fr; }
  .edu.flip .edu-img { order:-1; }
  .edu-img { position: static; max-width:420px; margin:0 auto; }
  .cta-inner { grid-template-columns:1fr; text-align:center; }
  .cta-copy p { margin-inline:auto; }
  .cta-media img { margin:0 auto; }
}
@media (max-width: 600px) {
  .tc-slide { flex-basis: 100%; }
  .edu-grid { grid-template-columns:1fr; }
  .hero-actions { flex-direction:column; } .hero-actions .btn { width:100%; }
  .ft-top { flex-direction:column; align-items:flex-start; }
}
@media (max-width: 430px) {
  .header-cta .btn { font-size: .78rem; padding: 10px 14px; }
}

/* ---------- Mobile menu ---------- */
.mobile-menu { display:none; }
.mobile-menu.open { display:block; position:fixed; inset:84px 0 0; background:#fff; z-index:99; padding:20px 24px 40px; overflow-y:auto; }
.mm-group { border-bottom:1px solid var(--line); padding: 10px 0; }
.mm-group > .mm-head { font-family:var(--font-head); font-weight:600; color:var(--ink); font-size:1.02rem; padding:8px 4px; }
.mm-group a { display:block; font-family:var(--font-body); color:var(--body); padding:8px 4px 8px 16px; font-size:.96rem; }
.mobile-menu .btn { width:100%; margin-top:20px; }
.mobile-menu .portal-link { display:block; text-align:center; font-family:var(--font-head); font-weight:500; padding:14px; color:var(--ink); }

/* "Free" pill on the J3U Hub nav item (Community mega-menu) — shared across funnel/legal pages */
.li-free { display:inline-block; font-family: var(--font-head, "Poppins", system-ui, sans-serif); font-weight:700; font-size:.6rem; letter-spacing:.08em; text-transform:uppercase; color:#fff; background: var(--red, #d31e03); border-radius:999px; padding:3px 8px; vertical-align:middle; margin-left:6px; }
