/* =====================================================================
   Medverion - x5.css v1
   The home HERO and the site FOOTER come from design 5; everything here is
   namespaced (.x5 / .x5-*) so it never collides with the design-3 classes.
   Fonts: Sora (UI) + Kalam (handwriting), as in design 5.
   ===================================================================== */
.x5 {
  --x5-blue: #3f74ee; --x5-blue2: #5d93fb; --x5-sky: #8ecbfb; --x5-sky2: #5aa6ef;
  --x5-amber: #f6c94c; --x5-ease: cubic-bezier(.2, .8, .2, 1);
  font-family: 'Sora', 'Inter', system-ui, sans-serif;
}
.x5 h1, .x5 h2, .x5 h3 { font-family: 'Sora', 'Inter', system-ui, sans-serif; }
.x5-wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.x5-ic { width: 18px; height: 18px; flex: none; }

/* ---------- buttons (no CSS transform transition: GSAP drives the magnetic x/y) ---------- */
.x5-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 46px; padding: 0 22px; border-radius: 999px; font: 600 15px/1 'Sora', 'Inter', sans-serif; text-decoration: none; white-space: nowrap;
  transition: box-shadow .35s, background-color .3s, border-color .3s, filter .3s, color .3s;
}
.x5-btn svg { width: 16px; height: 16px; flex: none; transition: transform .35s var(--x5-ease); }
.x5-btn:hover svg.x5-arr { transform: translateX(3px); }
.x5-btn-blue { color: #fff; background: linear-gradient(180deg, var(--x5-blue2), var(--x5-blue)); box-shadow: 0 8px 22px rgba(63, 116, 238, .35), inset 0 1px 0 rgba(255, 255, 255, .25); }
.x5-btn-blue:hover { filter: brightness(1.07); box-shadow: 0 12px 30px rgba(63, 116, 238, .5); }
.x5-btn-ghost { color: #fff; border: 1px solid rgba(255, 255, 255, .34); background: rgba(255, 255, 255, .03); }
.x5-btn-ghost:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .6); }
.x5-btn-ghost .x5-play { width: 13px; height: 13px; fill: currentColor; }
.x5-btn-sm { height: 40px; padding: 0 17px; font-size: 14px; }

/* ================================================================ HERO */
.x5-hero {
  position: relative; overflow: hidden; color: #fff; min-height: min(100vh, 860px);
  padding: calc(var(--nav-h) + clamp(24px, 5vw, 60px)) 0 clamp(70px, 8vw, 110px);
  background: radial-gradient(70% 90% at 70% 40%, #071530 0%, #040b19 45%, #02060d 100%);
}
.x5-hero-stars { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .7; pointer-events: none; }
.x5-hero-person {
  position: absolute; right: 0; top: 0; height: 100%; width: min(62vw, 1050px); object-fit: cover; object-position: 70% 30%;
  filter: brightness(.82) contrast(.97); -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 34%); mask-image: linear-gradient(90deg, transparent 0%, #000 34%);
}
.x5-hero-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(3, 7, 14, .95) 0%, rgba(3, 7, 14, .75) 38%, rgba(3, 7, 14, 0) 62%), linear-gradient(0deg, rgba(2, 5, 10, .7), rgba(2, 5, 10, 0) 26%); }
.x5-hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.22fr) minmax(0, .78fr); gap: 20px; align-items: center; }
.x5-hero-h { font-size: clamp(38px, 4.5vw, 66px); line-height: 1.04; letter-spacing: -.025em; font-weight: 600; }
.x5-hl { display: block; }
@media (min-width: 1001px) { .x5-hl { white-space: nowrap; } }
.x5-hero-sub { margin-top: 22px; max-width: 560px; color: #c3cbd7; font-size: clamp(16px, 1.5vw, 19px); line-height: 1.6; }
.x5-hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.x5-hero-stats { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; margin-top: clamp(34px, 5vw, 56px); }
.x5-hero-stats > div { display: flex; flex-direction: column; padding: 0 clamp(12px, 1.8vw, 26px); border-left: 1px solid rgba(255, 255, 255, .12); }
.x5-hero-stats > div:first-child { padding-left: 0; border-left: 0; }
.x5-hero-stats b { font-size: clamp(20px, 2vw, 28px); line-height: 1.5; color: #8fc0ec; font-weight: 600; letter-spacing: -.01em; }
.x5-hero-stats span { font-size: 13px; color: #8e97a7; white-space: nowrap; }
.x5-hero-quote { margin-top: 30px; color: #c4cbd7; font-size: 15px; }
.x5-hero-rate { display: flex; align-items: center; gap: 12px; margin-top: 10px; font-size: 13.5px; color: #8e97a7; }
.x5-stars { display: inline-flex; gap: 2px; color: var(--x5-amber); }
.x5-stars svg { width: 16px; height: 16px; filter: drop-shadow(0 0 3px rgba(246, 201, 76, .45)); }
.x5-hero-art { position: relative; aspect-ratio: 400 / 440; width: 100%; max-width: 520px; justify-self: center; }
.x5-heart-wrap { position: absolute; left: 21%; top: 9%; width: 58%; height: 84%; mix-blend-mode: screen; perspective: 800px; }
.x5-heart-tilt { position: absolute; inset: 0; transform-style: preserve-3d; will-change: transform; }
.x5-hero-heart { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transform-origin: 52% 58%; animation: x5beat 1.15s ease-in-out infinite; }
.x5-heart-glow { position: absolute; left: 10%; top: 25%; width: 80%; height: 65%; border-radius: 50%; pointer-events: none; opacity: 0;
  background: radial-gradient(closest-side, rgba(255, 60, 120, .35), rgba(90, 120, 255, .12) 60%, transparent); animation: x5glow 1.15s ease-in-out infinite; }
@keyframes x5beat { 0%, 100% { transform: scale(1); } 12% { transform: scale(1.035); } 24% { transform: scale(1.004); } 36% { transform: scale(1.022); } 55% { transform: scale(1); } }
@keyframes x5glow { 0%, 100% { opacity: 0; } 12% { opacity: .9; } 30% { opacity: .2; } 38% { opacity: .6; } 60% { opacity: 0; } }
.x5-note { position: absolute; font-family: 'Kalam', cursive; font-weight: 300; font-size: clamp(16px, 1.7vw, 23px); line-height: 1.1; color: #ccd5e7; transform: skewX(-10deg); }
.x5-n-think { right: 2%; top: 4%; }
.x5-n-learn { left: -4%; top: 42%; }
.x5-n-perf { right: -2%; top: 60%; }
.x5-note-arrows { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.x5-na { fill: none; stroke: #ccd5e7; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.x5-kcl { position: absolute; z-index: 2; right: clamp(16px, 4vw, 60px); bottom: clamp(26px, 4vw, 54px); display: flex; align-items: flex-end; gap: 12px; color: #e2e8f1; }
.x5-kcl p { font-size: clamp(16px, 1.6vw, 22px); font-weight: 600; line-height: 1.25; }
.x5-kcl svg { width: 36px; height: 30px; }
.x5-ecg-path { fill: none; stroke: #e2e8f1; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 80; animation: x5ecg 2.4s linear infinite; }
@keyframes x5ecg { 0% { stroke-dashoffset: 80; } 60% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -80; } }
.x5-scroll-cue { position: absolute; z-index: 2; left: 50%; bottom: 18px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #9fb0c8;
  border: 1px solid rgba(255, 255, 255, .15); transform: translateX(-50%); animation: x5cue 2.2s ease-in-out infinite; }
.x5-scroll-cue svg { width: 14px; height: 14px; }
@keyframes x5cue { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 6px); } }

/* ================================================================ FOOTER */
.x5-foot { position: relative; overflow: hidden; color: #fff; background: #02050c; padding: clamp(70px, 8vw, 110px) 0 28px; }
.x5-foot-stars { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.x5-earth-wrap { position: absolute; left: 50%; bottom: -46%; width: min(1500px, 140vw); aspect-ratio: 1536 / 1024; transform: translateX(-50%); pointer-events: none; opacity: .9; }
.x5-earth { width: 100%; height: 100%; object-fit: cover; transform-origin: 50% 70%; }
.x5-earth-rim { position: absolute; inset: 0; background: radial-gradient(60% 40% at 50% 30%, rgba(80, 150, 255, .18), transparent 70%), linear-gradient(180deg, #02050c 0%, rgba(2, 5, 12, .3) 40%, rgba(2, 5, 12, .2) 100%); }
.x5-foot-in { position: relative; display: grid; grid-template-columns: 1.2fr 1.5fr .85fr; gap: clamp(24px, 4vw, 60px); align-items: start; }
.x5-brand { color: #fff; }
.x5-brand svg { width: 34px; height: 34px; }
.x5-brand-tx { display: flex; flex-direction: column; line-height: 1.1; }
.x5-brand-tx b { font: 800 21px/1.1 'Plus Jakarta Sans', 'Inter', sans-serif; letter-spacing: -.02em; }
.x5-brand-tx small { font: 500 11px/1.2 'Sora', sans-serif; color: #8796b3; letter-spacing: .04em; margin-top: 3px; }
.x5-foot-sub { color: #aab6c9; margin-top: 14px; }
.x5-foot-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.x5-news { display: flex; gap: 8px; margin-top: 18px; max-width: 400px; }
.x5-news .input { height: 40px; border-radius: 999px; padding: 0 16px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); color: #fff; font-size: 14px; }
.x5-news .input::placeholder { color: #8796b3; }
.x5-foot-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.x5-foot-cols h3 { font: 600 13px/1.2 'Sora', sans-serif; text-transform: uppercase; letter-spacing: .12em; color: #7f8ca3; margin-bottom: 14px; }
.x5-foot-cols a { display: block; color: #d7dfeb; font-size: 14.5px; padding: 5px 0; transition: color .25s; }
.x5-foot-cols a:hover { color: var(--x5-sky); }
.x5-foot-script { position: relative; padding-top: 6px; }
.x5-foot-script p { font-family: 'Kalam', cursive; font-weight: 300; font-size: clamp(22px, 2.2vw, 30px); line-height: 1.15; color: #e4ebf5; transform: skewX(-8deg); }
.x5-foot-script .x5-fs2 { margin-left: 30px; }
.x5-f-ecg { width: 40px; height: 32px; margin-bottom: 4px; }
.x5-motion .x5-foot-script p { clip-path: inset(-40% 100% -40% -5%); transition: clip-path 1.1s ease-in-out; }
.x5-motion .x5-foot-script .x5-fs2 { transition-delay: .5s; }
.x5-motion .x5-foot-script.is-in p { clip-path: inset(-40% -5% -40% -5%); }
.x5-foot-bottom { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 20px 40px; margin-top: clamp(80px, 12vw, 180px); padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .08); }
.x5-flinks { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.x5-flinks a { color: #c3ccdb; font-size: 14px; transition: color .25s; }
.x5-flinks a:hover { color: #fff; }
.x5-social { display: flex; gap: 10px; }
.x5-social button { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #d5dceb; border: 1px solid rgba(255, 255, 255, .12); transition: background-color .3s, translate .35s var(--x5-ease); }
.x5-social button:hover { background: rgba(255, 255, 255, .1); translate: 0 -3px; }
.x5-social svg { width: 17px; height: 17px; }
.x5-foot-claim { margin-left: auto; text-align: right; color: #c3ccdb; font-size: 14px; }
.x5-foot-copy { position: relative; display: flex; flex-wrap: wrap; gap: 6px 24px; justify-content: space-between; margin-top: 20px; color: #6e7b92; font-size: 12.5px; }
.x5-foot-copy a { color: #9fb0c8; }
.x5-foot-copy a:hover { color: #fff; }
.x5-foot-copy kbd { font: 600 11px/1 'Inter', sans-serif; padding: 2px 6px; border-radius: 5px; border: 1px solid rgba(255, 255, 255, .16); color: #9fb0c8; }

/* ================================================================ VIDEO MODAL (s3 modal mechanics, s5 look) */
.modal .box.x5-video-box { width: min(980px, 100%); padding: 0; overflow: hidden; background: #03070f; }
.x5-video-box .x { color: #cdd6e4; }
.x5-video-box .x:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.x5-vm-stage { position: relative; aspect-ratio: 16 / 9; }
.x5-vm-stage canvas { display: block; width: 100%; height: 100%; }
.x5-vm-cap { position: absolute; left: 0; right: 0; bottom: 14%; text-align: center; font: 600 clamp(18px, 2.6vw, 30px)/1.2 'Sora', sans-serif; color: #e8f0fb; padding: 0 16px; }
.x5-vm-bar { position: absolute; left: 6%; right: 6%; bottom: 7%; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.x5-vm-bar i { display: block; height: 100%; width: 0; background: var(--x5-sky, #8ecbfb); }

/* ================================================================ RESPONSIVE */
@media (max-width: 1000px) {
  .x5-hero-grid, .x5-foot-in { grid-template-columns: minmax(0, 1fr); }
  .x5-hero { min-height: 0; }
  .x5-hero-person { width: 100%; opacity: .45; -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 95%); mask-image: linear-gradient(180deg, #000 30%, transparent 95%); }
  .x5-hero-art { max-width: 440px; order: -1; margin-bottom: -30px; }
  .x5-kcl { display: none; }
  .x5-n-learn { left: 1%; }
  .x5-foot-claim { margin-left: 0; text-align: left; }
}
@media (max-width: 760px) {
  .x5-hero-stats { grid-template-columns: 1fr 1fr; gap: 16px 0; }
  .x5-hero-stats > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .x5-foot-cols { grid-template-columns: 1fr 1fr; }
  .x5-scroll-cue { display: none; }
  .x5-earth-wrap { bottom: -150px; width: 230vw; }
  .x5-foot { padding-bottom: 36px; }
}
@media (max-width: 420px) {
  .x5-hero-cta .x5-btn { flex: 1 1 100%; }
  .x5-news { flex-wrap: wrap; }
  .x5-news .input, .x5-news .x5-btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .x5-hero-heart, .x5-heart-glow, .x5-ecg-path, .x5-scroll-cue { animation: none !important; }
  .x5-motion .x5-foot-script p { clip-path: none; }
}
