/* ============================================================
   Yodest - Healthcare Data Analytics
   Shared stylesheet
   ============================================================ */

:root {
  --ink:        #0B1220;
  --ink-2:      #121A2C;
  --panel:      #161F33;
  --line:       #243049;
  --blue:       #5B6CFF;
  --blue-soft:  #8A97FF;
  --teal:       #1FB6A6;
  --teal-soft:  #4FD6C8;
  --gold:       #E0A52E;
  --white:      #FFFFFF;
  --slate:      #9AA6BE;
  --slate-2:    #6B7689;
  --bg:         #FBFBFD;
  --card:       #FFFFFF;

  --maxw: 1180px;
  --r: 16px;

  --d: 'Space Grotesk', system-ui, sans-serif;
  --b: 'Inter', system-ui, sans-serif;
  --m: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--b);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

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

/* ---------- Typography ---------- */
h1, h2, h3 { font-family: var(--d); line-height: 1.08; letter-spacing: -0.02em; font-weight: 600; }
.eyebrow {
  font-family: var(--m);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue);
  display: inline-block;
}
.eyebrow.on-dark { color: var(--blue-soft); }

/* ---------- Nav ---------- */
header.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11,18,32,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { font-family: var(--d); font-weight: 700; font-size: 22px; color: var(--white);
        font-style: italic; letter-spacing: -0.03em; }
.logo span { color: var(--blue-soft); }
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a { color: var(--slate); font-size: 15px; font-weight: 500; transition: color .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--white); }
.nav-cta {
  background: var(--blue); color: var(--white) !important;
  padding: 9px 18px; border-radius: 10px; font-weight: 600;
  transition: background .2s, transform .2s;
}
.nav-cta:hover { background: var(--blue-soft); transform: translateY(-1px); }
.burger { display: none; background: none; border: 0; color: var(--white); font-size: 24px; cursor: pointer; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--b); font-weight: 600; font-size: 15px;
  padding: 13px 24px; border-radius: 11px; border: 1px solid transparent;
  cursor: pointer; transition: all .2s;
}
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-soft); transform: translateY(-2px); box-shadow: 0 10px 30px rgba(91,108,255,.35); }
.btn-ghost { background: transparent; color: var(--white); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--blue-soft); color: var(--blue-soft); }
.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark:hover { background: var(--ink-2); transform: translateY(-2px); }

/* ---------- Sections ---------- */
section { padding: 96px 0; }
.section-head { max-width: 680px; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(30px, 4vw, 46px); margin: 14px 0 16px; }
.section-head p { color: var(--slate-2); font-size: 18px; }
.center { text-align: center; margin-left: auto; margin-right: auto; }

/* ---------- Hero ---------- */
.hero { background: var(--ink); color: var(--white); padding: 0; overflow: hidden; position: relative; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center;
  padding: 88px 0 96px;
}
.hero h1 { font-size: clamp(38px, 5.5vw, 66px); margin: 20px 0 22px; }
.hero h1 .accent { color: var(--blue-soft); }
.hero p.lead { font-size: 19px; color: var(--slate); max-width: 520px; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-trust { margin-top: 40px; display: flex; gap: 36px; flex-wrap: wrap; }
.hero-trust .stat { }
.hero-trust .num { font-family: var(--d); font-size: 30px; font-weight: 700; color: var(--white); }
.hero-trust .lbl { font-size: 13px; color: var(--slate-2); font-family: var(--m); letter-spacing: .04em; }

/* hero live panel */
.live-panel {
  background: linear-gradient(160deg, var(--panel), var(--ink-2));
  border: 1px solid var(--line); border-radius: 20px; padding: 22px;
  box-shadow: 0 30px 80px rgba(0,0,0,.5);
}
.lp-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.lp-title { font-family: var(--m); font-size: 12px; color: var(--slate); letter-spacing: .08em; text-transform: uppercase; }
.lp-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 0 rgba(31,182,166,.6); animation: pulse 2s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(31,182,166,.5)} 70%{box-shadow:0 0 0 10px rgba(31,182,166,0)} 100%{box-shadow:0 0 0 0 rgba(31,182,166,0)} }
.lp-tiles { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; margin-bottom: 14px; }
.lp-tile { background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.lp-tile .k { font-family: var(--m); font-size: 11px; color: var(--slate-2); text-transform: uppercase; letter-spacing: .05em; }
.lp-tile .v { font-family: var(--d); font-size: 26px; font-weight: 700; color: var(--white); margin-top: 6px; }
.lp-tile .v.t-teal { color: var(--teal-soft); }
.lp-tile .v.t-blue { color: var(--blue-soft); }
.lp-spark { display: flex; align-items: flex-end; gap: 4px; height: 54px; margin-top: 8px; }
.lp-spark span { flex: 1; background: linear-gradient(180deg,var(--blue),rgba(91,108,255,.15)); border-radius: 3px 3px 0 0; transition: height .6s ease; }
.lp-foot { font-family: var(--m); font-size: 11px; color: var(--slate-2); margin-top: 6px; }

/* ---------- Cards / grids ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 24px; }
.card {
  background: var(--card); border: 1px solid #ECEEF4; border-radius: var(--r);
  padding: 30px; transition: transform .25s, box-shadow .25s, border-color .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 20px 50px rgba(11,18,32,.10); border-color: #DDE0EC; }
.card .ico {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(91,108,255,.10); color: var(--blue); margin-bottom: 18px;
}
.card h3 { font-size: 21px; margin-bottom: 10px; }
.card p { color: var(--slate-2); font-size: 15.5px; }
.card .tag { font-family: var(--m); font-size: 11px; color: var(--teal); letter-spacing: .08em; text-transform: uppercase; }

/* numbered process */
.steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; counter-reset: s; }
.step { background: var(--ink); color: var(--white); border-radius: var(--r); padding: 32px; position: relative; overflow: hidden; }
.step .n { font-family: var(--d); font-size: 54px; font-weight: 700; color: rgba(255,255,255,.10); line-height: 1; }
.step h3 { font-size: 20px; margin: 8px 0 12px; }
.step p { color: var(--slate); font-size: 15px; }
.step::after { content:''; position:absolute; right:-30px; top:-30px; width:120px; height:120px;
               background: radial-gradient(circle, rgba(91,108,255,.25), transparent 70%); }

/* impact band */
.impact { background: var(--ink); color: var(--white); }
.impact .grid-3 .istat { text-align: left; }
.istat .num { font-family: var(--d); font-size: clamp(34px,4.5vw,52px); font-weight:700; color: var(--teal-soft); }
.istat .lbl { color: var(--slate); margin-top: 6px; font-size: 15px; }

/* product showcase */
.show { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.show.rev { direction: rtl; } .show.rev > * { direction: ltr; }
.show-img { border-radius: 14px; border: 1px solid #E4E7F0; box-shadow: 0 24px 60px rgba(11,18,32,.14); overflow: hidden; background:#fff;}
.show-img img { width: 100%; }
.show h3 { font-size: 28px; margin: 12px 0 14px; }
.show ul { list-style: none; margin-top: 18px; display: grid; gap: 12px; }
.show li { padding-left: 28px; position: relative; color: var(--slate-2); font-size: 16px; }
.show li::before { content:'→'; position:absolute; left:0; color: var(--blue); font-weight:700; }

/* ---------- Calculator ---------- */
.calc { background: var(--ink); color: var(--white); }
.calc-card {
  background: linear-gradient(160deg,var(--panel),var(--ink-2));
  border: 1px solid var(--line); border-radius: 20px; overflow: hidden;
  box-shadow: 0 40px 100px rgba(0,0,0,.5);
}
.calc-bar { background: rgba(255,255,255,.04); padding: 18px 28px; border-bottom: 1px solid var(--line);
            font-family: var(--m); font-size: 13px; letter-spacing: .06em; color: var(--slate); text-align: center; text-transform: uppercase; }
.calc-body { padding: 32px; }
.calc-sliders { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 40px; margin-bottom: 34px; }
.slider-row { }
.slider-row .top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.slider-row .name { font-weight: 600; font-size: 15px; color: var(--white); }
.slider-row .val { font-family: var(--d); font-weight: 700; font-size: 20px; color: var(--teal-soft); }
.slider-row input[type=range] {
  -webkit-appearance: none; width: 100%; height: 5px; border-radius: 5px;
  background: var(--line); outline: none;
}
.slider-row input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--teal); cursor: pointer; border: 4px solid var(--ink-2);
  box-shadow: 0 0 0 1px var(--teal);
}
.slider-row input[type=range]::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%; background: var(--teal);
  cursor: pointer; border: 4px solid var(--ink-2);
}
.slider-row .minmax { display: flex; justify-content: space-between; font-family: var(--m); font-size: 11px; color: var(--slate-2); margin-top: 8px; }

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 26px; }
.cbox { border-radius: 14px; padding: 22px; }
.cbox.before { background: rgba(255,255,255,.03); border: 1px solid var(--line); }
.cbox.after  { background: rgba(31,182,166,.10); border: 1px solid rgba(31,182,166,.35); }
.cbox h4 { font-family: var(--d); font-size: 16px; margin-bottom: 16px; color: var(--white); }
.cline { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 14.5px; }
.cline:last-child { border-bottom: 0; }
.cline .lk { color: var(--slate); }
.cline .lv { font-family: var(--m); color: var(--white); }
.cbox.after .lv { color: var(--teal-soft); }

.results { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.rcard { border-radius: 14px; padding: 22px; text-align: center; }
.rcard.lead { background: var(--ink); border: 1px solid var(--teal); }
.rcard.plain { background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.rcard .rv { font-family: var(--d); font-size: 30px; font-weight: 700; color: var(--white); }
.rcard.lead .rv { color: var(--teal-soft); }
.rcard .rl { font-size: 13px; color: var(--slate); margin-top: 6px; }

/* ---------- About / founder ---------- */
.founder { display: grid; grid-template-columns: 300px 1fr; gap: 48px; align-items: start; }
.founder-photo { border-radius: 18px; overflow: hidden; border: 1px solid var(--line); position: relative; }
.founder-photo img { width: 100%; }
.founder-photo .ring { position:absolute; inset:0; box-shadow: inset 0 0 0 1px rgba(91,108,255,.4); border-radius:18px; }
.founder .role { font-family: var(--m); color: var(--blue); font-size: 13px; letter-spacing: .06em; margin-top: 6px; }
.founder h3 { font-size: 30px; margin-top: 12px; }
.founder .bio { color: var(--slate-2); font-size: 16.5px; margin-top: 16px; }
.founder .bio p { margin-bottom: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.chip { font-family: var(--m); font-size: 12px; padding: 7px 13px; border-radius: 999px; background: #EEF0FA; color: var(--blue); }
.linkedin { display: inline-flex; align-items:center; gap:8px; margin-top:22px; color: var(--blue); font-weight:600; }
.linkedin:hover { color: var(--blue-soft); }

/* timeline */
.tl { margin-top: 14px; border-left: 2px solid var(--line); padding-left: 28px; display: grid; gap: 26px; }
.tl-item { position: relative; }
.tl-item::before { content:''; position:absolute; left:-35px; top:4px; width:12px; height:12px; border-radius:50%; background: var(--blue); border: 3px solid var(--bg); }
.tl-item .when { font-family: var(--m); font-size: 12px; color: var(--slate-2); }
.tl-item h4 { font-family: var(--d); font-size: 18px; margin: 3px 0; }
.tl-item p { color: var(--slate-2); font-size: 15px; }

/* CTA band */
.cta-band { background: linear-gradient(135deg, var(--blue), #3D4BD6); color: #fff; border-radius: 24px; padding: 56px; text-align: center; }
.cta-band h2 { font-size: clamp(28px,4vw,42px); margin-bottom: 14px; }
.cta-band p { font-size: 18px; opacity: .9; margin-bottom: 28px; }

/* ---------- Footer ---------- */
footer.ft { background: var(--ink); color: var(--slate); padding: 64px 0 32px; }
.ft-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid var(--line); }
.ft .logo { margin-bottom: 14px; }
.ft p { font-size: 15px; max-width: 320px; }
.ft h5 { color: var(--white); font-family: var(--d); font-size: 14px; margin-bottom: 14px; text-transform: uppercase; letter-spacing: .08em; }
.ft a { display: block; padding: 5px 0; font-size: 15px; color: var(--slate); }
.ft a:hover { color: var(--blue-soft); }
.ft-bot { padding-top: 24px; display: flex; justify-content: space-between; font-size: 13px; color: var(--slate-2); flex-wrap: wrap; gap: 10px; }

/* page hero (interior) */
.page-hero { background: var(--ink); color: #fff; padding: 80px 0 72px; }
.page-hero h1 { font-size: clamp(34px,5vw,56px); margin: 14px 0 16px; }
.page-hero p { color: var(--slate); font-size: 19px; max-width: 620px; }

/* reveal animation */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .lp-dot { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; padding: 56px 0 64px; }
  .grid-3, .steps, .results, .calc-sliders { grid-template-columns: 1fr; }
  .grid-2, .show, .compare { grid-template-columns: 1fr; }
  .show.rev { direction: ltr; }
  .founder { grid-template-columns: 1fr; }
  .founder-photo { max-width: 260px; }
  .ft-grid { grid-template-columns: 1fr; gap: 28px; }
  .nav-links { display: none; position: absolute; top: 68px; left: 0; right: 0;
               flex-direction: column; background: var(--ink); padding: 18px 24px; gap: 14px;
               border-bottom: 1px solid var(--line); }
  .nav-links.open { display: flex; }
  .burger { display: block; }
  .cta-band { padding: 40px 24px; }
  section { padding: 64px 0; }
}

/* ============================================================
   Enhanced animations & cursor interactions
   ============================================================ */

/* Animated gradient logo */
.logo span {
  background: linear-gradient(90deg, var(--blue-soft), var(--teal), var(--blue-soft));
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: logoShimmer 5s linear infinite;
}
@keyframes logoShimmer { to { background-position: 200% center; } }
.logo { transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.logo:hover { transform: scale(1.04) rotate(-1deg); }

/* Nav links: animated underline on hover */
.nav-links a:not(.nav-cta) { position: relative; }
.nav-links a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 0; bottom: -5px; height: 2px; width: 100%;
  background: var(--blue-soft); transform: scaleX(0); transform-origin: left;
  transition: transform .28s cubic-bezier(.2,.8,.2,1);
}
.nav-links a:not(.nav-cta):hover::after,
.nav-links a:not(.nav-cta).active::after { transform: scaleX(1); }

/* Buttons: sliding shine sweep on hover */
.btn { position: relative; overflow: hidden; }
.btn::before {
  content: ""; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-20deg); transition: left .6s ease;
}
.btn:hover::before { left: 140%; }

/* Cards: smoother lift + subtle scale */
.card { will-change: transform; }
.card:hover { transform: translateY(-6px) scale(1.012); }

/* Chips: pop + color on hover */
.chip { transition: transform .2s ease, background .2s ease, color .2s ease; cursor: default; }
.chip:hover { transform: translateY(-3px) scale(1.05); background: var(--blue); color: #fff; }

/* Timeline items: slide + dot grow on hover */
.tl-item { transition: transform .25s ease; }
.tl-item:hover { transform: translateX(6px); }
.tl-item::before { transition: transform .25s ease, box-shadow .25s ease; }
.tl-item:hover::before { transform: scale(1.35); box-shadow: 0 0 0 6px rgba(91,108,255,.18); }

/* About hero badge */
.about-badge {
  display: inline-flex; flex-direction: column; gap: 8px; padding: 34px 30px;
  border-radius: 20px; background: var(--ink); color: #fff; min-width: 220px;
  box-shadow: 0 20px 60px rgba(11,18,32,.18); transition: transform .3s ease;
}
.about-badge:hover { transform: translateY(-6px) rotate(-1deg); }
.about-badge .ab-num { font-family: var(--d); font-size: 64px; font-weight: 700; line-height: 1;
  background: linear-gradient(90deg, var(--blue-soft), var(--teal));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.about-badge .ab-lbl { font-family: var(--m); font-size: 13px; letter-spacing: .04em;
  text-transform: uppercase; color: var(--slate); }

/* Calculator: cursor-tracking glow + interactive polish */
.calc-card { position: relative; overflow: hidden; }
.calc-card::after {
  content: ""; position: absolute; width: 460px; height: 460px; border-radius: 50%;
  left: var(--mx, 50%); top: var(--my, 0%); transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(31,182,166,.16), transparent 60%);
  opacity: 0; transition: opacity .4s ease; pointer-events: none; z-index: 0;
}
.calc-card:hover::after { opacity: 1; }
.calc-body, .calc-bar { position: relative; z-index: 1; }

/* Slider thumb grow on hover/active */
input[type="range"] { transition: filter .2s ease; }
input[type="range"]:hover { filter: brightness(1.15); }
input[type="range"]::-webkit-slider-thumb { transition: transform .15s ease, box-shadow .15s ease; }
input[type="range"]:hover::-webkit-slider-thumb,
input[type="range"]:active::-webkit-slider-thumb {
  transform: scale(1.25); box-shadow: 0 0 0 8px rgba(31,182,166,.18);
}

/* Result cards & compare boxes: hover lift */
.rcard, .cbox { transition: transform .25s ease, box-shadow .25s ease; }
.rcard:hover, .cbox:hover { transform: translateY(-4px); }
.rcard.lead:hover { box-shadow: 0 18px 50px rgba(31,182,166,.22); }

/* Process steps: number rotate on hover */
.step .n { transition: transform .3s cubic-bezier(.2,.8,.2,1), color .3s ease; }
.step:hover .n { transform: scale(1.12) rotate(-6deg); color: var(--blue); }

/* KPI tiles on landing pane */
.lp-tile { transition: transform .25s ease; }
.lp-tile:hover { transform: translateY(-4px); }

/* Floating entrance for hero pane */
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.lp-card, .landing-pane { animation: floaty 6s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .logo span { animation: none; }
  .btn::before, .lp-card, .landing-pane { animation: none !important; }
  .card:hover, .chip:hover, .tl-item:hover, .rcard:hover, .cbox:hover,
  .about-badge:hover, .lp-tile:hover, .step:hover .n { transform: none; }
}

/* ============================================================
   ADVANCED PROFESSIONAL ANIMATION LAYER  (appended)
   Custom cursor · scroll progress · SVG graphs · text reveal
   magnetic buttons · marquee · tilt · ambient grid
   ============================================================ */

/* ---------- 0. Motion guard ---------- */
:root { --ease: cubic-bezier(.22,.61,.36,1); --ease-out-back: cubic-bezier(.34,1.56,.64,1); }

/* ---------- 1. Custom cursor ---------- */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9999;
  border-radius: 50%; mix-blend-mode: difference; will-change: transform;
}
.cursor-dot  { width: 7px; height: 7px; background: #fff; transform: translate(-50%,-50%); }
.cursor-ring {
  width: 38px; height: 38px; border: 1.5px solid #fff; transform: translate(-50%,-50%);
  transition: width .25s var(--ease), height .25s var(--ease),
              background .25s var(--ease), border-color .25s var(--ease), opacity .25s;
}
.cursor-ring.hover { width: 64px; height: 64px; background: rgba(255,255,255,.12); border-color: transparent; }
.cursor-ring.click { width: 26px; height: 26px; }
body.has-cursor, body.has-cursor a, body.has-cursor button,
body.has-cursor input[type=range], body.has-cursor .card { cursor: none; }
@media (hover: none), (pointer: coarse) { .cursor-dot, .cursor-ring { display: none !important; } body.has-cursor * { cursor: auto !important; } }

/* ---------- 2. Scroll progress bar ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%; z-index: 9998;
  background: linear-gradient(90deg, var(--blue), var(--teal), var(--gold));
  box-shadow: 0 0 12px rgba(91,108,255,.6); transition: width .08s linear;
}

/* ---------- 3. Ambient animated grid in dark hero / sections ---------- */
.hero, .calc, .impact, .page-hero, .step { position: relative; }
.hero::before, .calc::before, .impact::before, .page-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(91,108,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91,108,255,.06) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, #000 30%, transparent 75%);
          mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, #000 30%, transparent 75%);
  animation: gridDrift 22s linear infinite;
}
@keyframes gridDrift { to { background-position: 46px 46px, 46px 46px; } }
.hero > .wrap, .calc > .wrap, .impact > .wrap, .page-hero > .wrap { position: relative; z-index: 1; }

/* floating ambient orbs in hero */
.hero .orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .5; z-index: 0; pointer-events: none; }
.hero .orb.o1 { width: 380px; height: 380px; background: radial-gradient(circle, rgba(91,108,255,.55), transparent 70%); top: -80px; right: -60px; animation: orbFloat 14s ease-in-out infinite; }
.hero .orb.o2 { width: 300px; height: 300px; background: radial-gradient(circle, rgba(31,182,166,.45), transparent 70%); bottom: -120px; left: -40px; animation: orbFloat 18s ease-in-out infinite reverse; }
@keyframes orbFloat { 0%,100%{ transform: translate(0,0) scale(1);} 33%{ transform: translate(30px,-26px) scale(1.08);} 66%{ transform: translate(-22px,18px) scale(.95);} }

/* ---------- 4. Word-by-word headline reveal ---------- */
.split-word { display: inline-block; overflow: hidden; vertical-align: top; }
.split-word > span { display: inline-block; transform: translateY(110%); opacity: 0;
  transition: transform .8s var(--ease), opacity .8s var(--ease); }
.split-ready .split-word > span { transform: translateY(0); opacity: 1; }

/* ---------- 5. Reveal variants (stagger + directional) ---------- */
.reveal.from-left  { transform: translateX(-40px); }
.reveal.from-right { transform: translateX(40px); }
.reveal.scale-in   { transform: scale(.92); }
.reveal.in.from-left, .reveal.in.from-right, .reveal.in.scale-in { transform: none; }
.stagger > * { opacity: 0; transform: translateY(22px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.stagger.in > * { opacity: 1; transform: none; }
.stagger.in > *:nth-child(1){ transition-delay:.05s }
.stagger.in > *:nth-child(2){ transition-delay:.14s }
.stagger.in > *:nth-child(3){ transition-delay:.23s }
.stagger.in > *:nth-child(4){ transition-delay:.32s }
.stagger.in > *:nth-child(5){ transition-delay:.41s }
.stagger.in > *:nth-child(6){ transition-delay:.50s }

/* ---------- 6. Animated SVG line chart (draws itself) ---------- */
.chart-card {
  background: linear-gradient(160deg,var(--panel),var(--ink-2));
  border: 1px solid var(--line); border-radius: 18px; padding: 22px 22px 14px;
  box-shadow: 0 30px 80px rgba(0,0,0,.45); position: relative; overflow: hidden;
}
.chart-card .ch-title { font-family: var(--m); font-size: 12px; letter-spacing:.08em; text-transform:uppercase; color: var(--slate); margin-bottom: 4px; }
.chart-card .ch-sub  { font-family: var(--d); font-size: 22px; font-weight: 700; color:#fff; margin-bottom: 14px; }
.line-chart { width: 100%; height: 190px; display: block; overflow: visible; }
.line-chart .axis { stroke: var(--line); stroke-width: 1; }
.line-chart .grid-y { stroke: rgba(255,255,255,.05); stroke-width: 1; }
.line-chart .area { opacity: 0; transition: opacity 1.2s ease .5s; }
.line-chart .line {
  fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: var(--len,1000); stroke-dashoffset: var(--len,1000);
}
.line-chart .dot { opacity: 0; transform: scale(0); transform-box: fill-box; transform-origin: center; }
.chart-card.draw .line { animation: drawLine 1.8s var(--ease) forwards; }
.chart-card.draw .area { opacity: 1; }
.chart-card.draw .dot  { animation: popDot .4s var(--ease-out-back) forwards; }
.chart-card.draw .dot:nth-child(1){animation-delay:.7s}
.chart-card.draw .dot:nth-child(2){animation-delay:.9s}
.chart-card.draw .dot:nth-child(3){animation-delay:1.1s}
.chart-card.draw .dot:nth-child(4){animation-delay:1.3s}
.chart-card.draw .dot:nth-child(5){animation-delay:1.5s}
.chart-card.draw .dot:nth-child(6){animation-delay:1.7s}
@keyframes drawLine { to { stroke-dashoffset: 0; } }
@keyframes popDot { to { opacity: 1; transform: scale(1); } }

/* ---------- 7. Animated bar chart ---------- */
.bars { display: flex; align-items: flex-end; gap: 10px; height: 150px; margin-top: 8px; }
.bars .bar { flex: 1; border-radius: 6px 6px 0 0; height: 0;
  background: linear-gradient(180deg, var(--blue), rgba(91,108,255,.25));
  transition: height 1s var(--ease); position: relative; }
.bars .bar:nth-child(even){ background: linear-gradient(180deg, var(--teal), rgba(31,182,166,.25)); }
.bars.draw .bar { height: var(--h); }
.bars .bar .cap { position:absolute; top:-20px; left:0; right:0; text-align:center;
  font-family: var(--m); font-size: 11px; color: var(--slate); opacity:0; transition: opacity .4s ease .8s; }
.bars.draw .bar .cap { opacity: 1; }

/* ---------- 8. Data-flow pipeline graph ---------- */
.flow { display: grid; grid-template-columns: 1fr 60px 1fr 60px 1fr; gap: 0; align-items: center;
  position: relative; margin-top: 8px; }
.flow .node {
  background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 14px;
  padding: 18px; text-align: center; position: relative; z-index: 2;
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
}
.flow .node:hover { transform: translateY(-4px); border-color: var(--blue-soft); box-shadow: 0 14px 40px rgba(91,108,255,.25); } { transform: translateY(-4px); border-color: var(--blue-soft); box-shadow: 0 14px 40px rgba(91,108,255,.25); }
.flow .node .ni { font-size: 24px; margin-bottom: 8px; }
.flow .node .nt { font-family: var(--d); font-weight: 700; color:#fff; font-size: 15px; }
.flow .node .nd { font-size: 12px; color: var(--slate-2); margin-top: 4px; font-family: var(--m); }
.flow .pipe { height: 2px; background: var(--line); position: relative; overflow: hidden; }
.flow .pipe::after { content:""; position:absolute; inset:0; width: 40%;
  background: linear-gradient(90deg, transparent, var(--teal-soft), transparent);
  animation: flowPulse 2.2s linear infinite; }
@keyframes flowPulse { from { transform: translateX(-100%);} to { transform: translateX(350%);} }

/* ---------- 9. Magnetic buttons ---------- */
.btn, .nav-cta { will-change: transform; }

/* ---------- 10. Marquee trust strip ---------- */
.marquee { overflow: hidden; border-block: 1px solid var(--line); background: var(--ink-2); }
.marquee-track { display: flex; gap: 56px; width: max-content; animation: marquee 26s linear infinite;
  padding: 16px 28px; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span { font-family: var(--m); font-size: 13px; letter-spacing:.1em; text-transform:uppercase;
  color: var(--slate); white-space: nowrap; display:inline-flex; align-items:center; gap:10px; }
.marquee-track span::before { content:"◆"; color: var(--teal); font-size: 9px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- 11. Spotlight follow on cards ---------- */
.card { position: relative; }
.card::after {
  content:""; position:absolute; inset:0; border-radius: inherit; pointer-events:none;
  opacity: 0; transition: opacity .35s ease;
  background: radial-gradient(360px circle at var(--cx,50%) var(--cy,50%), rgba(91,108,255,.10), transparent 60%);
}
.card:hover::after { opacity: 1; }

/* ---------- 12. Count-up flash ---------- */
.num.counting, .v.counting, .rv.counting { animation: numGlow 1.4s ease; }
@keyframes numGlow { 0%{ filter: brightness(1.6);} 100%{ filter: brightness(1);} }

/* ---------- 13. Section divider sheen ---------- */
.live-panel { position: relative; }

@media (prefers-reduced-motion: reduce) {
  .cursor-dot, .cursor-ring, .scroll-progress { display: none !important; }
  .hero::before, .calc::before, .impact::before, .page-hero::before,
  .hero .orb, .flow .pipe::after, .marquee-track, .logo span { animation: none !important; }
  .split-word > span { transform: none; opacity: 1; }
  .line-chart .line { stroke-dashoffset: 0 !important; animation: none !important; }
  .line-chart .area, .line-chart .dot { opacity: 1 !important; transform: none !important; }
  .bars .bar { height: var(--h) !important; transition: none; }
  body.has-cursor, body.has-cursor * { cursor: auto !important; }
}

/* flow responsive */
@media (max-width: 940px) {
  .flow { grid-template-columns: 1fr; gap: 12px; }
  .flow .pipe { width: 2px; height: 28px; margin: 0 auto; }
  .flow .pipe::after { width: 100%; height: 40%;
    background: linear-gradient(180deg, transparent, var(--teal-soft), transparent);
    animation: flowPulseV 2.2s linear infinite; }
  @keyframes flowPulseV { from { transform: translateY(-100%);} to { transform: translateY(350%);} }
  .grid-2 { grid-template-columns: 1fr; }
}

/* ---- Image logo ---- */
.logo-img { height: 40px; width: auto; display: block; }
.logo-img-ft { height: 46px; }
.logo:hover { transform: scale(1.04); }
@media (max-width: 640px) { .logo-img { height: 32px; } .logo-img-ft { height: 38px; } }
