:root {
  color-scheme: light;
  --bg: #080706;
  --bg-alt: #17130a;
  --text: #fff8df;
  --muted: #d0bd82;
  --panel: rgba(20, 18, 13, 0.78);
  --panel-solid: #15120b;
  --line: rgba(255, 207, 64, 0.18);
  --green: #ffcf40;
  --green-dark: #0b0906;
  --mint: #ffe08a;
  --red: #f2a900;
  --red-dark: #2a210c;
  --cream: #211a0b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.46);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 18px;
}


* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 207, 64, 0.22), transparent 28rem),
    radial-gradient(circle at 88% 10%, rgba(0, 0, 0, 0.82), transparent 30rem),
    radial-gradient(circle at 70% 82%, rgba(242, 169, 0, 0.16), transparent 26rem),
    linear-gradient(135deg, var(--bg), var(--bg-alt) 52%, #030303);
  overflow-x: hidden;
  transition: background 360ms ease, color 240ms ease;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  content: '';
  background-image:
    linear-gradient(rgba(255, 207, 64, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 207, 64, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }

.ambient {
  position: fixed;
  z-index: -2;
  width: 34rem;
  height: 34rem;
  border-radius: 999px;
  filter: blur(34px);
  opacity: 0.5;
  animation: drift 12s ease-in-out infinite alternate;
}
.ambient-one { left: -12rem; top: 12rem; background: rgba(255, 207, 64, 0.26); }
.ambient-two { right: -11rem; top: 26rem; background: rgba(0, 0, 0, 0.65); animation-delay: -5s; }

.page-shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.glass {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(145%);
}

.site-header {
  position: sticky;
  top: 16px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 14px 12px 16px;
  margin: 16px 0 48px;
  border-radius: 999px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; min-width: 228px; }
.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: #090807;
  font-weight: 900;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--green), #fff0ad 45%, var(--red));
  box-shadow: 0 14px 28px rgba(255, 207, 64, 0.2);
}
.brand strong, .brand small { display: block; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 0.74rem; }
.nav-links { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.nav-links a {
  padding: 10px 14px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  border-radius: 999px;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}
.nav-links a:hover { color: var(--text); background: rgba(255, 207, 64, 0.12); transform: translateY(-1px); }


.hero { padding: 18px 0 80px; }
.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1.05fr);
  gap: 38px;
  align-items: center;
}
.eyebrow {
  margin: 0 0 14px;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.hero h1, .section-heading h2 {
  margin: 0;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 800;
  line-height: 0.94;
  letter-spacing: -0.055em;
}
.hero h1 { max-width: 770px; font-size: clamp(3.5rem, 7vw, 6.7rem); }
.hero-lede {
  max-width: 650px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.4vw, 1.22rem);
  line-height: 1.75;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 34px 0 24px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  font-weight: 900;
  border-radius: 999px;
  transition: transform 190ms ease, box-shadow 190ms ease, background 190ms ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { color: #090807; background: linear-gradient(135deg, var(--green), var(--red)); box-shadow: 0 18px 40px rgba(255, 207, 64, 0.22); }
.btn-ghost { border: 1px solid var(--line); background: var(--panel); }
.trust-row { display: flex; flex-wrap: wrap; gap: 10px; }
.trust-row span {
  padding: 8px 11px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.hero-stage { position: relative; min-height: 620px; perspective: 1400px; }
.dashboard-card {
  position: relative;
  overflow: hidden;
  min-height: 548px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(255, 207, 64, 0.95), rgba(18, 15, 8, 0.96) 48%, rgba(242, 169, 0, 0.88)),
    var(--green-dark);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.56);
  transform: rotateX(4deg) rotateY(-8deg) rotateZ(1deg);
  animation: floatPanel 7s ease-in-out infinite;
}
.command-center::before {
  position: absolute;
  inset: -34% -28% auto auto;
  width: 28rem;
  height: 28rem;
  content: '';
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  filter: blur(4px);
}
.card-toolbar, .terminal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.card-toolbar span, .terminal-header span { width: 10px; height: 10px; border-radius: 50%; background: #ffdf7d; }
.card-toolbar span:nth-child(2), .terminal-header span:nth-child(2) { background: #ff766e; }
.card-toolbar span:nth-child(3), .terminal-header span:nth-child(3) { background: #76f2aa; }
.card-toolbar strong { margin-left: auto; }
.metric-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 22px 0;
}
.metric-strip article, .inventory-panel, .chart-panel, .floating-card, .analytics-card, .terminal-card, .phone-demo, .feature-card {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-lg);
}
.metric-strip article {
  padding: 18px;
  color: #fff8df;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(18px);
}
.metric-strip small, .metric-strip em { display: block; color: rgba(255, 255, 255, 0.72); font-style: normal; }
.metric-strip strong { display: block; margin: 8px 0 4px; font-size: clamp(1.7rem, 3vw, 2.25rem); }
.metric-strip .danger { background: rgba(255, 176, 0, 0.22); }
.metric-strip .success { background: rgba(255, 207, 64, 0.18); }
.visual-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 14px; }
.inventory-panel, .chart-panel { min-height: 320px; padding: 16px; background: rgba(255, 255, 255, 0.14); backdrop-filter: blur(16px); }
.panel-heading { display: flex; justify-content: space-between; color: #fff8df; font-weight: 900; }
.panel-heading b { padding: 4px 9px; color: #07231a; border-radius: 999px; background: var(--mint); }
.medicine-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
  padding: 14px;
  color: #fff8df;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
}
.medicine-row small { display: block; margin-top: 4px; color: rgba(255, 255, 255, 0.7); }
.medicine-row b { color: #ffe28f; }
.medicine-row.critical b { color: #fff0ad; }
.medicine-row.warning b { color: #ffd84f; }
.pill-dot { width: 12px; height: 30px; border-radius: 999px; background: linear-gradient(var(--red) 50%, #fff 50%); transform: rotate(28deg); }
.chart-panel { position: relative; display: grid; place-items: end center; overflow: hidden; }
.chart-orbit {
  position: absolute;
  top: 32px;
  width: 145px;
  height: 145px;
  border: 24px solid rgba(255, 255, 255, 0.13);
  border-top-color: var(--mint);
  border-right-color: rgba(255, 176, 0, 0.9);
  border-radius: 50%;
  animation: spin 10s linear infinite;
}
.bar-chart { display: flex; align-items: flex-end; gap: 11px; width: 100%; height: 140px; padding: 0 8px; }
.bar-chart i {
  flex: 1;
  height: var(--h);
  border-radius: 999px 999px 6px 6px;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.38), var(--mint));
  animation: grow 1.3s ease both;
}
.floating-card {
  position: absolute;
  right: -18px;
  width: 220px;
  padding: 18px;
  color: #fff8df;
  background: rgba(10, 9, 7, 0.82);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
  animation: bob 5s ease-in-out infinite;
}
.floating-card span, .floating-card small { display: block; color: rgba(255, 255, 255, 0.72); }
.floating-card strong { display: block; margin: 6px 0; font-size: 1.05rem; }
.pos-card { top: 96px; }
.alert-card { left: -18px; bottom: 70px; animation-delay: -2.5s; background: rgba(111, 24, 25, 0.78); }

.feature-section, .analytics-section { padding: 70px 0; }
.section-heading { max-width: 790px; margin-bottom: 28px; }
.section-heading.compact { max-width: 620px; }
.section-heading h2 { font-size: clamp(2.7rem, 5vw, 5rem); }
.section-heading p:not(.eyebrow) { color: var(--muted); font-size: 1.06rem; line-height: 1.75; }
.feature-grid, .analytics-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature-card {
  position: relative;
  overflow: hidden;
  min-height: 260px;
  padding: 26px;
  color: #fff8df;
  box-shadow: var(--shadow);
  transition: transform 220ms ease;
}
.feature-card:hover { transform: translateY(-7px) rotate(-0.5deg); }
.feature-card::after {
  position: absolute;
  right: -46px;
  bottom: -64px;
  width: 190px;
  height: 190px;
  content: '';
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}
.red-card { background: linear-gradient(145deg, #ffcf40, #171103); }
.green-card { background: linear-gradient(145deg, #0a0a0a, #f2a900); }
.dark-card { background: linear-gradient(145deg, #1c1709, #050505); }
.icon-badge { display: grid; width: 48px; height: 48px; place-items: center; font-weight: 900; border-radius: 16px; background: rgba(255, 255, 255, 0.16); }
.feature-card h3 { margin: 42px 0 10px; font-size: 1.35rem; }
.feature-card p { margin: 0; color: rgba(255, 255, 255, 0.76); line-height: 1.65; }

.workflow-section {
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: 34px;
  align-items: center;
  padding: 70px 0;
}
.terminal-card { padding: 24px; border-radius: var(--radius-xl); }
.terminal-header { color: var(--muted); }
.workflow-list { display: grid; gap: 14px; padding: 18px 0 0; margin: 0; list-style: none; counter-reset: item; }
.workflow-list li {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
}
.workflow-list li::before {
  counter-increment: item;
  content: '0' counter(item);
  color: var(--red);
  font-weight: 900;
}
.workflow-list b { grid-column: 1; }
.workflow-list span { color: var(--muted); line-height: 1.55; }
.phone-demo {
  position: relative;
  min-height: 560px;
  padding: 14px;
  border: 10px solid var(--text);
  border-radius: 44px;
  background: #101915;
  box-shadow: var(--shadow);
  transform: rotate(3deg);
}
.phone-notch { position: absolute; top: 12px; left: 50%; width: 92px; height: 24px; border-radius: 0 0 18px 18px; background: var(--text); transform: translateX(-50%); z-index: 2; }
.phone-screen { height: 100%; min-height: 512px; padding: 60px 22px 22px; color: #fff; border-radius: 30px; background: linear-gradient(160deg, #ffcf40, #10100b 46%, #050505); }
.phone-screen p { color: rgba(255, 255, 255, 0.7); font-weight: 800; text-transform: uppercase; letter-spacing: 0.12em; }
.phone-screen h3 { margin: 0 0 44px; font-size: 3.2rem; }
.scan-line { height: 120px; border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 24px; background: repeating-linear-gradient(90deg, rgba(255,255,255,0.14), rgba(255,255,255,0.14) 4px, transparent 4px, transparent 12px); animation: scan 2.4s ease-in-out infinite; }
.receipt-line { height: 16px; margin-top: 20px; border-radius: 999px; background: rgba(255,255,255,0.24); }
.receipt-line.short { width: 62%; }
.phone-screen button { width: 100%; min-height: 50px; margin-top: 32px; color: #06271d; font-weight: 900; border: 0; border-radius: 999px; background: #fff; }

.analytics-card {
  min-height: 230px;
  padding: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.analytics-card small { color: var(--muted); font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; }
.analytics-card strong { display: block; margin: 14px 0; font-size: clamp(2rem, 4vw, 3.2rem); letter-spacing: -0.06em; }
.analytics-card.highlight { color: #090807; background: linear-gradient(135deg, var(--red), var(--green)); }
.analytics-card.highlight p { color: rgba(9,8,7,0.78); line-height: 1.7; }
.sparkline { display: flex; align-items: end; gap: 10px; height: 78px; }
.sparkline span { flex: 1; border-radius: 999px; background: linear-gradient(to top, var(--green), var(--red)); }
.sparkline span:nth-child(1) { height: 32%; } .sparkline span:nth-child(2) { height: 55%; } .sparkline span:nth-child(3) { height: 48%; } .sparkline span:nth-child(4) { height: 76%; } .sparkline span:nth-child(5) { height: 94%; }
.donut { width: 92px; height: 92px; border-radius: 50%; background: conic-gradient(var(--green) 0 64%, var(--red) 64% 82%, rgba(127,127,127,0.22) 82%); box-shadow: inset 0 0 0 18px var(--panel-solid); }

.site-footer {
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 44px 16px 54px;
  text-align: center;
  color: var(--muted);
}
.site-footer p { margin: 0; }
.source-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  color: var(--text);
  font-weight: 900;
  border-bottom: 2px solid var(--green);
}
.source-link svg { width: 20px; height: 20px; fill: currentColor; }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity 620ms ease, transform 620ms ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@keyframes drift { to { transform: translate3d(36px, -30px, 0) scale(1.07); } }
@keyframes floatPanel { 0%, 100% { transform: rotateX(4deg) rotateY(-8deg) rotateZ(1deg) translateY(0); } 50% { transform: rotateX(5deg) rotateY(-4deg) rotateZ(-0.4deg) translateY(-14px); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes grow { from { transform: scaleY(0.15); transform-origin: bottom; } to { transform: scaleY(1); transform-origin: bottom; } }
@keyframes scan { 0%, 100% { box-shadow: inset 0 0 0 rgba(255,255,255,0); } 50% { box-shadow: inset 0 -70px 0 rgba(255,255,255,0.12); } }

@media (max-width: 980px) {
  .site-header { align-items: stretch; border-radius: 28px; flex-wrap: wrap; }
  .nav-links { order: 3; width: 100%; justify-content: center; flex-wrap: wrap; }
  .section-grid, .workflow-section { grid-template-columns: 1fr; }
  .hero-stage { min-height: 560px; }
  .dashboard-card { transform: none; }
  .feature-grid, .analytics-grid { grid-template-columns: 1fr; }
  .phone-demo { max-width: 360px; margin: 0 auto; }
}

@media (max-width: 640px) {
  .page-shell { width: min(100% - 20px, 1180px); }
  .site-header { top: 10px; margin-bottom: 28px; }
  .brand { min-width: 0; }
  .brand small { display: none; }
  .hero { padding-bottom: 38px; }
  .hero h1 { font-size: clamp(3rem, 16vw, 4.2rem); }
  .metric-strip, .visual-grid { grid-template-columns: 1fr; }
  .hero-stage { min-height: auto; }
  .floating-card { position: static; width: auto; margin-top: 12px; }
  .dashboard-card { min-height: auto; }
  .workflow-list li { grid-template-columns: 1fr; }
  .section-heading h2 { font-size: 2.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: 0.001ms !important; }
}
