@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --ink: #172126;
  --muted: #67757a;
  --paper: #f4f2ed;
  --white: #fffdf8;
  --line: #d8d9d2;
  --cyan: #62d4d0;
  --cyan-deep: #0d8f8d;
  --coral: #f47769;
  --gold: #f2c75c;
  --night: #172126;
  --display: 'Manrope', sans-serif;
  --mono: 'DM Mono', monospace;

  font-family: var(--display);
  line-height: 1.6;
  font-weight: 400;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--paper);
}

* {
  box-sizing: border-box;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  letter-spacing: -0.07em;
  line-height: 0.96;
  font-weight: 800;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2.8rem);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Header & Navigation */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 253, 248, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(23, 33, 38, 0.08);
  transition: min-height 0.2s ease;
  display: flex;
  align-items: center;
  min-height: 74px;
}

.topbar.is-compact {
  min-height: 56px;
}

.topbar-inner, .site-main, .footer-inner {
  width: min(1440px, calc(100% - 40px));
  margin: 0 auto;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand-link, .brand-link > span:last-child, .mobile-brand {
  display: flex;
  align-items: center;
}

.brand-link {
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand-link > span:last-child {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.brand-link strong {
  font-size: 16px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--white);
  font-weight: 800;
}

.desktop-nav {
  display: flex;
  gap: 22px;
}

.desktop-nav a, footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color .2s ease;
}

.desktop-nav a:hover, footer a:hover {
  color: var(--ink);
}

.zse-return-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 10px 16px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.zse-return-link:hover {
  background: var(--cyan);
  color: var(--ink);
  transform: translateY(-2px);
}

.zse-return-link:focus-visible,
.zse-footer-link:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 4px;
}

.zse-footer-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s ease, gap 0.2s ease;
}

.zse-footer-link:hover {
  gap: 12px;
  color: var(--cyan-deep);
}

.menu-toggle {
  display: none;
}

.mobile-menu {
  display: none;
}

.menu-overlay {
  display: none;
}

/* Layout */
.site-main {
  padding: 40px 0 80px;
}

.hero-panel {
  min-height: 570px;
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  align-items: end;
  gap: 60px;
  padding: 76px 7%;
  overflow: hidden;
  background: radial-gradient(circle at 83% 38%, rgba(98,212,208,.2), transparent 25%),
              linear-gradient(115deg, var(--paper), #e8ede5);
  border-radius: 24px;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero-copy h1 {
  max-width: 780px;
  margin: 20px 0 30px;
}

.hero-copy h1 span {
  color: var(--coral);
}

.hero-copy p, .section-lead {
  max-width: 620px;
  color: var(--muted);
  line-height: 1.8;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--cyan-deep);
  text-decoration: none;
  transition: color 0.2s ease;
}

.text-link:hover {
  color: var(--cyan);
}

.hero-button {
  margin-top: 18px;
}

.hero-note {
  position: relative;
  z-index: 1;
  padding: 28px;
  border-left: 3px solid var(--cyan);
  background: rgba(255,253,248,.74);
}

.hero-note strong {
  display: block;
  margin-top: 16px;
  font-size: 28px;
}

.hero-note p {
  margin: 8px 0 0;
  color: var(--muted);
}

.site-main > section:not(.hero-panel) {
  position: relative;
  padding: 105px 0 112px;
}

.site-main h2 {
  margin: 12px 0 32px;
}

.profession-grid, .grading-grid, .threshold-grid, .rules-grid, .rights-grid, .activity-grid {
  display: grid;
  gap: 24px;
}

.profession-grid {
  grid-template-columns: repeat(4, 1fr);
}

.grading-grid, .threshold-grid, .rights-grid {
  grid-template-columns: repeat(2, 1fr);
}

.rules-grid {
  grid-template-columns: repeat(3, 1fr);
}

.info-card, .threshold-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
}

.info-card h3, .threshold-card h3 {
  margin: 16px 0;
  font-size: 22px;
}

.card-number {
  font-family: var(--mono);
  color: var(--cyan-deep);
  font-size: 12px;
}

.profession-card {
  min-height: 190px;
  border-top: 3px solid var(--cyan);
  transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s ease, border-color .3s ease, background-color .3s ease;
}

.profession-card:nth-child(even) {
  border-top-color: var(--coral);
}

.profession-card:hover {
  transform: translateY(-8px) scale(1.025);
  border-color: var(--cyan-deep);
  background: var(--white);
  box-shadow: 0 16px 30px rgba(23,33,38,.14);
}

.profession-card:nth-child(even):hover {
  border-color: var(--coral);
}

.profession-card h3 {
  transition: color .3s ease;
}

.profession-card:hover h3 {
  color: var(--cyan-deep);
}

.profession-card:nth-child(even):hover h3 {
  color: var(--coral);
}

.grade-list {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 13px 0 20px;
}

.grade-item {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  opacity: 0;
  transform: translateY(16px);
}

.is-visible .grade-item {
  animation: grade-in 0.55s cubic-bezier(.2,.8,.2,1) var(--grade-delay, 0ms) forwards;
}

.grade-list strong {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
  opacity: 0;
  transform: scale(0);
}

.is-visible .grade-item strong {
  animation: grade-badge-pop 0.65s cubic-bezier(.2,1.4,.4,1) var(--grade-delay, 0ms) forwards;
}

.grade-list span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.25;
}

.threshold-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 13px 0;
  opacity: 0;
  transform: translateY(-24px);
}

.is-visible .threshold-row {
  animation: plus-row-in 0.6s cubic-bezier(.2,.8,.2,1) var(--threshold-delay, 0ms) forwards;
}

.threshold-row span, .card-intro, .rule-card p, .rights-card li, .duties-card li, .activity-item p {
  color: var(--muted);
}

.accent-card {
  border-top: 3px solid var(--gold);
}

.plus-row {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transform: translateY(-24px);
}

.is-visible .plus-row {
  animation: plus-row-in 0.6s cubic-bezier(.2,.8,.2,1) var(--plus-delay, 0ms) forwards;
}

.plus-row strong {
  color: var(--cyan-deep);
}

.threshold-card--accent {
  border-top: 3px solid var(--coral);
}

.threshold-row strong {
  color: var(--cyan-deep);
  font-family: var(--mono);
}

.average-layout {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 24px;
}

.average-card, .honors-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
}

.average-card {
  border-top: 3px solid var(--cyan);
}

.average-card h3, .honors-card h3 {
  margin: 0 0 24px;
  font-size: 22px;
}

.average-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.average-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transform: translateY(-18px);
}

.is-visible .average-row {
  animation: plus-row-in .6s cubic-bezier(.2,.8,.2,1) var(--average-delay, 0ms) forwards;
}

.average-row strong {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
}

.average-row span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
}

.honors-card {
  background: var(--gold);
  border-color: var(--gold);
}

.honors-card .eyebrow {
  color: var(--ink);
}

.honors-card p, .honors-card li {
  color: var(--ink);
  line-height: 1.7;
}

.honors-card ol {
  margin: 16px 0 0;
  padding-left: 22px;
}

.honors-card strong {
  font-weight: 800;
}

.teacher-note {
  margin: 24px 0 28px;
  padding: 18px 22px;
  border-left: 4px solid var(--coral);
  background: rgba(244,119,105,.12);
  color: var(--ink);
  line-height: 1.6;
}

.teacher-note strong {
  color: var(--coral);
  font-weight: 800;
}

.action-strip {
  display: flex;
  gap: 24px;
  align-items: center;
  margin-top: 32px;
  padding: 24px;
  border-left: 3px solid var(--coral);
  background: var(--white);
}

.action-strip span {
  color: var(--muted);
}

.rule-card {
  min-height: 260px;
}

.rule-card p {
  line-height: 1.7;
}

.rights-card {
  border-top: 3px solid var(--cyan);
}

.duties-card {
  border-top: 3px solid var(--gold);
}

.info-card ul {
  margin: 0;
  padding-left: 20px;
  line-height: 2;
}

.activity-grid {
  grid-template-columns: repeat(4, 1fr);
}

.activity-item {
  display: flex;
  gap: 16px;
  padding: 20px 0;
  border-top: 2px solid var(--ink);
}

.activity-item > span {
  font-family: var(--mono);
  color: var(--coral);
}

.activity-item h3 {
  margin: 0;
  font-size: 17px;
}

.activity-item p {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.5;
}

.closing-note {
  margin-top: 56px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

footer {
  padding: 64px 0 24px;
  background: var(--cyan);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.footer-nav .eyebrow {
  margin-bottom: 6px;
}

footer h2 {
  max-width: 400px;
  margin: 14px 0;
}

footer p {
  max-width: 420px;
  color: var(--muted);
  line-height: 1.7;
}

footer .eyebrow {
  color: var(--ink);
}

footer > .footer-bottom {
  width: min(1440px, calc(100% - 40px));
  margin: 48px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(23,33,38,.2);
  color: var(--muted);
  font: 12px var(--mono);
}

/* Animations & Keyframes */
@keyframes reveal-up {
  from {
    opacity: 0;
    transform: translateY(34px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes grow {
  from {
    transform: scaleX(0);
    transform-origin: left;
  }
  to {
    transform: scaleX(1);
    transform-origin: left;
  }
}

@keyframes grade-in {
  from { opacity: 0; transform: translateY(16px) scale(0.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes grade-badge-pop {
  from { opacity: 0; transform: scale(0); }
  70% { opacity: 1; transform: scale(1.12); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes plus-row-in {
  from { opacity: 0; transform: translateY(-24px); }
  to { opacity: 1; transform: translateY(0); }
}

.reveal-section {
  position: relative;
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.section-decor {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.section-decor > span {
  position: absolute;
  display: block;
  opacity: 0;
  will-change: opacity, transform;
  transition: opacity 1s ease, transform 1.15s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal-section > *:not(.section-decor) {
  position: relative;
  z-index: 1;
}

.reveal-section.is-visible .section-decor > span {
  opacity: 1;
  transform: translate(0, 0) rotate(var(--decor-rotation, 0deg)) scale(1);
}

.decor-line {
  width: clamp(660px, 72vw, 1140px);
  height: 1px;
  background: var(--ink);
  transform: translateX(-80px) rotate(var(--decor-rotation, 0deg));
}

.decor-circle {
  --decor-rotation: 0deg;
  width: clamp(360px, 39vw, 630px);
  height: clamp(360px, 39vw, 630px);
  border: 1px solid var(--cyan-deep);
  border-radius: 50%;
  transform: translateY(40px) scale(0.7);
}

.decor-square {
  --decor-rotation: 24deg;
  width: clamp(216px, 24vw, 375px);
  height: clamp(216px, 24vw, 375px);
  border: 1px solid var(--coral);
  transform: translate(40px, 40px) rotate(calc(var(--decor-rotation, 24deg) + 24deg)) scale(0.7);
}

.decor-line--hero {
  top: 32%;
  left: 4%;
  --decor-rotation: -28deg;
  transform: translate(-160vw, 0) rotate(var(--decor-rotation));
  transition-duration: 1.35s;
  transition-delay: 420ms;
}

.decor-circle--hero {
  top: 14%;
  right: 3%;
  transform: translate(160vw, -100vh) scale(0.7);
  transition-duration: 1.45s;
  transition-delay: 760ms;
}

.decor-square--hero {
  right: 40%;
  bottom: 9%;
  transform: translate(120vw, 100vh) rotate(48deg) scale(0.7);
  transition-duration: 1.55s;
  transition-delay: 1100ms;
}

.decor-line--kpi {
  top: 20%;
  right: -20px;
  --decor-rotation: 90deg;
  transform: translateX(80px) rotate(var(--decor-rotation));
}

.decor-circle--kpi {
  left: -32px;
  bottom: 12%;
  transition-delay: 180ms;
}

.decor-square--pages {
  top: 12%;
  right: 7%;
  transition-delay: 120ms;
}

.decor-line--pages {
  bottom: 13%;
  left: 3%;
  --decor-rotation: -18deg;
  transform: translateX(-80px) rotate(var(--decor-rotation));
  transition-delay: 260ms;
}

.decor-circle--engagement {
  top: 9%;
  right: 4%;
  transition-delay: 160ms;
}

.decor-line--engagement {
  bottom: 20%;
  left: -30px;
  --decor-rotation: 90deg;
  transform: translateX(-80px) rotate(var(--decor-rotation));
  transition-delay: 280ms;
}

.decor-square--recommendations {
  top: 15%;
  left: 2%;
  transition-delay: 120ms;
}

.decor-circle--recommendations {
  right: 5%;
  bottom: 12%;
  transition-delay: 260ms;
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--cyan);
  color: var(--ink);
  cursor: pointer;
  opacity: 0;
  transform: translateY(18px) scale(0.85);
  pointer-events: none;
  box-shadow: 0 8px 0 rgba(23, 33, 38, 0.14);
  transition: opacity 0.25s ease, transform 0.25s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.back-to-top svg {
  width: 22px;
  height: 22px;
}

.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--white);
  box-shadow: 0 4px 0 rgba(23, 33, 38, 0.14);
  transform: translateY(4px) scale(1.03);
}

.back-to-top:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 4px;
}

/* Responsive Media Queries */
@media (max-width: 767px) {
  .topbar-inner, .site-main, .footer-inner {
    width: min(100% - 32px, 600px);
  }
  .desktop-nav, .desktop-return {
    display: none;
  }
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--white);
    color: var(--ink);
    font-size: 22px;
    cursor: pointer;
  }
  .mobile-menu {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 50;
    display: flex;
    width: min(86%, 360px);
    flex-direction: column;
    gap: 12px;
    padding: 24px;
    background: var(--white);
    transform: translateX(100%);
    transition: transform .3s ease;
  }
  .mobile-menu.is-open {
    transform: translateX(0);
  }
  .mobile-menu > a:not(.zse-return-link) {
    padding: 13px 16px;
    border-radius: 10px;
    background: var(--paper);
    color: var(--ink);
    text-decoration: none;
    font-weight: 600;
  }
  .mobile-brand {
    gap: 12px;
    margin-bottom: 16px;
  }
  .menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(23,33,38,.45);
    display: none;
  }
  .menu-overlay.is-open {
    display: block;
  }
  .site-main {
    padding-top: 16px;
  }
  .hero-panel {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 56px 24px 64px;
  }
  .hero-note {
    margin-top: 8px;
  }
  .site-main > section:not(.hero-panel) {
    padding: 72px 0;
  }
  .profession-grid, .grading-grid, .threshold-grid, .rules-grid, .rights-grid, .activity-grid, .average-layout {
    grid-template-columns: 1fr;
  }
  .action-strip {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
  .grade-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 22px;
  }
  .average-list {
    grid-template-columns: 1fr;
  }
  footer {
    padding-top: 48px;
  }
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .back-to-top {
    right: 16px;
    bottom: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .section-decor > span,
  .reveal-section,
  .grade-item,
  .grade-list strong,
  .plus-row,
  .threshold-row,
  .profession-card,
  .average-row {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
