/* Medicare Matrix public website (resources/views/site). Dark, tech look with a medical teal accent.
   Animations: POS preloader, floating medicines, ECG line, scroll reveals - all off with prefers-reduced-motion. */
:root {
  --bg: #050b18; --bg-2: #081227; --card: #0c1730; --card-2: #101e3d; --line: #1c2d52; --soft: #13234a;
  --text: #e9f0ff; --muted: #94a3c4; --pri: #19d3a2; --pri-2: #22b8f0; --pri-text: #04121f; --warn: #ffb547; --pink: #ff6b9a;
  --grad: linear-gradient(135deg, #19d3a2 0%, #22b8f0 55%, #6d7cff 100%);
  --radius: 16px; --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.65 'Plus Jakarta Sans', system-ui, 'Segoe UI', Arial, sans-serif; overflow-x: hidden; }
img { max-width: 100%; }
a { color: var(--pri); }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 12px; }
h1 { font-size: clamp(34px, 5.4vw, 62px); font-weight: 800; }
h2 { font-size: clamp(26px, 3.4vw, 40px); font-weight: 800; }
h3 { font-size: 18px; font-weight: 700; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--pri); margin-bottom: 14px; }
.eyebrow::before { content: ''; width: 22px; height: 2px; background: var(--grad); border-radius: 2px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 999px; background: var(--grad); color: var(--pri-text) !important; font-weight: 700;
  text-decoration: none; border: 0; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; box-shadow: 0 10px 30px rgba(25, 211, 162, 0.25); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(34, 184, 240, 0.35); }
.btn.ghost { background: transparent; color: var(--text) !important; border: 1px solid var(--line); box-shadow: none; }
.btn.ghost:hover { border-color: var(--pri); }
.btn.sm { padding: 8px 16px; font-size: 14px; }

/* nav */
nav.top { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(14px); background: rgba(5, 11, 24, 0.72); border-bottom: 1px solid rgba(28, 45, 82, 0.6); }
nav.top .wrap { display: flex; align-items: center; gap: 18px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; color: var(--text); text-decoration: none; }
.brand img { width: 34px; height: 34px; filter: drop-shadow(0 0 12px rgba(25, 211, 162, 0.5)); }
.brand small { display: block; font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: 0.08em; }
nav.top .links { margin-left: auto; display: flex; gap: 6px; align-items: center; }
nav.top .links a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: 10px; transition: color 0.2s, background 0.2s; }
nav.top .links a:hover, nav.top .links a.on { color: var(--text); background: var(--soft); }
nav.top .links a.btn { color: var(--pri-text) !important; background: var(--grad); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 8px 10px; cursor: pointer; }
@media (max-width: 920px) {
  .nav-toggle { display: inline-flex; }
  nav.top .links { position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; padding: 12px 16px 18px; background: rgba(5, 11, 24, 0.97);
    border-bottom: 1px solid var(--line); display: none; }
  nav.top.open .links { display: flex; }
}

/* sections */
section { padding: 84px 0; position: relative; }
.section-head { max-width: 760px; margin-bottom: 40px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.card { background: linear-gradient(180deg, var(--card-2), var(--card)); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; position: relative; overflow: hidden; }
.card.hover { transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s; }
.card.hover:hover { transform: translateY(-6px); border-color: rgba(25, 211, 162, 0.5); box-shadow: var(--shadow); }
.card .ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: rgba(25, 211, 162, 0.12); color: var(--pri); margin-bottom: 14px; }
.card .ico svg { width: 26px; height: 26px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } section { padding: 64px 0; } }
.pill { display: inline-flex; align-items: center; gap: 6px; background: var(--soft); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 13px; margin: 0 6px 8px 0; color: var(--text); }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--pri); box-shadow: 0 0 10px var(--pri); }
ul.ticks { list-style: none; padding: 0; margin: 0; }
ul.ticks li { padding-left: 30px; position: relative; margin: 10px 0; }
ul.ticks li::before { content: ''; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: rgba(25, 211, 162, 0.15)
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2319d3a2' stroke-width='3'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/12px no-repeat; }

/* hero */
.hero { padding: 70px 0 90px; overflow: hidden; contain: paint; position: relative; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; position: relative; z-index: 2; }
.hero p.lead { font-size: 19px; color: var(--muted); max-width: 580px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 22px; }
.hero-art { position: relative; }
.hero-art .shot { border-radius: 18px; border: 1px solid var(--line); box-shadow: var(--shadow), 0 0 0 8px rgba(25, 211, 162, 0.05); width: 100%; height: auto; display: block; }
.float-card { position: absolute; background: rgba(12, 23, 48, 0.88); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; backdrop-filter: blur(10px);
  box-shadow: var(--shadow); font-size: 13px; display: flex; gap: 10px; align-items: center; animation: bob 5s ease-in-out infinite; }
.float-card b { display: block; font-size: 17px; color: var(--text); }
.float-card .dot { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(25, 211, 162, 0.15); color: var(--pri); flex: none; }
.float-card.a { left: -24px; top: 12%; }
.float-card.b { right: -18px; top: 44%; animation-delay: -1.6s; }
.float-card.c { left: 12%; bottom: -26px; animation-delay: -3.2s; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; } .float-card.a { left: 6px; } .float-card.b { right: 6px; } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* background: orbs, grid, floating medicines */
.bg-fx { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.bg-fx .orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.45; animation: orb 18s ease-in-out infinite alternate; }
.bg-fx .orb.o1 { width: 520px; height: 520px; background: #0fa37f; top: -160px; left: -120px; }
.bg-fx .orb.o2 { width: 460px; height: 460px; background: #1f6fd1; top: 20%; right: -160px; animation-delay: -6s; }
.bg-fx .orb.o3 { width: 360px; height: 360px; background: #6d3cff; bottom: -160px; left: 30%; opacity: 0.25; animation-delay: -12s; }
.bg-fx .gridlines { position: absolute; inset: 0; background-image: linear-gradient(rgba(148, 163, 196, 0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(148, 163, 196, 0.06) 1px, transparent 1px);
  background-size: 56px 56px; mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 75%); }
@keyframes orb { from { transform: translate(0, 0) scale(1); } to { transform: translate(60px, 40px) scale(1.15); } }
.med { position: absolute; opacity: 0.8; will-change: transform; animation: drift linear infinite; }
.med svg { display: block; filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.35)); }
@keyframes drift { 0% { transform: translate(0, 0) rotate(0deg); } 50% { transform: translate(30px, -40px) rotate(180deg); } 100% { transform: translate(0, 0) rotate(360deg); } }

/* ECG heartbeat */
.ecg { position: absolute; left: 0; right: 0; bottom: 18px; width: 100%; height: 80px; z-index: 1; opacity: 0.55; }
.ecg path { fill: none; stroke: url(#ecgGrad); stroke-width: 2.5; stroke-dasharray: 1600; stroke-dashoffset: 1600; animation: ecg 4.5s linear infinite; }
@keyframes ecg { 0% { stroke-dashoffset: 1600; } 70% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -1600; } }

/* stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat { text-align: center; padding: 26px 16px; }
.stat b { display: block; font-size: clamp(30px, 4vw, 44px); font-weight: 800; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* deployment diagram */
.diagram { position: relative; padding: 24px; min-height: 360px; }
.diagram svg { width: 100%; height: auto; }
.flow { stroke-dasharray: 6 10; animation: flow 1.2s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -32; } }
.packet { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }

/* steps */
.steps { counter-reset: s; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px; }
.steps .card::before { counter-increment: s; content: '0' counter(s); font-size: 42px; font-weight: 800; color: transparent; -webkit-text-stroke: 1px rgba(25, 211, 162, 0.6); display: block; margin-bottom: 8px; }

/* pricing */
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.price .amount { font-size: 38px; font-weight: 800; margin: 8px 0; }
.price .amount small { font-size: 15px; color: var(--muted); font-weight: 600; }
.price.featured { border-color: rgba(25, 211, 162, 0.7); box-shadow: 0 0 0 1px rgba(25, 211, 162, 0.4), var(--shadow); }
.price .tag { display: inline-block; margin-bottom: 10px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--grad); color: var(--pri-text); }
table.cmp { width: 100%; border-collapse: collapse; font-size: 15px; }
table.cmp th, table.cmp td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.table-scroll { overflow-x: auto; }

/* CTA band */
.cta-band { background: var(--grad); color: var(--pri-text); border-radius: 24px; padding: 48px 36px; display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; position: relative; overflow: hidden; }
.cta-band h2 { margin: 0 0 6px; }
.cta-band .btn { background: #04121f; color: #fff !important; box-shadow: none; }
.cta-band .btn.ghost { background: transparent; border-color: rgba(4, 18, 31, 0.4); color: #04121f !important; }

/* footer */
footer { border-top: 1px solid var(--line); padding: 54px 0 28px; font-size: 14px; background: var(--bg-2); }
footer .cols { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; }
footer h4 { margin: 0 0 12px; font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
footer a { color: var(--text); text-decoration: none; display: block; margin: 6px 0; opacity: 0.85; }
footer a:hover { color: var(--pri); }
footer .bottom { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--muted); }
@media (max-width: 760px) { footer .cols { grid-template-columns: 1fr 1fr; } }

/* page header */
.page-hero { padding: 72px 0 40px; overflow: hidden; contain: paint; position: relative; }
.page-hero .wrap { position: relative; z-index: 2; }

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.1s; } .reveal.d2 { transition-delay: 0.2s; } .reveal.d3 { transition-delay: 0.3s; }

/* ---------------- preloader: medicine POS ---------------- */
#preloader { position: fixed; inset: 0; z-index: 9999; background: radial-gradient(ellipse at center, #0b1a36 0%, #050b18 70%); display: grid; place-items: center;
  transition: opacity 0.6s ease, visibility 0.6s; }
#preloader.done { opacity: 0; visibility: hidden; }
.pos-wrap { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 16px; }
.pos { width: min(320px, 80vw); height: auto; }
.pos .beam { animation: beam 1.4s ease-in-out infinite; }
@keyframes beam { 0%, 100% { transform: translateX(0); opacity: 0.2; } 50% { transform: translateX(86px); opacity: 1; } }
.pos .receipt { animation: receipt 2.4s ease-in-out infinite; transform-origin: top; }
@keyframes receipt { 0% { transform: scaleY(0.1); } 60%, 100% { transform: scaleY(1); } }
.pos .pill-drop { animation: drop 2.4s cubic-bezier(0.5, 0, 0.75, 0) infinite; }
@keyframes drop { 0% { transform: translateY(-40px) rotate(0); opacity: 0; } 20% { opacity: 1; } 70% { transform: translateY(46px) rotate(200deg); opacity: 1; } 100% { transform: translateY(46px) rotate(200deg); opacity: 0; } }
.pos .screen-text { animation: blink 1.2s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0.35; } }
.pre-brand { font-weight: 800; font-size: 22px; letter-spacing: -0.01em; }
.pre-bar { width: 220px; height: 4px; border-radius: 4px; background: var(--soft); overflow: hidden; }
.pre-bar i { display: block; height: 100%; width: 40%; background: var(--grad); border-radius: 4px; animation: bar 1.1s ease-in-out infinite; }
@keyframes bar { 0% { transform: translateX(-110%); } 100% { transform: translateX(260%); } }
.pre-sub { font-size: 13px; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* floating WhatsApp / call */
.fab { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: flex; flex-direction: column; gap: 10px; }
.fab-btn { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; color: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); transition: transform 0.2s; }
.fab-btn:hover { transform: scale(1.08); }
.fab-btn.wa { background: #25d366; animation: fabpulse 2.4s ease-in-out infinite; }
.fab-btn.call { background: var(--grad); color: var(--pri-text); }
@keyframes fabpulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.55); } 50% { box-shadow: 0 0 0 12px rgba(37, 211, 102, 0); } }

/* version badge */
.ver-badge { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; padding: 5px 12px; border-radius: 999px; border: 1px solid rgba(25, 211, 162, 0.5); color: var(--pri); background: rgba(25, 211, 162, 0.08); text-decoration: none; margin-bottom: 14px; }

/* docs */
.docs { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 32px; align-items: start; }
.docs nav.side { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 2px; }
.docs nav.side a { color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: 10px; font-weight: 600; font-size: 15px; }
.docs nav.side a.on, .docs nav.side a:hover { color: var(--text); background: var(--soft); }
.doc-body { min-width: 0; overflow-wrap: anywhere; }
.doc-body h1 { font-size: clamp(28px, 4vw, 40px); }
.doc-body h2 { font-size: 24px; margin-top: 34px; }
.doc-body h3 { margin-top: 24px; }
.doc-body p, .doc-body li { color: #c9d4ee; }
.doc-body code { background: var(--soft); padding: 1px 6px; border-radius: 6px; font-size: 14px; }
.doc-body pre { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px; overflow-x: auto; }
.doc-body table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.doc-body th, .doc-body td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.doc-body blockquote { border-left: 3px solid var(--pri); margin: 16px 0; padding: 4px 16px; background: var(--soft); border-radius: 0 10px 10px 0; }
@media (max-width: 900px) { .docs { grid-template-columns: 1fr; } .docs nav.side { position: static; flex-direction: row; flex-wrap: wrap; } }
.addon-table td small { display: block; color: var(--muted); }
