/**
 * Landing antigravity / 3D motion layer
 * Works with marketing.css — brand-first hero atmosphere.
 */
:root {
    --font-display: 'Plus Jakarta Sans', system-ui, sans-serif;
    --font-body: 'DM Sans', system-ui, sans-serif;
}

body {
    font-family: var(--font-body);
}

h1, h2, h3, h4, h5, h6,
.hero-brand,
.split-title,
.section-title,
.brand-name {
    font-family: var(--font-display);
    letter-spacing: -0.025em;
}

/* ---- Antigravity hero (plain, clean) ---- */
.hero--antigravity {
    position: relative;
    min-height: min(82vh, 760px);
    display: flex;
    align-items: center;
    padding: 72px 0 56px;
    overflow: hidden;
    background: #fff;
}

@keyframes agFloat {
    0%, 100% { transform: translate3d(var(--ag-x, 0px), var(--ag-y, 0px), 0); }
    50% { transform: translate3d(var(--ag-x, 0px), calc(var(--ag-y, 0px) - 12px), 0); }
}

.hero-brand {
    font-size: clamp(1.2rem, 2vw, 1.55rem);
    font-weight: 700;
    color: var(--brand-purple, var(--accent));
    margin: 0 0 12px;
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.hero--antigravity .hero-copy h1,
.hero--antigravity .split-title {
    font-size: clamp(2rem, 4vw, 2.95rem);
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -0.035em;
}

.hero--antigravity .hero-lead {
    max-width: 32rem;
    font-size: 1.02rem;
    line-height: 1.65;
    color: var(--ink-muted);
}

.hero--antigravity .container {
    z-index: 1;
}

/* Stage — flat stacking (no preserve-3d) so z-index is respected and
   nothing paints behind the tilted panel plane. */
.ag-stage {
    position: relative;
    perspective: 1200px;
    padding: 0 8px;
}

.ag-panel {
    border-radius: 16px;
    box-shadow:
        0 20px 48px -24px rgba(15, 23, 42, 0.24),
        0 0 0 1px rgba(15, 23, 42, 0.04);
    transform: rotateY(-4deg) rotateX(2deg);
    transition: box-shadow 0.35s ease;
}

.ag-stage:hover .ag-panel {
    box-shadow:
        0 28px 56px -24px rgba(15, 23, 42, 0.32),
        0 0 0 1px color-mix(in srgb, var(--brand-purple, var(--accent)) 12%, transparent);
}

.hero--antigravity .hero-dashboard-wrap {
    position: relative;
    z-index: 2;
}

.hero--antigravity .preview-float {
    animation: agPanelFloat 6.5s ease-in-out infinite;
}

@keyframes agPanelFloat {
    0%, 100% { transform: translate3d(var(--ag-x, 0px), var(--ag-y, 0px), 0); }
    50% { transform: translate3d(var(--ag-x, 0px), calc(var(--ag-y, 0px) - 14px), 0); }
}

.ag-chip {
    position: absolute;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--border);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ink);
    backdrop-filter: blur(8px);
    will-change: transform;
    animation: agChipFloat 6.5s ease-in-out infinite;
}

.ag-chip i {
    color: var(--brand-red, var(--accent));
    font-size: 1.05rem;
}

/* Chips sit at the side edges, vertically clear of top/bottom product rows */
.ag-chip-1 {
    top: 42%;
    left: 0;
    animation-delay: 0s;
}

.ag-chip-3 {
    top: 58%;
    right: 0;
    animation-delay: -2.4s;
    animation-duration: 7s;
}

@keyframes agChipFloat {
    0%, 100% { transform: translate3d(var(--ag-x, 0px), var(--ag-y, 0px), 0) rotate(-1deg); }
    50% { transform: translate3d(var(--ag-x, 0px), calc(var(--ag-y, 0px) - 12px), 0) rotate(1deg); }
}

/* ---- 3D checkout scene ---- */
.ag-checkout {
    position: relative;
    z-index: 2;
    perspective: 1200px;
}

/* The inner scene is the containing block for the floats (the checkout
   wrap and this element both carry transforms). Row space for the floats
   is reserved HERE so top/bottom offsets land beside the panel, not on it. */
.ag-scene-inner {
    position: relative;
    padding: 74px 0 84px;
}

.pos-mini {
    position: relative;
    z-index: 1;
    max-width: 320px;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    padding: 18px 18px 16px;
    font-size: 0.9rem;
    border: 1px solid var(--border);
}

.pos-mini-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.pos-mini-title {
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--ink);
}

.pos-mini-title i { color: var(--brand-purple, var(--accent)); }

.pos-mini-till {
    font-size: 0.72rem;
    color: var(--ink-light);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 3px 9px;
    white-space: nowrap;
}

.pos-mini-lines {
    min-height: 96px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pos-mini-empty {
    color: var(--ink-light);
    font-size: 0.82rem;
    padding: 8px 2px;
    transition: opacity 0.3s ease;
}

.pos-mini.has-items .pos-mini-empty { display: none; }

.pos-mini-line {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 10px;
    border-radius: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    font-size: 0.83rem;
}

.pos-mini-line.is-in {
    display: flex;
    animation: agLineIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

@keyframes agLineIn {
    from { opacity: 0; transform: translateY(-10px) scale(0.94); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.pos-mini-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 12px 0 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--border);
    font-weight: 700;
    color: var(--ink);
}

.pos-mini-total strong {
    font-size: 1.15rem;
    color: var(--brand-purple, var(--accent));
    font-variant-numeric: tabular-nums;
}

.pos-mini-pay {
    display: block;
    text-align: center;
    background: var(--cta, var(--brand-red, var(--accent)));
    color: #fff;
    font-weight: 700;
    border-radius: 12px;
    padding: 10px;
    font-size: 0.88rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pos-mini-pay.is-paying {
    animation: agPayPulse 0.5s ease;
    box-shadow: 0 10px 26px color-mix(in srgb, var(--brand-red, #fb0c3a) 45%, transparent);
}

@keyframes agPayPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(0.96); }
}

/* Floating product cards */
.ag-product {
    position: absolute;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 9px 12px;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14);
    backdrop-filter: blur(8px);
    cursor: pointer;
    will-change: transform, opacity;
    animation: agChipFloat 6s ease-in-out infinite;
    transition: opacity 0.4s ease, box-shadow 0.25s ease;
}

.ag-product:hover {
    box-shadow: 0 20px 44px rgba(29, 78, 216, 0.22);
}

.ag-product-icon { font-size: 1.35rem; }

.ag-product-info {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.ag-product-info strong { font-size: 0.8rem; color: var(--ink); }
.ag-product-info small { font-size: 0.74rem; color: var(--ink-light); }

.ag-product-add {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--cta, var(--brand-red, var(--accent)));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex: none;
}

/* Product cards in their own rows above and below the panel — never on it */
.ag-product-1 { top: 0; left: 2%; animation-delay: -0.6s; }
.ag-product-2 { top: 0; right: 2%; animation-delay: -2.1s; animation-duration: 6.8s; }
.ag-product-3 { bottom: 4px; left: 2%; animation-delay: -3.4s; animation-duration: 7.4s; }

/* Product flying into the cart */
.ag-product.is-flying {
    animation: none;
    transition: transform 0.55s cubic-bezier(0.5, -0.1, 0.3, 1), opacity 0.55s ease;
    opacity: 0;
    pointer-events: none;
    z-index: 5;
}

.ag-product.is-gone {
    visibility: hidden;
    pointer-events: none;
}

/* Receipt / success chip — bottom row, opposite the third product */
.ag-receipt {
    position: absolute;
    z-index: 6;
    right: 2%;
    bottom: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid #bbf7d0;
    border-radius: 14px;
    padding: 10px 14px;
    box-shadow: 0 14px 32px rgba(22, 163, 74, 0.16);
    opacity: 0;
    transform: translateY(14px) scale(0.9);
    pointer-events: none;
}

.ag-receipt.is-shown {
    animation: agReceiptPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes agReceiptPop {
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.ag-receipt i { color: #16a34a; font-size: 1.4rem; }

.ag-receipt-text { display: flex; flex-direction: column; line-height: 1.25; }
.ag-receipt-text strong { font-size: 0.82rem; color: var(--ink); }
.ag-receipt-text small { font-size: 0.72rem; color: var(--ink-light); }

/* Narrow desktops: side gap is too small for chips — hide them */
@media (max-width: 1199.98px) and (min-width: 992px) {
    .ag-chip-1,
    .ag-chip-3 {
        display: none;
    }
}

@media (max-width: 991px) {
    .ag-product {
        animation: none;
    }

    .ag-stage {
        padding: 0;
    }

    .ag-scene-inner {
        padding: 64px 0 74px;
    }

    .ag-product-1 { top: 0; left: 0; }
    .ag-product-2 { top: 0; right: 0; }
    .ag-product-3 { bottom: 4px; left: 0; }

    .ag-receipt { right: 0; bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .ag-product,
    .pos-mini-line.is-in,
    .ag-receipt.is-shown,
    .pos-mini-pay.is-paying {
        animation: none !important;
    }

    .ag-receipt.is-shown { opacity: 1; transform: none; }
}

/* ---- Sections: plain backgrounds, no decor ---- */
.ag-scene {
    position: relative;
}

/* Clean card hover — lift only, no 3D twist */
.feature-tile,
.capability--fx,
.deploy-card,
.industry-cell,
.store-card--fx,
.pricing-mobile-card,
.deploy-sync-bridge {
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.feature-tile:hover,
.deploy-card:hover,
.industry-cell:hover,
.store-card--fx:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px -18px rgba(15, 23, 42, 0.16);
}

/* ---- Professional polish overrides ---- */
.site-nav {
    padding: 14px 0;
    background: rgba(255, 255, 255, 0.94);
}

.site-nav.scrolled {
    box-shadow: 0 1px 0 var(--border);
}

.nav-links {
    gap: 22px;
}

.nav-dropdown-panel {
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.1);
    border-color: #e8ecf1;
}

.nav-dropdown-item {
    border-radius: 10px;
    padding: 10px;
}

.nav-dropdown-icon {
    width: 38px;
    height: 38px;
}

.btn-nav,
.btn-lg-custom {
    border-radius: 8px;
}

.btn-nav-primary,
.btn-solid {
    box-shadow: none;
}

.btn-solid:hover {
    box-shadow: 0 6px 16px rgba(251, 12, 58, 0.2);
}

.btn-magnetic {
    transform: none !important;
}

.section {
    padding: 96px 0;
}

.section-alt {
    background: #fafbfc;
}

.section-eyebrow {
    letter-spacing: 0.06em;
    color: var(--brand-purple, var(--accent));
}

.feature-tile,
.deploy-card,
.industry-cell,
.store-card,
.pricing-mobile-card {
    border-radius: 12px;
}

.feature-tile {
    box-shadow: none;
}

.feature-tile:hover {
    border-color: color-mix(in srgb, var(--brand-purple, var(--accent)) 18%, var(--border));
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.hero-trust-strip {
    border-top: 1px solid var(--border);
    background: #fff;
    padding: 20px 0;
}

.hero-trust-strip .hero-stats {
    gap: 8px;
}

.marquee-strip {
    opacity: 0.85;
}

.ag-product {
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.1);
    border-radius: 12px;
}

.pos-mini-pay {
    border-radius: 10px;
}

/* ---- Section demos (features / deployment) ---- */
.ag-stage--section {
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.ag-demo {
    position: relative;
    z-index: 2;
    perspective: 1200px;
}

.ag-float-chip {
    position: absolute;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ink);
    will-change: transform;
    animation: agChipFloat 6.5s ease-in-out infinite;
}

.ag-float-chip i {
    color: var(--brand-red, var(--accent));
    font-size: 1.05rem;
}

.ag-float-chip--tl { top: 0; left: 0; }
.ag-float-chip--tr { top: 0; right: 0; animation-delay: -1.4s; }
.ag-float-chip--bl { bottom: 0; left: 0; animation-delay: -2.6s; }
.ag-float-chip--br { bottom: 0; right: 0; animation-delay: -3.2s; }

.demo-panel {
    position: relative;
    z-index: 1;
    max-width: 340px;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    padding: 18px;
    border: 1px solid var(--border);
    font-size: 0.9rem;
}

.demo-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
    font-weight: 700;
    color: var(--ink);
}

.demo-panel-head i {
    color: var(--brand-purple, var(--accent));
    margin-right: 4px;
}

.demo-panel-badge {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--ink-light);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 3px 9px;
    white-space: nowrap;
}

.demo-panel-badge.is-offline {
    color: #b45309;
    background: #fff7ed;
    border-color: #fed7aa;
}

.demo-panel-badge.is-syncing {
    color: var(--brand-purple, var(--accent));
    background: color-mix(in srgb, var(--brand-purple, var(--accent)) 8%, #fff);
    border-color: color-mix(in srgb, var(--brand-purple, var(--accent)) 18%, var(--border));
}

.demo-branch-list,
.demo-sync-steps {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 132px;
}

.demo-branch,
.demo-sync-step {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    border-radius: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    font-size: 0.84rem;
    opacity: 0.45;
    transition: opacity 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.demo-branch.is-active,
.demo-sync-step.is-active {
    opacity: 1;
    border-color: color-mix(in srgb, var(--brand-purple, var(--accent)) 22%, var(--border));
    background: #fff;
}

.demo-branch.is-pulse {
    animation: agLineIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.demo-branch-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e1;
    flex: none;
}

.demo-branch.is-active .demo-branch-dot {
    background: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

.demo-branch-name,
.demo-sync-step span {
    flex: 1;
    color: var(--ink-muted);
    min-width: 0;
}

.demo-branch-sales,
.demo-sync-step strong,
.demo-panel-total strong {
    font-variant-numeric: tabular-nums;
    color: var(--brand-purple, var(--accent));
    font-weight: 700;
}

.demo-sync-step i {
    color: var(--brand-red, var(--accent));
    font-size: 1.05rem;
}

.demo-sync-step.is-done {
    opacity: 1;
}

.demo-sync-step.is-done i {
    color: #16a34a;
}

.demo-panel-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--border);
    font-weight: 600;
    color: var(--ink);
}

.demo-panel-total strong {
    font-size: 1.1rem;
}

.ag-toast {
    position: absolute;
    z-index: 6;
    right: 2%;
    bottom: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 9px 12px;
    box-shadow: 0 12px 28px rgba(22, 163, 74, 0.14);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ink);
    opacity: 0;
    transform: translateY(12px) scale(0.94);
    pointer-events: none;
}

.ag-toast i {
    color: #16a34a;
    font-size: 1.15rem;
}

.ag-toast.is-shown {
    animation: agReceiptPop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.ag-float-chip.is-dim {
    opacity: 0.4;
}

.ag-float-chip.is-hot {
    border-color: color-mix(in srgb, var(--brand-red, #fb0c3a) 30%, var(--border));
    box-shadow: 0 10px 24px rgba(251, 12, 58, 0.12);
}

@media (max-width: 991px) {
    .ag-stage--section .ag-float-chip--bl {
        display: none;
    }

    .ag-stage--section .ag-scene-inner {
        padding: 58px 0 64px;
    }
}

/* Trust strip under hero */
.hero-trust-strip .hero-stats {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

/* Feature cards subtle lift on scroll sections */
.feature-card,
.industry-card,
.pricing-card {
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
}

.feature-card:hover,
.industry-card:hover,
.pricing-card:hover {
    transform: translateY(-6px);
}

@media (max-width: 991px) {
    .hero--antigravity {
        min-height: auto;
        padding: 48px 0 36px;
    }

    .ag-chip-1,
    .ag-chip-3 {
        display: none;
    }

    .ag-panel {
        transform: none;
    }

    .hero--antigravity .preview-float {
        animation: none;
    }

    .hero-trust-strip .hero-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (prefers-reduced-motion: reduce) {
    .ag-chip,
    .hero--antigravity .preview-float {
        animation: none !important;
    }

    .ag-panel {
        transform: none !important;
    }
}
