/* ═══════════════════════════════════════════════════════════
   Mashvara — Corporate Design System
    Brand:   #2C73C9 (blue)
    Accent:  #F23B35 (red)
   Dark:    #0C1B2A (navy)
   ═══════════════════════════════════════════════════════════ */

html { scroll-behavior: smooth; }

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: rgba(44, 115, 201, 0.15);
    color: #0C1B2A;
}

/* ── Scroll Progress ─────────────────────────────────────── */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 100%;
    transform: scaleX(0);
    transform-origin: left;
    background: linear-gradient(90deg, #2C73C9, #93C5FD, #F23B35);
    z-index: 1000;
    opacity: 0.9;
}

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #DBEAFE; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #2C73C9; }

/* ── Glass Nav ────────────────────────────────────────────── */
.glass-nav {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid rgba(44, 115, 201, 0.08);
}

/* Nav link underline */
.nav-link {
    position: relative;
    display: inline-block;
}
.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    height: 2px;
    background: linear-gradient(90deg, rgba(44,115,201,0.0), rgba(44,115,201,0.9), rgba(242,59,53,0.0));
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 220ms ease;
}
.nav-link:hover::after { transform: scaleX(1); }

/* ── Gradient Text ────────────────────────────────────────── */
.text-gradient-brand {
    background: linear-gradient(135deg, #2C73C9 0%, #245FA6 50%, #1D4B83 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ── Store Buttons (Hero) ─────────────────────────────────── */
.store-btn-primary {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: #2C73C9;
    color: #fff;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(44, 115, 201, 0.18), 0 10px 24px -8px rgba(44, 115, 201, 0.28);
    transition: all 0.2s ease;
}
.store-btn-primary:hover {
    background: #245FA6;
    transform: translateY(-2px);
    box-shadow: 0 1px 3px rgba(44, 115, 201, 0.18), 0 14px 34px -10px rgba(44, 115, 201, 0.34);
}

.store-btn-outline {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: #fff;
    color: #0C1B2A;
    font-weight: 600;
    font-size: 0.875rem;
    border: 1.5px solid rgba(44, 115, 201, 0.18);
    border-radius: 0.75rem;
    transition: all 0.2s ease;
}

/* ── Button shimmer (corporate) ───────────────────────────── */
.btn-shine {
    position: relative;
    overflow: hidden;
}
.btn-shine > * { position: relative; z-index: 1; }
.btn-shine::before {
    content: "";
    position: absolute;
    top: -30%;
    left: -60%;
    width: 60%;
    height: 160%;
    background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,0.55), rgba(255,255,255,0));
    transform: skewX(-18deg);
    opacity: 0;
    pointer-events: none;
}
.btn-shine:hover::before {
    opacity: 1;
    animation: btn-shine-sweep 900ms ease;
}
@keyframes btn-shine-sweep {
    from { transform: translateX(0) skewX(-18deg); }
    to   { transform: translateX(260%) skewX(-18deg); }
}

/* ── Hero blobs motion ───────────────────────────────────── */
@keyframes blob-drift {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(18px, -18px, 0) scale(1.03); }
}
.hero-blob { animation: blob-drift 14s ease-in-out infinite; }
.hero-blob--1 { animation-duration: 16s; }
.hero-blob--2 { animation-duration: 18s; }
.hero-blob--3 { animation-duration: 20s; }

/* ── Spotlight hover (subtle interactive) ─────────────────── */
.spotlight {
    position: relative;
    overflow: hidden;
    --spotlight-size: 520px;
    --spotlight-brand: rgba(156, 150, 150, 0.371);
    --spotlight-accent: rgba(154, 149, 149, 0.14);
}
.spotlight::after {
    content: "";
    position: absolute;
    inset: -28px;
    pointer-events: none;
    background:
        radial-gradient(var(--spotlight-size) circle at var(--x, 50%) var(--y, 50%), var(--spotlight-brand), transparent 62%),
        radial-gradient(calc(var(--spotlight-size) * 0.7) circle at var(--x, 50%) var(--y, 50%), var(--spotlight-accent), transparent 72%);
    opacity: 0;
    transition: opacity 180ms ease;
}
.spotlight:hover::after { opacity: 1; }
.spotlight--dark {
    --spotlight-size: 560px;
    --spotlight-brand: rgba(200, 200, 200, 0.295);
    --spotlight-accent: rgba(153, 150, 150, 0.41);
}

/* Light background variant (subtle, brand-first) */
.spotlight--light {
    --spotlight-size: 720px;
    --spotlight-brand: rgba(169, 166, 166, 0.17);
    --spotlight-accent: rgba(185, 183, 183, 0.285);
}

/* Large hover areas (entire sections) */
.spotlight-scope {
    --spotlight-size: 980px;
}

.spotlight-scope.spotlight--dark {
    --spotlight-brand: rgba(179, 180, 182, 0.3);
    --spotlight-accent: rgba(210, 209, 209, 0.105);
}

.spotlight-scope.spotlight--light {
    --spotlight-brand: rgba(44,115,201,0.14);
    --spotlight-accent: rgba(242,59,53,0.05);
}

/* Stronger glow for full blocks (cards) */
.feature-card.spotlight {
    --spotlight-size: 520px;
    --spotlight-brand: rgba(242, 59, 53, 0.14);
    --spotlight-accent: rgba(242, 59, 53, 0.06);
}
.feature-card.spotlight:hover {
    --spotlight-brand: rgba(242, 59, 53, 0.18);
    --spotlight-accent: rgba(242, 59, 53, 0.08);
}

.use-case-card.spotlight {
    --spotlight-size: 700px;
    --spotlight-brand: rgba(242, 59, 53, 0.12);
    --spotlight-accent: rgba(242, 59, 53, 0.05);
}

.use-case-card.spotlight:hover {
    --spotlight-brand: rgba(242, 59, 53, 0.16);
    --spotlight-accent: rgba(242, 59, 53, 0.07);
}

.feature-card.spotlight:hover,
.testimonial-card.spotlight:hover {
    border-color: rgba(242, 59, 53, 0.28);
    box-shadow: 0 1px 3px rgba(12, 27, 42, 0.06), 0 22px 64px -18px rgba(242, 59, 53, 0.22);
}

.use-case-card.spotlight:hover {
    box-shadow: 0 0 0 1px rgba(242, 59, 53, 0.16), 0 22px 70px -22px rgba(242, 59, 53, 0.26);
}

/* ── Back to top ─────────────────────────────────────────── */
.back-to-top {
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(12, 27, 42, 0.08);
    color: #0C1B2A;
    box-shadow: 0 10px 30px -16px rgba(12, 27, 42, 0.20);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 220ms ease, transform 220ms ease;
    z-index: 999;
}
.back-to-top.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.back-to-top:hover {
    border-color: rgba(44, 115, 201, 0.30);
    color: #2C73C9;
}
.store-btn-outline:hover {
    border-color: #2C73C9;
    color: #2C73C9;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px -4px rgba(44, 115, 201, 0.15);
}

/* ── Feature Cards ────────────────────────────────────────── */
.feature-card {
    background: #fff;
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid rgba(44, 115, 201, 0.08);
    transition: all 0.3s ease;
}
.feature-card:hover {
    border-color: rgba(242, 59, 53, 0.22);
    box-shadow: 0 1px 3px rgba(12, 27, 42, 0.06), 0 18px 52px -16px rgba(242, 59, 53, 0.18);
    transform: translateY(-4px);
}

.feature-icon {
    width: 3rem;
    height: 3rem;
    background: #EFF6FF;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    transition: all 0.3s ease;
}
.feature-card:hover .feature-icon { background: #2C73C9; }
.feature-card:hover .feature-icon i { color: #fff !important; }

/* ── Step Numbers ─────────────────────────────────────────── */
.step-number {
    flex-shrink: 0;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    border: 1.5px solid #E8EDF3;
    color: #8BA1BD;
    background: #fff;
    transition: all 0.2s ease;
}
.step-number.active {
    background: #2C73C9;
    border-color: #2C73C9;
    color: #fff;
    box-shadow: 0 8px 18px -6px rgba(44, 115, 201, 0.40);
}

/* ── Interactive Steps (How It Works) ─────────────────────── */
.steps-showcase-bg {
    background: #fff;
    border: none;
}

.steps-phone-frame {
    perspective: 1200px;
}

.steps-viewport {
    position: relative;
    width: min(448px, 100%);
    aspect-ratio: 3 / 4;
    border-radius: 0.9rem;
    overflow: hidden;
    background: #fff;
    border: none;
    box-shadow: none;
    transform: translateZ(0);
}
.steps-viewport::after {
    content: none;
}

/* Step images — crossfade stack */
.steps-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: 50% 50%;
    opacity: 0;
    transform: translateY(16px) scale(1);
    filter: blur(10px) saturate(0.98);
    transition:
        opacity 360ms ease,
        transform 520ms cubic-bezier(0.2, 0.8, 0.2, 1),
        filter 520ms cubic-bezier(0.2, 0.8, 0.2, 1);
    pointer-events: none;
    z-index: 1;
    will-change: opacity, transform, filter;
}

/* Fine-tune each screen crop */
.steps-img[data-step="0"] { object-position: 50% 50%; }
.steps-img[data-step="1"] { object-position: 50% 50%; }
.steps-img[data-step="2"] { object-position: 50% 50%; }
.steps-img--active {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0) saturate(1.03);
    z-index: 2;
}

/* Step items — clickable cards */
.step-item {
    display: flex;
    gap: 1rem;
    width: 100%;
    text-align: left;
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    padding: 1rem 1.25rem;
    border-radius: 0.9rem;
    cursor: pointer;
    border: 1px solid transparent;
    background: transparent;
    transition: background 220ms ease, border-color 220ms ease, transform 220ms ease;
    position: relative;
}
.step-item:hover {
    background: rgba(12, 27, 42, 0.02);
}
.step-item--active {
    background: #fff;
    border-color: rgba(44, 115, 201, 0.18);
    box-shadow: 0 8px 30px -18px rgba(12, 27, 42, 0.24), 0 12px 34px -22px rgba(44, 115, 201, 0.26);
}
.step-item--active:hover {
    background: #fff;
}
.step-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 3px;
    border-radius: 3px;
    background: transparent;
    transition: background 220ms ease;
}
.step-item--active::before {
    background: linear-gradient(180deg, #2C73C9, rgba(44, 115, 201, 0.10));
}

/* Step indicator — number circle + progress line */
.step-item-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    gap: 0.5rem;
}
.step-item-number {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    background: #f6f7fb;
    color: #8BA1BD;
    border: 1px solid #E8EDF3;
    transition: background 220ms ease, color 220ms ease, box-shadow 220ms ease;
}
.step-item--active .step-item-number {
    background: #2C73C9;
    border-color: transparent;
    color: #fff;
    box-shadow: 0 8px 22px -10px rgba(44, 115, 201, 0.55);
}
.step-item:hover:not(.step-item--active) .step-item-number {
    border-color: #2C73C9;
    color: #2C73C9;
    background: #EFF6FF;
}

.step-item-line {
    width: 2px;
    flex: 1;
    min-height: 1rem;
    background: #E8EDF3;
    border-radius: 1px;
    transition: background 0.35s ease;
}
.step-item--active .step-item-line {
    background: linear-gradient(180deg, #2C73C9, transparent);
}
.step-item:last-child .step-item-line { display: none; }

/* Step content */
.step-item-content {
    flex: 1;
    padding-top: 0.15rem;
}

.step-item:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(44, 115, 201, 0.20);
}

/* ── Use Case Cards (dark section) ────────────────────────── */
.use-case-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 2rem;
    border-radius: 1.25rem;
    transition: all 0.3s ease;
}
.use-case-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(242, 59, 53, 0.22);
    box-shadow: 0 0 0 1px rgba(242, 59, 53, 0.12), 0 22px 70px -28px rgba(242, 59, 53, 0.22);
    transform: translateY(-4px);
}

.use-case-icon {
    width: 2.75rem;
    height: 2.75rem;
    background: rgba(44, 115, 201, 0.20);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: #60A5FA;
}

/* ── Testimonial Cards ────────────────────────────────────── */
.testimonial-card {
    display: flex;
    flex-direction: column;
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid #E8EDF3;
    background: #fff;
    transition: all 0.3s ease;
}
.testimonial-card:hover {
    border-color: #ff362f;
    box-shadow: 0 8px 34px -10px #ff362f;
}

/* ── Form Inputs ──────────────────────────────────────────── */
.form-input {
    width: 100%;
    padding: 0.875rem 1.25rem;
    background: #f8f9fb;
    border: 1.5px solid transparent;
    border-radius: 0.75rem;
    outline: none;
    font-size: 0.875rem;
    color: #0C1B2A;
    transition: all 0.2s ease;
}
.form-input::placeholder { color: #8BA1BD; }
.form-input:focus {
    background: #fff;
    border-color: #2C73C9;
    box-shadow: 0 0 0 4px rgba(44, 115, 201, 0.14);
}

/* ── Floating Animation ───────────────────────────────────── */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-14px); }
}
.floating-animation {
    animation: float 5s ease-in-out infinite;
    will-change: transform;
}

/* ── Footer glow ──────────────────────────────────────────── */
#download .relative.border:hover {
    border-color: rgba(44, 115, 201, 0.4);
}

/* ── Glass Nav — scroll state ─────────────────────────────── */
.glass-nav.is-scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 1px 0 rgba(12, 27, 42, 0.04), 0 8px 40px -16px rgba(12, 27, 42, 0.12);
    border-bottom-color: rgba(12, 27, 42, 0.06);
}

/* ── Scroll Reveal System ─────────────────────────────────── */
.rv {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 600ms cubic-bezier(0.2, 0.6, 0.3, 1),
                transform 700ms cubic-bezier(0.2, 0.6, 0.3, 1);
    will-change: opacity, transform;
}
.rv--left  { transform: translateX(-40px); }
.rv--right { transform: translateX(40px); }
.rv--scale { transform: scale(0.92); }
.rv--visible {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1);
}

/* Stagger children delays */
.rv-d1 { transition-delay: 80ms; }
.rv-d2 { transition-delay: 160ms; }
.rv-d3 { transition-delay: 240ms; }
.rv-d4 { transition-delay: 320ms; }
.rv-d5 { transition-delay: 400ms; }
.rv-d6 { transition-delay: 480ms; }

/* ── Hero entrance — plays once on load ───────────────────── */
@keyframes hero-fade-up {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}
.hero-anim {
    opacity: 0;
    animation: hero-fade-up 700ms cubic-bezier(0.2, 0.6, 0.3, 1) forwards;
}
.hero-anim-d1 { animation-delay: 100ms; }
.hero-anim-d2 { animation-delay: 220ms; }
.hero-anim-d3 { animation-delay: 380ms; }
.hero-anim-d4 { animation-delay: 520ms; }
.hero-anim-d5 { animation-delay: 650ms; }

/* ── Accessibility ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .floating-animation { animation: none !important; }
    .hero-anim { animation: none !important; opacity: 1 !important; }
    .rv { opacity: 1 !important; transform: none !important; transition: none !important; }
    .hero-blob { animation: none !important; }
    .btn-shine::before { display: none !important; }
    .steps-img { transition: none !important; filter: none !important; }
    .feature-card, .use-case-card, .testimonial-card,
    .store-btn-primary, .store-btn-outline { transition: none !important; }
}

.hero-chart-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.hero-chart {
  position: absolute;
  left: 2%;
  right: 2%;
  bottom: 0;
  height: 78%;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: clamp(10px, 1.5vw, 20px);
  padding: 0 clamp(12px, 2vw, 24px) 0;
  opacity: 0.32;
}

.hero-chart::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: rgba(12, 27, 42, 0.10);
}

.hero-chart-bar {
  width: min(100px, 10vw);
  min-width: 34px;
  border-radius: 14px 14px 0 0;
  height: 0;
  transform-origin: bottom;
  animation: heroBarGrow 1.2s cubic-bezier(.22,.9,.24,1) forwards;
  animation-delay: var(--delay);
  box-shadow: 0 10px 30px rgba(12, 27, 42, 0.04);
}

.hero-chart-bar.is-blue {
  background: linear-gradient(
    180deg,
    rgba(35, 118, 214, 0.32) 0%,
    rgba(35, 118, 214, 0.18) 100%
  );
  border: 1px solid rgba(35, 118, 214, 0.10);
}

.hero-chart-bar.is-red {
  background: linear-gradient(
    180deg,
    rgba(252, 55, 49, 0.26) 0%,
    rgba(252, 55, 49, 0.14) 100%
  );
  border: 1px solid rgba(252, 55, 49, 0.08);
}

@keyframes heroBarGrow {
  from {
    height: 0;
    opacity: 0;
  }
  to {
    height: var(--bar-height);
    opacity: 1;
  }
}

@media (max-width: 1024px) {
  .hero-chart {
    height: 58%;
    opacity: 0.12;
    gap: 18px;
  }

  .hero-chart-bar {
    width: min(72px, 11vw);
  }
}

@media (max-width: 640px) {
  .hero-chart {
    height: 42%;
    opacity: 0.09;
    gap: 10px;
  }

  .hero-chart-bar {
    width: min(44px, 12vw);
    min-width: 20px;
    border-radius: 10px 10px 0 0;
  }
}