﻿/* ===== Design tokens ===== */
:root {
  --bg: #e4eaf2;
  --bg-alt: #d6e0ec;
  --surface: #dce5f0;
  --surface-2: #cbd9e8;
  --ink: #1b2a3a;
  --ink-muted: #4a5f75;
  --accent: #2f5f9e;
  --accent-hover: #244e82;
  --accent-soft: #3a7ca5;
  --border: #8fa3bb;
  --dark: #1f3a5f;
  --dark-card: #2c4a73;
  --light-on-dark: #eaf1f9;
  --focus: #967849;
  --danger-border: #8a4e50;
  --header-h: 64px;
  --radius: 12px;
  --shadow: 0 12px 40px rgba(27, 42, 58, 0.08);
  --shadow-lg: 0 20px 50px rgba(27, 42, 58, 0.12);
}

html,
body {
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body {
  font-family: "IBM Plex Sans", sans-serif;
  background: var(--bg);
  color: var(--ink);
  padding-top: var(--header-h);
  line-height: 1.6;
}

.serif {
  font-family: "DM Serif Display", serif;
  letter-spacing: -0.02em;
}

a {
  color: inherit;
}

.u {
  text-decoration: underline;
  color: var(--accent-soft);
}

/* ===== Header / nav ===== */
.site-header {
  background: rgba(211, 222, 235, 0.92);
  border-color: var(--border);
  backdrop-filter: blur(10px);
}

.badge {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--bg-alt);
  transition: box-shadow 0.3s, transform 0.3s;
}

.logo:hover .badge {
  box-shadow: 0 0 0 4px rgba(58, 124, 165, 0.25);
  transform: scale(1.04);
}

.nl {
  padding: 4px 2px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s, color 0.2s;
  font-weight: 500;
}

.nl:hover,
.nl.active {
  border-color: var(--accent);
  color: var(--accent);
}

/* ===== Buttons & cards ===== */
.btn,
.btn2 {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 8px;
  font-weight: 600;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.btn {
  background: var(--accent);
  color: var(--light-on-dark);
  box-shadow: 0 4px 14px rgba(47, 95, 158, 0.35);
}

.btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn2 {
  border: 1px solid var(--accent-soft);
  color: var(--ink);
  background: transparent;
}

.btn2:hover {
  background: var(--surface-2);
}

.card {
  display: block;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
  box-shadow: var(--shadow);
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-soft);
  box-shadow: var(--shadow-lg);
}

.chip {
  flex: none;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-alt);
  font-size: 0.875rem;
  transition: background 0.2s, color 0.2s;
}

.chip[aria-pressed="true"] {
  background: var(--accent-soft);
  color: var(--light-on-dark);
  border-color: var(--accent-soft);
}

/* ===== Sections ===== */
.section {
  padding: 3.5rem 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-dark {
  background: var(--dark);
  color: var(--light-on-dark);
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-soft);
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: clamp(1.75rem, 3vw, 2rem);
  margin-bottom: 1.25rem;
}

/* ===== Home hero ===== */
.hero {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - var(--header-h));
  background: linear-gradient(135deg, #d6e0ec 0%, #c5d4e8 35%, #dce4f4 65%, #d0dce8 100%);
  background-size: 400% 400%;
  animation: hero-gradient 20s ease infinite;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 70% 40%, rgba(58, 124, 165, 0.15), transparent 55%),
    radial-gradient(ellipse 50% 40% at 20% 80%, rgba(47, 95, 158, 0.12), transparent 50%);
  pointer-events: none;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.5;
  pointer-events: none;
}

.hero-orb-1 {
  width: 280px;
  height: 280px;
  background: rgba(58, 124, 165, 0.35);
  top: 10%;
  right: 5%;
  animation: orb-drift 14s ease-in-out infinite;
}

.hero-orb-2 {
  width: 200px;
  height: 200px;
  background: rgba(47, 95, 158, 0.25);
  bottom: 15%;
  left: 8%;
  animation: orb-drift 18s ease-in-out infinite reverse;
}

.hero-orb-3 {
  width: 120px;
  height: 120px;
  background: rgba(150, 120, 73, 0.2);
  top: 45%;
  left: 40%;
  animation: orb-drift 12s ease-in-out infinite;
  animation-delay: -4s;
}

@keyframes hero-gradient {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes orb-drift {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(20px, -25px) scale(1.08);
  }
  66% {
    transform: translate(-15px, 15px) scale(0.95);
  }
}

.hero-inner {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - var(--header-h));
}

.hero-title {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  line-height: 1.1;
}

.hero-fade {
  opacity: 0;
  transform: translateY(24px);
  animation: hero-fade-in 0.9s ease forwards;
}

.hero-fade-d1 {
  animation-delay: 0.15s;
}
.hero-fade-d2 {
  animation-delay: 0.35s;
}
.hero-fade-d3 {
  animation-delay: 0.55s;
}
.hero-fade-d4 {
  animation-delay: 0.75s;
}

@keyframes hero-fade-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.float {
  animation: float-card 7s ease-in-out infinite;
}

@keyframes float-card {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateY(-12px) rotate(1deg);
  }
}

.pulse {
  stroke-dasharray: 600;
  animation: dash-line 6s linear infinite;
}

@keyframes dash-line {
  to {
    stroke-dashoffset: -1200;
  }
}

.mini {
  background: var(--dark-card);
  border: 1px solid #4a6a94;
  border-radius: 10px;
  padding: 14px;
  color: var(--light-on-dark);
  box-shadow: var(--shadow-lg);
}

.hero-visual {
  perspective: 900px;
}

/* ===== Page hero (inner pages) ===== */
.page-hero {
  position: relative;
  overflow: hidden;
  min-height: 42vh;
  display: flex;
  align-items: center;
  background: linear-gradient(120deg, #d6e0ec, #cbd9e8, #dce4f4);
  background-size: 300% 300%;
  animation: hero-gradient 18s ease infinite;
}

.page-hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--accent-soft), transparent);
  opacity: 0.6;
}

.page-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  max-width: 42rem;
}

/* ===== Stats / steps / values ===== */
.stat-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.stat-card {
  text-align: center;
  padding: 1.5rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stat-card strong {
  display: block;
  font-size: 2rem;
  font-family: "DM Serif Display", serif;
  color: var(--accent);
  line-height: 1.2;
}

.step-list {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
}

.step-list li {
  counter-increment: step;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.step-list li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--light-on-dark);
  font-weight: 700;
  font-size: 0.9rem;
}

.value-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.value-card {
  padding: 1.5rem;
  background: rgba(44, 74, 115, 0.35);
  border: 1px solid rgba(74, 106, 148, 0.6);
  border-radius: var(--radius);
}

.value-card i {
  color: #a8c8e8;
}

.alert-banner {
  padding: 0.85rem 1rem;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--danger-border);
  font-weight: 500;
  font-size: 0.9rem;
}

.dark {
  background: var(--dark);
  color: var(--light-on-dark);
}

.pathway-list {
  border-left: 4px solid var(--accent);
  padding-left: 1.5rem;
}

/* ===== Forms ===== */
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="checkbox"],
input[type="radio"] {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
  accent-color: var(--accent);
}

.reflect-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
}

.reflect-checklist {
  border: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.reflect-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 0.9375rem;
  line-height: 1.45;
  transition: border-color 0.2s;
}

.reflect-item:hover {
  border-color: var(--border);
}

.reflect-item input[type="checkbox"] {
  margin-top: 0.2rem;
}

.reflect-form .btn {
  margin-top: 1rem;
}

.reflect-out {
  margin-top: 1rem;
  padding: 0.875rem 1rem;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 0.9rem;
  line-height: 1.55;
}

.reflect-out:empty {
  display: none;
}

input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent-soft);
  box-shadow: 0 0 0 3px rgba(58, 124, 165, 0.2);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* ===== Scroll reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 {
  transition-delay: 0.1s;
}
.reveal-delay-2 {
  transition-delay: 0.2s;
}
.reveal-delay-3 {
  transition-delay: 0.3s;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .hero-fade {
    opacity: 1;
    transform: none;
  }
}
