:root {
  --bg-void: #04060c;
  --bg-elevated: rgba(13, 18, 32, 0.72);
  --glass: rgba(16, 22, 38, 0.56);
  --glass-strong: rgba(18, 25, 44, 0.82);
  --border: rgba(255, 255, 255, 0.09);
  --border-bright: rgba(124, 212, 255, 0.35);
  --text-primary: #f4f7ff;
  --text-secondary: #9aa7c4;
  --text-muted: #697694;
  --cyan: #38e8ff;
  --indigo: #6c63ff;
  --violet: #a855f7;
  --emerald: #22d3a6;
  --amber: #fbbf24;
  --rose: #fb7185;
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --shadow-glow: 0 24px 80px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  background: var(--bg-void);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--bg-void);
  overflow-x: hidden;
  line-height: 1.6;
  min-height: 100vh;
}

/* Cosmic Background Layers */
#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.75;
}

.aurora-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 65% 45% at 15% 10%, rgba(108, 99, 255, 0.22), transparent 65%),
    radial-gradient(ellipse 55% 40% at 85% 15%, rgba(56, 232, 255, 0.16), transparent 65%),
    radial-gradient(ellipse 60% 45% at 50% 90%, rgba(168, 85, 247, 0.14), transparent 70%);
  filter: blur(20px);
  animation: auroraDrift 18s ease-in-out infinite alternate;
}

@keyframes auroraDrift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(0, -18px, 0) scale(1.05); }
}

.sci-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(120, 165, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 165, 255, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 25%, black 35%, transparent 100%);
}

.wrapper {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Sticky Liquid Glass Navbar */
.navbar {
  position: sticky;
  top: 16px;
  z-index: 50;
  max-width: 1200px;
  margin: 16px auto 0;
  padding: 12px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-radius: 999px;
  background: rgba(10, 14, 26, 0.72);
  backdrop-filter: blur(24px) saturate(170%);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.brand-orb {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--cyan), var(--indigo) 55%, var(--violet));
  display: grid;
  place-items: center;
  box-shadow: 0 0 24px rgba(56, 232, 255, 0.45);
  font-size: 15px;
  font-weight: 800;
  color: #030712;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--text-primary); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.18s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #38e8ff 0%, #6c63ff 52%, #a855f7 100%);
  color: #040712;
  box-shadow: 0 8px 32px rgba(56, 232, 255, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.25) inset;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(108, 99, 255, 0.48), 0 0 0 1px rgba(255, 255, 255, 0.4) inset;
}

.btn-glass {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(16px);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(56, 232, 255, 0.4);
  transform: translateY(-1px);
}

.btn-lg { padding: 15px 30px; font-size: 15px; }

/* Hero */
.hero {
  padding: 84px 0 56px;
  text-align: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(56, 232, 255, 0.08);
  border: 1px solid rgba(56, 232, 255, 0.28);
  color: var(--cyan);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 26px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 12px var(--emerald);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(1.35); }
}

.hero h1 {
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.04em;
  font-weight: 800;
  max-width: 980px;
  margin: 0 auto 24px;
}

.gradient-text {
  background: linear-gradient(120deg, #ffffff 10%, #7ceeff 48%, #a78bfa 82%, #38e8ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--text-secondary);
  max-width: 740px;
  margin: 0 auto 36px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-bottom: 44px;
}

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 48px;
}

.trust-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.trust-item span.check { color: var(--emerald); font-weight: 700; }

/* Icon Orbital Marquee */
.icon-ribbon {
  position: relative;
  overflow: hidden;
  padding: 18px 0;
  mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
}

.icon-track {
  display: flex;
  gap: 18px;
  width: max-content;
  animation: marquee 42s linear infinite;
}

.icon-track:hover { animation-play-state: paused; }

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.orbit-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
  flex-shrink: 0;
  transition: transform 0.22s ease;
}

.orbit-icon:hover { transform: translateY(-5px) scale(1.08); }
.orbit-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Sections */
.section { padding: 72px 0; }

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 44px;
}

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--cyan);
  margin-bottom: 12px;
}

.section-header h2 {
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin-bottom: 14px;
}

.section-header p { color: var(--text-secondary); font-size: 16px; }

/* Liquid Glass Card with Mouse Spotlight */
.glass-card {
  position: relative;
  background: var(--glass);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-glow);
  overflow: hidden;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.glass-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(56, 232, 255, 0.14), transparent 60%);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.glass-card:hover::before { opacity: 1; }
.glass-card:hover { border-color: rgba(56, 232, 255, 0.34); }

/* SaaS Tax Calculator */
.calc-panel {
  padding: 32px;
  display: grid;
  grid-template-columns: 1.35fr 0.95fr;
  gap: 28px;
  align-items: stretch;
}

.saas-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.saas-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 15px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  user-select: none;
  transition: all 0.18s ease;
  text-align: left;
  color: var(--text-primary);
}

.saas-chip:hover { border-color: rgba(56, 232, 255, 0.35); background: rgba(56, 232, 255, 0.06); }
.saas-chip.active {
  background: linear-gradient(135deg, rgba(56, 232, 255, 0.14), rgba(108, 99, 255, 0.16));
  border-color: rgba(56, 232, 255, 0.55);
  box-shadow: 0 0 22px rgba(56, 232, 255, 0.14);
}

.saas-name { font-weight: 600; font-size: 14px; display: block; }
.saas-alt { font-size: 11px; color: var(--text-secondary); }
.saas-price { font-weight: 700; font-size: 13px; color: var(--rose); white-space: nowrap; }

.calc-summary {
  padding: 28px;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(20, 30, 56, 0.9), rgba(10, 14, 28, 0.92));
  border: 1px solid rgba(56, 232, 255, 0.25);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
}

.calc-stat-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-secondary); }
.calc-big-red { font-size: 42px; font-weight: 800; color: var(--rose); letter-spacing: -0.03em; line-height: 1.1; }
.calc-big-green { font-size: 46px; font-weight: 800; color: var(--emerald); letter-spacing: -0.03em; line-height: 1.1; }
.calc-divider { height: 1px; background: rgba(255, 255, 255, 0.08); }
.calc-meta { font-size: 13px; color: var(--text-secondary); }
.calc-meta strong { color: var(--text-primary); }

/* Catalog Controls */
.catalog-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 28px;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-btn {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.filter-btn:hover { color: var(--text-primary); border-color: rgba(255, 255, 255, 0.22); }
.filter-btn.active {
  background: linear-gradient(135deg, rgba(56, 232, 255, 0.22), rgba(108, 99, 255, 0.28));
  color: #fff;
  border-color: rgba(56, 232, 255, 0.55);
}

.search-box {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(12, 17, 30, 0.8);
  color: var(--text-primary);
  font-size: 14px;
  min-width: 260px;
  outline: none;
}

.search-box:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(56, 232, 255, 0.14); }

/* App Matrix Grid */
.app-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.app-card {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  cursor: pointer;
}

.app-card:hover { transform: translateY(-4px); }

.app-card-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.app-icon {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  flex-shrink: 0;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
}

.app-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }

.app-title-wrap { min-width: 0; flex: 1; }
.app-name { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; color: var(--text-primary); }
.app-cat { font-size: 11px; color: var(--cyan); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; }

.app-desc { font-size: 13.5px; color: var(--text-secondary); line-height: 1.5; flex: 1; }

.replaces-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(251, 113, 133, 0.1);
  border: 1px solid rgba(251, 113, 133, 0.25);
  color: #fda4af;
  width: fit-content;
}

.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(56, 232, 255, 0.14);
  border: 1px solid rgba(56, 232, 255, 0.35);
  color: var(--cyan);
  font-weight: 700;
  margin-left: 6px;
  vertical-align: middle;
}

.app-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.price-tag { font-size: 20px; font-weight: 800; color: var(--text-primary); }
.price-tag small { font-size: 11px; font-weight: 500; color: var(--emerald); margin-left: 4px; }

/* Pricing Bundles */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  align-items: stretch;
}

.tier-card {
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.tier-card.featured {
  background: linear-gradient(165deg, rgba(24, 34, 68, 0.88), rgba(14, 18, 36, 0.92));
  border: 1px solid rgba(56, 232, 255, 0.55);
  box-shadow: 0 24px 80px rgba(56, 232, 255, 0.18), 0 0 0 1px rgba(108, 99, 255, 0.35) inset;
  transform: scale(1.02);
}

.tier-badge {
  display: inline-block;
  width: fit-content;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(56, 232, 255, 0.16);
  color: var(--cyan);
  border: 1px solid rgba(56, 232, 255, 0.38);
}

.tier-price { font-size: 48px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.tier-price span { font-size: 14px; font-weight: 500; color: var(--text-secondary); }

.tier-list { list-style: none; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.tier-list li { font-size: 14px; color: var(--text-secondary); display: flex; gap: 10px; }
.tier-list li::before { content: "✓"; color: var(--emerald); font-weight: 800; }

/* Silicon AI Banner */
.ai-banner {
  padding: 44px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
  align-items: center;
  background: linear-gradient(135deg, rgba(16, 28, 54, 0.85), rgba(32, 16, 54, 0.72));
  border-color: rgba(168, 85, 247, 0.35);
}

.ai-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.metric-box {
  padding: 20px;
  border-radius: var(--radius-md);
  background: rgba(4, 8, 18, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.metric-val { font-size: 28px; font-weight: 800; color: var(--cyan); letter-spacing: -0.02em; }
.metric-lbl { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }

/* FAQ */
.faq-list { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item { padding: 20px 24px; cursor: pointer; }
.faq-q { display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 16px; }
.faq-a { color: var(--text-secondary); font-size: 14.5px; margin-top: 12px; display: none; }
.faq-item.open .faq-a { display: block; }
.faq-item.open .faq-plus { transform: rotate(45deg); color: var(--cyan); }
.faq-plus { font-size: 22px; transition: transform 0.2s; color: var(--text-secondary); }

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(2, 5, 12, 0.78);
  backdrop-filter: blur(12px);
  display: none;
  place-items: center;
  padding: 20px;
}

.modal-backdrop.open { display: grid; }

.modal-box {
  max-width: 620px;
  width: 100%;
  padding: 32px;
  background: rgba(13, 19, 36, 0.96);
  border: 1px solid rgba(56, 232, 255, 0.35);
  border-radius: var(--radius-xl);
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.8);
}

.modal-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.modal-close {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
}

/* Legal Pages */
.legal-container {
  max-width: 860px;
  margin: 48px auto 80px;
  padding: 44px;
}

.legal-container h1 { font-size: 36px; margin-bottom: 10px; letter-spacing: -0.03em; }
.legal-container .meta { color: var(--cyan); font-size: 13px; margin-bottom: 28px; }
.legal-container h2 { font-size: 20px; margin: 28px 0 10px; color: var(--text-primary); }
.legal-container p, .legal-container li { color: var(--text-secondary); font-size: 15px; margin-bottom: 12px; }
.legal-container ul { padding-left: 20px; }

/* Footer */
footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 48px 0 60px;
  margin-top: 40px;
  color: var(--text-secondary);
  font-size: 13.5px;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
}

.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-links a { color: var(--text-secondary); text-decoration: none; }
.footer-links a:hover { color: var(--cyan); }

@media (max-width: 960px) {
  .calc-panel, .ai-banner, .pricing-grid { grid-template-columns: 1fr; }
  .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tier-card.featured { transform: none; }
  .nav-links { display: none; }
}

@media (max-width: 640px) {
  .app-grid, .saas-grid { grid-template-columns: 1fr; }
  .calc-panel, .ai-banner, .legal-container { padding: 22px; }
}
