:root {
  --ink: #0b1729;
  --navy: #07172c;
  --navy-2: #0e2a4d;
  --orange: #ff6738;
  --orange-dark: #e84c1c;
  --blue: #2777ff;
  --paper: #ffffff;
  --mist: #f4f7fb;
  --warm: #fff4ef;
  --muted: #657084;
  --line: #dfe6ef;
  --radius: 24px;
  --shadow: 0 24px 70px rgba(14, 31, 53, .10);
  --font-ui: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --font-sinhala: "Noto Sans Sinhala", "Sinhala Sangam MN", "Nirmala UI", "Iskoola Pota", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input { font: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid rgba(223,230,239,.8);
  backdrop-filter: blur(16px);
}
.nav-wrap {
  width: min(1180px, calc(100% - 40px));
  min-height: 86px;
  margin: auto;
  display: flex;
  align-items: center;
  gap: 32px;
}
.brand { display: flex; align-items: center; gap: 11px; font-size: 1.32rem; font-weight: 900; letter-spacing: -.04em; white-space: nowrap; }
.brand small { display: block; color: var(--muted); font-size: .58rem; line-height: 1; letter-spacing: .22em; margin-top: 1px; }
.brand-dot, .footer-brand span { color: var(--orange); }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; color: white; border-radius: 13px 13px 13px 4px; background: var(--ink); font-weight: 900; }
.main-nav { margin-left: auto; display: flex; align-items: center; gap: 30px; color: #4a5567; font-weight: 650; }
.main-nav a { position: relative; padding: 30px 0 27px; }
.main-nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 20px; height: 2px; background: var(--orange); transition: right .25s ease; }
.main-nav a:hover::after, .main-nav a.active::after { right: 0; }
.main-nav a.active { color: var(--ink); }
.portal-link { display: inline-flex; align-items: center; gap: 9px; background: #edf4ff; color: #155bbd; border-radius: 999px; padding: 11px 17px; font-weight: 750; }
.portal-link svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.menu-toggle { display: none; margin-left: auto; width: 42px; height: 42px; border: 0; border-radius: 12px; background: var(--mist); padding: 11px; }
.menu-toggle span { display: block; height: 2px; margin: 5px 0; background: var(--ink); border-radius: 2px; }

.hero { overflow: hidden; background: linear-gradient(135deg, #fff 0%, #fff 55%, #eef5ff 100%); }
.hero-inner { width: min(1220px, calc(100% - 40px)); min-height: 690px; margin: auto; display: grid; grid-template-columns: .95fr 1.05fr; align-items: center; gap: 54px; padding: 76px 0 68px; }
.eyebrow, .kicker { display: inline-flex; align-items: center; gap: 10px; color: var(--orange-dark); font-size: .78rem; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow span { width: 31px; height: 2px; background: var(--orange); }
.hero h1 { margin: 22px 0 24px; font-size: clamp(3.35rem, 6vw, 5.85rem); line-height: .98; letter-spacing: -.065em; }
.hero h1 em { color: var(--orange); font-style: normal; }
.hero-copy > p { max-width: 600px; color: var(--muted); font-size: 1.08rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 33px 0 38px; }
.button { min-height: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 14px; padding: 0 22px; border-radius: 999px; font-weight: 800; transition: transform .25s ease, box-shadow .25s ease, background .25s ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { color: #fff; background: var(--orange); box-shadow: 0 12px 30px rgba(255,103,56,.28); }
.button-primary:hover { background: var(--orange-dark); box-shadow: 0 16px 36px rgba(255,103,56,.34); }
.button-ghost { border: 1px solid var(--line); background: rgba(255,255,255,.72); }
.play { width: 30px; height: 30px; display: grid; place-items: center; padding-left: 2px; color: var(--blue); background: #edf4ff; border-radius: 50%; font-size: .66rem; }
.hero-proof { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); padding-top: 22px; }
.hero-proof div { padding: 0 16px; border-right: 1px solid var(--line); }
.hero-proof div:first-child { padding-left: 0; }
.hero-proof div:last-child { border: 0; }
.hero-proof strong { display: block; font-size: 1.05rem; }
.hero-proof span { display: block; color: var(--muted); font-size: .78rem; }
.hero-visual { position: relative; }
.visual-frame { position: relative; min-height: 505px; border-radius: 52% 48% 25% 75% / 52% 36% 64% 48%; overflow: visible; background: var(--navy); box-shadow: 0 40px 90px rgba(7,23,44,.24); }
.visual-frame::after { content: ""; position: absolute; width: 92px; height: 92px; right: -28px; top: -25px; border: 20px solid rgba(255,103,56,.14); border-radius: 50%; }
.visual-frame img { width: 100%; height: 505px; object-fit: cover; border-radius: inherit; }
.floating-note { position: absolute; display: flex; align-items: center; gap: 12px; padding: 13px 17px; background: rgba(255,255,255,.94); border: 1px solid rgba(255,255,255,.9); border-radius: 16px; box-shadow: var(--shadow); backdrop-filter: blur(10px); }
.floating-note span { width: 30px; height: 30px; display: grid; place-items: center; color: white; background: var(--orange); border-radius: 9px; font-size: .72rem; font-weight: 900; }
.floating-note strong { font-size: .86rem; white-space: nowrap; }
.note-one { left: -34px; top: 22%; }
.note-two { right: -8px; bottom: 12%; }
.formula-track { min-width: max-content; display: flex; align-items: center; justify-content: center; gap: 28px; color: #79859a; background: #f7f9fc; border-top: 1px solid #e9eef5; border-bottom: 1px solid #e9eef5; padding: 15px 20px; font-family: Georgia, serif; font-style: italic; }
.formula-track i { width: 4px; height: 4px; background: var(--orange); border-radius: 50%; }

.section { width: min(1180px, calc(100% - 40px)); margin: auto; padding: 110px 0; }
.section-heading { display: grid; grid-template-columns: 1.25fr .75fr; align-items: end; gap: 60px; margin-bottom: 47px; }
.section-heading h2, .system-intro h2, .join-card h2 { margin: 9px 0 0; font-size: clamp(2.35rem, 4.2vw, 4.2rem); line-height: 1.05; letter-spacing: -.055em; }
.section-heading p { color: var(--muted); margin: 0; }
.class-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.class-card { position: relative; overflow: hidden; min-height: 420px; display: flex; flex-direction: column; padding: 31px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease; }
.class-card:hover { transform: translateY(-7px); border-color: transparent; box-shadow: var(--shadow); }
.class-card.featured { color: #fff; border: 0; background: var(--navy); }
.card-orb { width: 70px; height: 70px; display: grid; place-items: center; border-radius: 22px; color: var(--orange); background: var(--warm); font-size: 1.48rem; font-weight: 900; }
.featured .card-orb { color: white; background: var(--orange); }
.class-card .tag { position: absolute; right: 23px; top: 23px; color: var(--orange-dark); background: var(--warm); padding: 6px 11px; border-radius: 999px; font-size: .69rem; font-weight: 850; letter-spacing: .08em; }
.class-card h3 { margin: 28px 0 8px; font-size: 1.65rem; letter-spacing: -.035em; }
.class-card p { color: var(--muted); margin: 0; }
.featured p { color: #aebdd0; }
.class-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0; }
.class-meta span { padding: 6px 10px; color: #536071; background: var(--mist); border-radius: 8px; font-size: .75rem; font-weight: 750; }
.featured .class-meta span { color: #d8e3ef; background: rgba(255,255,255,.09); }
.card-link { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding-top: 23px; border-top: 1px solid var(--line); font-weight: 850; }
.featured .card-link { border-color: rgba(255,255,255,.14); }
.card-link span { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; transition: background .2s, color .2s; }
.card-link:hover span { color: white; border-color: var(--orange); background: var(--orange); }

.system-section { color: white; background: var(--navy); }
.system-inner { width: min(1180px, calc(100% - 40px)); margin: auto; display: grid; grid-template-columns: .85fr 1.15fr; gap: 100px; padding: 112px 0; }
.kicker.light { color: #7dacff; }
.system-intro p { color: #aebdd0; max-width: 480px; }
.text-link { display: inline-flex; gap: 12px; margin-top: 22px; color: var(--orange); font-weight: 850; }
.system-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.step { min-height: 205px; padding: 24px; border: 1px solid rgba(255,255,255,.1); border-radius: 20px; background: rgba(255,255,255,.045); }
.step > span { color: var(--orange); font-size: .73rem; font-weight: 900; letter-spacing: .14em; }
.step h3 { margin: 35px 0 4px; font-size: 1.35rem; }
.step p { color: #9eafc3; font-size: .9rem; margin: 0; }

.resources-section { padding-bottom: 70px; }
.resource-layout { display: grid; grid-template-columns: 1.25fr .75fr; gap: 20px; }
.featured-resource { position: relative; min-height: 510px; overflow: hidden; color: white; padding: 32px; border-radius: var(--radius); background: linear-gradient(145deg, #0a2546, #07172c); }
.feature-top { position: relative; z-index: 2; display: flex; justify-content: space-between; color: #8eb8f4; font-size: .7rem; font-weight: 850; letter-spacing: .1em; }
.feature-content { position: relative; z-index: 2; max-width: 520px; margin-top: 90px; }
.feature-index { color: var(--orange); font-weight: 850; }
.feature-content h3 { max-width: 520px; margin: 8px 0 17px; font-size: clamp(2.1rem, 4vw, 3.5rem); line-height: 1.04; letter-spacing: -.05em; }
.feature-content > p:not(.feature-index) { color: #b6c4d6; }
.button-light { margin-top: 16px; color: var(--ink); background: white; }
.orbit-mark { position: absolute; right: -80px; bottom: -95px; width: 370px; height: 370px; opacity: .38; }
.orbit-mark span { position: absolute; inset: 50% auto auto 50%; width: 330px; height: 120px; border: 2px solid #4592ff; border-radius: 50%; transform: translate(-50%,-50%) rotate(0); }
.orbit-mark span:nth-child(2) { transform: translate(-50%,-50%) rotate(60deg); }
.orbit-mark span:nth-child(3) { transform: translate(-50%,-50%) rotate(120deg); }
.orbit-mark i { position: absolute; left: 50%; top: 50%; width: 36px; height: 36px; background: var(--orange); border-radius: 50%; transform: translate(-50%,-50%); box-shadow: 0 0 40px var(--orange); }
.resource-list { display: grid; gap: 14px; }
.resource-item { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 16px; padding: 21px; border: 1px solid var(--line); border-radius: 18px; transition: border-color .2s, transform .2s; }
.resource-item:hover { border-color: #a8c6f5; transform: translateX(4px); }
.resource-icon { width: 52px; height: 52px; display: grid; place-items: center; color: var(--blue); background: #edf4ff; border-radius: 15px; font-weight: 900; }
.resource-item h3 { margin: 0; font-size: 1rem; }
.resource-item p { margin: 2px 0 0; color: var(--muted); font-size: .78rem; }
.resource-arrow { color: var(--orange); font-weight: 900; }

.join-section { padding-top: 75px; }
.join-card { display: grid; grid-template-columns: 1.35fr .65fr; align-items: center; gap: 50px; padding: 62px; border-radius: 30px; background: linear-gradient(135deg, #fff3ed, #f2f7ff); border: 1px solid #f1e3dd; }
.join-card p { color: var(--muted); margin-bottom: 0; }
.join-actions { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.contact-mail { color: var(--muted); font-size: .87rem; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }

footer { color: white; background: #04101f; }
.footer-inner { width: min(1180px, calc(100% - 40px)); min-height: 190px; margin: auto; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 50px; }
.footer-brand strong { font-size: 1.45rem; letter-spacing: -.04em; }
.footer-brand p, .copyright { color: #8798ad; font-size: .84rem; margin: 4px 0 0; }
.footer-links { display: flex; gap: 24px; color: #c3cfdd; font-size: .88rem; font-weight: 700; }
.back-top { position: fixed; right: 24px; bottom: 24px; z-index: 30; width: 46px; height: 46px; display: grid; place-items: center; color: #fff; background: var(--orange); border-radius: 50%; box-shadow: 0 10px 30px rgba(255,103,56,.32); }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .65s ease, transform .65s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 1000px) {
  .nav-wrap { min-height: 74px; }
  .menu-toggle { display: block; }
  .main-nav { position: absolute; left: 20px; right: 20px; top: 74px; display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 12px; background: white; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 14px; border-radius: 10px; }
  .main-nav a:hover { background: var(--mist); }
  .main-nav a::after { display: none; }
  .portal-link { margin-left: 0; }
  .hero-inner { grid-template-columns: 1fr; padding-top: 62px; }
  .hero-copy { max-width: 760px; }
  .hero-visual { width: min(760px, 100%); margin: 0 auto; }
  .visual-frame { min-height: 420px; }
  .visual-frame img { height: 420px; }
  .class-grid { grid-template-columns: 1fr 1fr; }
  .class-card:last-child { grid-column: 1 / -1; }
  .system-inner { grid-template-columns: 1fr; gap: 48px; }
  .resource-layout { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .nav-wrap { width: min(100% - 28px, 1180px); gap: 12px; }
  .portal-link { width: 42px; height: 42px; padding: 0; justify-content: center; }
  .portal-link span { display: none; }
  .brand { font-size: 1.04rem; }
  .brand-mark { width: 34px; height: 34px; }
  .hero-inner, .section, .system-inner, .footer-inner { width: min(100% - 30px, 1180px); }
  .hero-inner { min-height: auto; gap: 48px; padding: 52px 0 56px; }
  .hero h1 { font-size: clamp(2.95rem, 14.5vw, 4.4rem); }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .button { width: 100%; }
  .hero-proof { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .hero-proof div { padding: 0; border: 0; }
  .hero-proof div:last-child { grid-column: auto; }
  .visual-frame { min-height: 340px; border-radius: 34px; }
  .visual-frame img { height: 340px; border-radius: 34px; }
  .floating-note { padding: 10px 12px; }
  .note-one { left: -5px; top: 15%; }
  .note-two { right: -5px; bottom: 8%; }
  .formula-track { justify-content: flex-start; overflow: hidden; }
  .section { padding: 82px 0; }
  .section-heading { grid-template-columns: 1fr; gap: 18px; margin-bottom: 34px; }
  .class-grid { grid-template-columns: 1fr; }
  .class-card:last-child { grid-column: auto; }
  .class-card { min-height: 380px; }
  .system-inner { padding: 82px 0; }
  .system-steps { grid-template-columns: 1fr; }
  .step { min-height: 170px; }
  .step h3 { margin-top: 20px; }
  .featured-resource { min-height: 560px; padding: 25px; }
  .feature-content { margin-top: 72px; }
  .resource-item { grid-template-columns: 48px 1fr auto; padding: 17px; }
  .join-card { grid-template-columns: 1fr; padding: 35px 25px; }
  .footer-inner { grid-template-columns: 1fr; gap: 22px; padding: 45px 0; }
  .footer-links { flex-wrap: wrap; }
  .back-top { right: 16px; bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
