:root {
  --bg: #0a0f1e;
  --card: #0d1526;
  --accent: #3b82f6;
  --success: #22c55e;
  --text: #ffffff;
  --muted: #94a3b8;
  --border: #1e293b;
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
  scroll-behavior: smooth;
}

body {
  position: relative;
  overflow-x: hidden;
  background-image: radial-gradient(circle at 20% 10%, rgba(59, 130, 246, 0.12), transparent 30%),
    radial-gradient(circle at 80% 20%, rgba(34, 197, 94, 0.08), transparent 35%);
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.section {
  padding: 5rem 0 1rem;
}

.bg-orb {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
  opacity: 0.25;
  z-index: 0;
}

.orb-1 {
  top: -120px;
  right: -120px;
  background: #3b82f6;
}

.orb-2 {
  bottom: -150px;
  left: -120px;
  background: #22c55e;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  padding-top: 1rem;
}

.navbar {
  background: transparent;
  backdrop-filter: none;
  border: 1px solid transparent;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  transition: all 0.3s ease;
}

.logo-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.logo {
  font-weight: 800;
  letter-spacing: 0.2px;
  font-size: 1.1rem;
}

.logo strong {
  color: var(--accent);
}

.logo-sub {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  font-size: 0.95rem;
}

.nav-links a {
  color: var(--muted);
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links .nav-cta {
  color: #fff;
}

.menu-toggle {
  display: none;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  border-radius: 10px;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
}

.hero {
  padding: 4.5rem 0 2rem;
  display: grid;
  gap: 2rem;
  position: relative;
  z-index: 1;
}

.hero-content {
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.pill {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  color: var(--muted);
  background: rgba(13, 21, 38, 0.7);
  font-size: 0.86rem;
}

.hero h1 {
  margin: 1rem 0 0.5rem;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.05;
  background: linear-gradient(
    -45deg,
    #3b82f6,
    #8b5cf6,
    #06b6d4,
    #3b82f6
  );
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientFlow 4s ease infinite;
}

.hero h2 {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.1rem, 2vw, 1.55rem);
  font-weight: 500;
}

.hero p {
  max-width: 620px;
  margin: 1.25rem auto;
  color: var(--muted);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border-radius: 12px;
  border: 1px solid transparent;
  padding: 0.75rem 1.2rem;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 28px rgba(59, 130, 246, 0.35);
}

.btn-primary:hover {
  box-shadow: 0 14px 34px rgba(59, 130, 246, 0.45);
}

.btn-outline,
.btn-dark {
  background: rgba(13, 21, 38, 0.85);
  border-color: var(--border);
  color: var(--text);
}

.btn-outline:hover,
.btn-dark:hover {
  border-color: #2c3b52;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.35);
}

.app-mockup {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(13, 21, 38, 0.95), rgba(13, 21, 38, 0.82));
  border-radius: var(--radius);
  overflow: hidden;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  min-height: 360px;
}

.mock-sidebar {
  background: #0a1223;
  border-right: 1px solid var(--border);
  padding: 0.65rem;
}

.mock-brand {
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
}

.mock-sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.mock-tab {
  color: var(--muted);
  font-size: 11px;
  border-radius: 10px;
  padding: 0.38rem 0.45rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.mock-tab:hover {
  color: var(--text);
  background: rgba(59, 130, 246, 0.1);
}

.mock-tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.mock-main {
  padding: 0.72rem;
  display: grid;
  gap: 0.6rem;
  min-width: 0;
  overflow-x: hidden;
  font-size: 11px;
}

.mock-main h3 {
  margin: 0;
}

.mock-tab-content {
  display: none;
  opacity: 0;
  animation: fadeIn 0.3s ease forwards;
  min-width: 0;
}

.mock-tab-content.active {
  display: grid;
  opacity: 1;
}

#my-invoices .btn.btn-primary {
  font-size: 11px !important;
  padding: 0.3rem 0.55rem !important;
}

#my-invoices table {
  min-width: 0 !important;
  width: 100% !important;
  table-layout: fixed;
}

#my-invoices th {
  font-size: 10px !important;
  text-transform: uppercase;
}

#my-invoices td {
  font-size: 11px !important;
}

#my-invoices th,
#my-invoices td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#my-invoices th:nth-child(1),
#my-invoices td:nth-child(1) {
  max-width: 130px;
}

#my-invoices th:nth-child(2),
#my-invoices td:nth-child(2) {
  max-width: 70px;
}

#my-invoices th:nth-child(3),
#my-invoices td:nth-child(3) {
  max-width: 70px;
}

#my-invoices th:nth-child(4),
#my-invoices td:nth-child(4) {
  max-width: 80px;
}

#my-invoices th:nth-child(5),
#my-invoices td:nth-child(5) {
  max-width: 90px;
}

#my-invoices th:nth-child(6),
#my-invoices td:nth-child(6) {
  max-width: 90px;
}

#my-invoices th:nth-child(7),
#my-invoices td:nth-child(7) {
  max-width: 60px;
}

#my-invoices .status,
#my-invoices td span[style*="border-radius: 999px"] {
  font-size: 10px !important;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.dashboard-stat {
  background: rgba(13, 21, 38, 0.7);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.8rem;
}

.quarter-card {
  background: rgba(13, 21, 38, 0.7);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.8rem;
}

.threshold-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.8rem;
  background: rgba(10, 15, 30, 0.7);
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.row.amount {
  margin-top: 0.5rem;
  color: var(--muted);
}

.green {
  color: var(--success);
}

.status {
  display: inline-flex;
  font-size: 0.75rem;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.25rem 0.55rem;
}

.status.ok {
  color: #9ae6b3;
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.45);
}

.progress {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #111a2e;
  border: 1px solid #1b2942;
  overflow: hidden;
  margin-top: 0.6rem;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e, #2bd36c);
}

.section-head {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 2rem;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
}

.section-head p {
  color: var(--muted);
  margin-top: 0.65rem;
}

.grid {
  display: grid;
  gap: 1rem;
}

.features-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.15), 0 16px 30px rgba(0, 0, 0, 0.3);
}

.card i {
  color: var(--accent);
  width: 20px;
  height: 20px;
}

.card h3 {
  margin: 0.8rem 0 0.55rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.tag {
  display: inline-flex;
  margin-top: 1rem;
  font-size: 0.75rem;
  border-radius: 999px;
  padding: 0.3rem 0.62rem;
  border: 1px solid transparent;
}

.tag-green {
  color: #9ae6b3;
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.4);
}

.tag-blue {
  color: #bfd8ff;
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.45);
}

.tag-orange {
  color: #ffd8a8;
  background: rgba(251, 146, 60, 0.14);
  border-color: rgba(251, 146, 60, 0.45);
}

.tag-gray {
  color: #d7dce6;
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.35);
}

.threshold-showcase .stack {
  display: grid;
  gap: 1rem;
}

.threshold-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}

.panel-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
}

.panel-top h3 {
  font-size: 1rem;
  margin: 0;
}

.panel-amount {
  color: var(--success);
  font-weight: 700;
  margin-top: 0.55rem;
  text-align: right;
}

.threshold-panel p {
  color: var(--muted);
  margin-bottom: 0;
}

.how-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.step-card {
  position: relative;
}

.step-number {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--muted);
  font-weight: 700;
  background: #0a1223;
}

.pricing-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pricing-card {
  display: flex;
  flex-direction: column;
}

.price {
  font-size: 2rem;
  font-weight: 800;
  margin: 0.8rem 0;
}

.price span {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 500;
}

.pricing-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
  color: var(--muted);
}

.pricing-card li {
  padding-left: 1.35rem;
  position: relative;
}

.pricing-card li::before {
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 700;
}

.pricing-card li.yes::before {
  content: "✓";
  color: var(--success);
}

.pricing-card li.no::before {
  content: "✕";
  color: #ef4444;
}

.pricing-card .btn {
  margin-top: auto;
}

.premium {
  border-color: rgba(59, 130, 246, 0.8);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.35), 0 0 34px rgba(59, 130, 246, 0.36);
}

.premium:hover {
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.6), 0 0 44px rgba(59, 130, 246, 0.44);
}

.stats {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  padding: 1.2rem;
}

.stats article {
  text-align: center;
}

.stats strong {
  display: block;
  font-size: 1.55rem;
}

.stats span {
  color: var(--muted);
  font-size: 0.92rem;
}

.cta-banner {
  border: 1px solid rgba(59, 130, 246, 0.6);
  background: linear-gradient(160deg, rgba(13, 21, 38, 0.95), rgba(8, 14, 28, 0.95));
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.3), 0 0 34px rgba(59, 130, 246, 0.25);
}

.cta-banner h2 {
  margin-top: 0;
}

.cta-banner p {
  color: var(--muted);
  margin-bottom: 1.2rem;
}

.site-footer {
  margin-top: 4.5rem;
  border-top: 1px solid var(--border);
  background: #0a0f1e;
}

.footer-grid {
  padding: 2rem 0;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 1rem;
  align-items: center;
}

.footer-grid p {
  color: var(--muted);
  margin: 0.45rem 0 0;
}

.footer-links {
  display: flex;
  gap: 1rem;
}

.footer-links a {
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--text);
}

.lang-switch {
  color: var(--muted);
  letter-spacing: 0.1em;
  display: inline-flex;
  gap: 0.4rem;
}

.lang-option,
.lang-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font: inherit;
  letter-spacing: 0.1em;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s ease;
}

.lang-option:hover,
.lang-btn:hover {
  color: var(--text);
}

.lang-option.active,
.lang-btn.active {
  color: #3b82f6;
  font-weight: 700;
}

.page-content {
  transition: opacity 0.2s ease;
}

.page-content.i18n-fade {
  opacity: 0;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 0.9rem;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ==================== ANIMATIONS ==================== */

/* 1. SMOOTH SCROLL REVEAL */
@keyframes slideUpReveal {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 2. GRADIENT TEXT ANIMATION */
@keyframes gradientFlow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.show {
  opacity: 1;
  transform: translateY(0);
  animation: slideUpReveal 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* 3. NAVBAR FROSTED GLASS - SCROLLED STATE */
.navbar.scrolled {
  background: rgba(10, 15, 30, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
}

/* 5. BUTTON SHIMMER EFFECT */
@keyframes shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

.btn-primary {
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: shimmer 2s infinite;
}

/* 6. COUNTER ANIMATION */
@keyframes counterPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

.stats strong {
  animation: counterPulse 0.5s ease-out;
}

/* 7. TYPEWRITER EFFECT */
@keyframes typingCursor {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.typewriter-cursor {
  display: inline;
  animation: typingCursor 1s infinite;
}

/* 8. BUTTON HOVER LIFT */
.btn {
  transition: transform 0.2s ease, box-shadow 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

/* 9. HERO PARTICLE STYLE */
#particle-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* 10. CURSOR GLOW EFFECT */
.cursor-glow {
  position: fixed;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.15), transparent);
  filter: blur(80px);
  pointer-events: none;
  z-index: 1;
  transform: translate(-50%, -50%);
  display: none;
}

@media (min-width: 1024px) {
  .cursor-glow {
    display: block;
  }
}

/* PREFERS-REDUCED-MOTION: Respect user preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .hero h1 {
    animation: none !important;
    background: linear-gradient(to right, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .btn-primary::after {
    animation: none !important;
  }

  .stats strong {
    animation: none !important;
  }

  .typewriter-cursor {
    animation: none !important;
  }

  .mock-tab-content {
    animation: none !important;
    display: none !important;
  }

  .mock-tab-content.active {
    display: grid !important;
    opacity: 1 !important;
  }
}

@media (max-width: 980px) {
  .features-grid,
  .pricing-grid,
  .how-grid,
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-mockup {
    grid-template-columns: 1fr;
  }

  .mock-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }
}

@media (max-width: 760px) {
  .menu-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    top: 72px;
    left: 50%;
    transform: translateX(-50%);
    width: min(92vw, 460px);
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(13, 21, 38, 0.98);
    backdrop-filter: blur(10px);
    padding: 0.8rem;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }

  .nav-links.open {
    display: flex;
  }

  .features-grid,
  .pricing-grid,
  .how-grid,
  .stats {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 3rem;
  }
}
