/* ============================================
   Super Billing — Homepage
   ============================================ */

:root {
  --ink: #0c0a10;
  --ink-2: #15111c;
  --ink-3: #201a2a;
  --line-dark: rgba(255, 255, 255, 0.09);
  --on-dark: #f4f1f7;
  --on-dark-muted: #a79fb3;

  --paper: #f8f6f3;
  --white: #ffffff;
  --text: #17131c;
  --muted: #6a6474;
  --line: #e9e4ec;

  --brand: #8e44ad;
  --brand-600: #7a2f99;
  --brand-50: #f6eefa;
  --brand-100: #ecdcf4;
  --brand-glow: #b06ae0;
  --marigold: #f0a43a;
  --green: #18935a;
  --red: #d24a4a;

  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --shadow-app: 0 40px 80px -24px rgba(12, 6, 20, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.06);
  --shadow-card: 0 1px 2px rgba(23, 19, 28, 0.04), 0 8px 24px -12px rgba(23, 19, 28, 0.12);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { font-family: var(--sans); color: var(--text); background: var(--paper); line-height: 1.6; overflow-x: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
table { border-collapse: collapse; width: 100%; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 128px 0; }

h1, h2, h3 { font-weight: 700; letter-spacing: -0.035em; line-height: 1.04; }
h2 { font-size: clamp(2.2rem, 4.6vw, 3.75rem); }
h3 { font-size: 1.15rem; letter-spacing: -0.015em; line-height: 1.3; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }

.eyebrow { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brand); margin-bottom: 18px; }
.eyebrow-light { color: var(--brand-glow); }
.head { max-width: 720px; margin-bottom: 64px; }
.head p:not(.eyebrow) { margin-top: 20px; font-size: 1.12rem; color: var(--muted); max-width: 600px; }
.head-center { margin-left: auto; margin-right: auto; text-align: center; }
.head-center p:not(.eyebrow) { margin-left: auto; margin-right: auto; }
.head h2 em { color: var(--brand); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 24px; border-radius: 999px; font-weight: 600; font-size: 0.95rem;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease, color .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn-lg { padding: 17px 30px; font-size: 1rem; }
.btn-sm { padding: 9px 18px; font-size: 0.88rem; }
.btn-brand { background: var(--brand); color: #fff; box-shadow: 0 10px 30px -10px rgba(142, 68, 173, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.18); }
.btn-brand:hover { background: var(--brand-600); transform: translateY(-1px); }
.btn-brand .arrow { transition: transform .2s ease; }
.btn-brand:hover .arrow { transform: translateX(3px); }
.btn-ghost { color: var(--on-dark); border: 1px solid rgba(255, 255, 255, 0.18); }
.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.4); background: rgba(255, 255, 255, 0.04); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: #efe9f3; }
.btn-outline { border: 1px solid var(--line); color: var(--text); background: #fff; }
.btn-outline:hover { border-color: var(--text); }

/* Reveal (script.js adds .visible) */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1); }
.reveal.visible { opacity: 1; transform: none; }

/* ===== NAV ===== */
.navbar { position: fixed; inset: 0 0 auto 0; z-index: 50; transition: background .3s ease, border-color .3s ease, backdrop-filter .3s ease; border-bottom: 1px solid transparent; }
.navbar.scrolled { background: rgba(12, 10, 16, 0.86); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom-color: var(--line-dark); }
.nav-inner { height: 72px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.08rem; letter-spacing: -0.02em; color: var(--on-dark); }
.brand img { width: 32px; height: 32px; object-fit: contain; }
.brand b { color: var(--brand-glow); font-weight: 700; }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a { font-size: 0.92rem; font-weight: 500; color: var(--on-dark-muted); transition: color .2s ease; }
.nav-links a:hover { color: var(--on-dark); }
.nav-links .btn-light { color: var(--ink); }
.nav-links .btn-light:hover { color: var(--ink); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav-toggle span { width: 22px; height: 2px; border-radius: 2px; background: var(--on-dark); transition: transform .3s ease, opacity .3s ease; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== HERO ===== */
.hero { position: relative; background: var(--ink); color: var(--on-dark); padding: 168px 0 0; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(142, 68, 173, 0.42) 0%, rgba(142, 68, 173, 0) 70%),
    radial-gradient(40% 30% at 85% 30%, rgba(240, 164, 58, 0.10) 0%, rgba(240, 164, 58, 0) 70%);
}
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(70% 60% at 50% 10%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(70% 60% at 50% 10%, #000 20%, transparent 75%);
}
.hero-copy { position: relative; text-align: center; display: flex; flex-direction: column; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 10px; padding: 7px 16px 7px 12px; border-radius: 999px; border: 1px solid var(--line-dark); background: rgba(255, 255, 255, 0.04); font-size: 0.85rem; color: var(--on-dark-muted); margin-bottom: 32px; }
.pill-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--marigold); box-shadow: 0 0 0 4px rgba(240, 164, 58, 0.18); }
.hero h1 { font-size: clamp(3rem, 8.4vw, 6.6rem); letter-spacing: -0.05em; line-height: 0.98; color: #fff; }
.hero h1 em { color: transparent; background: linear-gradient(100deg, #e9c6ff 0%, #c58af0 45%, #f0b86a 100%); -webkit-background-clip: text; background-clip: text; padding-right: 0.06em; }
.hero-sub { margin-top: 28px; max-width: 620px; font-size: 1.15rem; line-height: 1.7; color: var(--on-dark-muted); }
.hero-cta { margin-top: 40px; display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.hero-proof { margin-top: 28px; display: flex; gap: 28px; flex-wrap: wrap; justify-content: center; font-size: 0.88rem; color: var(--on-dark-muted); }
.hero-proof li { display: inline-flex; align-items: center; gap: 8px; }
.hero-proof li::before { content: ''; width: 16px; height: 16px; border-radius: 50%; background: rgba(24, 147, 90, 0.18) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.8' fill='none' stroke='%2342d392' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat; }

.hero-stage { position: relative; margin-top: 80px; perspective: 2000px; }
.hero-stage::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 120px; background: linear-gradient(to bottom, rgba(12, 10, 16, 0), var(--ink)); pointer-events: none; z-index: 3; }

/* App window (mock of the real invoice screen) */
.app { position: relative; z-index: 2; background: #fff; color: var(--text); border-radius: 18px 18px 0 0; box-shadow: var(--shadow-app); overflow: hidden; transform: rotateX(8deg); transform-origin: center bottom; font-size: 13px; }
.app-bar { height: 40px; display: flex; align-items: center; gap: 7px; padding: 0 16px; background: #f4f2f6; border-bottom: 1px solid var(--line); }
.app-bar i { width: 10px; height: 10px; border-radius: 50%; background: #dcd6e0; }
.app-url { margin-left: 14px; padding: 4px 14px; border-radius: 6px; background: #fff; border: 1px solid var(--line); font-size: 11.5px; color: var(--muted); }
.app-body { display: grid; grid-template-columns: 200px 1fr 270px; min-height: 440px; }
.app-side { background: #fbfafc; border-right: 1px solid var(--line); padding: 18px 12px; }
.side-biz { display: flex; gap: 10px; align-items: center; padding: 4px 8px 18px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.side-biz b { display: block; font-size: 12.5px; }
.side-biz small { font-size: 11px; color: var(--muted); }
.biz-mark { width: 30px; height: 30px; flex: none; border-radius: 8px; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; background: linear-gradient(135deg, #a259c9, #6c2b8a); }
.biz-mark-2 { background: linear-gradient(135deg, #f0a43a, #c97a17); }
.app-side nav { display: grid; gap: 2px; }
.app-side nav span { padding: 8px 10px; border-radius: 8px; color: #5b5466; font-weight: 500; font-size: 12.5px; }
.app-side nav span.on { background: var(--brand-50); color: var(--brand); font-weight: 600; }
.app-main { padding: 22px 24px; min-width: 0; }
.inv-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.inv-head > div:first-child { margin-right: auto; }
.inv-head small, .inv-meta small { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; }
.inv-head h3 { font-size: 20px; letter-spacing: -0.02em; }
.seg { display: inline-flex; padding: 3px; border-radius: 9px; background: #f3f0f5; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.seg span { padding: 5px 10px; border-radius: 7px; }
.seg span.on { background: #fff; color: var(--brand); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
.inv-meta { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 16px; }
.inv-meta b { display: block; font-size: 13px; margin-top: 2px; }
.inv-meta em { font-family: var(--sans); font-style: normal; font-size: 11px; color: var(--muted); }
.inv-table th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 600; padding: 9px 8px; border-bottom: 1px solid var(--line); }
.inv-table td { padding: 11px 8px; border-bottom: 1px solid #f2eff4; font-variant-numeric: tabular-nums; }
.inv-table td:first-child { font-weight: 600; }
.inv-table th:last-child, .inv-table td:last-child { text-align: right; }
.app-total { padding: 18px; border-left: 1px solid var(--line); background: #fbfafc; display: flex; flex-direction: column; gap: 14px; }
.grand { border-radius: 14px; padding: 16px 18px; color: #fff; background: linear-gradient(140deg, #9b4fc2 0%, #6f2a8f 100%); box-shadow: 0 12px 24px -12px rgba(111, 42, 143, 0.7); }
.grand small { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; opacity: .8; font-weight: 600; }
.grand > b { display: block; font-size: 30px; letter-spacing: -0.03em; margin: 2px 0 10px; }
.grand-split { display: flex; justify-content: space-between; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.2); font-size: 11px; opacity: .9; }
.grand-split i { font-style: normal; font-weight: 700; font-size: 12.5px; }
.tax-list { display: grid; gap: 8px; padding: 14px; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.tax-list div { display: flex; justify-content: space-between; font-size: 12.5px; }
.tax-list dt { color: var(--muted); }
.tax-list dd { font-weight: 600; font-variant-numeric: tabular-nums; }
.tax-list .due { padding-top: 8px; border-top: 1px dashed var(--line); }
.tax-list .due dd { color: var(--red); }
.fake-btn { margin-top: auto; text-align: center; padding: 11px; border-radius: 10px; background: var(--green); color: #fff; font-weight: 600; font-size: 13px; }

.chip { position: absolute; z-index: 4; display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 12px; border-radius: 14px; background: rgba(28, 22, 36, 0.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.6); color: var(--on-dark); animation: float 7s ease-in-out infinite; }
.chip b { display: block; font-size: 0.9rem; }
.chip small { font-size: 0.78rem; color: var(--on-dark-muted); }
.chip-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 0.95rem; flex: none; }
.ico-green { background: rgba(24, 147, 90, 0.2); color: #4fe0a0; }
.ico-amber { background: rgba(240, 164, 58, 0.2); color: #ffc46e; }
.ico-brand { background: rgba(176, 106, 224, 0.22); color: #d9a8ff; }
.chip-a { left: -40px; top: 150px; }
.chip-b { right: -44px; top: -34px; animation-delay: -2.4s; }
.chip-c { left: -40px; top: 300px; animation-delay: -4.8s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ===== BUILT FOR ===== */
.built { background: var(--ink); color: var(--on-dark-muted); padding: 40px 0 56px; border-top: 1px solid var(--line-dark); position: relative; z-index: 4; }
.built-label { text-align: center; font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; margin-bottom: 22px; color: #7d758a; }
.built-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 12px; }
.built-list li { padding: 9px 18px; border-radius: 999px; border: 1px solid var(--line-dark); font-size: 0.92rem; font-weight: 500; color: #d8d2df; background: rgba(255, 255, 255, 0.025); }

/* ===== DEMO ===== */
.demo { background: var(--paper); }
.demo-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 24px; align-items: stretch; }
.demo-bill, .book { background: #fff; border-radius: var(--r-lg); border: 1px solid var(--line); box-shadow: var(--shadow-card); }
.demo-bill { padding: 28px; display: flex; flex-direction: column; }
.db-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.db-head small { display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; color: var(--muted); }
.db-head b { font-size: 1.1rem; letter-spacing: -0.01em; }
.replay { font-size: 0.82rem; font-weight: 600; color: var(--brand); padding: 7px 14px; border-radius: 999px; background: var(--brand-50); transition: background .2s ease; }
.replay:hover { background: var(--brand-100); }
.db-rows { flex: 1; min-height: 236px; }
.db-rows li { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid #f1edf3; animation: rowIn .5s cubic-bezier(.2, .7, .2, 1) both; font-variant-numeric: tabular-nums; }
.db-rows li b { font-weight: 600; }
.db-rows li small { display: block; color: var(--muted); font-size: 0.8rem; }
.db-rows .qty { color: var(--muted); font-size: 0.9rem; }
.db-rows .amt { font-weight: 600; min-width: 84px; text-align: right; }
@keyframes rowIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.db-foot { margin-top: 18px; display: grid; gap: 8px; font-variant-numeric: tabular-nums; }
.db-foot div { display: flex; justify-content: space-between; font-size: 0.95rem; color: var(--muted); }
.db-foot div b { color: var(--text); font-weight: 600; }
.db-grand { margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--line); }
.db-grand span { color: var(--text); font-weight: 600; }
.db-grand b { font-size: 1.6rem; letter-spacing: -0.03em; color: var(--brand) !important; }
.db-paid { opacity: 0; transition: opacity .4s ease; }
.db-paid.show { opacity: 1; }

.demo-books { display: grid; grid-template-rows: auto auto auto auto; gap: 16px; }
.book { padding: 20px 22px; transition: border-color .4s ease, box-shadow .4s ease, transform .4s ease; }
.book.flash { border-color: var(--brand-100); box-shadow: 0 0 0 4px var(--brand-50), var(--shadow-card); }
.book-top { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 0.95rem; }
.book-num { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 0.75rem; font-weight: 700; background: var(--brand-50); color: var(--brand); }
.stock-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 20px; font-size: 0.88rem; font-variant-numeric: tabular-nums; }
.stock-list li { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); }
.stock-list li b { color: var(--text); font-weight: 600; transition: color .3s ease; }
.stock-list li.down b { color: var(--red); }
.dues { display: flex; justify-content: space-between; align-items: baseline; color: var(--muted); font-size: 0.92rem; }
.dues b { font-size: 1.5rem; letter-spacing: -0.03em; color: var(--text); font-variant-numeric: tabular-nums; }
.gst-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.gst-cols span { display: block; font-size: 0.78rem; color: var(--muted); }
.gst-cols b { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.print-note { color: var(--muted); font-size: 0.92rem; }
.print-note.done { color: var(--green); font-weight: 600; }

/* ===== FEATURES (BENTO) ===== */
.features { background: #fff; }
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.card { position: relative; border-radius: var(--r-lg); background: var(--paper); border: 1px solid var(--line); padding: 30px; display: flex; flex-direction: column; gap: 26px; overflow: hidden; }
.card-text h3 { margin-bottom: 8px; }
.card-text p { color: var(--muted); font-size: 0.95rem; }
.card-dark { background: var(--ink); border-color: var(--ink); color: var(--on-dark); flex-direction: row; align-items: center; }
.card-dark::before { content: ''; position: absolute; inset: auto -20% -60% auto; width: 70%; height: 120%; background: radial-gradient(closest-side, rgba(142, 68, 173, 0.45), transparent); pointer-events: none; }
.card-dark .card-text { flex: 1; position: relative; }
.card-dark .card-text h3 { font-size: 1.6rem; letter-spacing: -0.03em; line-height: 1.15; }
.card-dark .card-text p { color: var(--on-dark-muted); }

.ui-gst { position: relative; flex: 1.1; background: var(--ink-2); border: 1px solid var(--line-dark); border-radius: var(--r); padding: 18px; font-size: 0.82rem; }
.gst-btns { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.gst-btns span { padding: 7px 12px; border-radius: 8px; border: 1px solid rgba(176, 106, 224, 0.5); color: #e2c2ff; font-weight: 600; font-size: 0.78rem; }
.ui-gst th { text-align: left; font-weight: 600; color: #8a8296; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; padding: 0 6px 8px; }
.ui-gst td { padding: 9px 6px; border-top: 1px solid var(--line-dark); color: #e6e1ec; font-variant-numeric: tabular-nums; }
.ui-gst td i { font-style: normal; padding: 2px 8px; border-radius: 999px; background: rgba(176, 106, 224, 0.18); color: #e2c2ff; font-weight: 600; }

.ui-scan { margin-top: auto; display: grid; gap: 10px; }
.scan-box { position: relative; overflow: hidden; padding: 14px 16px; border-radius: 12px; background: var(--ink); color: #e6e1ec; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9rem; letter-spacing: 0.08em; }
.scan-line { position: absolute; top: 0; bottom: 0; width: 2px; background: #ff5b5b; box-shadow: 0 0 12px 2px rgba(255, 91, 91, 0.7); animation: scan 2.6s ease-in-out infinite; }
@keyframes scan { 0%, 100% { left: 8%; } 50% { left: 92%; } }
.scan-hit { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-radius: 12px; background: #fff; border: 1px solid var(--line); font-size: 0.88rem; }
.scan-hit span { color: var(--green); font-weight: 600; font-size: 0.82rem; }

.ui-stock { margin-top: auto; display: grid; gap: 8px; }
.ui-stock li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px; background: #fff; border: 1px solid var(--line); font-size: 0.86rem; }
.ui-stock small { display: block; color: var(--muted); font-size: 0.76rem; }
.tag { flex: none; padding: 4px 10px; border-radius: 999px; font-size: 0.74rem; font-weight: 600; background: #f0edf2; color: #5b5466; white-space: nowrap; }
.tag-amber { background: #fdf1dc; color: #a8650a; }
.tag-red { background: #fbe6e6; color: #b23636; }
.tag-green { background: #e2f5ea; color: #137447; }
.tag-brand { background: var(--brand-50); color: var(--brand); }

.ui-aging { margin-top: auto; height: 150px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; align-items: end; padding: 16px 16px 10px; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.ui-aging .bar { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 8px; }
.ui-aging .bar span { width: 100%; height: var(--h); border-radius: 6px 6px 3px 3px; background: linear-gradient(to top, #8e44ad, #c58af0); }
.ui-aging .bar.warn span { background: linear-gradient(to top, #d24a4a, #f08a6a); }
.ui-aging small { font-size: 0.72rem; color: var(--muted); }

.ui-roles { margin-top: auto; display: grid; gap: 8px; }
.ui-roles li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--line); font-size: 0.88rem; }
.ui-roles li b { flex: 1; font-weight: 600; }
.av { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 0.78rem; font-weight: 700; color: #fff; background: #8e44ad; }
.av-2 { background: #2f7d6d; }
.av-3 { background: #c97a17; }

.ui-devices { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px; }
.ui-devices span { padding: 10px 16px; border-radius: 12px; background: #fff; border: 1px solid var(--line); font-size: 0.88rem; font-weight: 600; }

.ui-biz { margin-top: auto; display: grid; gap: 8px; }
.biz { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.biz .biz-mark { grid-row: span 2; }
.biz b { font-size: 0.9rem; }
.biz small { font-size: 0.76rem; color: var(--muted); }
.biz.on { border-color: var(--brand-100); box-shadow: 0 0 0 3px var(--brand-50); }

.also { margin-top: 40px; text-align: center; color: var(--muted); font-size: 0.95rem; line-height: 1.9; max-width: 860px; margin-left: auto; margin-right: auto; }

/* ===== SWITCH ===== */
.switch { background: var(--ink); color: var(--on-dark); position: relative; overflow: hidden; }
.switch .head h2 { color: #fff; }
.switch .head h2 em { color: #d9a8ff; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.steps li { padding: 32px; border-radius: var(--r-lg); border: 1px solid var(--line-dark); background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)); }
.step-n { display: block; font-family: var(--serif); font-style: italic; font-size: 3.2rem; line-height: 1; color: #d9a8ff; margin-bottom: 28px; }
.steps h3 { color: #fff; font-size: 1.25rem; margin-bottom: 8px; }
.steps p { color: var(--on-dark-muted); }

/* ===== PRICING ===== */
.pricing { background: var(--paper); }
.founding { display: inline-flex !important; max-width: none !important; align-items: center; gap: 12px; text-align: left; margin-top: 28px !important; padding: 8px 18px 8px 8px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 0.92rem !important; color: var(--text) !important; }
.founding span { flex: none; padding: 4px 12px; border-radius: 999px; background: #fdf1dc; color: #9a5c08; font-weight: 700; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; padding: 36px 32px; border-radius: var(--r-lg); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-card); }
.plan h3 { font-size: 1.3rem; }
.plan-for { color: var(--muted); font-size: 0.92rem; margin-top: 4px; }
.price { margin-top: 28px; display: flex; align-items: baseline; gap: 6px; }
.price b { font-size: 3.4rem; letter-spacing: -0.05em; line-height: 1; font-weight: 800; }
.price span { color: var(--muted); font-weight: 500; }
.per { color: var(--muted); font-size: 0.88rem; margin-top: 8px; }
.plan .btn { margin: 28px 0; width: 100%; }
.plan ul { display: grid; gap: 12px; padding-top: 24px; border-top: 1px solid var(--line); }
.plan li { position: relative; padding-left: 28px; font-size: 0.93rem; }
.plan li::before { content: ''; position: absolute; left: 0; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--brand-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.8' fill='none' stroke='%238e44ad' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat; }
.plan-pop { background: var(--ink); border-color: var(--ink); color: var(--on-dark); box-shadow: 0 30px 60px -20px rgba(60, 20, 80, 0.55); overflow: hidden; }
.plan-pop::before { content: ''; position: absolute; top: -40%; left: -20%; width: 140%; height: 70%; background: radial-gradient(closest-side, rgba(142, 68, 173, 0.5), transparent); pointer-events: none; }
.plan-pop > * { position: relative; }
.plan-pop h3, .plan-pop .price b { color: #fff; }
.plan-pop .plan-for, .plan-pop .per, .plan-pop .price span { color: var(--on-dark-muted); }
.plan-pop ul { border-top-color: var(--line-dark); }
.plan-pop li::before { background-color: rgba(176, 106, 224, 0.22); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.8' fill='none' stroke='%23e2c2ff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.pop-tag { position: absolute !important; top: 20px; right: 20px; padding: 5px 12px; border-radius: 999px; background: var(--marigold); color: #3a2304; font-size: 0.75rem; font-weight: 700; }
.plans-note { margin-top: 32px; text-align: center; color: var(--muted); font-size: 0.92rem; }

/* ===== FAQ ===== */
.faq { background: #fff; }
.faq-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 64px; align-items: start; }
.faq .head { position: sticky; top: 120px; margin-bottom: 0; }
.faq .head h2 { font-size: clamp(2.2rem, 3.8vw, 3.2rem); }
.faq .head h2 em, .cta h2 em { white-space: nowrap; }
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-question { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 26px 0; text-align: left; font-size: 1.08rem; font-weight: 600; letter-spacing: -0.01em; }
.plus { position: relative; flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); transition: transform .3s ease, background .3s ease, border-color .3s ease; }
.plus::before, .plus::after { content: ''; position: absolute; left: 50%; top: 50%; width: 11px; height: 1.6px; background: var(--text); transform: translate(-50%, -50%); transition: transform .3s ease, background .3s ease; }
.plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq-item.active .plus { background: var(--brand); border-color: var(--brand); transform: rotate(45deg); }
.faq-item.active .plus::before, .faq-item.active .plus::after { background: #fff; }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height .4s ease; }
.faq-answer-inner { padding: 0 48px 26px 0; color: var(--muted); line-height: 1.75; }

/* ===== CTA ===== */
.cta { position: relative; overflow: hidden; background: var(--ink); color: var(--on-dark); padding: 140px 0; text-align: center; }
.cta-inner { position: relative; }
.cta h2 { font-size: clamp(2.4rem, 6vw, 4.6rem); color: #fff; max-width: 860px; margin: 0 auto; letter-spacing: -0.045em; }
.cta h2 em { color: transparent; background: linear-gradient(100deg, #e9c6ff 0%, #c58af0 45%, #f0b86a 100%); -webkit-background-clip: text; background-clip: text; padding-right: 0.06em; }
.cta p { margin: 24px 0 40px; color: var(--on-dark-muted); font-size: 1.12rem; }

/* ===== FOOTER ===== */
.footer { background: var(--ink); border-top: 1px solid var(--line-dark); padding: 36px 0; color: var(--on-dark-muted); font-size: 0.88rem; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer nav { display: flex; gap: 28px; flex-wrap: wrap; }
.footer nav a:hover { color: #fff; }
.footer .brand { font-size: 1rem; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
  .app-body { grid-template-columns: 1fr 250px; }
  .app-side { display: none; }
  .chip-a, .chip-c { left: 8px; }
  .chip-b { right: 8px; }
}
@media (max-width: 960px) {
  .section { padding: 96px 0; }
  .demo-grid { grid-template-columns: 1fr; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .span-2, .span-3 { grid-column: span 1; }
  .span-4 { grid-column: span 2; }
  .card-dark { flex-direction: column; align-items: stretch; }
  .steps { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
  .faq-grid { grid-template-columns: 1fr; gap: 32px; }
  .faq .head { position: static; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.active { display: flex; flex-direction: column; align-items: stretch; gap: 4px; position: absolute; top: 72px; left: 0; right: 0; padding: 16px 24px 24px; background: rgba(12, 10, 16, 0.97); border-bottom: 1px solid var(--line-dark); }
  .nav-links.active a { padding: 12px 0; font-size: 1rem; }
  .nav-links.active .btn { margin-top: 8px; padding: 14px; }
  .nav-toggle { display: flex; }
  .navbar:has(.nav-links.active) { background: rgba(12, 10, 16, 0.97); }

  .hero { padding-top: 128px; }
  .hero-sub { font-size: 1.05rem; }
  .hero-stage { margin-top: 56px; }
  .app { transform: none; border-radius: 14px 14px 0 0; font-size: 12px; }
  .app-body { grid-template-columns: 1fr; min-height: 0; }
  .app-total { border-left: 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
  .fake-btn { display: none; }
  .app-main { padding: 18px 16px; }
  .inv-head .seg:last-child { display: none; }
  .inv-meta { grid-template-columns: 1fr 1fr; }
  .inv-meta > div:first-child { grid-column: span 2; }
  .c-hsn, .c-rate { display: none; }
  .chip { display: none; }
  .hero-stage::after { height: 60px; }

  .bento { grid-template-columns: 1fr; }
  .span-2, .span-3, .span-4 { grid-column: span 1; }
  .card { padding: 24px; }
  .stock-list { grid-template-columns: 1fr; }
  .demo-bill { padding: 22px; }
  .db-rows li { grid-template-columns: 1fr auto; }
  .db-rows .qty { display: none; }
}
@media (max-width: 480px) {
  .wrap { padding: 0 16px; }
  .hero-cta { width: 100%; }
  .hero-cta .btn { width: 100%; }
  .hero-proof { gap: 10px 18px; }
  .app-total { grid-template-columns: 1fr; }
  .gst-cols { grid-template-columns: 1fr 1fr; }
  .plan { padding: 28px 22px; }
  .faq-answer-inner { padding-right: 0; }
  .founding { border-radius: 18px; padding: 10px 14px 10px 10px; font-size: 0.86rem !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .chip, .scan-line, .db-rows li { animation: none; }
}
