/* Premium experience layer — motion, depth, glass, cursor */
:root {
  --ease-out-expo: var(--ax-ease-out-expo, cubic-bezier(0.16, 1, 0.3, 1));
  --ease-out-quart: var(--ax-ease-out-quart, cubic-bezier(0.22, 1, 0.36, 1));
  --radius-premium: var(--ax-radius-lg, 26px);
  --health-teal: var(--ax-teal, #14b8a6);
  --health-cyan: var(--ax-cyan, #a5f3fc);
  --glow-primary: var(--ax-glow-sage, rgba(137, 169, 148, 0.3));
}

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }

/* Ambient background */
.ambient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient-mesh {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(ellipse 60% 50% at 18% 35%, rgba(137, 169, 148, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 75% 55%, rgba(123, 162, 163, 0.14) 0%, transparent 50%),
    radial-gradient(ellipse 45% 38% at 55% 85%, rgba(200, 217, 212, 0.2) 0%, transparent 48%);
  animation: ambientDrift 28s ease-in-out infinite alternate;
}

@keyframes ambientDrift {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-2%, 1%) scale(1.03); }
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  animation: orbFloat 20s ease-in-out infinite;
}

.ambient-orb-1 {
  width: 480px;
  height: 480px;
  top: -120px;
  right: -80px;
  background: rgba(123, 162, 163, 0.22);
}

.ambient-orb-2 {
  width: 360px;
  height: 360px;
  bottom: 10%;
  left: -100px;
  background: rgba(90, 125, 114, 0.2);
  animation-delay: -8s;
}

.ambient-orb-3 {
  width: 280px;
  height: 280px;
  top: 42%;
  right: 28%;
  background: rgba(200, 217, 212, 0.25);
  animation-delay: -14s;
  opacity: 0.45;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(24px, -16px); }
}

.ambient-noise {
  position: absolute;
  inset: 0;
  opacity: 0.4;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
}

.ambient-particles {
  position: absolute;
  inset: 0;
}

.ambient-particle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  animation: particleDrift linear infinite;
}

@keyframes particleDrift {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  10% { opacity: 0.6; }
  90% { opacity: 0.3; }
  100% { transform: translateY(-100vh) translateX(20px); opacity: 0; }
}

/* Cursor spotlight */
.cursor-glow {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  background: radial-gradient(circle, rgba(168, 196, 180, 0.12) 0%, transparent 65%);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.4s ease;
  mix-blend-mode: screen;
}

body.has-cursor-glow .cursor-glow { opacity: 1; }

/* Premium nav */
.site-nav-premium {
  transition:
    padding 0.5s var(--ease-out-expo),
    background 0.5s var(--ease-out-expo),
    box-shadow 0.5s var(--ease-out-expo),
    backdrop-filter 0.5s var(--ease-out-expo);
}

.site-nav-premium .site-nav-inner {
  transition: height 0.5s var(--ease-out-expo);
}

.site-nav-premium.is-compact .site-nav-inner {
  height: 60px;
}

.site-nav-premium.is-compact .site-logo {
  font-size: 1.12rem;
}

.site-nav-premium .site-logo {
  transition: font-size 0.5s var(--ease-out-expo);
}

.site-nav-premium.scrolled {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: 0 8px 32px rgba(30, 27, 58, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
}

.site-nav-links-wrap {
  position: relative;
}
.site-nav-links {
  position: relative;
}

.nav-indicator {
  position: absolute;
  bottom: -6px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--primary), var(--health-teal));
  transition:
    left 0.45s var(--ease-out-expo),
    width 0.45s var(--ease-out-expo),
    opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
}

.site-nav.scrolled .nav-indicator { opacity: 1; }

.btn-magnetic {
  position: relative;
  transition: transform 0.35s var(--ease-out-expo), box-shadow 0.35s var(--ease-out-expo);
}

.btn-glow {
  box-shadow: 0 4px 20px var(--glow-primary);
}

.btn-glow::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(90, 125, 114, 0.35), rgba(137, 169, 148, 0.25));
  opacity: 0;
  z-index: -1;
  filter: blur(12px);
  transition: opacity 0.4s ease;
}

.btn-glow:hover::after { opacity: 1; }

/* Hero premium split */
.hero-premium {
  position: relative;
  z-index: 1;
  padding: 128px 0 72px;
  text-align: left;
  overflow: hidden;
  isolation: isolate;
}

@media (min-width: 1024px) {
  .hero-premium {
    min-height: 88vh;
    padding-bottom: 100px;
  }
}

.hero-aurora {
  position: absolute;
  inset: -20% -10%;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
}

.hero-aurora-layer {
  position: absolute;
  inset: 0;
  filter: blur(60px);
  animation: auroraDrift 32s ease-in-out infinite alternate;
}

.hero-aurora-1 {
  background:
    radial-gradient(ellipse 55% 45% at 18% 35%, rgba(137, 169, 148, 0.28) 0%, transparent 58%),
    radial-gradient(ellipse 40% 35% at 72% 28%, rgba(123, 162, 163, 0.2) 0%, transparent 52%);
}

.hero-aurora-2 {
  background:
    radial-gradient(ellipse 50% 40% at 55% 68%, rgba(157, 180, 168, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse 35% 30% at 88% 72%, rgba(90, 125, 114, 0.16) 0%, transparent 50%);
  animation-delay: -12s;
  animation-duration: 38s;
}

.hero-aurora-3 {
  background: radial-gradient(ellipse 45% 38% at 40% 50%, rgba(220, 231, 232, 0.18) 0%, transparent 60%);
  animation-delay: -20s;
  animation-duration: 42s;
  opacity: 0.7;
}

@keyframes auroraDrift {
  0% { transform: translate(0, 0) scale(1) rotate(0deg); }
  100% { transform: translate(3%, -2%) scale(1.04) rotate(2deg); }
}

.hero-beam {
  position: absolute;
  width: 1px;
  height: 140%;
  top: -20%;
  background: linear-gradient(180deg, transparent 0%, rgba(200, 217, 212, 0.16) 35%, rgba(123, 162, 163, 0.1) 55%, transparent 100%);
  filter: blur(1px);
  opacity: 0.5;
  animation: beamSweep 24s ease-in-out infinite;
}

.hero-beam-1 { left: 22%; transform: rotate(12deg); }
.hero-beam-2 { right: 18%; transform: rotate(-8deg); animation-delay: -10s; animation-name: beamSweepAlt; }

@keyframes beamSweepAlt {
  0%, 100% { opacity: 0.25; transform: rotate(-8deg) translateX(0); }
  50% { opacity: 0.55; transform: rotate(-8deg) translateX(-20px); }
}

@keyframes beamSweep {
  0%, 100% { opacity: 0.25; transform: rotate(12deg) translateX(0); }
  50% { opacity: 0.55; transform: rotate(12deg) translateX(24px); }
}


.site-nav-premium:not(.scrolled) .site-nav-links a {
  color: var(--body);
}

.site-nav-premium:not(.scrolled) .site-nav-links a:hover {
  color: var(--ink);
}

.site-nav-premium:not(.scrolled) .site-nav-toggle span {
  background: var(--ink);
}

.hero-premium .hero-trust span {
  color: var(--body);
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(30, 27, 58, 0.1);
}

.site-footer.footer-premium::before {
  display: none;
}

.hero-premium .hero-seq,
.hero-premium .hero-stage-glow {
  opacity: 0;
}

.hero-premium #hero-dashboard {
  opacity: 0;
}

html.hero-ready .hero-premium .hero-seq,
html.hero-ready .hero-premium .hero-stage-glow,
html.hero-ready .hero-aurora {
  opacity: 1;
}

.hero-line {
  display: block;
}

.hero-headline {
  text-align: center;
  text-wrap: balance;
  margin: 0 0 20px;
}

.hero-line-primary {
  display: block;
  white-space: nowrap;
  line-height: 1.08;
}

.hero-line-for,
.hero-line-rotate {
  display: block;
  line-height: 1.08;
}

@media (max-width: 480px) {
  .hero-line-primary {
    white-space: normal;
  }
}

.hero-premium .hero-rotate-wrap {
  position: relative;
  display: inline-block;
  height: 1.12em;
  vertical-align: bottom;
  text-align: center;
}

.hero-premium .hero-rotate-wrap .hero-rotate {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.45s ease, transform 0.45s ease;
  white-space: nowrap;
  display: block;
  width: max-content;
  max-width: none;
  text-align: center;
  color: #0f766e;
  font-style: italic;
  font-weight: 600;
}

.hero-premium .hero-rotate-wrap .hero-rotate.is-active {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.hero-premium .hero-rotate-wrap .hero-rotate:not(.is-active) {
  transform: translateX(-50%) translateY(4px);
}

.hero-premium #hero-dashboard {
  opacity: 0;
  transform-origin: center center;
}

@media (min-width: 1024px) {
  .hero-premium #hero-dashboard {
    transform: none;
  }

  html.hero-dashboard-preview .hero-premium #hero-dashboard,
  html.hero-dashboard-static .hero-premium #hero-dashboard {
    opacity: 1;
  }
}

@media (max-width: 1023px) {
  .hero-premium #hero-dashboard {
    transform: none;
    will-change: transform, opacity;
  }
}

html.hero-dashboard-revealed .hero-premium #hero-dashboard {
  opacity: 1;
  will-change: auto;
}

.hero-premium #hero-rotate.hero-rotate {
  color: #0f766e;
}

.hero-premium .hero-accent {
  background: linear-gradient(
    100deg,
    #0f766e 0%,
    #14b8a6 38%,
    #0d9488 68%,
    #115e59 100%
  );
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(36px, 5vw, 56px);
  position: relative;
  z-index: 2;
}

.hero-copy-centered {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.hero-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(36px, 5vw, 56px);
  position: relative;
  z-index: 2;
}

.hero-copy-centered {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.hero-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 48px;
  align-items: center;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.hero-premium .hero-eyebrow {
  margin-bottom: 24px;
}

.hero-premium h1 {
  margin: 0 0 20px;
  max-width: none;
  font-size: clamp(2.25rem, 4.2vw, 4.25rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-premium .hero-sub {
  margin: 0 auto 28px;
  text-align: center;
  max-width: 42ch;
}

.hero-premium .hero-ctas {
  justify-content: center;
  margin-bottom: 24px;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.hero-trust span {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
}

.hero-stage {
  position: relative;
  z-index: 2;
  width: 100%;
}

.hero-stage-landscape {
  max-width: 1140px;
  margin: 0 auto;
  padding-bottom: 24px;
}

.hero-stage-glow {
  position: absolute;
  inset: -14% -10%;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 72% 58% at 48% 42%, var(--ax-glow-sage, rgba(137, 169, 148, 0.32)) 0%, transparent 58%),
    radial-gradient(ellipse 52% 48% at 62% 58%, var(--ax-glow-teal, rgba(123, 162, 163, 0.22)) 0%, transparent 52%);
  filter: blur(48px);
  will-change: transform, opacity;
}

.hero-stage-shadow {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -28px;
  height: 56px;
  border-radius: 50%;
  background: radial-gradient(ellipse 85% 100% at 50% 0%, rgba(0, 0, 0, 0.42) 0%, transparent 72%);
  filter: blur(22px);
  pointer-events: none;
  z-index: 0;
}

.hero-gradient-follow {
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168, 196, 180, 0.3) 0%, transparent 70%);
  pointer-events: none;
  filter: blur(40px);
  opacity: 0.6;
  z-index: 0;
}

/* Quick call — living call card */
#quick-call.quick-call-section {
  padding-top: clamp(40px, 5vh, 56px);
  padding-bottom: clamp(28px, 4vh, 40px);
}

#quick-call .quick-call-layout {
  display: grid;
  gap: 32px;
  align-items: start;
}

@media (min-width: 768px) {
  #quick-call .quick-call-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
    column-gap: 56px;
    align-items: end;
  }

  #quick-call .quick-call-copy {
    align-self: start;
  }

  #quick-call .qc-stage {
    align-self: end;
    justify-content: flex-end;
    align-items: center;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  #quick-call .quick-call-layout {
    column-gap: 32px;
  }
}

#quick-call .quick-call-copy {
  max-width: 480px;
  width: 100%;
}

#quick-call .section-eyebrow {
  color: #059669;
}

#quick-call .quick-call-copy h2 {
  color: #0f172a;
}

#quick-call .quick-call-copy > p:not(.section-eyebrow):not(.qc-caps-eyebrow):not(.qc-caps-hook) {
  color: #64748b;
}

#quick-call .qc-tick-block {
  margin-top: 20px;
}

@media (max-width: 767px) {
  #quick-call .qc-tick-block {
    margin-top: 20px;
  }
}

#quick-call .qc-stage {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  width: 100%;
}

#quick-call .qc-glow {
  position: absolute;
  width: 520px;
  height: 520px;
  top: 50%;
  left: 50%;
  transform: translate(-42%, -48%);
  background: radial-gradient(closest-side, rgba(94, 234, 212, 0.35), rgba(167, 243, 208, 0.18), transparent);
  filter: blur(50px);
  opacity: 0.6;
  z-index: 0;
  pointer-events: none;
}

#quick-call .qc-callcard {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 20px;
  box-shadow:
    0 24px 60px -24px rgba(15, 23, 42, 0.22),
    0 2px 8px rgba(15, 23, 42, 0.05);
  overflow: hidden;
  padding: 0 0 18px;
  opacity: 1;
  transform: none;
}

#quick-call .qc-confirm.is-visible,
#quick-call .qc-chips.is-visible {
  display: flex;
}

#quick-call .qc-typing.is-show {
  display: inline-flex;
}

#quick-call.qc-is-ready .chat-bubble-patient,
#quick-call.qc-is-ready .chat-bubble-ai {
  opacity: 1;
}

#quick-call.qc-is-ready .qc-confirm {
  opacity: 1;
  transform: none;
}

#quick-call.qc-is-ready .qc-chip {
  opacity: 1;
  transform: none;
}

@media (max-width: 767px) {
  #quick-call .quick-call-layout {
    grid-template-columns: 1fr;
  }

  #quick-call .qc-callcard {
    max-width: 100%;
    margin: 0 auto;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  #quick-call .qc-callcard {
    max-width: 100%;
    margin-left: 0;
  }
}

.hero-product { display: none; }

/* Premium cards */
.experience-card {
  transition:
    transform 0.45s var(--ease-out-expo),
    box-shadow 0.45s var(--ease-out-expo),
    border-color 0.45s ease;
  will-change: transform;
}

.experience-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 20px 50px rgba(30, 27, 58, 0.12);
}

.testimonial-card.experience-card {
  transform-style: preserve-3d;
}

.testimonial-card.experience-card:hover {
  transform: translateY(-8px) rotateX(2deg) rotateY(-2deg);
}

.gradient-card.experience-card:hover {
  transform: translateY(-8px) scale(1.02);
}

#voice-overview .gradient-card.experience-card:hover {
  transform: none;
}

.feature-panel.experience-card {
  backdrop-filter: blur(4px);
}

.emr-cloud {
  position: relative;
  padding: 20px 0;
}

.emr-cloud .emr-grid {
  position: relative;
  z-index: 2;
}

.emr-cloud-glow {
  position: absolute;
  inset: 10% 5%;
  background: radial-gradient(ellipse at center, rgba(79, 70, 229, 0.06) 0%, transparent 70%);
  pointer-events: none;
  animation: cloudPulse 6s ease-in-out infinite;
}

@keyframes cloudPulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.02); }
}

.emr-tile.experience-card {
  border-radius: 22px;
  transition: all 0.4s var(--ease-out-expo);
}

.emr-tile.experience-card:hover {
  transform: translateY(-4px) scale(1.03);
  border-color: var(--primary);
  box-shadow: 0 12px 32px rgba(79, 70, 229, 0.15);
  color: var(--primary-deep);
}

/* Section flow */
.section-premium {
  position: relative;
  z-index: 1;
}

.section-premium::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(79, 70, 229, 0.08), transparent);
}

/* GSAP reveal initial state */
.gsap-reveal {
  opacity: 0;
  filter: blur(8px);
  transform: translateY(40px) scale(0.98);
}

.gsap-reveal.is-done {
  opacity: 1;
  filter: none;
  transform: none;
}

/* Live demo premium shell (restyled under .tryLive) */
.tryLive .live-demo-widget.experience-shell .live-demo-card {
  border-radius: var(--tl-r-card, 28px);
  box-shadow: var(--tl-shadow-card, 0 30px 80px -30px rgba(30, 41, 59, 0.18));
  border: 1px solid rgba(15, 23, 42, 0.05);
  transition: box-shadow 0.5s var(--ease-out-expo), transform 0.5s var(--ease-out-expo);
}

.tryLive .live-demo-widget.experience-shell .live-demo-card:hover {
  box-shadow: var(--tl-shadow-card, 0 30px 80px -30px rgba(30, 41, 59, 0.18));
}

/* Footer premium */
.site-footer.footer-premium {
  position: relative;
  overflow: hidden;
}

.site-footer.footer-premium::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 100%, rgba(137, 169, 148, 0.16) 0%, transparent 60%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
}

.footer-premium .container {
  position: relative;
  z-index: 1;
}

.footer-logo-float {
  animation: footerFloat 8s ease-in-out infinite;
}

@keyframes footerFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* Sticky CTA premium */
.sticky-demo .btn-dark {
  border-radius: 999px;
  transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s ease;
}

.sticky-demo.visible .btn-dark {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

@media (max-width: 1024px) {
  .hero-stack,
  .hero-split {
    gap: 32px;
  }
  .hero-premium { text-align: center; padding-top: 108px; }
  .hero-premium .hero-sub,
  .hero-premium .hero-ctas { justify-content: center; text-align: center; margin-left: auto; margin-right: auto; }
  .hero-trust { justify-content: center; }
  .cursor-glow { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ambient-mesh, .ambient-orb, .ambient-particle, .footer-logo-float, .emr-cloud-glow,
  .hero-aurora-layer, .hero-beam {
    animation: none !important;
  }
  .hero-aurora,
  .hero-premium .hero-seq,
  .hero-premium #hero-dashboard,
  .hero-premium .hero-stage-glow {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
  .gsap-reveal { opacity: 1; filter: none; transform: none; }
  .experience-card:hover { transform: none; }
}
