:root {
  --navy: #0d2d6b;
  --blue: #1a56db;
  --blue-lt: #4f8ef7;
  --sky: #dbeafe;
  --sky-deep: #bfdbfe;
  --white: #ffffff;
  --off: #f5f8ff;
  --text: #0f172a;
  --text-2: #374151;
  --muted: #6b7280;
  --border: #d1ddf7;
  --border-lt: #e8eeff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Nunito', sans-serif;
  background: var(--white);
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

h1, h2, h3 {
  font-family: 'Bricolage Grotesque', sans-serif;
}

/* NAV */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 900;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-lt);
  transition: box-shadow 0.3s;
}

nav.scrolled {
  box-shadow: 0 2px 24px rgba(13, 45, 107, 0.08);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 32px;
  max-width: 1300px;
  margin: 0 auto;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-text {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  font-size: 17px;
  color: var(--navy);
}

.logo-text span {
  color: var(--blue);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--blue);
}

.nav-links a.nav-contact {
  padding: 10px 22px;
  background: var(--blue);
  color: var(--white);
  border-radius: 8px;
}

.nav-links a.nav-contact:hover,
.nav-links a.nav-contact.active {
  background: var(--navy);
  color: var(--white);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--off);
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--navy);
  position: relative;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: var(--navy);
  transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

.nav-toggle[aria-expanded="true"] span { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::before { transform: rotate(-90deg) translateX(-6px); }
.nav-toggle[aria-expanded="true"] span::after { opacity: 0; }

/* HOME */
main {
  flex: 1;
}

#home {
  padding: 120px 0 80px;
  position: relative;
  overflow: hidden;
}

#home::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(26, 86, 219, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26, 86, 219, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 0%, black 40%, transparent 100%);
}

.label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 14px;
}

.label::before {
  content: '';
  width: 20px;
  height: 2px;
  background: var(--blue);
  border-radius: 2px;
}

.hero {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 52px;
  position: relative;
  z-index: 1;
}

.hero-brand {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 0 auto 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-brand-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(26, 86, 219, 0.18);
  animation: brandRingPulse 3s ease-out infinite;
}

.hero-brand-ring:nth-child(2) {
  animation-delay: 1s;
}

.hero-brand svg {
  width: 72px;
  height: 72px;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 4px 16px rgba(26, 86, 219, 0.15));
}

.hero-brand .logo-node-center {
  transform-origin: 17px 17px;
  animation: brandNodePulse 2.4s ease-in-out infinite;
}

.hero-brand .logo-node-orbit {
  animation: brandOrbitPulse 2.4s ease-in-out infinite;
}

.hero-brand .logo-node-orbit:nth-of-type(2) { animation-delay: 0.3s; }
.hero-brand .logo-node-orbit:nth-of-type(3) { animation-delay: 0.6s; }
.hero-brand .logo-node-orbit:nth-of-type(4) { animation-delay: 0.9s; }
.hero-brand .logo-node-orbit:nth-of-type(5) { animation-delay: 1.2s; }
.hero-brand .logo-node-orbit:nth-of-type(6) { animation-delay: 1.5s; }
.hero-brand .logo-node-orbit:nth-of-type(7) { animation-delay: 1.8s; }

.hero-brand .logo-line {
  animation: brandLineGlow 2.4s ease-in-out infinite;
}

@keyframes brandRingPulse {
  0% {
    transform: scale(0.85);
    opacity: 0.5;
  }
  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}

@keyframes brandNodePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.12); }
}

@keyframes brandOrbitPulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

@keyframes brandLineGlow {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.65; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-brand-ring,
  .hero-brand .logo-node-center,
  .hero-brand .logo-node-orbit,
  .hero-brand .logo-line {
    animation: none;
  }
}

.hero .label {
  justify-content: center;
}

.hero-title {
  font-size: clamp(36px, 5.5vw, 58px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--navy);
  margin-bottom: 18px;
}

.hero-title .accent {
  color: var(--blue);
  position: relative;
}

.hero-title .accent::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 4px;
  width: 100%;
  height: 6px;
  background: var(--sky-deep);
  z-index: -1;
  border-radius: 2px;
}

.hero-sub {
  font-size: 17px;
  color: var(--muted);
  line-height: 1.75;
  max-width: 640px;
  margin: 0 auto 28px;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  background: var(--blue);
  color: var(--white);
  border-radius: 8px;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(26, 86, 219, 0.25);
}

.hero-contact-btn:hover {
  background: var(--navy);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(26, 86, 219, 0.3);
}

.divisions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  position: relative;
  z-index: 1;
}

.division-card {
  border-radius: 20px;
  padding: 32px 28px;
  border: 1px solid var(--border-lt);
  transition: box-shadow 0.25s, transform 0.25s, border-color 0.25s;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.division-card.academy,
.division-card.research,
.division-card.development {
  background: linear-gradient(160deg, #ffffff 0%, #f8fbff 100%);
  border-color: #c5d8f7;
}

.division-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(13, 45, 107, 0.1);
  border-color: var(--blue-lt);
}

.division-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.division-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  background: var(--white);
  border: 1px solid var(--border);
}

.division-card .division-icon {
  background: var(--sky);
  border-color: var(--sky-deep);
}

.division-tagline {
  font-size: 12px;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.division-card h3 {
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
}

.division-desc {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 16px;
  flex: 1;
}

.division-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-more {
  margin-top: 16px;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--blue);
}

.pill {
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 100px;
  background: var(--off);
  color: var(--navy);
  border: 1px solid var(--border-lt);
}

/* DIVISION PAGES */
.page-main {
  padding: 120px 0 80px;
}

.theme-academy {
  background: linear-gradient(180deg, #f0f6ff 0%, var(--white) 280px);
}

.theme-research {
  background: linear-gradient(180deg, #f0f6ff 0%, var(--white) 280px);
}

.theme-development {
  background: linear-gradient(180deg, #f0f6ff 0%, var(--white) 280px);
}

.back-link {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 32px;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--blue);
}

.page-hero {
  max-width: 720px;
  margin-bottom: 56px;
}

.page-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  background: var(--white);
  border: 1px solid var(--border);
  margin-bottom: 20px;
}

.page-title {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  color: var(--navy);
  line-height: 1.1;
  margin-bottom: 16px;
}

.page-lead {
  font-size: 18px;
  color: var(--muted);
  line-height: 1.75;
}

.page-section {
  margin-bottom: 48px;
}

.page-section h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 14px;
}

.page-text {
  color: var(--muted);
  margin-bottom: 16px;
  max-width: 720px;
}

.pill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.program-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.program-card {
  background: var(--off);
  border: 1px solid var(--border-lt);
  border-radius: 14px;
  padding: 24px;
}

.program-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}

.program-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
}

.page-list {
  list-style: none;
  max-width: 720px;
}

.page-list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 12px;
  color: var(--text-2);
}

.page-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--blue);
  font-weight: 700;
}

/* FOOTER */
footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.7);
  padding: 40px 0 28px;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 20px;
}

.footer-logo {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: white;
  text-decoration: none;
}

.footer-logo span {
  color: var(--blue-lt);
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: white;
}

.footer-copy {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
}

/* RESPONSIVE */
@media (max-width: 960px) {
  .container { padding: 0 20px; }
  .nav-inner { padding: 12px 20px; }
  .divisions-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .nav-inner { padding: 10px 16px; }
  .nav-toggle { display: inline-flex; }

  .nav-links {
    display: none;
    position: absolute;
    inset-inline: 0;
    top: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 12px 16px 20px;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--border-lt);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
  }

  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; width: 100%; }
  .nav-links a.nav-contact { text-align: center; }

  .hero-contact-btn { width: 100%; justify-content: center; }

  #home,
  .page-main { padding-top: 100px; }

  .hero-brand {
    width: 80px;
    height: 80px;
    margin-bottom: 22px;
  }

  .hero-brand svg {
    width: 60px;
    height: 60px;
  }

  .hero-title { font-size: clamp(30px, 8vw, 40px); }
  .hero-sub { font-size: 15px; }
  .division-card { padding: 24px 20px; }
}
