/* =========================================================
   Homepage hero (v2)
   Blue gradient + yellow accent, real stats, teacher card,
   live-class badge. Headline keeps the Fraunces display face
   (set in homepage.css via .hp-hero-title).
   ========================================================= */
:root {
  --hx-blue: #0b22a6;
  --hx-grad: linear-gradient(135deg, #091a7a 0%, #0d28b8 52%, #004fe8 100%);
  --hx-y: #f5a623;
  --hx-y2: #ffc04d;
}

body.homepage { font-family: 'Plus Jakarta Sans', 'Noto Sans Sinhala', sans-serif; }

.hx {
  position: relative;
  background: var(--hx-grad);
  color: #fff;
  padding: 128px 0 120px;
  overflow: hidden;
  isolation: isolate;
}

/* ---- background ---- */
.hx-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hx-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 70% 45%, #000 20%, transparent 75%);
          mask-image: radial-gradient(ellipse 75% 70% at 70% 45%, #000 20%, transparent 75%);
}
.hx-glow { position: absolute; border-radius: 50%; filter: blur(70px); }
.hx-glow.g1 { width: 520px; height: 520px; right: -120px; top: -80px; background: rgba(0,140,255,.45); }
.hx-glow.g2 { width: 380px; height: 380px; left: -140px; bottom: -120px; background: rgba(245,166,35,.18); }
.hx-doodle {
  position: absolute; font-family: 'Fraunces', Georgia, serif; font-weight: 700;
  color: rgba(255,255,255,.09); line-height: 1; user-select: none;
}
.hx-doodle.d1 { font-size: 4.5rem; left: 46%; top: 16%; transform: rotate(-12deg); }
.hx-doodle.d2 { font-size: 3.4rem; right: 4%; bottom: 22%; transform: rotate(10deg); }
.hx-doodle.d3 { font-size: 3rem; right: 7%; top: 18%; color: rgba(245,166,35,.25); }

.hx-wrap { position: relative; }

/* ---- copy ---- */
.hx-tag {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 15px 7px 12px; border-radius: 999px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
  font-size: .85rem; font-weight: 600; color: rgba(255,255,255,.95);
  margin-bottom: 22px; text-decoration: none;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.hx-tag .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--hx-y); box-shadow: 0 0 0 4px rgba(245,166,35,.22); }
.hx-tag.is-live { background: rgba(239,68,68,.18); border-color: rgba(255,120,120,.5); color: #fff; transition: background .2s; }
.hx-tag.is-live:hover { background: rgba(239,68,68,.3); color: #fff; }
.hx-tag .live { width: 9px; height: 9px; border-radius: 50%; background: #ff4d4d; animation: hx-pulse 1.6s infinite; }
@keyframes hx-pulse { 0% { box-shadow: 0 0 0 0 rgba(255,77,77,.7); } 70% { box-shadow: 0 0 0 9px rgba(255,77,77,0); } 100% { box-shadow: 0 0 0 0 rgba(255,77,77,0); } }

.hx-title {
  font-size: clamp(2.3rem, 5vw, 3.75rem) !important;
  font-weight: 700 !important;
  line-height: 1.14 !important;
  margin: 0 0 20px;
  text-wrap: balance;
}
.hx-sub {
  font-size: clamp(1rem, 1.5vw, 1.12rem);
  line-height: 1.65; color: rgba(255,255,255,.82);
  max-width: 500px; margin: 0 0 32px;
}

.hx-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 40px; }
.hx-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 14px 26px; border-radius: 12px; font-weight: 700; font-size: .98rem;
  text-decoration: none; transition: transform .2s, background .2s, box-shadow .2s, border-color .2s;
}
.hx-btn-y { background: var(--hx-y); color: #14152b; box-shadow: 0 10px 26px -8px rgba(245,166,35,.65); }
.hx-btn-y:hover { background: var(--hx-y2); color: #000; transform: translateY(-2px); }
.hx-btn-y i { transition: transform .2s; }
.hx-btn-y:hover i { transform: translateX(3px); }
.hx-btn-g { background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.28); }
.hx-btn-g:hover { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.5); color: #fff; }

.hx-stats {
  list-style: none; margin: 0; padding: 22px 0 0;
  display: flex; flex-wrap: wrap; gap: 14px 36px;
  border-top: 1px solid rgba(255,255,255,.15);
  max-width: 520px;
}
.hx-stats li { display: flex; flex-direction: column; }
.hx-stats strong { font-size: 1.75rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; color: #fff; }
.hx-stats li:first-child strong { color: var(--hx-y); }
.hx-stats span { font-size: .82rem; color: rgba(255,255,255,.7); margin-top: 3px; }
.hx-note { display: flex; align-items: center; gap: 8px; font-size: .88rem; color: rgba(255,255,255,.75); margin: 0; }
.hx-note i { color: var(--hx-y); }

/* ---- visual ---- */
.hx-visual {
  position: relative; max-width: 540px; margin-left: auto;
  aspect-ratio: 1 / .92;
  display: flex; align-items: flex-end; justify-content: center;
}
.hx-disc {
  position: absolute; width: 86%; aspect-ratio: 1; border-radius: 50%;
  left: 50%; top: 4%; transform: translateX(-50%);
  background: radial-gradient(circle at 35% 30%, #2f6bff 0%, #1646d6 55%, #0f33b5 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), 0 30px 80px -20px rgba(0,0,0,.45);
}
.hx-ring {
  position: absolute; width: 96%; aspect-ratio: 1; border-radius: 50%;
  left: 50%; top: -1%; transform: translateX(-50%) rotate(-28deg);
  border: 3px solid transparent;
  border-top-color: var(--hx-y); border-right-color: var(--hx-y);
  opacity: .9;
}
.hx-img {
  position: relative; z-index: 1; width: 100%; height: auto;
  /* soften the photo's square bottom corners into the circle */
  -webkit-mask-image: linear-gradient(to bottom, #000 80%, transparent 100%), linear-gradient(to right, transparent 0%, #000 12%, #000 88%, transparent 100%);
  -webkit-mask-composite: source-in;
          mask-image: linear-gradient(to bottom, #000 80%, transparent 100%), linear-gradient(to right, transparent 0%, #000 12%, #000 88%, transparent 100%);
          mask-composite: intersect;
}
.hx-img-photo {
  width: 84%; aspect-ratio: 1; object-fit: cover; border-radius: 50%;
  margin-bottom: 4%; -webkit-mask-image: none; mask-image: none;
  border: 6px solid rgba(255,255,255,.14);
}

.hx-card {
  position: absolute; z-index: 2;
  background: rgba(255,255,255,.96); color: #14152b;
  border-radius: 14px; box-shadow: 0 16px 40px -12px rgba(5,15,80,.5);
  animation: hx-float 6s ease-in-out infinite;
}
.hx-card-teacher {
  left: -4%; bottom: 9%;
  display: flex; align-items: center; gap: 11px;
  padding: 10px 16px 10px 10px; max-width: 290px;
}
.hx-card-teacher img, .hx-card-teacher .ph {
  width: 44px; height: 44px; border-radius: 11px; object-fit: cover; flex: none;
  background: #e8edff; color: var(--hx-blue); display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
}
.hx-card-teacher strong { display: block; font-size: .92rem; font-weight: 800; line-height: 1.2; }
.hx-card-teacher small { display: block; font-size: .74rem; color: #5b6280; line-height: 1.3; margin-top: 2px; }
.hx-card-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 14px; font-size: .82rem; font-weight: 700; white-space: nowrap;
}
.hx-card-chip i { color: var(--hx-blue); font-size: 1rem; }
.hx-card-chip.c1 { top: 12%; left: 2%; animation-delay: -2s; }
.hx-card-chip.c1 i { color: #e53935; }
.hx-card-chip.c2 { top: 40%; right: -3%; animation-delay: -4s; background: var(--hx-y); }
.hx-card-chip.c2 i { color: #14152b; }
@keyframes hx-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.hx-wave { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 56px; z-index: 1; }
.hx-wave path { fill: #fff; }

/* ---- entrance (opacity only, keeps the big headline crisp) ---- */
.hx-copy > * { opacity: 0; animation: hx-in .7s ease forwards; }
.hx-copy > *:nth-child(2) { animation-delay: .1s; }
.hx-copy > *:nth-child(3) { animation-delay: .2s; }
.hx-copy > *:nth-child(4) { animation-delay: .3s; }
.hx-copy > *:nth-child(5) { animation-delay: .4s; }
.hx-visual { opacity: 0; animation: hx-in .9s .15s ease forwards; }
@keyframes hx-in { to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .hx-copy > *, .hx-visual, .hx-card, .hx-tag .live { animation: none !important; opacity: 1 !important; }
}

/* ---- responsive ---- */
@media (max-width: 1199.98px) {
  .hx-card-teacher { left: 0; }
  .hx-card-chip.c2 { right: 0; }
}
@media (max-width: 991.98px) {
  .hx { padding: 108px 0 96px; }
  .hx-copy { text-align: center; }
  .hx-sub, .hx-stats { margin-left: auto; margin-right: auto; }
  .hx-actions, .hx-stats, .hx-note { justify-content: center; }
  .hx-stats li { align-items: center; }
  .hx-visual { margin: 0 auto; max-width: 460px; }
  .hx-doodle { display: none; }
}
@media (max-width: 575.98px) {
  .hx { padding: 96px 0 72px; }
  .hx-doodle { display: none; }
  .hx-title { font-size: 2.25rem !important; }
  .hx-actions { flex-direction: column; gap: 10px; margin-bottom: 30px; }
  .hx-btn { width: 100%; padding: 14px 20px; }
  .hx-stats { gap: 10px; justify-content: space-between; padding-top: 18px; }
  .hx-stats li { flex: 1; }
  .hx-stats strong { font-size: 1.4rem; }
  .hx-stats span { font-size: .74rem; }
  .hx-card-teacher { left: 2%; bottom: 4%; max-width: 78%; padding: 8px 12px 8px 8px; }
  .hx-card-teacher img, .hx-card-teacher .ph { width: 38px; height: 38px; }
  .hx-card-chip { font-size: .74rem; padding: 7px 11px; }
  .hx-card-chip.c1 { top: 4%; left: 0; }
  .hx-card-chip.c2 { top: 34%; right: 0; }
  .hx-wave { height: 32px; }
}
