:root {
  --bg: #020617;
  --text: #0f172a;
  --muted: #475569;
  --accent: #0ea5e9;
  --accent-dark: #0284c7;
  --card: #ffffff;
  --glow: rgba(125, 211, 252, 0.55);
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: linear-gradient(120deg, rgba(2, 6, 23, 1), rgba(15, 23, 42, 0.92));
  color: var(--text);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.25), transparent 70%);
  filter: blur(60px);
  z-index: -1;
  transform: translateZ(0);
  animation: drift 18s linear infinite;
}

body::before {
  top: -180px;
  left: -120px;
}

body::after {
  bottom: -220px;
  right: -120px;
  animation-duration: 22s;
}

.landing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

.landing__header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  padding: 2rem clamp(1.5rem, 4vw, 4rem);
  gap: 2rem;
  color: #fff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand__mark {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, #38bdf8, #22d3ee);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.6rem;
  box-shadow: var(--shadow);
}

.brand h1 {
  margin: 0;
  font-size: 1.6rem;
}

.brand span {
  display: block;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
}

.landing__header nav {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.landing__header nav a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  padding-bottom: 0.2rem;
}

.landing__header nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, rgba(14, 165, 233, 0.4), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.landing__header nav a:hover::after {
  transform: scaleX(1);
}

.cta-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

button.primary,
button.ghost {
  padding: 0.75rem 1.4rem;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

button.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 20px 40px rgba(14, 165, 233, 0.35);
}

button.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 28px 50px rgba(14, 165, 233, 0.45);
}

button.primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.35), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  mix-blend-mode: screen;
  pointer-events: none;
}

button.primary:hover::after {
  opacity: 1;
}

button.ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #fff;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: center;
  gap: 3rem;
  padding: 0 clamp(1.5rem, 5vw, 5rem) 4rem;
  position: relative;
  overflow: hidden;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.orb-wrapper {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.floating-orb {
  position: absolute;
  width: var(--size);
  height: var(--size);
  left: var(--left);
  top: var(--top);
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, rgba(125, 211, 252, 0.4), rgba(14, 165, 233, 0.05));
  transform: translate3d(-50%, -50%, 0) scale(0.9);
  animation: orbFloat 14s ease-in-out infinite;
  animation-delay: var(--delay);
}

.hero h2 {
  color: #fff;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  margin-bottom: 1rem;
}

.hero p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.1rem;
  max-width: 520px;
}

.hero__preview img {
  width: 100%;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.preview-card {
  background: rgba(15, 23, 42, 0.82);
  padding: 1.75rem;
  border-radius: 24px;
  box-shadow: var(--shadow);
  color: #fff;
  display: grid;
  gap: 1rem;
  position: relative;
  overflow: hidden;
}

.preview-card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: conic-gradient(
    from 0deg,
    rgba(56, 189, 248, 0.1),
    rgba(14, 165, 233, 0.5),
    rgba(56, 189, 248, 0.15)
  );
  animation: glowPulse 12s linear infinite;
  opacity: 0.6;
}

.preview-card > * {
  position: relative;
  z-index: 1;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.preview-header strong {
  display: block;
  font-size: 1.2rem;
}

.preview-header span {
  color: rgba(226, 232, 240, 0.75);
}

.preview-pill {
  background: rgba(14, 165, 233, 0.18);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-weight: 600;
}

.preview-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.preview-card li {
  display: flex;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.75rem 1rem;
  border-radius: 14px;
}

.preview-card li span {
  color: rgba(226, 232, 240, 0.75);
}

.section {
  padding: clamp(2.5rem, 6vw, 5rem);
  background: rgba(255, 255, 255, 0.95);
  border-radius: clamp(0px, 1vw, 36px);
  box-shadow: 0 32px 60px rgba(15, 23, 42, 0.08);
  margin: clamp(1rem, 3vw, 3rem) clamp(1.5rem, 4vw, 4rem);
}

.section--contrast {
  background: rgba(15, 23, 42, 0.95);
  color: #fff;
}

.section h3 {
  margin-top: 0;
  font-size: 2rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.feature-grid article {
  padding: 1.5rem;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(56, 189, 248, 0.08));
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

.demo-card {
  height: 520px;
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.4);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

.demo-ui {
  display: grid;
  grid-template-columns: 220px 1fr;
  height: 100%;
  background: rgba(15, 23, 42, 0.8);
  color: #fff;
}

.demo-ui__sidebar {
  background: rgba(15, 23, 42, 0.92);
  display: grid;
  gap: 0.75rem;
  padding: 1.5rem;
}

.demo-ui__sidebar button {
  background: rgba(148, 163, 184, 0.18);
  border: none;
  color: #fff;
  padding: 0.65rem 0.9rem;
  border-radius: 12px;
  text-align: left;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.demo-ui__sidebar button.active {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.9), rgba(56, 189, 248, 0.7));
  box-shadow: 0 18px 45px rgba(14, 165, 233, 0.32);
  transform: translateX(6px);
}

.demo-ui__main {
  padding: 2rem;
  display: grid;
  gap: 1.5rem;
  background: rgba(15, 23, 42, 0.65);
  border-left: 1px solid rgba(148, 163, 184, 0.12);
  backdrop-filter: blur(4px);
}

.demo-ui__main.switching {
  animation: panelPulse 0.6s ease;
}

.demo-ui__main header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.demo-ui__main header h4 {
  margin: 0;
}

.demo-ui__main .pill {
  background: rgba(14, 165, 233, 0.18);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-weight: 600;
}

.demo-ui__main .invoice-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.demo-ui__main .invoice-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  transition-delay: var(--delay, 0s);
}

.demo-ui__main .invoice-list li.enter {
  opacity: 1;
  transform: translateY(0);
}

.demo-ui__main .invoice-list strong {
  display: block;
}

.demo-ui__main .invoice-list span {
  color: rgba(226, 232, 240, 0.85);
  font-size: 0.85rem;
}

.demo-ui__main .status {
  display: inline-block;
  margin-top: 0.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.demo-ui__main .status-Open {
  background: rgba(14, 165, 233, 0.2);
  color: #bae6fd;
}

.demo-ui__main .status-Paid {
  background: rgba(74, 222, 128, 0.24);
  color: #bbf7d0;
}

.demo-ui__main .status-Cancelled {
  background: rgba(248, 113, 113, 0.24);
  color: #fecdd3;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.pricing-card {
  background: var(--card);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.12);
  display: grid;
  gap: 1rem;
  text-align: center;
}

.pricing-card--highlight {
  border: 2px solid var(--accent);
  transform: translateY(-6px);
}

.footer {
  padding: 2rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(15, 23, 42, 0.85);
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  backdrop-filter: blur(6px);
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.modal.open {
  display: flex;
}

.modal__content {
  background: #fff;
  border-radius: 24px;
  padding: 2rem;
  width: min(420px, 100%);
  position: relative;
  box-shadow: var(--shadow);
  display: grid;
  gap: 1.5rem;
  transform: translateY(16px) scale(0.96);
  opacity: 0;
}

.modal__content.pop-in {
  animation: popIn 0.48s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  cursor: pointer;
}

.modal__tabs {
  display: flex;
  gap: 0.5rem;
  background: rgba(14, 165, 233, 0.12);
  padding: 0.35rem;
  border-radius: 999px;
}

.modal__tabs button {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.6rem 0.8rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  color: var(--muted);
}

.modal__tabs button.active {
  background: var(--card);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16);
  color: var(--text);
}

.modal__form {
  display: grid;
  gap: 0.75rem;
}

.modal__form label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--muted);
}

.modal__form input {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.hidden {
  display: none !important;
}

.animate-ready {
  opacity: 0;
  transform: translateY(42px);
  transition: transform 0.8s ease, opacity 0.8s ease;
}

.animate-ready.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.has-ripple {
  position: relative;
  overflow: hidden;
}

.ripple {
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  transform: scale(0);
  animation: ripple 0.6s ease-out;
  pointer-events: none;
  opacity: 0.45;
}

.toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  display: grid;
  gap: 0.75rem;
  z-index: 400;
}

.toast {
  padding: 0.9rem 1.25rem;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.9);
  color: #f8fafc;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(125, 211, 252, 0.45);
  transform: translateY(-12px);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
  position: relative;
  overflow: hidden;
}

.toast::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(56, 189, 248, 0.3), transparent 60%);
  opacity: 0.7;
  mix-blend-mode: screen;
}

.toast.visible {
  transform: translateY(0);
  opacity: 1;
}

.toast--success {
  border-color: rgba(74, 222, 128, 0.65);
  background: rgba(15, 23, 42, 0.92);
}

.toast--info {
  border-color: rgba(125, 211, 252, 0.55);
}

.toast--accent {
  border-color: rgba(14, 165, 233, 0.7);
}

@media (max-width: 900px) {
  .landing__header {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .landing__header nav {
    order: 3;
  }
}

@keyframes drift {
  0% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(40px, 20px, 0);
  }
  100% {
    transform: translate3d(0, 0, 0);
  }
}

@keyframes orbFloat {
  0% {
    transform: translate3d(-50%, -50%, 0) scale(0.9);
  }
  50% {
    transform: translate3d(-48%, -54%, 0) scale(1.05);
  }
  100% {
    transform: translate3d(-50%, -50%, 0) scale(0.9);
  }
}

@keyframes glowPulse {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes panelPulse {
  0% {
    box-shadow: 0 0 0 rgba(56, 189, 248, 0);
  }
  50% {
    box-shadow: 0 0 35px rgba(56, 189, 248, 0.35);
  }
  100% {
    box-shadow: 0 0 0 rgba(56, 189, 248, 0);
  }
}

@keyframes ripple {
  to {
    transform: scale(2.4);
    opacity: 0;
  }
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
