/* Landing UI improvements + demo animation */

/* Layout: use more horizontal space */
.main-entry {
  padding: clamp(16px, 3vw, 28px);
}

/* Card wrapper: wider and less tall on desktop */
.landing-card {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  border-radius: 40px;
  border: 1px solid var(--border-color);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.landing-card__inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 75px !important;
  padding: clamp(18px, 4vw, 52px);
}

/* Left: copy + actions */
.landing-copy {
  text-align: center;
}

.landing-copy__logo {
  width: 120px;
  margin: 0 auto 18px;
}

.landing-copy h2 {
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 950;
  margin-bottom: 12px;
  letter-spacing: -1px;
  background: linear-gradient(135deg, var(--text-primary), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.landing-copy p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: clamp(20px, 4vw, 45px);
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  font-weight: 600;
}

.landing-actions {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: center;
}

/* Right: demo */
.landing-demo {
  position: relative;
  min-height: 360px;
  border-radius: 26px;
  background:
    radial-gradient(circle at 10% 10%, rgba(var(--accent-rgb), 0.14), transparent 45%),
    radial-gradient(circle at 80% 25%, rgba(var(--accent-rgb), 0.12), transparent 40%),
    rgba(var(--surface-rgb), 0.55);
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  overflow: hidden;
}

/* Decorative blobs */
.landing-demo::before,
.landing-demo::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(0px);
  opacity: 0.9;
}

.landing-demo::before {
  width: 180px;
  height: 180px;
  top: -70px;
  right: -70px;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.25), transparent 60%);
  animation: demo-float-1 4.5s ease-in-out infinite;
}

.landing-demo::after {
  width: 140px;
  height: 140px;
  bottom: -60px;
  left: -60px;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.18), transparent 60%);
  animation: demo-float-2 5.2s ease-in-out infinite;
}

@keyframes demo-float-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-14px, 10px) scale(1.03); }
}

@keyframes demo-float-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(12px, -10px) scale(1.04); }
}

/* Demo device */
.demo-device {
  position: absolute;
  inset: 18px;
  border-radius: 22px;
  background: rgba(var(--surface-rgb), 0.35);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.10);
  overflow: hidden;
}

.demo-topbar {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 0 14px;
  background: rgba(var(--surface-rgb), 0.75);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.demo-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(var(--accent-rgb), 0.35);
  box-shadow: 0 0 0 6px rgba(var(--accent-rgb), 0.06);
}

.demo-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Animated chart card */
.demo-card {
  padding: 14px;
  border-radius: 16px;
  background: rgba(var(--surface-rgb), 0.6);
  border: 1px solid rgba(var(--accent-rgb), 0.14);
}

.demo-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

/* 3-step CRM demo */
.demo-scroll {
  height: 100%;
  overflow: hidden;
}

.demo-scroll .demo-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  animation: crmAutoScroll 9.5s ease-in-out infinite;
}

.demo-scroll-clone {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@keyframes crmAutoScroll {
  0% { transform: translateY(0); }
  33% { transform: translateY(calc(-1 * (100% / 3))); }
  66% { transform: translateY(calc(-2 * (100% / 3))); }
  100% { transform: translateY(0); }
}


.demo-step {
  padding: 12px;
  border-radius: 16px;
  background: rgba(var(--surface-rgb), 0.6);
  border: 1px solid rgba(var(--accent-rgb), 0.14);
}

.demo-step-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.demo-step-title {
  font-weight: 900;
  color: var(--text-primary);
}

.demo-step-badge {
  font-weight: 900;
  font-size: 0.78rem;
  color: var(--text-secondary);
  background: rgba(var(--accent-rgb), 0.10);
  border: 1px solid rgba(var(--accent-rgb), 0.20);
  padding: 6px 10px;
  border-radius: 999px;
}

.demo-step-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.demo-kpi-row {
  height: 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  position: relative;
  overflow: hidden;
}

.demo-kpi-row::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.30), transparent);
  transform: translateX(-120%);
  animation: demo-shimmer 1.25s ease-in-out infinite;
}

.demo-kpi-row:nth-child(2)::after { animation-delay: 0.1s; }
.demo-kpi-row:nth-child(3)::after { animation-delay: 0.2s; }

@keyframes demo-shimmer {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}


.demo-pill {
  font-weight: 800;
  font-size: 0.78rem;
  color: var(--text-secondary);
  background: rgba(var(--accent-rgb), 0.10);
  border: 1px solid rgba(var(--accent-rgb), 0.20);
  padding: 6px 10px;
  border-radius: 999px;
}

.demo-chart {
  height: 128px;
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.demo-bar {
  width: 14px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.9), rgba(var(--accent-rgb), 0.25));
  transform-origin: bottom;
  animation: demo-bar 1.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.demo-bar:nth-child(2) { animation-delay: 0.08s; height: 30%; }
.demo-bar:nth-child(3) { animation-delay: 0.16s; height: 50%; }
.demo-bar:nth-child(4) { animation-delay: 0.24s; height: 40%; }
.demo-bar:nth-child(5) { animation-delay: 0.32s; height: 70%; }
.demo-bar:nth-child(1) { height: 25%; }

@keyframes demo-bar {
  0%, 100% { transform: scaleY(0.85); filter: saturate(1); }
  50% { transform: scaleY(1.15); filter: saturate(1.2); }
}

/* Animated table rows */
.demo-row {
  height: 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  overflow: hidden;
  position: relative;
}

.demo-row::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.30), transparent);
  transform: translateX(-120%);
  animation: demo-shimmer 1.25s ease-in-out infinite;
}

.demo-row:nth-child(2)::after { animation-delay: 0.1s; }
.demo-row:nth-child(3)::after { animation-delay: 0.2s; }
.demo-row:nth-child(4)::after { animation-delay: 0.3s; }

@keyframes demo-shimmer {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}

/* Subtle floating action icon */
.demo-fab {
  display:none;
  position: absolute;
  bottom: 18px;
  right: 18px;
  width: 46px;
  height: 46px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--accent-rgb), 0.16);
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  color: var(--accent-color);
  animation: fab-bob 2.1s ease-in-out infinite;
  box-shadow: 0 12px 25px rgba(0,0,0,0.12);
}

@keyframes fab-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@media (max-width: 992px) {
  .landing-card__inner {
    grid-template-columns: 1fr;
  }
  .landing-demo {
    min-height: 320px;
  }
  .landing-copy { order: 1; }
  .landing-demo { order: 2; }
}

@media (max-width: 576px) {
  .landing-card {
    border-radius: 28px;
  }
  .landing-card__inner {
    padding: 18px;
  }
  .landing-demo {
    min-height: 280px;
  }
}

/* Respect reduced motion */
@keyframes crmStepGlow {
  0% { opacity: 0.35; transform: translateY(6px) scale(0.98); }
  15% { opacity: 1; transform: translateY(0) scale(1); }
  60% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0.35; transform: translateY(6px) scale(0.98); }
}

/* Looping 3-step demo */
.demo-step {
  opacity: 0.35;
  transform-origin: center;
}

.demo-step[data-step="1"] { animation: crmStepGlow 6.5s ease-in-out infinite; }
.demo-step[data-step="2"] { animation: crmStepGlow 6.5s ease-in-out infinite; animation-delay: 2.16s; }
.demo-step[data-step="3"] { animation: crmStepGlow 6.5s ease-in-out infinite; animation-delay: 4.32s; }

@media (prefers-reduced-motion: reduce) {
  .demo-bar,
  .demo-row::after,
  .landing-demo::before,
  .landing-demo::after,
  .demo-fab,
  .demo-step {
    animation: none !important;
  }
}


