/* IGCSE Maths Hub · landing page (BS Format: navy, school blue, yellow) */
:root {
  --navy: #202D4A;
  --navy-2: #172238;
  --blue: #2D6687;
  --yellow: #F6C94C;
  --bg: #F4F8FB;
  --surface: #ffffff;
  --surface-2: #EAF2F8;
  --ink: #18243B;
  --muted: #59677A;
  --line: #DCE6EF;
  --shadow: 0 2px 4px rgb(20 25 40 / .05), 0 18px 40px -12px rgb(20 25 40 / .22);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11151c;
    --surface: #1a1f29;
    --surface-2: #242a37;
    --ink: #e9ecf2;
    --muted: #9ba3b4;
    --line: #2f3646;
    --shadow: 0 18px 40px -12px rgb(0 0 0 / .6);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 1.05rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { line-height: 1.12; margin: 0; letter-spacing: -.02em; }
p { margin: 0; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 1.5rem; }

.logo { flex: none; width: 2.2rem; height: 3.5rem; background: #fff; -webkit-mask: url("../logo.png") center / contain no-repeat; mask: url("../logo.png") center / contain no-repeat; }
.logo.sm { width: 1.9rem; height: 3rem; background: var(--muted); }
.hbadge { display: inline-grid; place-items: center; min-width: 1.25rem; height: 1.25rem; padding: 0 .3rem; border-radius: 5px; background: var(--yellow); color: var(--navy); font: 800 .74rem/1 system-ui, sans-serif; vertical-align: .1em; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: .4rem; border-radius: 12px; padding: .65rem 1.15rem; font-weight: 750; text-decoration: none; border: 2px solid transparent; transition: transform .15s, box-shadow .2s, background .2s; white-space: nowrap; }
.btn:hover { transform: translateY(-2px); }
.btn-lg { padding: .85rem 1.5rem; font-size: 1.08rem; }
.btn-yellow { background: var(--yellow); color: var(--navy); box-shadow: 0 10px 24px -10px rgb(246 201 76 / .9); }
.btn-yellow:hover { box-shadow: 0 14px 30px -10px rgb(246 201 76 / 1); }
.btn-ghost { color: #fff; border-color: rgb(255 255 255 / .35); }
.btn-ghost:hover { background: rgb(255 255 255 / .08); }

/* sticky nav */
.nav { position: fixed; inset: 0 0 auto; z-index: 20; display: flex; align-items: center; gap: 1.5rem; padding: .6rem 1.5rem; color: #fff; transition: background .3s, box-shadow .3s, padding .3s; }
.nav.solid { background: rgb(32 45 74 / .94); backdrop-filter: blur(10px); box-shadow: 0 6px 24px -12px rgb(0 0 0 / .5); padding-block: .4rem; }
.nav-brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.nav-brand .logo { width: 1.7rem; height: 2.7rem; }
.nav-name { font-weight: 800; font-size: 1.1rem; letter-spacing: -.01em; }
.nav-links { display: flex; gap: 1.4rem; margin-left: auto; }
.nav-links a { text-decoration: none; font-weight: 600; opacity: .85; }
.nav-links a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 6px; text-decoration-color: var(--yellow); }
.nav-cta { padding: .5rem .95rem; }

/* hero */
.hero { position: relative; overflow: hidden; background: radial-gradient(1200px 600px at 85% 10%, #2D6687 0%, transparent 60%), linear-gradient(160deg, #202D4A 0%, #172238 100%); color: #fff; padding: 8.5rem 0 6rem; }
.hero-bg span { position: absolute; left: var(--x); top: var(--y); font: 700 clamp(1.6rem, 3vw, 2.8rem) Georgia, serif; color: rgb(255 255 255 / .07); animation: drift 9s ease-in-out var(--d) infinite; pointer-events: none; }
@keyframes drift { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-18px) rotate(6deg); } }
.hero-inner { max-width: 1240px; margin: 0 auto; padding: 0 1.5rem; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 3rem; align-items: center; position: relative; }
.kicker { color: var(--yellow); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; font-size: .8rem; margin-bottom: .9rem; }
.kicker.dark { color: var(--blue); }
@media (prefers-color-scheme: dark) { .kicker.dark { color: #7fb6d8; } }
.hero h1 { font-size: clamp(2.3rem, 4.6vw, 3.9rem); font-weight: 850; }
.hl { background: linear-gradient(transparent 62%, rgb(246 201 76 / .55) 62%); padding: 0 .1em; }
.lead { font-size: 1.18rem; opacity: .9; margin: 1.3rem 0 1.8rem; max-width: 34rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; }
.stats { list-style: none; padding: 0; margin: 2.4rem 0 0; display: flex; flex-wrap: wrap; gap: 1.6rem 2.2rem; }
.stats li { display: grid; }
.stats b { font-size: 2rem; font-weight: 850; color: var(--yellow); line-height: 1; }
.stats span { font-size: .85rem; opacity: .75; margin-top: .3rem; }
.hero-shot { position: relative; }
.tilt { transform: perspective(1600px) rotateY(-9deg) rotateX(4deg); transition: transform .6s; }
.hero-shot:hover .tilt { transform: perspective(1600px) rotateY(-3deg) rotateX(1deg); }
.float { position: absolute; display: flex; align-items: center; gap: .7rem; background: #fff; color: #18243B; border-radius: 14px; padding: .65rem .9rem; box-shadow: 0 18px 40px -12px rgb(0 0 0 / .55); font-size: .9rem; animation: bob 5s ease-in-out infinite; }
.float b { display: block; line-height: 1.2; }
.float small { color: #59677A; }
.f1 { left: -1.6rem; bottom: 12%; }
.f2 { right: -1rem; top: -1.4rem; animation-delay: 1.5s; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.tick { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: #2D7A60; color: #fff; font-weight: 900; }
.ring { --v: 0; display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: conic-gradient(#2D6687 calc(var(--v) * 1%), #EAF2F8 0); }
.ring b { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: #fff; font-size: .68rem; }

/* browser frames for screenshots */
.frame { margin: 0; background: var(--surface); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); }
.hero .frame { border-color: rgb(255 255 255 / .12); }
.frame-bar { display: flex; align-items: center; gap: .4rem; padding: .55rem .8rem; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.frame-bar i { width: .65rem; height: .65rem; border-radius: 50%; background: #ff6b6b; }
.frame-bar i:nth-child(2) { background: #fcc419; }
.frame-bar i:nth-child(3) { background: #51cf66; }
.frame-bar span { margin-left: .6rem; font: 600 .78rem ui-monospace, Menlo, monospace; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.frame figcaption { padding: .75rem 1rem; font-weight: 700; font-size: .95rem; }

/* sections */
section h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); font-weight: 850; }
.sub { color: var(--muted); max-width: 46rem; margin-top: 1rem; font-size: 1.1rem; }
.band { padding: 6rem 0 5rem; }
.areas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; margin-top: 2.6rem; }
.area { position: relative; display: grid; gap: .45rem; align-content: start; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 1.4rem 1.4rem 1.2rem; overflow: hidden; transition: transform .2s, box-shadow .2s, border-color .2s; }
.area::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: var(--a); }
.area:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--a) 45%, var(--line)); }
.area-n { display: grid; place-items: center; width: 2.3rem; height: 2.3rem; border-radius: 10px; background: var(--a); color: #fff; font-weight: 850; }
.area h3 { font-size: 1.3rem; margin-top: .3rem; }
.area p { color: var(--muted); font-size: .97rem; }
.area small { font-weight: 800; color: var(--a); margin-top: .2rem; }
@media (prefers-color-scheme: dark) { .area small { color: color-mix(in srgb, var(--a) 55%, #fff); } }

.features { padding: 2rem 0 5rem; }
.feat { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.25fr); gap: 3.5rem; align-items: center; margin-top: 4.5rem; }
.feat.flip .feat-copy { order: 2; }
.feat-ic { display: inline-grid; place-items: center; width: 3rem; height: 3rem; border-radius: 14px; background: var(--navy); color: var(--yellow); font-size: 1.35rem; font-weight: 800; margin-bottom: 1rem; }
.feat h3 { font-size: 1.75rem; font-weight: 820; margin-bottom: .8rem; }
.feat p { color: var(--muted); }
.ticks { list-style: none; padding: 0; margin: 1.1rem 0 0; display: grid; gap: .45rem; }
.ticks li { display: flex; gap: .55rem; font-weight: 600; }
.ticks li::before { content: "✓"; color: #2D7A60; font-weight: 900; }
.feat .frame { transition: transform .4s; }
.feat:hover .frame { transform: translateY(-4px) scale(1.01); }

.gallery { padding: 4rem 0 5rem; background: var(--surface-2); }
.shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; margin-top: 2rem; }

.teachers { padding: 5.5rem 0; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4rem; }
.teachers .kicker { color: var(--blue); }
@media (prefers-color-scheme: dark) { .teachers .kicker { color: #7fb6d8; } }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; gap: 1rem; }
.steps li { counter-increment: s; display: flex; gap: .9rem; align-items: baseline; color: var(--muted); }
.steps li::before { content: counter(s); flex: none; display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--yellow); color: var(--navy); font-weight: 850; }
.steps b { color: var(--ink); }
.tlist { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; gap: 1.1rem; }
.tlist li { display: flex; gap: .9rem; color: var(--muted); }
.tlist span { flex: none; font-size: 1.5rem; }
.tlist b { color: var(--ink); }

.final { position: relative; overflow: hidden; background: linear-gradient(135deg, #202D4A, #2D6687); color: #fff; text-align: center; padding: 5.5rem 0; }
.final p { opacity: .85; margin: .9rem 0 2rem; font-size: 1.15rem; }
.final .btn { margin: .3rem; }

.foot { display: grid; justify-items: center; gap: .5rem; text-align: center; padding: 2.5rem 1.5rem 3rem; color: var(--muted); font-size: .9rem; }
.foot p { max-width: 46rem; }

/* scroll reveal */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } .hero-bg span, .float { animation: none; } .tilt { transform: none; } }

/* tablets (the site is used on computers and tablets) */
@media (max-width: 1000px) {
  .hero-inner, .feat, .two { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
  .feat.flip .feat-copy { order: 0; }
  .hero { padding-top: 7.5rem; }
  .tilt { transform: none; }
  .areas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shots { grid-template-columns: minmax(0, 1fr); }
  .f1 { left: .6rem; } .f2 { right: .6rem; }
}
@media (max-width: 820px) { .nav-links { display: none; } .nav-cta { margin-left: auto; } }
@media (max-width: 560px) { .areas { grid-template-columns: minmax(0, 1fr); } .nav-name { display: none; } .float { display: none; } }
