/* ============================================================================
   Massetro Healthcare CMMS — solution website
   Modern, vibrant, animated. Self-contained (no build step).
   ========================================================================== */

:root {
  /* vibrant brand palette */
  --teal:   #06B6D4;
  --teal-d: #0E7490;
  --cyan:   #22D3EE;
  --blue:   #3B82F6;
  --indigo: #6366F1;
  --violet: #8B5CF6;
  --purple: #7C3AED;
  --pink:   #EC4899;
  --emerald:#10B981;
  --amber:  #F59E0B;
  --rose:   #F43F5E;

  --navy:   #0B1224;
  --navy-2: #111a33;
  --ink:    #0F172A;
  --slate:  #475569;
  --muted:  #64748B;
  --line:   #E2E8F0;
  --soft:   #F1F5F9;
  --paper:  #FFFFFF;
  --bg:     #F8FAFC;

  /* gradients */
  --g-brand:  linear-gradient(120deg, #06B6D4 0%, #6366F1 55%, #8B5CF6 100%);
  --g-brand-2:linear-gradient(120deg, #22D3EE 0%, #3B82F6 50%, #7C3AED 100%);
  --g-warm:   linear-gradient(120deg, #F59E0B 0%, #EC4899 100%);
  --g-cool:   linear-gradient(120deg, #10B981 0%, #06B6D4 100%);
  --g-hero:   radial-gradient(1200px 600px at 12% -10%, rgba(34,211,238,.30), transparent 60%),
              radial-gradient(1000px 700px at 90% 0%, rgba(139,92,246,.32), transparent 55%),
              radial-gradient(900px 600px at 60% 120%, rgba(59,130,246,.28), transparent 60%),
              linear-gradient(160deg, #0B1224 0%, #0E1B3A 60%, #131a3a 100%);

  --radius: 18px;
  --radius-s: 12px;
  --shadow: 0 10px 30px -12px rgba(15,23,42,.22);
  --shadow-lg: 0 30px 60px -20px rgba(15,23,42,.35);
  --glow: 0 0 0 1px rgba(99,102,241,.14), 0 18px 50px -18px rgba(99,102,241,.45);

  --maxw: 1180px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.02em; margin: 0; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 104px 0; position: relative; }
.section.tight { padding: 72px 0; }

.gradient-text {
  background: var(--g-brand); -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--teal-d);
  background: linear-gradient(90deg, rgba(6,182,212,.12), rgba(139,92,246,.12));
  border: 1px solid rgba(99,102,241,.22);
  padding: 7px 14px; border-radius: 999px;
}
.section-head { max-width: 760px; margin-bottom: 52px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(30px, 4vw, 46px); margin: 18px 0 14px; font-weight: 800; }
.section-head p { font-size: 18px; color: var(--slate); margin: 0; }

/* ---------------- NAV ---------------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; transition: background .3s var(--ease), box-shadow .3s var(--ease), padding .3s var(--ease);
}
.nav.scrolled {
  background: rgba(255,255,255,.82); backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(15,23,42,.06), var(--shadow);
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 19px; letter-spacing: -.02em; }
.brand .logo {
  width: 34px; height: 34px; border-radius: 10px; background: var(--g-brand);
  display: grid; place-items: center; color: #fff; font-weight: 900; box-shadow: var(--glow);
}
.nav.scrolled .brand { color: var(--ink); }
.nav:not(.scrolled) .brand { color: #fff; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  padding: 9px 14px; border-radius: 10px; font-size: 14.5px; font-weight: 600; color: inherit;
  opacity: .9; transition: background .2s, color .2s, opacity .2s;
}
.nav:not(.scrolled) .nav-links a { color: rgba(255,255,255,.92); }
.nav.scrolled .nav-links a { color: var(--slate); }
.nav-links a:hover, .nav-links a.active { background: rgba(99,102,241,.14); color: var(--indigo); opacity: 1; }
.nav:not(.scrolled) .nav-links a:hover, .nav:not(.scrolled) .nav-links a.active { background: rgba(255,255,255,.16); color: #fff; }
.nav-cta {
  background: var(--g-brand); color: #fff !important; padding: 10px 18px !important;
  border-radius: 999px !important; font-weight: 700 !important; box-shadow: var(--glow);
}
.nav-cta:hover { transform: translateY(-1px); filter: brightness(1.06); }
.hamburger { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.hamburger span { display: block; width: 24px; height: 2.4px; background: currentColor; border-radius: 2px; margin: 5px 0; transition: .3s; }
.nav:not(.scrolled) .hamburger { color: #fff; }
.nav.scrolled .hamburger { color: var(--ink); }

/* ---------------- HERO ---------------- */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  background: var(--g-hero); color: #fff; overflow: hidden;
  padding: 120px 0 80px;
}
.hero .blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .5; animation: float 12s ease-in-out infinite; }
.hero .blob.b1 { width: 420px; height: 420px; background: #06B6D4; top: -80px; left: -60px; }
.hero .blob.b2 { width: 480px; height: 480px; background: #8B5CF6; bottom: -120px; right: -80px; animation-delay: -4s; }
.hero .blob.b3 { width: 320px; height: 320px; background: #3B82F6; top: 40%; left: 55%; animation-delay: -8s; opacity: .35; }
.hero-grid { position: relative; z-index: 2; display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 700;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
  padding: 8px 15px; border-radius: 999px; backdrop-filter: blur(6px); margin-bottom: 22px;
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 0 4px rgba(16,185,129,.25); animation: pulse 2s infinite; }
.hero h1 { font-size: clamp(36px, 5.4vw, 62px); font-weight: 900; letter-spacing: -.03em; }
.hero h1 .accent { background: linear-gradient(90deg, #22D3EE, #A78BFA); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lede { font-size: clamp(17px, 1.5vw, 21px); color: rgba(226,232,240,.9); margin: 22px 0 32px; max-width: 60ch; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: 15.5px;
  padding: 14px 26px; border-radius: 999px; cursor: pointer; border: 0; transition: transform .2s var(--ease), box-shadow .2s, filter .2s;
}
.btn-primary { background: var(--g-brand); color: #fff; box-shadow: var(--glow); }
.btn-primary:hover { transform: translateY(-2px); filter: brightness(1.08); }
.btn-ghost { background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.26); }
.btn-ghost:hover { background: rgba(255,255,255,.16); transform: translateY(-2px); }
.btn-dark { background: var(--ink); color: #fff; }
.hero-stats { display: flex; gap: 30px; margin-top: 42px; flex-wrap: wrap; }
.hero-stats .stat .n { font-size: 30px; font-weight: 900; background: linear-gradient(90deg,#22D3EE,#A78BFA); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-stats .stat .l { font-size: 13px; color: rgba(226,232,240,.75); font-weight: 600; }
.hero-visual { position: relative; }
.scroll-hint { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,.6); font-size: 12px; font-weight: 600; letter-spacing: .1em; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.scroll-hint .mouse { width: 22px; height: 36px; border: 2px solid rgba(255,255,255,.4); border-radius: 12px; position: relative; }
.scroll-hint .mouse::after { content:''; position: absolute; top: 7px; left: 50%; transform: translateX(-50%); width: 4px; height: 7px; border-radius: 3px; background: #fff; animation: scrolldot 1.6s infinite; }

/* ---------------- trust bar ---------------- */
.trustbar { background: var(--navy); color: #fff; padding: 26px 0; }
.trustbar .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.trustbar .t { display: flex; align-items: center; gap: 10px; font-size: 14.5px; font-weight: 600; color: rgba(255,255,255,.82); }
.trustbar .t b { color: #fff; }

/* ---------------- cards ---------------- */
.grid { display: grid; gap: 22px; }
.grid.c2 { grid-template-columns: repeat(2, 1fr); }
.grid.c3 { grid-template-columns: repeat(3, 1fr); }
.grid.c4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
  box-shadow: var(--shadow); transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
  position: relative; overflow: hidden;
}
.card::before { content:''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--g-brand); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease); }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card:hover::before { transform: scaleX(1); }
.card .ic { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 16px; color: #fff; }
.card h3 { font-size: 19px; font-weight: 800; margin-bottom: 8px; }
.card p { color: var(--slate); font-size: 15px; margin: 0; }
.card .tag { display: inline-block; margin-top: 14px; font-size: 12px; font-weight: 800; letter-spacing: .04em; color: var(--indigo); background: rgba(99,102,241,.1); padding: 4px 10px; border-radius: 999px; }
.bg-teal{background:var(--g-cool);} .bg-blue{background:linear-gradient(135deg,#3B82F6,#6366F1);}
.bg-violet{background:linear-gradient(135deg,#8B5CF6,#7C3AED);} .bg-pink{background:var(--g-warm);}
.bg-emerald{background:linear-gradient(135deg,#10B981,#06B6D4);} .bg-amber{background:linear-gradient(135deg,#F59E0B,#F43F5E);}

/* AI use-case callout */
.usecase { background: rgba(34,211,238,.1); border-left: 3px solid var(--cyan); padding: 11px 14px; border-radius: 10px; margin: 0 0 14px !important; font-size: 14px; }
.usecase b { color: var(--cyan); }

/* feature pillars */
.pillar { padding: 30px; }
.pillar ul { list-style: none; padding: 0; margin: 14px 0 0; }
.pillar li { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; font-size: 14.5px; color: var(--slate); }
.pillar li svg { flex: 0 0 auto; margin-top: 3px; }

/* dark section */
.section.dark { background: linear-gradient(165deg, #0B1224, #131c3c); color: #fff; }
.section.dark .section-head p { color: rgba(226,232,240,.78); }
.section.dark .card { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.1); box-shadow: none; }
.section.dark .card h3 { color: #fff; }
.section.dark .card p { color: rgba(226,232,240,.74); }
.section.dark .kicker { color: var(--cyan); background: rgba(34,211,238,.1); border-color: rgba(34,211,238,.25); }

/* diagram frame */
.diagram { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.section.dark .diagram { background: rgba(255,255,255,.03); border-color: rgba(255,255,255,.1); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
.split.wide-left { grid-template-columns: 1.15fr .85fr; }

/* metrics / counters */
.metric { text-align: center; padding: 30px 18px; }
.metric .n { font-size: clamp(40px, 5vw, 60px); font-weight: 900; line-height: 1; }
.metric .n.g1 { background: var(--g-brand); -webkit-background-clip:text; background-clip:text; color:transparent; }
.metric .n.g2 { background: var(--g-warm); -webkit-background-clip:text; background-clip:text; color:transparent; }
.metric .n.g3 { background: var(--g-cool); -webkit-background-clip:text; background-clip:text; color:transparent; }
.metric .l { margin-top: 8px; font-weight: 700; font-size: 15px; }
.metric .s { color: var(--muted); font-size: 13.5px; }

/* compliance chips */
.chips { display: flex; flex-wrap: wrap; gap: 12px; }
.chip { display: inline-flex; align-items: center; gap: 9px; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 10px 18px; font-weight: 700; font-size: 14.5px; box-shadow: var(--shadow); }
.chip .d { width: 9px; height: 9px; border-radius: 50%; }

/* CTA */
.cta { background: var(--g-brand); border-radius: 28px; padding: 64px; text-align: center; color: #fff; position: relative; overflow: hidden; box-shadow: var(--shadow-lg); }
.cta::after { content:''; position: absolute; inset: 0; background: radial-gradient(600px 300px at 20% 0%, rgba(255,255,255,.22), transparent 60%); }
.cta h2 { font-size: clamp(28px, 4vw, 44px); font-weight: 900; position: relative; }
.cta p { font-size: 18px; opacity: .92; max-width: 60ch; margin: 16px auto 28px; position: relative; }
.cta .hero-cta { justify-content: center; position: relative; }

/* footer */
footer { background: var(--navy); color: rgba(255,255,255,.7); padding: 54px 0 30px; }
footer .cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
footer h4 { color: #fff; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 14px; }
footer a { display: block; padding: 5px 0; font-size: 14.5px; color: rgba(255,255,255,.66); }
footer a:hover { color: var(--cyan); }
footer .foot-brand p { max-width: 36ch; font-size: 14.5px; }
footer .bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 36px; padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 13.5px; }

/* ---------------- reveal animations ---------------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; } .reveal.d4 { transition-delay: .32s; }
.reveal.d5 { transition-delay: .40s; } .reveal.d6 { transition-delay: .48s; }

/* SVG animation hooks — play when the diagram's section reveals */
.draw { stroke-dasharray: var(--len, 600); stroke-dashoffset: var(--len, 600); }
.in .draw { animation: draw 1.6s var(--ease) forwards; }
.in .draw.s1{animation-delay:.1s} .in .draw.s2{animation-delay:.35s} .in .draw.s3{animation-delay:.6s}
.in .draw.s4{animation-delay:.85s} .in .draw.s5{animation-delay:1.1s}
.pulse-node { transform-box: fill-box; transform-origin: center; }
.in .pulse-node { animation: nodepop .6s var(--ease) backwards; }
.flow { stroke-dasharray: 8 10; animation: flow 1.1s linear infinite; }
.spin-slow { transform-box: fill-box; transform-origin: center; animation: spin 26s linear infinite; }
.orbit { transform-box: fill-box; transform-origin: 270px 230px; animation: spin 22s linear infinite; }
.orbit.rev { animation: spin 30s linear infinite reverse; }
.float-y { animation: float 7s ease-in-out infinite; }

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes nodepop { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: scale(1); } }
@keyframes flow { to { stroke-dashoffset: -36; } }
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-16px)} }
@keyframes pulse { 0%,100%{box-shadow:0 0 0 4px rgba(16,185,129,.25)} 50%{box-shadow:0 0 0 8px rgba(16,185,129,.05)} }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes scrolldot { 0%{opacity:1;top:7px} 80%{opacity:0;top:18px} 100%{opacity:0} }
@keyframes shimmer { to { background-position: 200% center; } }

/* count-up wrapper keeps layout stable */
.count { font-variant-numeric: tabular-nums; }

/* ---------------- responsive ---------------- */
@media (max-width: 960px) {
  .hero-grid, .split, .split.wide-left { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .grid.c4 { grid-template-columns: repeat(2, 1fr); }
  .grid.c3 { grid-template-columns: 1fr; }
  footer .cols { grid-template-columns: 1fr 1fr; }
  .nav-links {
    position: fixed; inset: 0 0 0 auto; width: min(80vw, 320px);
    flex-direction: column; align-items: stretch; gap: 6px;
    background: #fff; padding: 90px 20px 20px; box-shadow: var(--shadow-lg);
    transform: translateX(100%); transition: transform .35s var(--ease);
  }
  .nav-links.open { transform: none; }
  .nav-links a { color: var(--ink) !important; padding: 14px 16px; }
  .hamburger { display: block; z-index: 110; }
}
@media (max-width: 620px) {
  .section { padding: 72px 0; }
  .grid.c4, .grid.c2 { grid-template-columns: 1fr; }
  .cta { padding: 40px 24px; }
  .trustbar .wrap { justify-content: center; text-align: center; }
  footer .cols { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .draw { stroke-dashoffset: 0; }
  .float-y, .orbit, .spin-slow, .flow, .blob, .hero-badge .dot { animation: none !important; }
}
