/* Skilleze home — v4 polish layer: hero fx, stats, marquee, tilt/glow, bento, timeline, dividers,
   glass nav, mobile carousel + bottom sheet. Loaded last, index.html only. All motion respects prefers-reduced-motion. */

html.home-v2 {
  --v4-ease: cubic-bezier(.16, 1, .3, 1);
  --v4-a: 139, 92, 246;            /* rgb of the accent (dark) */
  --v4-b: 196, 181, 253;
  --v4-sec: clamp(56px, 7vw, 96px); /* one vertical rhythm for every section (8px grid) */
}
html.home-v2[data-theme="light"] { --v4-a: 109, 40, 217; --v4-b: 124, 58, 237; }

/* ===================== 0. display font (H1/H2) ===================== */
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(/assets/fonts/bricolage-grotesque-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
html.home-v2 :is(h1.hv-title, main h2, .hv4-stat b) { font-family: 'Bricolage Grotesque', 'Plus Jakarta Sans', sans-serif !important; }
html.home-v2 :is(h1.hv-title, main h2) { letter-spacing: -0.028em; }

/* ===================== 1. hero: living background ===================== */
.hv4-fx { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  }
.hv4-fx i { position: absolute; border-radius: 50%; will-change: transform; }
.hv4-fx i:nth-child(1) { width: 620px; height: 620px; left: 8%; top: -240px;
  background: radial-gradient(circle, rgba(var(--v4-a), .30) 0%, rgba(var(--v4-a), 0) 68%);
  translate: calc(var(--px, 0) * 36px) calc(var(--py, 0) * 24px); animation: v4-drift-a 22s ease-in-out infinite alternate; }
.hv4-fx i:nth-child(2) { width: 540px; height: 540px; right: 4%; top: -160px;
  background: radial-gradient(circle, rgba(var(--v4-b), .20) 0%, rgba(var(--v4-b), 0) 68%);
  translate: calc(var(--px, 0) * -26px) calc(var(--py, 0) * -18px); animation: v4-drift-b 27s ease-in-out infinite alternate; }
.hv4-fx i:nth-child(3) { width: 460px; height: 460px; left: 38%; top: 120px;
  background: radial-gradient(circle, rgba(var(--v4-a), .16) 0%, rgba(var(--v4-a), 0) 68%);
  animation: v4-drift-c 31s ease-in-out infinite alternate; }
html.home-v2[data-theme="light"] .hv4-fx i:nth-child(1) { background: radial-gradient(circle, rgba(var(--v4-a), .17) 0%, rgba(var(--v4-a), 0) 68%); }
html.home-v2[data-theme="light"] .hv4-fx i:nth-child(2) { background: radial-gradient(circle, rgba(var(--v4-b), .13) 0%, rgba(var(--v4-b), 0) 68%); }
@keyframes v4-drift-a { to { transform: translate3d(90px, 50px, 0) scale(1.12); } }
@keyframes v4-drift-b { to { transform: translate3d(-80px, 70px, 0) scale(1.08); } }
@keyframes v4-drift-c { to { transform: translate3d(-60px, -30px, 0) scale(1.15); } }
.hv-hero.is-offscreen :is(.hv4-fx i, .hv-accent, .hv4-rot-v) { animation-play-state: paused !important; }

/* highlighted words in the H1 */
html.home-v2 .hv-title .hv-accent {
  position: relative; color: transparent; -webkit-text-fill-color: transparent;
  background: linear-gradient(100deg, var(--hv-primary) 0%, #E9D5FF 38%, var(--hv-primary) 62%, #8B5CF6 100%) 0 0 / 220% 100%;
  -webkit-background-clip: text; background-clip: text; box-decoration-break: clone; -webkit-box-decoration-break: clone;
  animation: v4-shine 7s linear 2;
}
html.home-v2[data-theme="light"] .hv-title .hv-accent {
  background-image: linear-gradient(100deg, #5B21B6 0%, #A855F7 40%, #6D28D9 62%, #4C1D95 100%);
}
@keyframes v4-shine { to { background-position: -220% 0; } }
html.home-v2 .hv-title .hv-accent::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -.02em; height: .07em; border-radius: 99px;
  background: linear-gradient(90deg, var(--hv-primary), rgba(var(--v4-b), .35)); -webkit-text-fill-color: initial;
  transform: scaleX(0); transform-origin: left center; animation: v4-underline .9s .75s var(--v4-ease) forwards;
}
@keyframes v4-underline { to { transform: scaleX(1); } }

/* rotating "Now teaching" line */
.hv4-rot { display: inline-flex; align-items: center; gap: 10px; margin: 20px 0 30px; padding: 7px 16px; border-radius: 999px;
  border: 1px solid var(--hv-line); background: rgba(var(--v4-a), .06); font-size: 14.5px; color: var(--hv-text2); }
.hv4-rot-k { white-space: nowrap; }
.hv4-rot-v { display: inline-block; min-width: 9.5em; text-align: left; color: var(--hv-primary); font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.hv4-rot-v.is-typing::after { content: ""; display: inline-block; width: 2px; height: 1.05em; margin-left: 2px; vertical-align: -.17em; background: var(--hv-primary); animation: v4-caret 1s steps(1) infinite; }
@keyframes v4-caret { 50% { opacity: 0; } }

/* ===================== 3. technology marquee ===================== */
.hv4-marquee { width: 100%; margin: 0 auto 8px; overflow: hidden; padding: 6px 0; position: relative; }
.hv4-marquee::before, .hv4-marquee::after { content: ""; position: absolute; top: 0; bottom: 0; width: 9%; z-index: 1; pointer-events: none; }
.hv4-marquee::before { left: 0; background: linear-gradient(90deg, var(--hv-bg), rgba(var(--hv-bg-rgb), 0)); }
.hv4-marquee::after { right: 0; background: linear-gradient(270deg, var(--hv-bg), rgba(var(--hv-bg-rgb), 0)); }
.hv4-track { display: flex; width: max-content; animation: v4-marq 46s linear infinite; }
.hv4-marquee:hover .hv4-track, .hv4-marquee.is-paused .hv4-track { animation-play-state: paused; }
.hv4-set { display: flex; gap: 12px; padding-right: 12px; flex: none; }
.hv4-tech { display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px 10px 14px; border-radius: 999px; white-space: nowrap;
  border: 1px solid var(--hv-line); background: rgba(var(--v4-a), .05); color: var(--hv-text); font-size: 14px; font-weight: 600; transition: border-color .25s, background .25s; }
.hv4-tech svg { width: 20px; height: 20px; fill: currentColor; color: var(--hv-primary); flex: none; }
.hv4-tech:hover { border-color: var(--hv-primary); background: rgba(var(--v4-a), .12); }
@keyframes v4-marq { to { transform: translate3d(-50%, 0, 0); } }

/* ===================== 4. card tilt + cursor glow ===================== */
html.home-v2 :is(.hv-ccard, .hv3-card, .hv-tcard, .hv-strip-item) { position: relative; }
html.home-v2 :is(.hv-ccard, .hv3-card, .hv-strip-item)::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .35s ease;
  background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 50%), rgba(var(--v4-a), .17), transparent 62%);
}
html.home-v2 :is(.hv-ccard, .hv3-card, .hv-strip-item).is-tilt::after { opacity: 1; }
html.home-v2 :is(.hv-ccard, .hv3-card, .hv-strip-item).is-tilt { transition: transform .12s linear, border-color .3s, box-shadow .3s; will-change: transform; }

/* ===================== 5. bento layouts ===================== */
@media (min-width: 768px) {
  .hv-strip-grid { grid-template-columns: 1.25fr 1fr !important; grid-auto-rows: minmax(0, auto); }
  .hv-strip-grid > .hv-strip-item:first-child { grid-row: span 2; flex-direction: column; align-items: flex-start !important; justify-content: flex-end; gap: 22px; padding: 34px 32px !important; min-height: 240px; }
  .hv-strip-grid > .hv-strip-item:first-child .hv-ico { width: 64px !important; height: 64px !important; border-radius: 20px !important; }
  .hv-strip-grid > .hv-strip-item:first-child h4 { font-size: clamp(20px, 2vw, 26px) !important; line-height: 1.2; margin-bottom: 6px; }
  .hv-strip-grid > .hv-strip-item:first-child p { font-size: 14.5px; }
  .hv-trust .grid.md\:grid-cols-3 { grid-template-columns: 1.15fr 1fr !important; }
  .hv-trust .grid.md\:grid-cols-3 > .hv-tcard:first-child { grid-row: span 2; justify-content: center; padding: 40px 32px !important; }
  .hv-trust .grid.md\:grid-cols-3 > .hv-tcard:first-child h3 { font-size: clamp(1.4rem, 2vw, 1.8rem); }
  .hv-trust .grid.md\:grid-cols-3 > .hv-tcard:first-child > div:first-child { width: 80px; height: 80px; }
  .hv-trust .grid.md\:grid-cols-3 > .hv-tcard:first-child > p { font-size: 15px; max-width: 30ch; }
}

/* ===================== 6. scroll-fill timeline (About steps) ===================== */
.hv4-timeline { position: relative; --p: 0; }
.hv4-timeline .hv-step { position: relative; }
.hv4-timeline .hv-step::before { content: ""; position: absolute; width: 14px; height: 14px; border-radius: 50%; box-sizing: border-box;
  background: var(--hv-bg); border: 2px solid var(--hv-border); z-index: 2; transition: background .4s, border-color .4s, box-shadow .4s; }
.hv4-timeline .hv-step.is-lit::before { background: var(--hv-primary); border-color: var(--hv-primary); box-shadow: 0 0 0 5px rgba(var(--v4-a), .20); }
@media (min-width: 1024px) {
  .hv4-timeline { padding-top: 36px !important; }
  .hv4-timeline::before, .hv4-timeline::after { content: ""; position: absolute; top: 14px; left: 10%; right: 10%; height: 2px; border-radius: 2px; }
  .hv4-timeline::before { background: var(--hv-line); }
  .hv4-timeline::after { background: linear-gradient(90deg, var(--hv-primary), rgba(var(--v4-b), .85)); transform: scaleX(var(--p)); transform-origin: left center; }
  .hv4-timeline .hv-step::before { top: -29px; left: calc(50% - 7px); }
}
@media (max-width: 1023px) {
  .hv4-timeline { padding-left: 34px !important; }
  .hv4-timeline::before, .hv4-timeline::after { content: ""; position: absolute; left: 7px; top: 24px; bottom: 24px; width: 2px; border-radius: 2px; }
  .hv4-timeline::before { background: var(--hv-line); }
  .hv4-timeline::after { background: linear-gradient(var(--hv-primary), rgba(var(--v4-b), .85)); transform: scaleY(var(--p)); transform-origin: top center; }
  .hv4-timeline .hv-step::before { left: -34px; top: calc(50% - 7px); }
  .hv4-timeline .hv-step { text-align: left !important; }
}

/* ===================== 7. section dividers + one vertical rhythm ===================== */
.hv4-divider { position: relative; height: 1px; width: min(1100px, 84%); margin: 48px auto 0; background: linear-gradient(90deg, transparent, rgba(var(--v4-a), .55), transparent); }
.hv4-divider::after { content: ""; position: absolute; left: 50%; top: -4px; width: 9px; height: 9px; margin-left: -4px; border-radius: 50%;
  background: var(--hv-primary); box-shadow: 0 0 0 6px rgba(var(--v4-a), .14), 0 0 18px rgba(var(--v4-a), .6); }
html.home-v2 .hv-sec, html.home-v2 .hv-trust { padding-block: var(--v4-sec) !important; }
html.home-v2 .hv-guide { margin-block: 0 !important; }
html.home-v2 .hv-facts { margin-top: 24px; }

/* ===================== 8. glass navbar that tightens on scroll ===================== */
html.home-v2 body > div > header > div:first-child { position: relative; isolation: isolate; }
html.home-v2 body > div > header > div:first-child::before {
  content: ""; position: absolute; z-index: -1; inset: 11px -22px; border-radius: 999px; pointer-events: none; opacity: 0;
  background: rgba(var(--hv-bg-rgb), .72); border: 1px solid var(--hv-line);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 14px 40px -22px var(--hv-card-shadow); transition: opacity .35s ease;
}
html.home-v2 body > div > header.scrolled > div:first-child::before { opacity: 1; }
html.home-v2 body > div > header > div:first-child > a > img { transition: height .35s var(--v4-ease); }
html.home-v2 body > div > header.scrolled > div:first-child > a > img { height: 46px; }
@media (min-width: 1024px) { html.home-v2 body > div > header.scrolled > div:first-child > a > img { height: 50px; } }
@media (max-width: 400px) { html.home-v2 body > div > header > div:first-child::before { inset: 11px -12px; } }

/* ===================== 9. brand finishing: scrollbar, selection, focus ===================== */
html.home-v2 { scrollbar-color: rgba(var(--v4-a), .55) transparent; scrollbar-width: thin; }
html.home-v2 ::-webkit-scrollbar { width: 11px; height: 11px; }
html.home-v2 ::-webkit-scrollbar-track { background: transparent; }
html.home-v2 ::-webkit-scrollbar-thumb { background: rgba(var(--v4-a), .45); border-radius: 99px; border: 3px solid var(--hv-bg); }
html.home-v2 ::-webkit-scrollbar-thumb:hover { background: rgba(var(--v4-a), .75); }
html.home-v2 ::selection { background: rgba(var(--v4-a), .35); color: inherit; }
html.home-v2 :is(a, button, summary, [tabindex]):focus-visible { outline: 2px solid var(--hv-primary); outline-offset: 3px; border-radius: 12px; }

/* ===================== 10. image blur-up / skeleton ===================== */
html.js main img[loading="lazy"] { opacity: 0; filter: blur(14px); transform: scale(1.02);
  background: linear-gradient(100deg, transparent 30%, rgba(var(--v4-a), .12) 50%, transparent 70%) 0 0 / 220% 100%, var(--hv-sheen);
  animation: v4-skel 1.4s linear infinite; transition: opacity .6s ease, filter .7s ease, transform .7s ease; }
html.js main img[loading="lazy"].is-loaded { opacity: 1; filter: none; transform: none; animation: none; background: none; }
@keyframes v4-skel { to { background-position: -220% 0; } }

/* ===================== 11. mobile: swipe carousel, bottom-sheet menu, compact action bar ===================== */
.hv4-dots { display: none; }
@media (max-width: 767px) {
  .hv-courses > .grid { display: flex !important; gap: 14px !important; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
    margin-inline: -16px; padding: 6px 16px 14px; scroll-padding-inline: 16px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .hv-courses > .grid::-webkit-scrollbar { display: none; }
  .hv-courses > .grid > .hv-ccard { flex: 0 0 84%; scroll-snap-align: center; scroll-snap-stop: always; opacity: 1 !important; animation: none !important; }
  .hv4-dots { display: flex; justify-content: center; gap: 8px; margin-top: -2px; }
  .hv4-dots button { width: 8px; height: 8px; padding: 0 !important; min-width: 0; border-radius: 99px; border: 0; background: var(--hv-line); cursor: pointer; transition: width .3s var(--v4-ease), background .3s; }
  .hv4-dots button.is-on { width: 26px; background: var(--hv-primary); }
  .hv-courses > .grid::after { content: ""; flex: 0 0 2px; }
}
@media (max-width: 1023px) {
  html.home-v2 #mobile-menu:not(.hidden) {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 70; max-height: 82vh; max-height: 82dvh; overflow-y: auto; overscroll-behavior: contain;
    border: 1px solid var(--hv-border); border-bottom: 0; border-radius: 28px 28px 0 0; padding: 40px 24px calc(28px + env(safe-area-inset-bottom, 0px)) !important;
    box-shadow: 0 0 0 100vmax rgba(6, 4, 14, .58), 0 -24px 70px -16px rgba(0, 0, 0, .55); animation: v4-sheet .42s var(--v4-ease);
  }
  html.home-v2 #mobile-menu:not(.hidden)::before { content: ""; position: absolute; top: 12px; left: 50%; width: 46px; height: 5px; margin-left: -23px; border-radius: 99px; background: var(--hv-border); }
  html.home-v2 #mobile-menu:not(.hidden) a { padding-block: 9px !important; }
  html:has(#mobile-menu:not(.hidden)) :is(.back-to-top-btn, .floating-whatsapp-widget) { opacity: 0 !important; pointer-events: none !important; }
  html.hv4-lock { overflow: hidden; }
}
@keyframes v4-sheet { from { transform: translate3d(0, 100%, 0); } to { transform: none; } }

@media (max-width: 767px) {
  .md\:hidden.fixed.bottom-0 { transition: padding .35s var(--v4-ease); }
  .md\:hidden.fixed.bottom-0 > a { transition: flex-basis .35s var(--v4-ease), padding .35s var(--v4-ease), gap .35s var(--v4-ease); }
  .md\:hidden.fixed.bottom-0 > a > span { display: inline-block; max-width: 96px; overflow: hidden; white-space: nowrap; transition: max-width .3s var(--v4-ease), opacity .2s; }
  .md\:hidden.fixed.bottom-0.hv4-compact > a:not(:last-child) { flex: 0 0 52px; padding-inline: 0 !important; gap: 0; }
  .md\:hidden.fixed.bottom-0.hv4-compact > a:not(:last-child) > span { max-width: 0; opacity: 0; }
  html.home-v2 .back-to-top-btn, html.home-v2 .floating-whatsapp-widget { transition: bottom .35s var(--v4-ease), opacity .3s ease, transform .3s ease !important; }
}

/* small screens: stats 2×2, tighter marquee */
@media (max-width: 420px) { .hv4-stat { padding: 18px 16px; } .hv4-rot { font-size: 13.5px; padding: 6px 13px; } .hv4-rot-v { min-width: 8.6em; } .hv4-fx i:nth-child(3) { display: none; } }

/* ===================== 12. reduced motion ===================== */
@media (prefers-reduced-motion: reduce) {
  .hv4-fx i, .hv4-track, html.home-v2 .hv-title .hv-accent, html.js main img[loading="lazy"] { animation: none !important; }
  html.home-v2 .hv-title .hv-accent::after { animation: none; transform: none; }
  .hv4-marquee::before, .hv4-marquee::after { display: none; }
  .hv4-track { flex-wrap: wrap; width: auto; justify-content: center; }
  .hv4-set + .hv4-set { display: none; }
  .hv4-set { flex-wrap: wrap; justify-content: center; padding-right: 0; }
  .hv4-rot-v.is-typing::after { animation: none; }
  html.home-v2 #mobile-menu:not(.hidden) { animation: none; }
}
