/* Self-hosted variable fonts (Fontsource 5.3.0, SIL Open Font License) */
@font-face { font-family: Inter; src: url("/fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("/fonts/space-grotesk.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }

:root {
  --navy: #061934;
  --panel: #0e2042;
  --gold: #edac1c;
  --gold-text: #8a6200; /* gold dark enough for text on white */
  --txt: #eaf0fb;
  --mute: #93a3c2;      /* muted text on navy */
  --mute-light: #5b6575; /* muted text on white */
  --line: rgba(255, 255, 255, .1);
  --ink: #0b1730;
  --body: #3b4660;
  --paper: #ffffff;
  --gray: #f2f4f8;
  --edge: #e3e8f0;
  --head: "Space Grotesk", Inter, system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { font-family: Inter, system-ui, sans-serif; color: var(--ink); background: var(--paper); line-height: 1.6; }
h1, h2, h3 { font-family: var(--head); letter-spacing: -.02em; line-height: 1.05; }
h2 { font-size: clamp(2.1rem, 5vw, 3.25rem); margin-bottom: 22px; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
ul { list-style: none; }
[hidden] { display: none !important; } /* keep hidden working on elements with their own display, like .btn */
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--mute-light); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 20; background: var(--gold); color: var(--navy); padding: 8px 12px; }

/* Header */
.topbar { position: fixed; inset: 0 0 auto 0; z-index: 10; background: rgba(6, 25, 52, .7); backdrop-filter: blur(10px); color: var(--txt); border-bottom: 1px solid var(--line); transition: background .3s, box-shadow .3s; }
.topbar.scrolled { background: rgba(6, 25, 52, .96); box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; gap: 10px; align-items: center; font-family: var(--head); font-weight: 700; text-decoration: none; }
.topbar nav { display: flex; gap: 6px; align-items: center; font-size: 14px; font-weight: 500; }
.topbar nav a { text-decoration: none; padding: 8px 14px; border-radius: 8px; color: var(--mute); transition: color .2s, background .2s; }
.topbar nav a:hover, .topbar nav a.active { color: #fff; background: var(--line); }
.topbar nav a.nav-cta { background: var(--gold); color: var(--navy); font-weight: 700; }

/* Hero */
.hero { position: relative; overflow: hidden; background: var(--navy); color: var(--txt); padding: 130px 0 56px; }
.hero::after, .hero-mark::before { content: ""; position: absolute; border-radius: 50%; border: 1px solid rgba(237, 172, 28, .25); pointer-events: none; }
.hero::after { left: -260px; bottom: -320px; width: 520px; height: 520px; animation: breathe 12s ease-in-out infinite alternate-reverse; }
@keyframes breathe { from { transform: scale(1); opacity: .7; } to { transform: scale(1.06); opacity: 1; } }
.hero-inner { position: relative; z-index: 1; display: grid; gap: 40px; align-items: end; }
.pill { display: inline-flex; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 13px; color: var(--mute); margin-bottom: 26px; }
.pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); animation: blink 2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .3; } }
.hero h1 { font-size: clamp(2.8rem, 8vw, 5.25rem); line-height: .98; margin-bottom: 26px; }
.hero h1 span { color: var(--gold); }
.hero-text { font-size: 19px; color: var(--mute); max-width: 560px; margin-bottom: 34px; }
/* Logo sits at the center of the gold rings */
.hero-mark { display: none; position: relative; justify-self: center; align-self: center; width: 280px; aspect-ratio: 1; }
.hero-mark::before { inset: -110px; box-shadow: 0 0 0 60px rgba(237, 172, 28, .04), 0 0 0 140px rgba(237, 172, 28, .025); animation: breathe 9s ease-in-out infinite alternate; }
.hero-mark img { position: relative; width: 100%; }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 15px 26px; border-radius: 10px; font-weight: 700; text-decoration: none; font-size: 15px; transition: transform .2s, box-shadow .2s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 0, 0, .25); }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-ghost { background: var(--line); color: #fff; border: 1px solid var(--line); }
.btn-ink { background: var(--ink); color: #fff; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }

.stats { position: relative; z-index: 1; background: var(--panel); border-top: 1px solid var(--line); }
.stats ul { display: grid; grid-template-columns: 1fr 1fr; }
.stats li { padding: 24px 16px 24px 0; border-bottom: 1px solid var(--line); }
.stats b { display: block; font-family: var(--head); font-size: 1.5rem; line-height: 1.15; color: #fff; }
.stats span { color: var(--mute); font-size: 14px; }

/* Sections */
.section { padding: 90px 0; }
.section.tint { background: var(--gray); }
.section.dark { background: var(--navy); color: var(--txt); }
.section.dark h2 { color: #fff; }
.label { font-family: var(--head); font-size: 14px; font-weight: 700; color: var(--gold-text); margin-bottom: 14px; }
.dark .label, .footer .label { color: var(--gold); }

.split { display: grid; gap: 40px; }
.greeting { font-style: italic; color: var(--mute-light); margin-bottom: 12px; }
.big { font-size: 23px; line-height: 1.5; font-weight: 500; margin-bottom: 16px; }
.split p { color: var(--body); font-size: 17px; }
.split .big { color: var(--ink); }
.mission { margin-top: 28px; padding: 26px; background: var(--gray); border-left: 4px solid var(--gold); border-radius: 0 14px 14px 0; color: var(--body); }
.mission b { display: block; color: var(--ink); margin-bottom: 6px; }
.highlights { margin-top: 40px; border-top: 2px solid var(--gold); }
.highlights div { display: grid; gap: 4px; padding: 22px 0; border-bottom: 1px solid var(--edge); }
.highlights dt { font-family: var(--head); font-size: 20px; font-weight: 700; color: var(--ink); }
.highlights dd { color: var(--body); font-size: 16px; }

/* Announcements sit right under the hero, with less padding than other sections */
.news-section { padding: 48px 0 56px; }
.news { display: grid; gap: 16px; }
.news li { background: var(--gray); border-radius: 14px; padding: 24px; }

/* "Get the app" hint: touch screens only, and not inside the installed app itself */
.app-hint { margin-top: 16px; border: 1px solid var(--edge); border-radius: 14px; padding: 16px 20px; color: var(--body); }
.app-hint summary { cursor: pointer; }
.app-hint summary b { font-family: var(--head); color: var(--gold-text); }
.app-install { margin-top: 14px; width: 100%; justify-content: center; border: 0; font: inherit; font-weight: 700; cursor: pointer; }
.app-steps { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--edge); }
.app-for { font-weight: 700; color: var(--ink); }
.app-steps ol { list-style: none; counter-reset: step; display: grid; gap: 12px; margin-top: 12px; }
.app-steps li { counter-increment: step; display: flex; align-items: center; gap: 12px; color: var(--ink); }
.app-steps li::before { content: counter(step); flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; font-size: .9rem; display: grid; place-items: center; }
/* Icons drawn like the phone's own buttons, so parents can match them on screen. */
.app-icon { flex: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--edge); background: var(--gray) center / 26px no-repeat; }
.icon-more { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23061934'%3E%3Ccircle cx='5' cy='12' r='2.2'/%3E%3Ccircle cx='12' cy='12' r='2.2'/%3E%3Ccircle cx='19' cy='12' r='2.2'/%3E%3C/svg%3E"); }
.icon-menu { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23061934'%3E%3Ccircle cx='12' cy='5' r='2.2'/%3E%3Ccircle cx='12' cy='12' r='2.2'/%3E%3Ccircle cx='12' cy='19' r='2.2'/%3E%3C/svg%3E"); }
.icon-share { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23061934' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12M8 7l4-4 4 4M8 10H6v11h12V10h-2'/%3E%3C/svg%3E"); }
.icon-add { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23061934' stroke-width='2' stroke-linecap='round'%3E%3Crect x='3.5' y='3.5' width='17' height='17' rx='4'/%3E%3Cpath d='M12 8v8M8 12h8'/%3E%3C/svg%3E"); }
.icon-install { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23061934' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='6' y='2.5' width='12' height='19' rx='2.5'/%3E%3Cpath d='M12 7v7M9 11l3 3 3-3'/%3E%3C/svg%3E"); }
.app-help { margin-top: 14px; font-size: .9rem; }
@media (display-mode: standalone), (hover: hover) and (pointer: fine) { .app-hint { display: none; } }

/* Program tabs (tab buttons only appear with JavaScript; without it every panel shows) */
.tablist { display: none; gap: 8px; flex-wrap: wrap; margin: 10px 0 28px; }
.js .tablist { display: flex; }
.tablist button { font: 600 15px Inter, system-ui, sans-serif; border: 1px solid #d5dbe6; background: #fff; border-radius: 999px; padding: 10px 20px; cursor: pointer; color: var(--ink); transition: background .2s, color .2s; }
.tablist button:hover { border-color: var(--ink); }
.tablist button[aria-selected="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.panel { display: grid; gap: 32px; background: #fff; border-radius: 20px; padding: 32px; border: 1px solid var(--edge); margin-bottom: 16px; animation: fade .35s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } }
.panel h3 { font-size: 2.25rem; margin-bottom: 10px; }
.grades { color: var(--gold-text); font-weight: 700; margin-bottom: 12px; }
.panel p { color: var(--body); font-size: 17px; }
.panel li { padding: 14px 0; border-bottom: 1px solid #e9edf3; font-weight: 600; }

/* Registration */
.rgrid { display: grid; gap: 20px; margin-top: 20px; }
.rcard { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 32px; transition: transform .25s; }
.rcard:hover { transform: translateY(-4px); }
.rcard h3 { font-size: 28px; margin-bottom: 10px; color: #fff; }
.rcard p { color: var(--mute); margin-bottom: 24px; }
.rcard.main { background: linear-gradient(135deg, #f5bd3a, var(--gold)); color: var(--navy); }
.rcard.main h3 { color: var(--navy); }
.rcard.main p { color: #3d2b00; }

/* Team */
.team { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 20px; margin-top: 30px; }
.team li { text-align: center; }
.team img { width: 100%; max-width: 220px; aspect-ratio: 1; object-fit: cover; border-radius: 50%; margin: 0 auto 16px; border: 4px solid var(--gold); transition: transform .3s; }
.team li:hover img { transform: scale(1.04); }
.team b { display: block; font-family: var(--head); font-size: 21px; }
.team span { color: var(--mute-light); }

/* Footer, which is also the Contact section */
.footer { background: var(--navy); color: var(--mute); padding: 90px 0 40px; font-size: 14px; }
.footer h2 { color: #fff; }
.contact { display: grid; gap: 16px; margin-top: 10px; }
.contact a { display: block; text-decoration: none; padding: 26px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); color: #fff; transition: background .2s, color .2s, transform .2s; }
.contact a:hover { background: var(--gold); color: var(--navy); transform: translateY(-3px); }
.contact a:hover small { color: var(--navy); }
.contact small { display: block; color: var(--mute); font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.contact strong { font-family: var(--head); font-size: 20px; line-height: 1.3; overflow-wrap: anywhere; }
.footer-base { display: grid; gap: 16px; margin-top: 60px; padding-top: 24px; border-top: 1px solid var(--line); }
.footer-name { font-family: var(--head); font-size: 24px; font-weight: 700; color: #fff; }
.social { display: flex; gap: 12px; }
.social a { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--panel); border: 1px solid var(--line); color: #fff; transition: background .2s, color .2s, transform .2s; }
.social a:hover { background: var(--gold); color: var(--navy); transform: translateY(-2px); }
.social svg { width: 20px; height: 20px; fill: currentColor; }

/* Phone-only sticky Register button */
.mobile-cta { position: fixed; bottom: 12px; left: 12px; right: 12px; z-index: 9; text-align: center; background: var(--gold); color: var(--navy); font-weight: 800; padding: 15px; border-radius: 12px; text-decoration: none; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
body { padding-bottom: 76px; }
.topbar nav a:not(.nav-cta) { display: none; }

/* Scroll reveal, only when JavaScript runs */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (min-width: 880px) {
  .wrap { padding: 0 28px; }
  .topbar nav a:not(.nav-cta) { display: inline-block; }
  .mobile-cta { display: none; }
  body { padding-bottom: 0; }
  .hero { padding-top: 150px; }
  .hero-inner { grid-template-columns: 1.4fr 1fr; }
  .hero-mark { display: block; }
  .stats ul { grid-template-columns: repeat(4, 1fr); }
  .stats li { padding: 30px 0 30px 24px; border-bottom: 0; border-right: 1px solid var(--line); }
  .stats li:first-child { padding-left: 0; }
  .stats li:last-child { border-right: 0; }
  .section { padding: 110px 0; }
  .split { grid-template-columns: 1fr 1fr; gap: 72px; }
  .highlights div { grid-template-columns: 190px 1fr; gap: 20px; align-items: baseline; }
  .panel { grid-template-columns: 1fr 1fr; gap: 40px; padding: 44px; }
  .rgrid { grid-template-columns: 1.3fr 1fr; }
  .rcard { padding: 38px; }
  .team { grid-template-columns: repeat(4, 1fr); }
  .contact { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .footer-base { grid-template-columns: 1fr auto; align-items: end; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
