/* ==========================================================================
   Apex Academy -- Design System (playful & energetic)
   ========================================================================== */

:root {
  --color-navy: #16294f;
  --color-navy-light: #24396c;
  --color-orange: #ff6b35;
  --color-orange-dark: #e0501e;
  --color-orange-light: #ffe4d6;
  --color-yellow: #ffc93c;
  --color-yellow-dark: #dba310;
  --color-yellow-light: #fff3d1;
  --color-teal: #2dd4bf;
  --color-teal-dark: #129488;
  --color-teal-light: #d6faf5;
  --color-bg: #fffaf1;
  --color-surface: #ffffff;
  --color-text: #262019;
  --color-text-muted: #6b6459;
  --color-border: #f1e6cf;

  --font-display: 'Poppins', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-full: 999px;
  --shadow-sm: 0 2px 10px rgba(22, 41, 79, 0.08);
  --shadow-md: 0 14px 30px rgba(22, 41, 79, 0.14);
  --shadow-lg: 0 26px 50px rgba(22, 41, 79, 0.2);

  --container-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  animation: page-fade-in 0.35s ease;
}

@keyframes page-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

body.is-leaving {
  opacity: 0;
  transition: opacity 0.18s ease;
}

@media (prefers-reduced-motion: reduce) {
  body {
    animation: none;
  }
  body.is-leaving {
    transition: none;
  }
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-navy);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em 0;
}

p {
  margin: 0 0 1em 0;
}

a {
  color: var(--color-navy);
}

img, svg {
  max-width: 100%;
  display: block;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-navy);
  color: #fff;
  padding: 10px 16px;
  z-index: 100;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ------------------------------ Motion ------------------------------ */

[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(.22,.9,.32,1), transform 0.7s cubic-bezier(.22,.9,.32,1);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@keyframes float-a {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-16px) rotate(4deg); }
}

@keyframes float-b {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(14px) rotate(-5deg); }
}

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.float-a { animation: float-a 6s ease-in-out infinite; }
.float-b { animation: float-b 7s ease-in-out infinite; }
.float-a-slow { animation: float-a 9s ease-in-out infinite; }
.spin-slow { animation: spin-slow 22s linear infinite; }

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--color-orange), var(--color-yellow), var(--color-teal));
  z-index: 100;
  transition: width 0.1s linear;
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .float-a, .float-b, .float-a-slow, .spin-slow {
    animation: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* -------------------------------- Logo mark -------------------------------- */

.logo-mark {
  width: 140px;
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.hero-card .logo-mark {
  width: 72px;
}

.footer-brand .logo-mark {
  width: 150px;
}

/* ------------------------ Header / Navigation ------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: transparent;
  padding: 16px 0;
  transition: padding 0.25s ease;
}

.site-header.is-scrolled {
  padding: 10px 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 250, 241, 0.9);
  backdrop-filter: saturate(180%) blur(10px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  padding: 10px 12px 10px 22px;
  transition: box-shadow 0.25s ease;
}

.site-header.is-scrolled .header-inner {
  box-shadow: var(--shadow-md);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-navy);
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}

.primary-nav ul {
  list-style: none;
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.primary-nav a {
  display: inline-block;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text);
  padding: 9px 16px;
  border-radius: var(--radius-full);
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.primary-nav a:hover,
.primary-nav a:focus-visible {
  color: var(--color-orange-dark);
  background: var(--color-orange-light);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: var(--color-navy);
  border-radius: 2px;
}

/* ------------------------------ Buttons ------------------------------ */

.btn {
  position: relative;
  display: inline-block;
  overflow: hidden;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(.34,1.56,.64,1), box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -75%;
  width: 40%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-20deg);
  transition: left 0.55s ease;
  pointer-events: none;
}

.btn:hover::after {
  left: 130%;
}

.btn:hover {
  transform: translateY(-3px) scale(1.03);
}

.btn:active {
  transform: translateY(-1px) scale(1);
}

.btn-primary {
  background: var(--color-orange);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--color-orange-dark);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.55);
}
.btn-secondary:hover,
.btn-secondary:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  border-color: #ffffff;
}

.btn-on-light {
  color: var(--color-navy);
  border-color: var(--color-navy);
  background: transparent;
}
.btn-on-light:hover,
.btn-on-light:focus-visible {
  background: var(--color-navy);
  color: #fff;
}

.btn-block {
  display: block;
  width: 100%;
  text-align: center;
}

.text-link {
  color: var(--color-orange-dark);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid var(--color-orange);
  transition: letter-spacing 0.18s ease;
}
.text-link:hover {
  letter-spacing: 0.01em;
}

/* ------------------------------- Badges / tags ------------------------------- */

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag {
  display: inline-block;
  background: var(--color-navy);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 9px 18px;
  border-radius: var(--radius-full);
  transition: transform 0.18s ease;
}
.tag:hover {
  transform: translateY(-2px) rotate(-1deg);
}

.tag-accent { background: var(--color-orange); }
.tag-yellow { background: var(--color-yellow); color: var(--color-navy); }
.tag-teal { background: var(--color-teal); color: var(--color-navy); }

/* ------------------------------ Sections ------------------------------ */

.section {
  padding: 76px 0;
}

.section-muted {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.section-dark {
  position: relative;
  background: var(--color-navy);
  color: #d8dce6;
  overflow: hidden;
}

.cta-blob {
  position: absolute;
  border-radius: 50%;
  transform: translateY(var(--parallax-y, 0px));
}

.cta-blob-1 {
  width: 220px;
  height: 220px;
  background: var(--color-orange);
  opacity: 0.14;
  top: -60px;
  left: -60px;
}

.cta-blob-2 {
  width: 260px;
  height: 260px;
  background: var(--color-teal);
  opacity: 0.12;
  bottom: -80px;
  right: -60px;
}

.section-dark h2 {
  color: #ffffff;
}

/* Flat geometric confetti shapes used to liven up otherwise-empty dark sections.
   Solid shapes, no glow/blur -- same floating motion as the hero shapes. */

.confetti {
  position: absolute;
  pointer-events: none;
  opacity: 0.9;
}

.confetti-square {
  border-radius: 4px;
}

.confetti-ring {
  border-radius: 50%;
  border-style: solid;
  background: transparent;
}

.confetti-triangle {
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom-style: solid;
}

.section-header {
  max-width: 62ch;
  margin: 0 0 40px 0;
}

.section-header.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-title {
  font-size: 1.9rem;
  margin-bottom: 10px;
}

.section-kicker {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--color-orange-dark);
  background: var(--color-orange-light);
  padding: 5px 14px;
  border-radius: var(--radius-full);
  margin: 0 0 12px 0;
}

.section-dark .section-kicker {
  color: var(--color-navy);
  background: var(--color-yellow);
}

.section-kicker-yellow {
  color: var(--color-navy);
  background: var(--color-yellow);
}

/* --------------------------- Interactive canvas moment --------------------------- */

.canvas-moment {
  position: relative;
  background: var(--color-navy);
  overflow: hidden;
  min-height: 420px;
  display: flex;
  align-items: center;
  padding: 80px 0;
}

.canvas-moment canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: pan-y;
}

.canvas-moment-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 620px;
  margin: 0 auto;
  pointer-events: none;
}

.canvas-moment-content h2 {
  color: #ffffff;
  font-size: 2.1rem;
}

.canvas-moment-content .lede {
  color: #c7cbd8;
  margin: 0 auto;
}

@media (max-width: 720px) {
  .canvas-moment {
    min-height: 340px;
    padding: 56px 0;
  }
}

/* -------------------------------- Hero -------------------------------- */

.hero {
  position: relative;
  padding: 76px 0 40px 0;
  background: linear-gradient(180deg, #fff4e0 0%, var(--color-bg) 100%);
  overflow: hidden;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.wave-divider {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 40px;
}

.wave-divider path {
  fill: var(--color-surface);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--color-navy);
  background: var(--color-yellow-light);
  padding: 6px 16px 6px 10px;
  border-radius: var(--radius-full);
  margin: 0 0 18px 0;
}

.eyebrow::before {
  content: '\2728';
  font-size: 0.9rem;
}

.hero-copy h1 {
  font-size: 3rem;
  margin-bottom: 0.35em;
}

.hero-copy h1 .accent {
  position: relative;
  color: var(--color-navy);
  z-index: 1;
}

.hero-copy h1 .accent::after {
  content: '';
  position: absolute;
  left: -4px;
  right: -4px;
  bottom: 0.05em;
  height: 0.36em;
  background: var(--color-yellow);
  z-index: -1;
  border-radius: var(--radius-full);
  transform: rotate(-1deg);
  animation: highlight-breathe 3.2s ease-in-out infinite;
  transform-origin: left center;
}

@keyframes highlight-breathe {
  0%, 100% { transform: rotate(-1deg) scaleX(1); }
  50% { transform: rotate(-1deg) scaleX(1.03); }
}

.lede {
  font-size: 1.08rem;
  color: var(--color-text-muted);
  max-width: 52ch;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 8px 0 28px 0;
}

.hero-actions .btn-secondary {
  color: var(--color-navy);
  border-color: var(--color-navy);
}
.hero-actions .btn-secondary:hover,
.hero-actions .btn-secondary:focus-visible {
  background: var(--color-navy);
  color: #fff;
}

/* Hero visual: floating blob shapes + a friendly badge card */

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 420px;
  padding: 24px;
}

.hero-parallax {
  position: absolute;
  inset: 0;
  transition: transform 0.2s ease-out;
}

.hero-shape {
  position: absolute;
  z-index: 1;
}

.hero-shape-1 {
  width: 280px;
  height: 280px;
  background: var(--color-orange);
  opacity: 0.22;
  top: -6px;
  right: 2%;
  border-radius: 63% 37% 54% 46% / 45% 40% 60% 55%;
}

.hero-shape-2 {
  width: 170px;
  height: 170px;
  background: var(--color-teal);
  opacity: 0.24;
  bottom: -4px;
  left: 2%;
  border-radius: 42% 58% 61% 39% / 55% 42% 58% 45%;
}

.hero-shape-3 {
  width: 64px;
  height: 64px;
  background: var(--color-yellow);
  opacity: 0.8;
  top: 16px;
  left: 6%;
  border-radius: 40% 60% 55% 45% / 50% 45% 55% 50%;
}

.hero-dots {
  position: absolute;
  z-index: 1;
  width: 110px;
  height: 110px;
  top: -14px;
  left: -10px;
  background-image: radial-gradient(var(--color-navy) 1.6px, transparent 1.6px);
  background-size: 15px 15px;
  opacity: 0.25;
}

.hero-photo {
  position: relative;
  z-index: 2;
  width: 300px;
  height: 340px;
  border-radius: 26px;
  border: 10px solid var(--color-surface);
  box-shadow: var(--shadow-lg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: rotate(-4deg) translateY(var(--parallax-y, 0px));
  transition: transform 0.3s ease;
}

.hero-photo:hover {
  transform: rotate(-1deg) translateY(var(--parallax-y, 0px)) scale(1.02);
}

.hero-photo::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 50%;
  width: 96px;
  height: 36px;
  background: var(--color-yellow);
  opacity: 0.9;
  transform: translateX(-50%) rotate(-5deg);
  box-shadow: var(--shadow-sm);
}

.hero-card {
  position: absolute;
  z-index: 3;
  bottom: -18px;
  left: -12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 18px 20px;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 280px;
  transform: rotate(3deg) translateY(var(--parallax-y, 0px));
  transition: transform 0.25s cubic-bezier(.34,1.56,.64,1);
}

.hero-card:hover {
  transform: translateY(calc(-4px + var(--parallax-y, 0px))) rotate(0deg);
}

.hero-chip {
  position: absolute;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 9px 16px 9px 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--color-navy);
  box-shadow: var(--shadow-md);
}

.hero-chip-1 {
  top: 26px;
  right: -8px;
}

.hero-chip-2 {
  bottom: 96px;
  left: -16px;
}

.hero-card-mark {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.hero-card p {
  margin: 0;
  font-weight: 700;
  color: var(--color-navy);
  font-size: 0.85rem;
  line-height: 1.3;
}

.hero-card .cert-sub {
  margin-top: 4px;
  font-weight: 500;
  font-size: 0.72rem;
  color: var(--color-text-muted);
}

/* -------------------------------- Marquee ticker -------------------------------- */

.marquee {
  overflow: hidden;
  background: var(--color-navy);
  padding: 14px 0;
}

.marquee-track {
  display: flex;
  width: max-content;
  gap: 44px;
  animation: marquee-scroll 24s linear infinite;
}

.marquee-track span {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  color: #ffffff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.marquee-track span::after {
  content: '\2726';
  color: var(--color-orange);
  font-size: 0.8rem;
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track {
    animation: none;
  }
}

/* -------------------------------- Cards -------------------------------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 30px 26px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card-grid .card:nth-child(1) { --card-rot: -1.4deg; }
.card-grid .card:nth-child(2) { --card-rot: 1deg; }
.card-grid .card:nth-child(3) { --card-rot: -0.8deg; }

.card[data-reveal] {
  transform: translateY(28px) rotate(var(--card-rot, 0deg));
}

.card[data-reveal].is-visible {
  transform: rotate(var(--card-rot, 0deg));
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-6px) rotate(0deg) scale(1.015);
}

.card:hover .card-icon {
  transform: rotate(-8deg) scale(1.08);
}

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  background: var(--color-navy);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  transition: transform 0.25s cubic-bezier(.34,1.56,.64,1);
}

.card-icon-orange { background: var(--color-orange); }
.card-icon-teal { background: var(--color-teal); }
.card-icon-yellow { background: var(--color-yellow); color: var(--color-navy); }

.card-icon svg {
  width: 24px;
  height: 24px;
}

.card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.4em;
}

.card p {
  color: var(--color-text-muted);
  margin: 0;
}

/* ------------------------------- Feature list columns ------------------------------- */

.feature-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.feature-column h3 {
  display: inline-block;
  background: var(--color-navy);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.92rem;
  padding: 9px 20px;
  margin-bottom: 20px;
  border-radius: var(--radius-full);
}

.feature-column:nth-child(2) h3 { background: var(--color-orange); }
.feature-column:nth-child(3) h3 { background: var(--color-teal-dark); }

.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--color-border);
  color: var(--color-text);
  font-weight: 500;
}

.feature-list li:last-child {
  border-bottom: none;
}

.feature-list svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: #ffffff;
}

.feature-list .check-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  background: var(--color-orange);
  flex-shrink: 0;
}

.feature-column:nth-child(2) .check-badge { background: var(--color-teal-dark); }
.feature-column:nth-child(3) .check-badge { background: var(--color-yellow-dark); }

/* ------------------------------- About/Contact ------------------------------- */

.about-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.about-preview-text {
  max-width: 68ch;
}

.about-visual {
  position: relative;
  height: 300px;
}

.about-visual[data-reveal] {
  transform: translateY(calc(28px + var(--parallax-y, 0px)));
}

.about-visual[data-reveal].is-visible {
  transform: translateY(var(--parallax-y, 0px));
  transition: opacity 0.7s cubic-bezier(.22,.9,.32,1);
}

.about-shape {
  position: absolute;
  inset: 0;
  border-radius: 38% 62% 61% 39% / 45% 40% 60% 55%;
  background-color: var(--color-teal);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: var(--shadow-lg);
}

.about-shape-outline {
  position: absolute;
  inset: -14px;
  border-radius: 42% 58% 57% 43% / 48% 44% 56% 52%;
  border: 2px dashed var(--color-orange);
  pointer-events: none;
}

.about-dot {
  position: absolute;
  border-radius: 50%;
}

.about-dot-1 {
  width: 26px;
  height: 26px;
  background: var(--color-yellow);
  top: 10px;
  right: 10px;
}

.about-dot-2 {
  width: 16px;
  height: 16px;
  background: var(--color-orange);
  bottom: 30px;
  left: -6px;
}

.contact-panel {
  position: relative;
  background: var(--color-navy);
  border-radius: var(--radius-lg);
  padding: 36px;
  overflow: hidden;
}

.contact-panel::before {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: var(--color-yellow);
  opacity: 0.1;
  top: -70px;
  right: -50px;
}

.contact-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.contact-item {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.contact-item:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.1);
}

.contact-item h3 {
  font-size: 1rem;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.contact-item h3 span.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  background: var(--color-orange);
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(.34,1.56,.64,1);
  animation: icon-badge-pulse 3s ease-in-out infinite;
}

@keyframes icon-badge-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.4); }
  50% { box-shadow: 0 0 0 7px rgba(255, 107, 53, 0); }
}

.contact-item:nth-child(2) h3 span.icon-badge { animation-name: icon-badge-pulse-teal; animation-delay: 0.5s; }
.contact-item:nth-child(3) h3 span.icon-badge { animation-name: icon-badge-pulse-yellow; animation-delay: 1s; }

@keyframes icon-badge-pulse-teal {
  0%, 100% { box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.4); }
  50% { box-shadow: 0 0 0 7px rgba(45, 212, 191, 0); }
}

@keyframes icon-badge-pulse-yellow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 201, 60, 0.4); }
  50% { box-shadow: 0 0 0 7px rgba(255, 201, 60, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .contact-item h3 span.icon-badge {
    animation: none;
  }
}

.contact-item:hover h3 span.icon-badge {
  transform: rotate(-12deg) scale(1.12);
}

.contact-item:nth-child(2) h3 span.icon-badge { background: var(--color-teal-dark); }
.contact-item:nth-child(3) h3 span.icon-badge { background: var(--color-yellow-dark); }

.contact-item h3 svg {
  width: 16px;
  height: 16px;
  color: #ffffff;
}

.contact-item p {
  color: #c7cbd8;
  margin: 0;
}

.contact-item a {
  text-decoration: none;
  color: #c7cbd8;
}
.contact-item a:hover {
  color: #ffffff;
}

/* --------------------------------- CTA banner --------------------------------- */

.cta-banner {
  text-align: center;
}

.cta-banner .container {
  position: relative;
  z-index: 1;
}

.cta-banner h2 {
  font-size: 2rem;
  max-width: 40ch;
  margin: 0 auto 12px auto;
}

.cta-banner .lede {
  color: #c7cbd8;
  max-width: 52ch;
  margin: 0 auto 28px auto;
}

.cta-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* -------------------------------- Footer -------------------------------- */

.site-footer {
  background: var(--color-navy);
  color: #cfd4e0;
  padding: 44px 0;
}

.footer-inner {
  text-align: center;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
  font-size: 1.05rem;
}

.footer-address {
  font-size: 0.9rem;
  margin: 0 0 6px 0;
}

.footer-note {
  font-size: 0.8rem;
  color: #8b93ab;
  margin: 0;
}

/* --------------------------- Generic state pages --------------------------- */

.state-page {
  min-height: 55vh;
  display: flex;
  align-items: center;
}

.state-page-inner {
  text-align: center;
  max-width: 60ch;
  margin: 0 auto;
}

.state-page-inner .eyebrow {
  margin-left: auto;
  margin-right: auto;
}

.state-page-inner .lede {
  margin: 0 auto 24px auto;
}

/* ----------------------------- Student profile ----------------------------- */

.profile-section {
  padding-top: 48px;
}

.profile-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 32px;
  align-items: start;
}

.profile-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 28px 24px;
  text-align: center;
  position: sticky;
  top: 96px;
}

.profile-photo {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 16px auto;
  border: 4px solid var(--color-yellow-light);
}

.profile-photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-navy);
  color: #fff;
  font-family: var(--font-display);
  font-size: 2.4rem;
}

/* ----------------------------- Student directory ----------------------------- */

.students-directory {
  padding-top: 36px;
}

.students-directory .section-header {
  margin-bottom: 48px;
}

.students-directory > .container {
  max-width: 1400px;
}

.students-directory .lede {
  margin-left: auto;
  margin-right: auto;
}

.student-filters {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) repeat(4, minmax(185px, 1fr)) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 32px;
  padding: 14px;
  background: linear-gradient(135deg, #fff3d1 0%, #fffaf1 42%, #d6faf5 100%);
  border: 1px solid rgba(22, 41, 79, 0.16);
  border-radius: 30px;
  box-shadow: 0 16px 34px rgba(22, 41, 79, 0.12);
}

.student-filter-search,
.student-filter-field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.student-filters label {
  padding-left: 14px;
  color: var(--color-navy);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  font-weight: 700;
  text-transform: uppercase;
}

.student-filters input,
.student-filters select {
  width: 100%;
  min-height: 46px;
  padding: 10px 16px;
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(22, 41, 79, 0.18);
  border-radius: 999px;
  font: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.student-filters input::placeholder {
  color: var(--color-text-muted);
}

.student-filters input:hover,
.student-filters select:hover {
  background: #fff;
  border-color: var(--color-orange);
}

.student-filters input:focus,
.student-filters select:focus {
  background: #fff;
  border-color: var(--color-teal);
  box-shadow: 0 0 0 4px rgba(38, 166, 154, 0.14);
}

.student-filter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding-bottom: 0;
}

.student-filter-actions .btn {
  white-space: nowrap;
  min-height: 46px;
  border-radius: 999px;
  padding-left: 12px;
  padding-right: 12px;
}

.student-filter-actions .btn-on-light {
  border-color: var(--color-teal-dark);
  color: var(--color-teal-dark);
}

.student-filter-actions .btn-on-light:hover,
.student-filter-actions .btn-on-light:focus-visible {
  background: var(--color-teal-dark);
  color: #fff;
}

.student-directory-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}

.student-card {
  display: block;
  text-decoration: none;
  text-align: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 26px 18px 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.1s ease-out, transform 0.1s ease-out;
}

.student-card:hover {
  box-shadow: 0 6px 16px rgba(22, 41, 79, 0.1);
  transform: translateY(-6px);
}

.student-card:nth-child(5n+1) .student-avatar { border-color: var(--color-orange-light); }
.student-card:nth-child(5n+2) .student-avatar { border-color: var(--color-teal-light); }
.student-card:nth-child(5n) .student-avatar { border-color: var(--color-yellow-light); }

.student-avatar {
  width: 96px;
  height: 96px;
  font-size: 1.7rem;
}

.student-card-name {
  font-size: 1.15rem;
  margin: 18px 0 0.25em;
}

.student-card-course {
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 2px 0;
}

.student-card-year {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  margin: 0 0 14px 0;
}

.student-card-cta {
  display: inline-block;
  margin-top: auto;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--color-orange-dark);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 44px;
  padding-top: 8px;
  width: 100%;
  flex-wrap: wrap;
}

.pagination-pages {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.pagination-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
}

.pagination-page:hover,
.pagination-page.is-current {
  color: #fff;
  background: var(--color-navy);
  border-color: var(--color-navy);
}

.pagination-status {
  font-weight: 600;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.pagination-size-form {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.pagination-size-form select {
  min-height: 38px;
  padding: 6px 10px;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font: inherit;
}

@media (max-width: 960px) {
  .student-filters {
    grid-template-columns: repeat(2, 1fr);
  }

  .student-filter-search {
    grid-column: 1 / -1;
  }

  .student-directory-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .student-directory-grid {
    grid-template-columns: 1fr;
  }
}

.profile-name {
  font-size: 1.4rem;
  margin-bottom: 0.2em;
}

.profile-course {
  font-weight: 600;
  color: var(--color-text);
  margin: 0;
}

.profile-year {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin: 0 0 20px 0;
}

.profile-meta {
  display: flex;
  justify-content: space-around;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  margin: 0 0 20px 0;
  padding: 16px 0;
}

.profile-meta dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}

.profile-meta dd {
  margin: 0;
  font-weight: 700;
  color: var(--color-navy);
}

.detail-block {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.detail-block h2 {
  font-size: 1.15rem;
  margin-bottom: 16px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin: 0;
}

.detail-grid dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}

.detail-grid dd {
  margin: 0;
  font-weight: 700;
}

.mono {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.85rem;
  word-break: break-all;
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.skills-list li {
  background: var(--color-orange-light);
  border: 1px solid var(--color-orange);
  color: var(--color-orange-dark);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(.34,1.56,.64,1);
}

.detail-block.is-visible .skills-list li {
  opacity: 1;
  transform: scale(1);
}

.skills-list li:nth-child(1) { transition-delay: 0.05s; }
.skills-list li:nth-child(2) { transition-delay: 0.1s; }
.skills-list li:nth-child(3) { transition-delay: 0.15s; }
.skills-list li:nth-child(4) { transition-delay: 0.2s; }
.skills-list li:nth-child(5) { transition-delay: 0.25s; }
.skills-list li:nth-child(n+6) { transition-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  .skills-list li {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.skills-list li:nth-child(3n+2) {
  background: var(--color-teal-light);
  border-color: var(--color-teal);
  color: var(--color-teal-dark);
}

.skills-list li:nth-child(3n) {
  background: var(--color-yellow-light);
  border-color: var(--color-yellow);
  color: var(--color-yellow-dark);
}

.review-quote {
  margin: 0;
  padding-left: 18px;
  border-left: 3px solid var(--color-orange);
  color: var(--color-text-muted);
  font-style: italic;
}

.certificate-block .btn {
  margin-top: 8px;
}

.profile-card .btn-primary {
  animation: cert-pulse 2.6s ease-in-out infinite;
}

.profile-card .btn-primary:hover {
  animation: none;
}

@keyframes cert-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.35), var(--shadow-sm); }
  50% { box-shadow: 0 0 0 10px rgba(255, 107, 53, 0), var(--shadow-sm); }
}

@media (prefers-reduced-motion: reduce) {
  .profile-card .btn-primary {
    animation: none;
  }
}

/* --------------------------- Download toast --------------------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  background: var(--color-navy);
  color: #ffffff;
  padding: 12px 22px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.88rem;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 60;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (prefers-reduced-motion: reduce) {
  .toast {
    transition: none;
  }
}

/* ----------------------- Sticky mobile download bar ----------------------- */

.mobile-download-bar {
  display: none;
}

@media (max-width: 960px) {
  .mobile-download-bar {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
    box-shadow: 0 -10px 24px rgba(22, 41, 79, 0.1);
  }

  .profile-section {
    padding-bottom: 96px;
  }

  .toast {
    bottom: 96px;
  }
}

/* -------------------------------- Responsive -------------------------------- */

@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }
  .hero-visual {
    order: -1;
  }
  .card-grid,
  .contact-grid,
  .feature-columns {
    grid-template-columns: repeat(2, 1fr);
  }
  .about-preview {
    grid-template-columns: 1fr;
  }
  .about-visual {
    order: -1;
    height: 220px;
  }
  .profile-layout {
    grid-template-columns: 1fr;
  }
  .profile-card {
    position: static;
  }
}

@media (max-width: 720px) {
  .student-filters {
    grid-template-columns: 1fr;
  }

  .student-filter-search {
    grid-column: 1 / -1;
  }

  .nav-toggle {
    display: flex;
  }

  .primary-nav {
    display: none;
    width: 100%;
    order: 3;
  }

  .primary-nav.is-open {
    display: block;
  }

  .header-inner {
    flex-wrap: wrap;
  }

  .primary-nav ul {
    flex-direction: column;
    gap: 4px;
    padding: 12px 0 4px 0;
    border-top: 1px solid var(--color-border);
    margin-top: 12px;
  }

  .primary-nav a {
    display: block;
    padding: 10px 14px;
  }

  .hero-copy h1 {
    font-size: 2.1rem;
  }

  .card-grid,
  .contact-grid,
  .feature-columns {
    grid-template-columns: 1fr;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .section {
    padding: 48px 0;
  }
  .hero {
    padding: 48px 0 24px 0;
  }
  .profile-card {
    padding: 22px 18px;
  }
  .detail-block {
    padding: 20px 18px;
  }
}

@media (max-width: 600px) {
  .hero-visual {
    flex-direction: column;
    min-height: 0;
    padding: 8px;
  }
  .hero-photo {
    width: 220px;
    height: 250px;
  }
  .hero-photo::before {
    width: 70px;
    height: 26px;
  }
  .hero-shape-1,
  .hero-shape-2 {
    width: 140px;
    height: 140px;
  }

  .hero-shape-3 {
    display: block;
    width: 48px;
    height: 48px;
    top: 10px;
    left: 4%;
  }

  .hero-dots {
    display: block;
    width: 82px;
    height: 82px;
    top: -6px;
    left: -4px;
    background-size: 12px 12px;
    opacity: 0.3;
  }
  .hero-chip {
    font-size: 0.7rem;
    padding: 7px 12px 7px 10px;
  }
  .hero-chip-1 {
    top: 8px;
    right: 4px;
  }
  .hero-chip-2 {
    top: 130px;
    left: -6px;
    bottom: auto;
  }
  .hero-card {
    position: static;
    margin-top: 24px;
    max-width: 320px;
    width: 100%;
  }
}

/* --------------------------- Phone refinements --------------------------- */

@media (max-width: 600px) {
  html,
  body {
    overflow-x: clip;
  }

  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .header-inner,
  .profile-layout,
  .student-filters,
  .detail-block,
  .contact-panel {
    min-width: 0;
  }

  .site-header {
    padding: 10px 0;
  }

  .header-inner {
    padding: 8px 10px 8px 14px;
    border-radius: 22px;
  }

  .brand {
    min-width: 0;
    gap: 8px;
    font-size: 1rem;
  }

  .brand-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .hero-copy h1 {
    font-size: clamp(1.8rem, 8vw, 2.1rem);
  }

  .hero-copy .lede,
  .canvas-moment-content .lede,
  .cta-banner .lede {
    font-size: 1rem;
  }

  .hero-actions,
  .cta-actions,
  .student-filter-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn,
  .cta-actions .btn,
  .student-filter-actions .btn {
    width: 100%;
    text-align: center;
  }

  .hero-visual {
    width: 100%;
  }

  .hero-chip {
    max-width: calc(100% - 8px);
    white-space: nowrap;
  }

  .hero-chip-1 {
    right: 0;
  }

  .hero-chip-2 {
    left: 0;
  }

  .hero-card {
    max-width: calc(100% - 16px);
    padding: 14px 16px;
  }

  .hero-card p {
    font-size: 0.78rem;
  }

  .canvas-moment-content h2 {
    font-size: 1.7rem;
  }

  .contact-panel {
    padding: 22px 16px;
  }

  .contact-item {
    padding: 18px;
  }

  .footer-address {
    overflow-wrap: anywhere;
  }

  .student-filters {
    padding: 12px;
    border-radius: 22px;
  }

  .student-filter-actions {
    gap: 10px;
  }

  .student-filter-actions .btn {
    padding-left: 18px;
    padding-right: 18px;
  }

  .student-card-course,
  .profile-course,
  .detail-grid dd {
    overflow-wrap: anywhere;
  }

  .pagination {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .pagination .btn {
    width: 100%;
    text-align: center;
  }

  .pagination-status {
    text-align: center;
  }

  .pagination-size-form {
    justify-content: space-between;
  }

  .profile-section {
    padding-top: 32px;
  }

  .profile-layout {
    gap: 20px;
  }

  .profile-meta {
    gap: 12px;
    justify-content: space-between;
  }

  .certificate-block .btn {
    width: 100%;
    text-align: center;
  }

  .toast {
    width: max-content;
    max-width: calc(100% - 32px);
    text-align: center;
  }
}

@media (max-width: 360px) {
  .container {
    padding-left: 12px;
    padding-right: 12px;
  }

  .brand .logo-mark {
    width: 120px;
  }

  .nav-toggle {
    width: 36px;
    height: 36px;
  }

  .hero-photo {
    width: 200px;
    height: 230px;
  }

  .hero-shape-3 {
    width: 42px;
    height: 42px;
  }

  .hero-dots {
    width: 70px;
    height: 70px;
  }

  .hero-chip {
    font-size: 0.66rem;
    padding-left: 9px;
    padding-right: 10px;
  }

  .pagination-size-form {
    align-items: flex-start;
    flex-direction: column;
  }
}
