/* ============================================================
   EURO MATES — style.css  (v2, Node edition)
   Navy · crimson · gold — palette from the Euro Mates badge
   Type: Outfit (display) + Instrument Sans (body)
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Source+Serif+4:opsz,wght@8..60,600;8..60,700&family=Instrument+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap");

/* ---------- Tokens ---------- */
:root {
  --navy: #16224a;
  --red: #c8202f;
  --red-deep: #a51825;
  --gold: #f0b429;
  --gold-deep: #8a6410; /* amber that stays readable on light backgrounds */
  --paper: #f7f8fc;
  --surface: #ffffff;
  --surface-2: #eef1f8;
  --text: #1b2547;
  --text-soft: #4c5878;
  --border: #dde3f0;
  --skyline: #c3cad8;
  --shadow: 0 10px 30px rgba(22, 34, 74, 0.1);
  --shadow-soft: 0 4px 14px rgba(22, 34, 74, 0.07);
  --ring: #2f4bb0;
  --radius: 18px;
  --radius-sm: 12px;
  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-body:
    "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
[data-theme="dark"] {
  --navy: #eceef4;
  --red: #ef4d5c;
  --red-deep: #d22a3a;
  --gold: #f4c14b;
  --gold-deep: #f4c14b; /* on dark, the bright gold is the readable one */
  --paper: #14161f;
  --surface: #1d2029;
  --surface-2: #262a36;
  --text: #eceef4;
  --text-soft: #a6acbd;
  --border: #333849;
  --skyline: #303648;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  --shadow-soft: 0 4px 14px rgba(0, 0, 0, 0.38);
  --ring: #8fa3e8;
  color-scheme: dark;
}

/* ---------- Reset / base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  /* Stop iOS/Safari from inflating text in landscape */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: rgba(200, 32, 47, 0.12);
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}
/* Removes the 300ms tap delay and double-tap-zoom on controls (iOS/Android) */
a,
button,
summary,
[role="button"],
input,
select,
textarea,
label {
  touch-action: manipulation;
}
/* Long words / URLs must not push a phone layout sideways */
p,
li,
h1,
h2,
h3,
h4,
td,
figcaption,
blockquote {
  overflow-wrap: break-word;
  word-wrap: break-word;
}
img:not([class*="hero"]),
video,
iframe {
  max-width: 100%;
}
[data-theme="dark"] body {
  background-image:
    radial-gradient(
      900px 520px at 88% -8%,
      rgba(244, 193, 75, 0.07),
      transparent 60%
    ),
    radial-gradient(
      760px 460px at -8% 18%,
      rgba(239, 77, 92, 0.055),
      transparent 55%
    );
  background-attachment: fixed;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
}
h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.14;
  margin: 0 0 0.5em;
  letter-spacing: -0.005em;
  font-weight: 700;
}
h1 {
  font-size: clamp(1.95rem, 4.4vw, 3.2rem);
}
h1 .accent,
h2 .accent {
  color: var(--red);
}
h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
}
h3 {
  font-size: 1.15rem;
  font-weight: 700;
}
p {
  margin: 0 0 1em;
}
:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 3px;
  border-radius: 4px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

main {
  overflow-x: hidden;
  overflow-x: clip;
}
.container {
  width: min(1120px, 92%);
  margin-inline: auto;
}
.section {
  padding: clamp(3.2rem, 7vw, 5.5rem) 0;
}
.section-alt {
  background: var(--surface-2);
}
.center {
  text-align: center;
}
.lead {
  color: var(--text-soft);
  font-size: 1.07rem;
  max-width: 46rem;
}
.center .lead {
  margin-inline: auto;
}

/* Scroll progress bar */
#progressBar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 90;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--red), var(--gold));
  transition: width 0.08s linear;
}

/* Eyebrow with the gold EU star — brand signature */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.9rem;
}
.eyebrow .star {
  width: 14px;
  height: 14px;
  color: var(--gold);
  flex: none;
  animation: twinkle 3.2s ease-in-out infinite;
}
@keyframes twinkle {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(0.78) rotate(18deg);
    opacity: 0.65;
  }
}

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.7rem 1.5rem;
  border-radius: 999px;
  border: 2px solid transparent;
  font: 600 1rem var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease;
}
.btn:hover {
  transform: translateY(-2px);
}
.btn:active {
  transform: translateY(0) scale(0.98);
}
.btn-primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 8px 20px rgba(200, 32, 47, 0.3);
}
.btn-primary:hover {
  background: var(--red-deep);
}
[data-theme="dark"] .btn-primary {
  background: #d22a3a;
  color: #fff;
}
[data-theme="dark"] .btn-primary:hover {
  background: #e54452;
}
/* shine sweep */
.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255, 255, 255, 0.35) 50%,
    transparent 60%
  );
  transform: translateX(-120%);
}
.btn-primary:hover::after {
  transform: translateX(120%);
  transition: transform 0.7s ease;
}
.btn-ghost {
  border-color: var(--border);
  color: var(--text);
  background: var(--surface);
}
.btn-ghost:hover {
  border-color: var(--ring);
}
.btn svg {
  width: 18px;
  height: 18px;
}
.btn .spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Header (floating glass pill) ---------- */
.site-header {
  position: fixed;
  top: 12px;
  left: 0;
  right: 0;
  z-index: 50;
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
  background: transparent;
  border: 0;
  padding: 0 3%;
}
:root {
  --nav-offset: 74px;
} /* room reserved under the floating bar */
[id] {
  scroll-margin-top: calc(var(--nav-offset) + 12px);
}
.nav-wrap {
  position: relative;
  width: min(1120px, 100%);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0.55rem 0.45rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(22, 34, 74, 0.1);
  box-shadow: 0 8px 30px rgba(22, 34, 74, 0.08);
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
}
[data-theme="dark"] .nav-wrap {
  background: rgba(26, 29, 40, 0.55);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.45);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
}
.brand img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  transition: transform 0.5s ease;
}
.brand:hover img {
  transform: rotate(360deg);
}
.brand-name {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  color: var(--text);
}
.brand-name .accent {
  color: var(--red);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.1rem;
}
.main-nav a {
  position: relative;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-soft);
  padding: 0.55rem 0.95rem 0.6rem;
  border-radius: 999px;
  transition: color 0.18s ease;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 1px;
  width: 9px;
  height: 9px;
  background: var(--gold);
  clip-path: polygon(
    50% 0%,
    61% 35%,
    98% 35%,
    68% 57%,
    79% 91%,
    50% 70%,
    21% 91%,
    32% 57%,
    2% 35%,
    39% 35%
  );
  transform: translateX(-50%) scale(0);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.6, 1);
}
.main-nav a:hover {
  color: var(--red);
}
.main-nav a:hover::after {
  transform: translateX(-50%) scale(0.75);
}
.main-nav a[aria-current="page"] {
  color: var(--red);
}
.main-nav a[aria-current="page"]::after {
  transform: translateX(-50%) scale(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.theme-toggle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
  transition:
    transform 0.25s ease,
    background-color 0.2s ease;
}
.theme-toggle:hover {
  transform: rotate(20deg) scale(1.07);
  background: rgba(240, 180, 41, 0.14);
}
.theme-toggle svg {
  width: 20px;
  height: 20px;
}
.theme-toggle .icon-moon {
  display: none;
}
[data-theme="dark"] .theme-toggle .icon-sun {
  display: none;
}
[data-theme="dark"] .theme-toggle .icon-moon {
  display: block;
}

.nav-burger {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-burger:hover {
  background: rgba(240, 180, 41, 0.14);
}
.nav-burger svg {
  width: 22px;
  height: 22px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: calc(var(--nav-offset) + clamp(2.2rem, 5vw, 3.6rem)) 0 0;
}
.hero-glow {
  position: absolute;
  width: 620px;
  height: 620px;
  right: -160px;
  top: -140px;
  background: radial-gradient(
    circle,
    rgba(240, 180, 41, 0.18),
    rgba(200, 32, 47, 0.07) 55%,
    transparent 70%
  );
  border-radius: 50%;
  pointer-events: none;
  animation: glowPulse 9s ease-in-out infinite;
}
@keyframes glowPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.9;
  }
  50% {
    transform: scale(1.12);
    opacity: 0.6;
  }
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  padding-bottom: clamp(3rem, 6vw, 4.5rem);
}
.hero .lead {
  margin-top: 0.35rem;
}

.grad-text {
  color: var(--red);
}

/* student mascot holding the badge */
.hero-student {
  position: relative;
  width: min(400px, 88%);
  animation: floaty 7s ease-in-out infinite;
  z-index: 1;
}
.hero-student svg {
  display: block;
  width: 100%;
  height: auto;
}
.hero-student .student-front {
  position: absolute;
  inset: 0;
  height: 100%;
  pointer-events: none;
}
/* the badge is a coin that flips on its own — front: your logo · back: EU stars + wordmark */
.badge-flip {
  position: absolute;
  left: 21.92%;
  top: 38.28%;
  width: 56.15%;
  height: 50.34%;
  perspective: 900px;
}
.badge-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  animation: badgeFlip 10s ease-in-out infinite;
}
.badge-face {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: 0 10px 26px rgba(22, 34, 74, 0.18);
}
.badge-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.badge-face.back {
  transform: rotateY(180deg);
}
.badge-face.back svg {
  width: 100%;
  height: 100%;
}
@keyframes badgeFlip {
  0%,
  40% {
    transform: rotateY(0deg);
  }
  50%,
  90% {
    transform: rotateY(180deg);
  }
  100% {
    transform: rotateY(360deg);
  }
}

/* staggered load-in */
.hero-in {
  opacity: 0;
  transform: translateY(24px);
  animation: heroIn 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
.hero-in:nth-child(1) {
  animation-delay: 0.05s;
}
.hero-in:nth-child(2) {
  animation-delay: 0.15s;
}
.hero-in:nth-child(3) {
  animation-delay: 0.25s;
}
.hero-in:nth-child(4) {
  animation-delay: 0.35s;
}
.hero-in:nth-child(5) {
  animation-delay: 0.45s;
}
.hero-in:nth-child(6) {
  animation-delay: 0.55s;
}
@keyframes heroIn {
  to {
    opacity: 1;
    transform: none;
  }
}

/* rotating word */
.rotato {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  margin: 1.1rem 0 0;
  color: var(--text-soft);
}
.rotator {
  display: inline-block;
  color: var(--red);
  font-weight: 800;
  border-bottom: 3px solid var(--gold);
  padding-bottom: 1px;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}
.rotator.out {
  opacity: 0;
  transform: translateY(-10px);
}
.rotator.in {
  opacity: 1;
  transform: none;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.5rem;
}
.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
  margin-top: 1.6rem;
  padding: 0;
  list-style: none;
  color: var(--text-soft);
  font-size: 0.93rem;
  font-weight: 500;
}
.hero-points li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.hero-points svg {
  width: 16px;
  height: 16px;
  color: var(--gold);
  flex: none;
}

.hero-art {
  position: relative;
  display: grid;
  place-items: center;
}
.hero-badge {
  width: min(340px, 78%);
  border-radius: 50%;
  box-shadow: var(--shadow);
  border: 6px solid var(--surface);
  animation: floaty 7s ease-in-out infinite;
  position: relative;
  z-index: 1;
}
.hero-route {
  position: absolute;
  inset: -6% -10%;
  width: 120%;
  height: 112%;
  pointer-events: none;
  color: var(--red);
  opacity: 0.55;
}
.hero-route .route-path {
  stroke-dasharray: 7 9;
  animation: routeDash 26s linear infinite;
}
.hero-route .route-star {
  color: var(--gold);
  transform-origin: 552px 57px;
  animation: twinkle 3.2s ease-in-out infinite;
}
.hero-route .plane {
  color: var(--red);
}
@keyframes routeDash {
  to {
    stroke-dashoffset: -640;
  }
}
@keyframes floaty {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* floating decorative stars */
.float-star {
  position: absolute;
  color: var(--gold);
  opacity: 0.8;
  animation: floatStar 6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes floatStar {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-14px) rotate(22deg);
  }
}

/* Skyline strip — echoes the badge skyline */
.skyline {
  display: block;
  width: 100%;
  height: max(64px, 8.85vw);
  color: var(--skyline);
}
.skyline .sky-back {
  opacity: 0.38;
}
.skyline .sky-front {
  opacity: 0.8;
}
[data-theme="dark"] .skyline .sky-back {
  opacity: 0.5;
}
[data-theme="dark"] .skyline .sky-front {
  opacity: 0.95;
}
.skyline .cloud {
  animation: cloudDrift linear infinite;
}
.skyline .cloud-a {
  animation-duration: 90s;
}
.skyline .cloud-b {
  animation-duration: 120s;
  animation-delay: -40s;
}
@keyframes cloudDrift {
  from {
    transform: translateX(-140px);
  }
  to {
    transform: translateX(560px);
  }
}

/* ---------- Marquee band ---------- */
.marquee-band {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  padding: 0.8rem 0;
}
.marquee-track {
  display: flex;
  gap: 2.6rem;
  width: max-content;
  animation: marquee 34s linear infinite;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
  white-space: nowrap;
}
.marquee-band:hover .marquee-track {
  animation-play-state: paused;
}
.marquee-track span {
  display: inline-flex;
  align-items: center;
  gap: 2.6rem;
}
.marquee-track svg {
  width: 13px;
  height: 13px;
  color: var(--gold);
  flex: none;
}
@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
  margin-top: 2.4rem;
}
.stat {
  text-align: center;
  padding: 1.6rem 1rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}
.stat-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--red);
  line-height: 1;
}
.stat-num .suffix {
  color: var(--gold);
}
.stat-label {
  color: var(--text-soft);
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: 0.45rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- Cards / grids ---------- */
.grid {
  display: grid;
  gap: 1.4rem;
  margin-top: 2.2rem;
}
.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}
.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}
.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow-soft);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: rgba(200, 32, 47, 0.35);
}
.card .icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
  background: var(--surface-2);
  color: var(--red);
  transition:
    transform 0.3s ease,
    background-color 0.3s ease;
}
.card:hover .icon {
  transform: rotate(-8deg) scale(1.1);
}
.card .icon svg {
  width: 26px;
  height: 26px;
}
.card p {
  color: var(--text-soft);
  margin: 0;
  font-size: 0.97rem;
}

/* Steps — numbered because it is a real sequence */
.steps {
  counter-reset: step;
  position: relative;
}
.step {
  position: relative;
  padding-top: 0.4rem;
}
.step::before {
  counter-increment: step;
  content: "0" counter(step);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2rem;
  color: var(--gold);
  display: block;
  margin-bottom: 0.4rem;
}

/* flight lane: a plane flies across each time the section comes into view */
.steps {
  padding-top: 62px;
}
.flight-lane {
  position: absolute;
  top: 4px;
  left: 1%;
  right: 1%;
  height: 44px;
  pointer-events: none;
}
.flight-lane .trail {
  position: absolute;
  left: 2px;
  top: 21px;
  width: 0;
  height: 0;
  border-top: 2px dashed rgba(240, 180, 41, 0.65);
}
[data-theme="dark"] .flight-lane .trail {
  border-top-color: rgba(244, 193, 75, 0.55);
}
.step-plane {
  position: absolute;
  left: 0;
  top: 7px;
  width: 44px;
  height: auto;
  color: var(--red);
}

/* ---------- Mentors ---------- */
.mentor-card {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform-style: preserve-3d;
}
.mentor-figure {
  overflow: hidden;
}
.mentor-photo {
  aspect-ratio: 4 / 4.3;
  width: 100%;
  object-fit: cover;
  object-position: center 18%;
  transition: transform 0.5s ease;
}
.mentor-card:hover .mentor-photo {
  transform: scale(1.06);
}
.mentor-body {
  padding: 1.35rem 1.45rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.mentor-body h3 {
  margin: 0;
  font-size: 1.28rem;
}
.mentor-role {
  color: var(--red);
  font-weight: 700;
  font-size: 0.86rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.mentor-loc {
  color: var(--text-soft);
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.mentor-loc svg {
  width: 15px;
  height: 15px;
  color: var(--gold);
}
.mentor-bio {
  color: var(--text-soft);
  font-size: 0.96rem;
  margin: 0.2rem 0 0;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.6rem;
}
.tag {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-soft);
  transition:
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}
.tag:hover {
  border-color: var(--gold);
  color: var(--text);
  transform: translateY(-2px);
}

/* ---------- Reviews ---------- */
.rating-summary {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.6rem 1.3rem;
  margin-top: 1.2rem;
  box-shadow: var(--shadow-soft);
  font-weight: 700;
}
.stars {
  display: inline-flex;
  gap: 2px;
  color: var(--gold);
}
.stars svg {
  width: 18px;
  height: 18px;
}
.stars .off {
  color: var(--border);
}
.review-card {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.review-text {
  color: var(--text);
  font-size: 0.99rem;
  margin: 0;
  flex: 1;
}
.review-text::before {
  content: "“";
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 1.6rem;
  line-height: 0;
  margin-right: 0.15rem;
}
.review-meta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  border-top: 1px dashed var(--border);
  padding-top: 0.9rem;
}
.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.95rem;
  background: #16224a;
  color: #f7f8fc;
  font-family: var(--font-display);
}
[data-theme="dark"] .avatar {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}
.review-name {
  font-weight: 700;
  font-size: 0.95rem;
}
.review-sub {
  color: var(--text-soft);
  font-size: 0.84rem;
}

/* ---------- Carousel (home testimonials) ---------- */
.carousel {
  position: relative;
  max-width: 720px;
  margin: 2.2rem auto 0;
}
.car-viewport {
  overflow: hidden;
  border-radius: var(--radius);
}
.car-track {
  display: flex;
  transition: transform 0.55s cubic-bezier(0.25, 0.8, 0.3, 1);
}
/* Safari: keep the off-screen neighbour from painting past the clip */
.car-viewport {
  isolation: isolate;
}
.car-slide {
  flex: 0 0 100%;
  min-width: 0;
  padding: 0.2rem;
}
.car-slide .card {
  height: 100%;
  text-align: left;
}
.car-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.2rem;
}
.car-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease;
}
.car-btn:hover {
  transform: scale(1.08);
  border-color: var(--red);
  color: var(--red);
}
.car-btn svg {
  width: 20px;
  height: 20px;
}
.car-dots {
  display: inline-flex;
  gap: 0.5rem;
}
.car-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: var(--border);
  cursor: pointer;
  transition:
    transform 0.2s ease,
    background-color 0.2s ease;
}
.car-dot[aria-current="true"] {
  background: var(--red);
  transform: scale(1.3);
}

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, #16224a, #23346e);
  color: #f2f4fb;
  border-radius: calc(var(--radius) + 6px);
  padding: clamp(2.2rem, 5vw, 3.4rem);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-band h2 {
  color: #fff;
}
.cta-band p {
  color: #c3cdf0;
  max-width: 40rem;
  margin-inline: auto;
}
.cta-band .btn-primary {
  margin-top: 0.9rem;
}
.cta-band .band-star {
  position: absolute;
  color: #f0b429;
  opacity: 0.65;
  width: 20px;
  height: 20px;
  animation: twinkle 3.5s ease-in-out infinite;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.2rem;
  align-items: start;
  margin-top: 2.2rem;
}
.form-card {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.field label {
  font-weight: 600;
  font-size: 0.92rem;
}
.field input,
.field textarea {
  font: inherit;
  color: var(--text);
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.8rem 1rem;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 3px rgba(47, 75, 176, 0.18);
}
.field textarea {
  min-height: 150px;
  resize: vertical;
}
.field .hint {
  font-size: 0.82rem;
  color: var(--text-soft);
}
/* Live character counter under the message box */
.field .char-count {
  align-self: flex-end;
  font-variant-numeric: tabular-nums; /* digits stop jittering as it counts */
  transition: color 0.2s ease;
}
.field .char-count.is-low {
  color: var(--gold-deep);
  font-weight: 600;
}
.field .char-count.is-full {
  color: var(--red);
  font-weight: 700;
}
.honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
}

.form-card.shake {
  animation: shake 0.45s ease;
}
@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-8px);
  }
  40% {
    transform: translateX(7px);
  }
  60% {
    transform: translateX(-5px);
  }
  80% {
    transform: translateX(4px);
  }
}

.form-success {
  text-align: center;
  padding: 2.5rem 1.5rem;
}
.form-success .big-star {
  width: 74px;
  height: 74px;
  color: var(--gold);
  margin-inline: auto;
  animation: popStar 0.6s cubic-bezier(0.2, 1.6, 0.4, 1) both;
}
@keyframes popStar {
  from {
    transform: scale(0) rotate(-90deg);
    opacity: 0;
  }
  to {
    transform: scale(1) rotate(0);
    opacity: 1;
  }
}
.form-error {
  color: var(--red);
  font-weight: 600;
  font-size: 0.93rem;
  margin: 0;
}

.social-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 1.1rem;
}
.social-btn {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  text-decoration: none;
  font-weight: 600;
  color: var(--text);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}
.social-btn:hover {
  transform: translateX(5px);
  border-color: var(--ring);
  box-shadow: var(--shadow-soft);
}
.social-btn svg {
  width: 22px;
  height: 22px;
  flex: none;
}
.social-btn .s-wa {
  color: #25d366;
}
.social-btn .s-fb {
  color: #1877f2;
}
.social-btn .s-ig {
  color: #e4405f;
}
.social-btn .s-mail {
  color: var(--red);
}
.social-btn small {
  display: block;
  font-weight: 400;
  color: var(--text-soft);
  font-size: 0.82rem;
}

/* ---------- Notices ---------- */
.notice {
  margin-top: 2rem;
  padding: 1.1rem 1.3rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-soft);
  font-size: 0.95rem;
}
.notice strong {
  color: var(--text);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 2.6rem 0 2rem;
  margin-top: 1rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  align-items: start;
}
.footer-brand p {
  color: var(--text-soft);
  font-size: 0.93rem;
  max-width: 28rem;
}
.footer-col h3 {
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 0.8rem;
}
.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.footer-col a {
  text-decoration: none;
  color: var(--text);
  font-size: 0.95rem;
}
.footer-col a:hover {
  color: var(--red);
}
.footer-social {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.9rem;
}
.footer-social a {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  color: var(--text);
  transition:
    transform 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease;
}
.footer-social a:hover {
  transform: translateY(-3px) rotate(6deg);
  color: var(--red);
  border-color: var(--red);
}
.footer-social svg {
  width: 19px;
  height: 19px;
}
.copyright {
  text-align: center;
  color: var(--text-soft);
  font-size: 0.85rem;
  margin-top: 2.2rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--border);
}

/* ---------- Inner page hero ---------- */
.page-hero {
  padding: calc(var(--nav-offset) + clamp(2rem, 4.5vw, 3rem)) 0
    clamp(1.6rem, 4vw, 2.6rem);
}

/* ---------- Back to top ---------- */
.to-top {
  position: fixed;
  left: calc(22px + env(safe-area-inset-left));
  bottom: calc(22px + env(safe-area-inset-bottom));
  z-index: 60;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--red);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}
.to-top.show {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.to-top:hover {
  color: var(--gold);
}
.to-top svg {
  width: 22px;
  height: 22px;
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* ---------- Skeleton loading ---------- */
.skeleton {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(
    100deg,
    var(--surface) 40%,
    var(--surface-2) 50%,
    var(--surface) 60%
  );
  background-size: 200% 100%;
  animation: shimmer 1.3s linear infinite;
  min-height: 220px;
}
@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 760px) {
  body {
    font-size: 16px;
  }
  :root {
    --nav-offset: 62px;
  }
  .site-header {
    top: 8px;
    padding: 0 2.5%;
  }
  .nav-wrap {
    padding: 0.35rem 0.4rem 0.35rem 0.75rem;
  }
  .brand img {
    width: 38px;
    height: 38px;
  }
  .brand-name {
    font-size: 0.92rem;
    letter-spacing: 0.05em;
  }
  .theme-toggle,
  .nav-burger {
    width: 44px;
    height: 44px;
  }
  .section {
    padding: 2.6rem 0;
  }
  .stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.55rem;
  }
  .stat {
    padding: 1rem 0.4rem;
  }
  .stat-num {
    font-size: 1.6rem;
  }
  .stat-label {
    font-size: 0.68rem;
    letter-spacing: 0.03em;
  }
  .map-tip {
    white-space: normal;
    max-width: 78%;
    text-align: center;
    transform: translate(-50%, -125%);
  }
  .car-slide .card {
    padding: 1.25rem;
  }
  .cta-band {
    border-radius: var(--radius);
  }
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-ctas,
  .hero-points,
  .rotato {
    justify-content: center;
  }
  .hero-art {
    order: -1;
  }
  .hero-badge {
    width: min(230px, 60%);
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* Tablets (incl. iPad portrait 768/810/820) get the burger menu too:
   the horizontal nav wraps to two lines below ~900px. */
@media (max-width: 900px) {
  .nav-burger {
    display: inline-flex;
  }
  .main-nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
    border-radius: 22px;
    background: #fff;
    border: 1px solid rgba(22, 34, 74, 0.1);
    backdrop-filter: blur(18px) saturate(1.5);
    -webkit-backdrop-filter: blur(18px) saturate(1.5);
    padding: 0.6rem;
    display: none;
    box-shadow:
      0 18px 40px rgba(10, 16, 38, 0.28),
      var(--shadow);
  }
  [data-theme="dark"] .main-nav {
    background: #1a1d28;
    border-color: rgba(255, 255, 255, 0.08);
  }
  .main-nav.open {
    display: flex;
    animation: navDrop 0.25s ease;
  }
  .main-nav a {
    padding: 0.9rem 1rem 0.95rem;
    border-radius: 14px;
  }
  .main-nav a:hover {
    background: rgba(240, 180, 41, 0.1);
  }
}
@keyframes navDrop {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (max-width: 560px) {
  .grid-4,
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  h1 {
    font-size: 1.85rem;
  }
  .lead {
    font-size: 1rem;
  }
  .hero-student {
    width: min(280px, 76%);
  }
  .hero-ctas .btn {
    width: 100%;
  }
  .contact-grid {
    gap: 1.4rem;
  }
  .to-top {
    left: 12px;
    bottom: 12px;
    width: 46px;
    height: 46px;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal,
  .hero-in {
    opacity: 1;
    transform: none;
  }
  .marquee-track {
    animation: none;
  }
}

/* ---------- Header hide/reveal on scroll ---------- */
.site-header.nav-hidden {
  transform: translateY(-140%);
}

/* ---------- Sliding red pill in the nav ---------- */
/* Scoped to desktop: this `position: relative` is only the anchor for the
   hover pill, but being later in the file it used to override the
   `position: absolute` that turns the nav into a burger dropdown — which
   left the open mobile menu as a narrow inline column stretching the
   header. The pill itself is hidden below 901px anyway. */
@media (min-width: 901px) {
  .main-nav {
    position: relative;
  }
}
.nav-pill {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: 0;
  border-radius: 999px;
  background: rgba(200, 32, 47, 0.09);
  opacity: 0;
  pointer-events: none;
  transition:
    left 0.32s cubic-bezier(0.3, 1.2, 0.4, 1),
    width 0.32s cubic-bezier(0.3, 1.2, 0.4, 1),
    opacity 0.2s ease;
}
[data-theme="dark"] .nav-pill {
  background: rgba(239, 77, 92, 0.14);
}
@media (max-width: 900px) {
  .nav-pill {
    display: none;
  }
}

/* ---------- Europe map ---------- */
.map-layout {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 2rem;
  align-items: center;
  margin-top: 2.2rem;
}
.map-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  background:
    radial-gradient(
      ellipse at 22% 18%,
      rgba(47, 75, 176, 0.1),
      transparent 58%
    ),
    radial-gradient(
      ellipse at 78% 82%,
      rgba(240, 180, 41, 0.07),
      transparent 55%
    ),
    var(--surface);
}
[data-theme="dark"] .map-card {
  background:
    radial-gradient(
      ellipse at 22% 18%,
      rgba(143, 163, 232, 0.09),
      transparent 58%
    ),
    radial-gradient(
      ellipse at 78% 82%,
      rgba(244, 193, 75, 0.07),
      transparent 55%
    ),
    #171a26;
}
.euro-map {
  width: 100%;
  height: auto;
  display: block;
}
.map-grid {
  fill: none;
  stroke: var(--border);
  stroke-width: 0.6;
  opacity: 0.45;
}
.map-land {
  fill: var(--surface-2);
  stroke: var(--surface);
  stroke-width: 1;
  transition: fill 0.3s ease;
}
[data-theme="dark"] .map-land {
  fill: #262b3a;
  stroke: #171a26;
}
.map-italy-glow {
  fill: var(--red);
  opacity: 0.35;
}
.map-italy {
  fill: rgba(200, 32, 47, 0.22);
  stroke: var(--red);
  stroke-width: 1.6;
}
[data-theme="dark"] .map-italy {
  fill: rgba(239, 77, 92, 0.28);
}

/* pins */
.uni-pin {
  cursor: pointer;
}
.uni-pin:focus {
  outline: none;
}
.pin-anim {
  transform-box: fill-box;
  transform-origin: center;
}
.map-wrap.in .pin-anim {
  animation: pinDrop 0.7s cubic-bezier(0.34, 1.56, 0.6, 1) both;
  animation-delay: calc(var(--i, 0) * 130ms + 0.25s);
}
@keyframes pinDrop {
  from {
    opacity: 0;
    transform: translateY(-22px) scale(0.5);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.pin-ring {
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.6;
  opacity: 0.55;
  animation: pinPulse 2.6s ease-out infinite;
  transform-origin: center;
  transform-box: fill-box;
}
.uni-pin.home .pin-ring {
  stroke: var(--red);
  stroke-width: 2;
  animation-duration: 2s;
}
@keyframes pinPulse {
  0% {
    transform: scale(0.4);
    opacity: 0.85;
  }
  70% {
    transform: scale(1.6);
    opacity: 0;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}
.pin-dot {
  fill: var(--surface);
  stroke: var(--gold);
  stroke-width: 2;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.6, 1);
  transform-origin: center;
  transform-box: fill-box;
}
.uni-pin.home .pin-dot {
  stroke: var(--red);
}
.pin-star {
  fill: var(--gold);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.6, 1);
  transform-origin: center;
  transform-box: fill-box;
}
.uni-pin.home .pin-star {
  fill: var(--red);
}
.uni-pin:hover .pin-star,
.uni-pin:focus .pin-star,
.uni-pin.active .pin-star {
  transform: scale(1.5);
}
.uni-pin:hover .pin-dot,
.uni-pin:focus .pin-dot,
.uni-pin.active .pin-dot {
  transform: scale(1.4);
}
.map-label {
  font: 700 15px var(--font-body);
  fill: var(--text);
  letter-spacing: 0.02em;
  paint-order: stroke;
  stroke: var(--surface);
  stroke-width: 4px;
  stroke-linejoin: round;
  pointer-events: none;
}
[data-theme="dark"] .map-label {
  stroke: #171a26;
}
.map-home-tag {
  font: 700 10px var(--font-body);
  letter-spacing: 0.16em;
  fill: var(--red);
  paint-order: stroke;
  stroke: var(--surface);
  stroke-width: 3px;
  pointer-events: none;
}
[data-theme="dark"] .map-home-tag {
  stroke: #171a26;
}

/* tooltip */
.map-tip {
  position: absolute;
  transform: translate(-50%, calc(-100% - 24px));
  background: var(--text);
  color: var(--paper);
  padding: 0.55rem 0.85rem;
  border-radius: 10px;
  max-width: 250px;
  box-shadow: var(--shadow);
  pointer-events: none;
  opacity: 0;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
  z-index: 5;
}
.map-tip.show {
  opacity: 1;
}
.map-tip strong {
  display: block;
  font-size: 0.88rem;
}
.map-tip small {
  display: block;
  font-size: 0.76rem;
  opacity: 0.8;
  margin-top: 0.1rem;
}

/* legend */
.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  margin-top: 0.8rem;
  color: var(--text-soft);
  font-size: 0.84rem;
}
.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.map-legend .lg {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  flex: none;
}
.map-legend .lg-star {
  background: var(--gold);
  clip-path: polygon(
    50% 0%,
    61% 35%,
    98% 35%,
    68% 57%,
    79% 91%,
    50% 70%,
    21% 91%,
    32% 57%,
    2% 35%,
    39% 35%
  );
}
.map-legend .lg-home {
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(200, 32, 47, 0.22);
}

/* list */
.uni-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.uni-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.8rem 1rem 0.8rem 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}
.uni-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--gold);
  min-width: 2ch;
  text-align: center;
  flex: none;
}
.uni-item.home .uni-num {
  color: var(--red);
}
.uni-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.uni-text strong {
  font-size: 0.95rem;
  line-height: 1.3;
}
.uni-text small {
  color: var(--text-soft);
  font-size: 0.8rem;
  margin-top: 0.15rem;
}
.uni-tag {
  position: absolute;
  top: 0.55rem;
  right: 0.65rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  background: rgba(200, 32, 47, 0.1);
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
}
.uni-item:hover,
.uni-item:focus,
.uni-item.active {
  transform: translateX(6px);
  border-color: var(--gold);
  box-shadow: var(--shadow-soft);
  outline: none;
}
.uni-item.home:hover,
.uni-item.home:focus,
.uni-item.home.active {
  border-color: var(--red);
}
@media (max-width: 860px) {
  .map-layout {
    grid-template-columns: 1fr;
  }
  .uni-item:hover,
  .uni-item:focus,
  .uni-item.active {
    transform: none;
  }
}
@media (max-width: 640px) {
  .map-label,
  .map-home-tag {
    display: none;
  }
  .map-legend {
    font-size: 0.78rem;
  }
  .uni-tag {
    position: static;
    margin-left: auto;
  }
}

/* ---------- Auto-rotating 3D mentor carousel ---------- */
.mentor-stage {
  position: relative;
  max-width: 940px;
  margin: 1.2rem auto 0;
}
.stage-cards {
  position: relative;
  /* Scales with the card width so the body always fits its text.
     Cards are min(380px, 86vw) wide; height tracks that. */
  height: clamp(430px, 118vw, 540px);
  perspective: 1500px;
}
.stage-card {
  position: absolute;
  left: 50%;
  top: 0;
  width: min(380px, 86vw);
  height: 100%;
  transition:
    transform 0.65s cubic-bezier(0.25, 0.8, 0.3, 1),
    opacity 0.5s ease;
  will-change: transform;
}
.stage-card .mentor-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  transform: none !important;
}
.stage-card .mentor-figure {
  flex: 0 0 64%;
  min-height: 0;
}
.stage-card .mentor-photo {
  height: 100%;
  aspect-ratio: auto;
}
.stage-card .mentor-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.stage-card .mentor-tagline {
  display: -webkit-box;
  display: box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  box-orient: vertical;
  overflow: hidden;
  min-height: 0;
}
.stage-card .mentor-more {
  margin-top: auto;
}
.stage-card.side {
  cursor: pointer;
  filter: saturate(0.7) brightness(0.88);
}
.stage-card.side .mentor-card:hover {
  box-shadow: var(--shadow);
}
@media (max-width: 560px) {
  .stage-cards {
    height: clamp(420px, 128vw, 500px);
  }
  .stage-card .mentor-figure {
    flex: 0 0 56%;
  }
  .stage-card .mentor-tagline {
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }
}

/* ---------- Video stories ---------- */
.carousel-wide {
  max-width: none;
}
.video-card {
  padding: 0;
  overflow: hidden;
  text-align: left;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.video-shell {
  flex: 1 1 auto;
  position: relative;
  width: 100%;
  min-width: 0;
  aspect-ratio: 2 / 1;
  background: #0a0d16;
  overflow: hidden;
}
.video-shell.portrait {
  aspect-ratio: 16 / 9;
} /* taller frame for phone videos */
#vlogGrid .video-shell {
  aspect-ratio: 16 / 9;
}
#vlogGrid .video-shell.portrait {
  aspect-ratio: 1 / 1;
}
.video-bg {
  position: absolute;
  inset: -30px;
  background: #0a0d16 center / cover no-repeat;
  filter: blur(26px) saturate(1.25) brightness(0.55);
  transform: scale(1.12);
}
.video-shell video {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}
.video-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  background: rgba(200, 32, 47, 0.92);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  transition:
    transform 0.25s cubic-bezier(0.34, 1.56, 0.6, 1),
    background-color 0.2s ease,
    opacity 0.25s ease;
}
.video-play:hover {
  transform: scale(1.12);
  background: #a51825;
}
.video-play svg {
  width: 32px;
  height: 32px;
  margin-left: 4px;
}
.video-shell.started .video-play {
  opacity: 0;
  pointer-events: none;
}

/* custom control bar — no download, no fullscreen, no menus */
.video-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 1.4rem 0.9rem 0.7rem;
  background: linear-gradient(transparent, rgba(6, 9, 20, 0.85));
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.video-shell.started .video-bar {
  opacity: 1;
  pointer-events: auto;
}
.vb-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  flex: none;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    transform 0.15s ease;
}
.vb-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.06);
}
.vb-btn svg {
  width: 18px;
  height: 18px;
}
.vb-seek {
  flex: 1;
  height: 4px;
  cursor: pointer;
  accent-color: var(--red);
  min-width: 60px;
}
.vb-time {
  color: #fff;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  flex: none;
}
@media (max-width: 640px) {
  .vb-time {
    display: none;
  }
  .video-bar {
    gap: 0.5rem;
  }
  .video-shell {
    aspect-ratio: 16 / 9;
  }
  .video-shell.portrait,
  #vlogGrid .video-shell.portrait {
    aspect-ratio: 4 / 5;
  }
}
.video-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 1rem 1.35rem;
  flex-wrap: wrap;
}
.video-meta strong {
  font-family: var(--font-display);
  font-size: 1.12rem;
}
.video-meta small {
  color: var(--text-soft);
}

/* ---------- Blog post cards ---------- */
.post-card {
  display: flex;
  padding: 0;
  overflow: hidden;
  text-align: left;
  text-decoration: none;
  color: inherit;
}
.post-img {
  flex: 0 0 42%;
  overflow: hidden;
}
.post-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.post-card:hover .post-img img {
  transform: scale(1.05);
}
.post-body {
  flex: 1;
  padding: 1.4rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.post-kicker {
  color: var(--red);
  font-weight: 700;
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.post-body h3 {
  margin: 0;
  font-size: 1.32rem;
}
.post-body p {
  color: var(--text-soft);
  font-size: 0.95rem;
  margin: 0;
  flex: 1;
}
.post-more {
  color: var(--red);
  font-weight: 600;
  font-size: 0.92rem;
}
.post-card:hover .post-more {
  text-decoration: underline;
}
@media (max-width: 640px) {
  .post-card {
    flex-direction: column;
  }
  .post-img {
    flex: none;
    aspect-ratio: 16 / 9;
  }
  .video-play {
    width: 68px;
    height: 68px;
  }
}

/* ---------- Full article page (logo top right + watermark) ---------- */
.article-section {
  padding-top: calc(var(--nav-offset) + clamp(1.4rem, 3.5vw, 2.4rem));
}
.article-card {
  position: relative;
  overflow: hidden;
  padding: 0;
}
.article-watermark {
  position: absolute;
  inset: -30%;
  background: url("/assets/logo.png") center / 300px repeat;
  opacity: 0.05;
  transform: rotate(-12deg);
  pointer-events: none;
}
[data-theme="dark"] .article-watermark {
  opacity: 0.06;
}
.article-logo {
  position: absolute;
  top: 1.2rem;
  right: 1.3rem;
  z-index: 2;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: 3px solid var(--surface);
  box-shadow: var(--shadow-soft);
}
.article-inner {
  position: relative;
  z-index: 1;
  padding: clamp(1.7rem, 4.5vw, 3.4rem);
  max-width: 780px;
  margin-inline: auto;
}
.article-inner h1 {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  padding-right: 64px;
}
.article-meta {
  color: var(--text-soft);
  font-size: 0.92rem;
  margin-bottom: 1.5rem;
}
.article-hero {
  width: 100%;
  border-radius: var(--radius-sm);
  margin-bottom: 1.7rem;
  box-shadow: var(--shadow-soft);
}
.article-content p {
  font-size: 1.04rem;
  line-height: 1.85;
  margin-bottom: 1.2rem;
}
.article-content p:first-child {
  font-size: 1.13rem;
}
@media (max-width: 640px) {
  .article-logo {
    width: 50px;
    height: 50px;
  }
  .article-inner h1 {
    padding-right: 52px;
  }
}

/* ---------- Vlog tabs ---------- */
.tabs {
  display: inline-flex;
  gap: 0.3rem;
  padding: 0.3rem;
  margin-top: 1.5rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.tab-btn {
  border: 0;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font: 600 0.95rem var(--font-body);
  color: var(--text-soft);
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  transition:
    color 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}
.tab-btn svg {
  width: 16px;
  height: 16px;
}
.tab-btn:hover {
  color: var(--text);
}
.tab-btn[aria-selected="true"] {
  background: var(--surface);
  color: var(--red);
  box-shadow: var(--shadow-soft);
}
.tab-count {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text);
  background: rgba(240, 180, 41, 0.22);
  padding: 0.08rem 0.5rem;
  border-radius: 999px;
  min-width: 1.4em;
  text-align: center;
}
.tabpanel {
  animation: heroIn 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}
@media (max-width: 560px) {
  .tabs {
    width: 100%;
  }
  .tab-btn {
    flex: 1;
    justify-content: center;
    padding: 0.6rem 0.5rem;
    font-size: 0.86rem;
  }
}

/* vertical blog cards (vlog page) */
.post-card-v {
  flex-direction: column;
  height: 100%;
}
.post-card-v .post-img {
  flex: none;
  aspect-ratio: 16 / 9;
}
.post-card-v .post-body {
  padding: 1.2rem 1.3rem 1.4rem;
}

/* video duration chip */
.video-dur {
  position: absolute;
  top: 0.7rem;
  right: 0.8rem;
  background: rgba(6, 9, 20, 0.72);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  pointer-events: none;
}

/* ---------- Services page ---------- */
.sv-card {
  position: relative;
}
.badge-free {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(240, 180, 41, 0.22);
  color: var(--text);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
}
.phase-card {
  position: relative;
  padding: 2rem 1.8rem 1.6rem;
}
.phase-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.3rem;
  color: var(--gold);
  display: block;
  line-height: 1;
  margin-bottom: 0.5rem;
}
.phase-highlight {
  border-color: rgba(240, 180, 41, 0.65);
  box-shadow: 0 10px 30px rgba(240, 180, 41, 0.12);
}
.phase-badge {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  background: var(--gold);
  color: #1b2547;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
}
.check-list {
  list-style: none;
  margin: 0.8rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.check-list li {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  color: var(--text-soft);
  font-size: 0.96rem;
}
.check-list li svg {
  width: 16px;
  height: 16px;
  color: var(--gold);
  flex: none;
  margin-top: 4px;
}
.check-list strong {
  color: var(--text);
}
.phase-note {
  margin: 1.1rem 0 0;
  padding-top: 1rem;
  border-top: 1px dashed var(--border);
  color: var(--text-soft);
  font-size: 0.9rem;
}
.phase-note a {
  color: var(--red);
  font-weight: 600;
}

.dont-layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 2.4rem;
  align-items: center;
}
.dont-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.dont-list li {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.95rem 1.1rem;
  color: var(--text-soft);
  font-size: 0.95rem;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease;
}
.dont-list li:hover {
  transform: translateX(5px);
  border-color: rgba(200, 32, 47, 0.45);
}
.dont-list svg {
  width: 20px;
  height: 20px;
  color: var(--red);
  flex: none;
  margin-top: 1px;
}
.dont-list strong {
  color: var(--text);
}
@media (max-width: 860px) {
  .dont-layout {
    grid-template-columns: 1fr;
  }
}

/* FAQ accordion */
.faq {
  max-width: 780px;
  margin: 2rem auto 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s ease;
}
.faq-item[open] {
  border-color: rgba(240, 180, 41, 0.6);
}
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  padding: 1.05rem 3rem 1.05rem 1.25rem;
  position: relative;
  list-style: none;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary::after {
  content: "";
  position: absolute;
  right: 1.3rem;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2.5px solid var(--red);
  border-bottom: 2.5px solid var(--red);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.25s ease;
}
.faq-item[open] summary::after {
  transform: translateY(-30%) rotate(225deg);
}
.faq-item p {
  margin: 0;
  padding: 0 1.25rem 1.15rem;
  color: var(--text-soft);
  font-size: 0.96rem;
}

/* ---------- "Ask us" chat widget ---------- */
.chat-fab {
  position: fixed;
  right: calc(22px + env(safe-area-inset-right));
  bottom: calc(22px + env(safe-area-inset-bottom));
  z-index: 70;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 54px;
  padding: 0.8rem 1.35rem;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: var(--red);
  color: #fff;
  font: 700 1rem var(--font-body);
  box-shadow: 0 12px 32px rgba(200, 32, 47, 0.4);
  transition:
    transform 0.2s ease,
    background-color 0.2s ease;
}
.chat-fab::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 2px solid var(--red);
  opacity: 0;
  animation: fabPulse 3s ease-out infinite;
}
@keyframes fabPulse {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  70% {
    transform: scale(1.35);
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
.chat-fab:hover {
  transform: translateY(-3px);
  background: var(--red-deep);
}
.chat-fab svg {
  width: 20px;
  height: 20px;
  transition: transform 0.25s ease;
}
.chat-fab.open svg {
  transform: rotate(90deg) scale(0.9);
}
[data-theme="dark"] .chat-fab {
  background: #d22a3a;
}
[data-theme="dark"] .chat-fab:hover {
  background: #e54452;
}

.chat-panel {
  position: fixed;
  right: calc(22px + env(safe-area-inset-right));
  bottom: calc(92px + env(safe-area-inset-bottom));
  z-index: 71;
  width: min(380px, calc(100vw - 44px));
  height: min(560px, calc(100vh - 130px));
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
  overflow: hidden;
  opacity: 0;
  transform: translateY(18px) scale(0.98);
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.28s ease,
    transform 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.2),
    visibility 0.28s;
}
.chat-panel.open {
  opacity: 1;
  transform: none;
  visibility: visible;
  pointer-events: auto;
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  background: linear-gradient(120deg, #16224a, #23346e);
  color: #fff;
}
.chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
}
.chat-who {
  flex: 1;
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.chat-who strong {
  font-family: var(--font-body);
  font-size: 1rem;
}
.chat-who small {
  color: #c3cdf0;
  font-size: 0.78rem;
}
.chat-close {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
}
.chat-close:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: rotate(90deg);
}
.chat-close svg {
  width: 17px;
  height: 17px;
}

.chat-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: var(--paper);
}
.msg {
  max-width: 84%;
  padding: 0.65rem 0.95rem;
  border-radius: 16px;
  font-size: 0.93rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  animation: msgIn 0.25s ease;
}
@keyframes msgIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.msg.bot {
  align-self: flex-start;
  background: var(--surface-2);
  color: var(--text);
  border-bottom-left-radius: 5px;
}
.msg.user {
  align-self: flex-end;
  background: var(--red);
  color: #fff;
  border-bottom-right-radius: 5px;
}
[data-theme="dark"] .msg.user {
  background: #d22a3a;
}
.chat-walink {
  display: inline-block;
  margin-top: 0.3rem;
  color: var(--red);
  font-weight: 700;
  text-decoration: none;
}
.chat-walink:hover {
  text-decoration: underline;
}

.msg.typing {
  display: inline-flex;
  gap: 5px;
  padding: 0.8rem 1rem;
}
.msg.typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-soft);
  animation: dotBounce 1.2s ease-in-out infinite;
}
.msg.typing span:nth-child(2) {
  animation-delay: 0.15s;
}
.msg.typing span:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes dotBounce {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  30% {
    transform: translateY(-5px);
    opacity: 1;
  }
}

.chat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.2rem;
}
.chat-chip {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: 600 0.82rem var(--font-body);
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}
.chat-chip:hover {
  border-color: var(--red);
  color: var(--red);
  transform: translateY(-2px);
}

.chat-inputrow {
  display: flex;
  gap: 0.5rem;
  padding: 0.7rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.chat-inputrow input {
  flex: 1;
  font: inherit;
  color: var(--text);
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 0.65rem 1.05rem;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}
.chat-inputrow input:focus {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 3px rgba(47, 75, 176, 0.18);
}
.chat-send {
  width: 46px;
  height: 46px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition:
    transform 0.18s ease,
    background-color 0.18s ease;
}
.chat-send:hover {
  transform: scale(1.08) rotate(-8deg);
  background: var(--red-deep);
}
.chat-send:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}
.chat-send svg {
  width: 19px;
  height: 19px;
  margin-left: -2px;
}

@media (max-width: 640px) {
  /* Icon-only circle: the labelled pill was wide enough to cover the
     "Book a free consultation" / "View profile" buttons underneath it. */
  .chat-fab {
    right: calc(14px + env(safe-area-inset-right));
    bottom: calc(14px + env(safe-area-inset-bottom));
    width: 54px;
    height: 54px;
    min-height: 0;
    padding: 0;
    justify-content: center;
    gap: 0;
  }
  .chat-fab .chat-fab-label {
    display: none;
  }
  .chat-fab svg {
    width: 23px;
    height: 23px;
  }
  .chat-panel {
    right: calc(10px + env(safe-area-inset-right));
    left: calc(10px + env(safe-area-inset-left));
    bottom: calc(78px + env(safe-area-inset-bottom));
    width: auto;
    height: min(66vh, 540px);
  }
}

/* ---------- Mentor cards (photo · name · one line) ---------- */
.mentor-card {
  text-decoration: none;
  color: inherit;
}
.mentor-tagline {
  color: var(--text-soft);
  font-size: 0.95rem;
  margin: 0.15rem 0 0;
}
.mentor-more {
  color: var(--red);
  font-weight: 700;
  font-size: 0.9rem;
  margin-top: 0.55rem;
  display: inline-block;
}
.mentor-card:hover .mentor-more {
  text-decoration: underline;
}

/* ---------- Mentor profile page ---------- */
.profile-head {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 1.9rem;
  align-items: center;
  margin-bottom: 1.4rem;
}
.profile-photo {
  width: 190px;
  height: 190px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
  border: 5px solid var(--surface-2);
  box-shadow: var(--shadow-soft);
}
.profile-role {
  color: var(--red);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0.2rem 0 0.4rem;
}
.profile-sub {
  font-size: 1.25rem;
  margin: 1.9rem 0 0.2rem;
}
.profile-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.timeline {
  list-style: none;
  margin: 1.3rem 0 0;
  padding: 0.2rem 0 0.2rem 26px;
  border-left: 3px solid #16224a;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}
[data-theme="dark"] .timeline {
  border-left-color: var(--border);
}
.timeline li {
  position: relative;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: -34px;
  top: 4px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--red);
  border: 3px solid var(--surface);
}
.timeline li:nth-child(even)::before {
  background: var(--gold);
}
.timeline strong {
  display: block;
  color: var(--text);
  font-size: 1.02rem;
  line-height: 1.4;
}
.timeline small {
  color: var(--text-soft);
  font-size: 0.89rem;
}

@media (max-width: 640px) {
  .profile-head {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .profile-photo {
    margin-inline: auto;
    width: 160px;
    height: 160px;
  }
  .profile-head .mentor-loc {
    justify-content: center;
  }
}

/* ---------- Formatted chatbot answers ---------- */
.msg {
  white-space: normal;
}
.msg.user {
  white-space: pre-wrap;
}
.msg .md-p {
  margin: 0 0 0.55rem;
}
.msg .md-h {
  margin: 0.25rem 0 0.45rem;
  font-weight: 700;
}
.msg .md-list {
  margin: 0.1rem 0 0.6rem;
  padding-left: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.msg .md-list li::marker {
  color: var(--gold);
  font-weight: 700;
}
.msg .md-p:last-child,
.msg .md-list:last-child,
.msg .md-h:last-child {
  margin-bottom: 0;
}
.msg.bot strong {
  font-weight: 700;
  color: var(--text);
}
.msg.bot code {
  background: rgba(240, 180, 41, 0.16);
  border-radius: 5px;
  padding: 0.05em 0.35em;
  font-size: 0.86em;
}
.msg.bot a {
  color: var(--red);
  font-weight: 600;
}


/* ==========================================================================
   Cross-device / cross-browser layer
   Phones, tablets, laptops · Chrome, Safari, Firefox, Edge, Samsung Internet
   ========================================================================== */

/* --- Dynamic viewport height -------------------------------------------
   iOS Safari and Chrome on Android shrink the visible area as their
   toolbars slide in. `100vh` ignores that, so a vh-sized panel runs off
   under the browser chrome. `dvh` tracks the real visible height; the
   @supports guard keeps the vh value for older browsers.               */
@supports (height: 100dvh) {
  .chat-panel {
    height: min(560px, calc(100dvh - 130px));
  }
  @media (max-width: 640px) {
    .chat-panel {
      height: min(66dvh, 540px);
    }
  }
}

/* --- Touch devices ------------------------------------------------------
   Hover effects stick on touch (they fire on tap and stay until you tap
   elsewhere). Gate the lift/scale ones behind a real pointer.          */
@media (hover: none) {
  .card:hover,
  .btn:hover,
  .chat-fab:hover,
  .to-top:hover,
  .social-btn:hover,
  .uni-item:hover {
    transform: none;
  }
  .mentor-card:hover .mentor-photo {
    transform: none;
  }
  /* Give the pressed state to :active instead, so taps still feel alive */
  .btn:active,
  .card:active {
    transform: scale(0.985);
  }
}

/* --- Comfortable tap targets on touch screens ---------------------------
   The 9px carousel dots are far too small for a fingertip. Keep the dot
   the same size visually, but give it a 44px invisible hit area.       */
@media (hover: none) {
  .car-dot {
    position: relative;
  }
  .car-dot::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 44px;
    height: 44px;
    transform: translate(-50%, -50%);
  }
}
@media (max-width: 900px) {
  .footer-col a,
  .footer-social a {
    display: inline-block;
    padding-block: 0.42rem;
  }
  .main-nav a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
}

/* --- Desktop nav: keep multi-word items on one line --------------------- */
@media (min-width: 901px) {
  .main-nav a {
    white-space: nowrap;
  }
}

/* --- Tablet range (iPad portrait/landscape, small laptops) --------------
   Between the phone and desktop breakpoints the two-up grids were still
   using desktop spacing and the map/profile columns stayed cramped.    */
@media (min-width: 561px) and (max-width: 900px) {
  .container {
    width: min(1120px, 94%);
  }
  .hero-ctas .btn {
    flex: 0 1 auto;
  }
}

/* --- Landscape phones ---------------------------------------------------
   Short viewports: the hero's tall art pushed the headline off-screen.  */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    padding-block: 1.5rem;
  }
  .hero-art {
    max-height: 46vh;
  }
  .chat-panel {
    height: min(78vh, 420px);
  }
}
@supports (height: 100dvh) {
  @media (max-height: 500px) and (orientation: landscape) {
    .chat-panel {
      height: min(78dvh, 420px);
    }
  }
}

/* --- Printing ------------------------------------------------------------ */
@media print {
  .site-header,
  .chat-fab,
  .chat-panel,
  .to-top,
  #progressBar {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
}
