/* ═══════════════════════════════════════════════════
   DEVZIFY – Animations (CSS-only, zero dependencies)
   ═══════════════════════════════════════════════════ */

/* ── Hero entrance — GPU composited (translate3d) ── */
@keyframes heroIn {
    from { opacity: 0; transform: translate3d(0, 28px, 0); }
    to   { opacity: 1; transform: translate3d(0, 0, 0); }
}
.hero-eyebrow    { animation: heroIn 0.6s 0.1s  both cubic-bezier(0.4,0,0.2,1); will-change: transform, opacity; }
.hero-title      { animation: heroIn 0.7s 0.25s both cubic-bezier(0.4,0,0.2,1); will-change: transform, opacity; }
.hero-description{ animation: heroIn 0.7s 0.4s  both cubic-bezier(0.4,0,0.2,1); will-change: transform, opacity; }
.hero-actions    { animation: heroIn 0.6s 0.55s both cubic-bezier(0.4,0,0.2,1); will-change: transform, opacity; }
.hero-trust      { animation: heroIn 0.6s 0.65s both cubic-bezier(0.4,0,0.2,1); will-change: transform, opacity; }
.hero-mockup     { animation: heroIn 0.9s 0.3s  both cubic-bezier(0.4,0,0.2,1); will-change: transform, opacity; }

/* ── Scroll reveal — GPU composited ─────────────── */
.reveal-up,
.reveal-fade,
.reveal-left,
.reveal-right,
.reveal-scale {
    opacity: 0;
    will-change: transform, opacity;
}
.reveal-up    { transform: translate3d(0, 32px, 0); }
.reveal-left  { transform: translate3d(-32px, 0, 0); }
.reveal-right { transform: translate3d(32px, 0, 0); }
.reveal-scale { transform: scale3d(0.94, 0.94, 1); }

.revealed.reveal-up,
.revealed.reveal-fade,
.revealed.reveal-left,
.revealed.reveal-right,
.revealed.reveal-scale {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    transition: opacity 0.6s cubic-bezier(0.4,0,0.2,1),
                transform 0.6s cubic-bezier(0.4,0,0.2,1);
    will-change: auto;
}

/* ── Stagger children — GPU composited ──────────── */
.stagger-children > * {
    opacity: 0;
    transform: translate3d(0, 24px, 0);
    will-change: transform, opacity;
    transition: opacity 0.5s cubic-bezier(0.4,0,0.2,1),
                transform 0.5s cubic-bezier(0.4,0,0.2,1);
}
.stagger-children.revealed > *:nth-child(1)  { transition-delay: 0.00s; }
.stagger-children.revealed > *:nth-child(2)  { transition-delay: 0.07s; }
.stagger-children.revealed > *:nth-child(3)  { transition-delay: 0.14s; }
.stagger-children.revealed > *:nth-child(4)  { transition-delay: 0.21s; }
.stagger-children.revealed > *:nth-child(5)  { transition-delay: 0.28s; }
.stagger-children.revealed > *:nth-child(6)  { transition-delay: 0.35s; }
.stagger-children.revealed > * { opacity: 1; transform: translate3d(0,0,0); will-change: auto; }

/* ── Float animation — GPU composited ───────────── */
@keyframes float {
    0%, 100% { transform: translate3d(0, 0, 0); }
    50%       { transform: translate3d(0, -7px, 0); }
}
.hero-float { animation: heroIn 0.5s 0.8s both cubic-bezier(0.4,0,0.2,1), float 5s 1.3s ease-in-out infinite; will-change: transform; }

/* ── Ticker — GPU composited ─────────────────────── */
.ticker-track { animation: ticker 35s linear infinite; will-change: transform; }
@keyframes ticker { from { transform: translate3d(0,0,0); } to { transform: translate3d(-50%,0,0); } }

/* ── Loader bar ──────────────────────────────────── */
@keyframes loaderFill { to { width: 100%; } }

/* ── Scroll progress bar ─────────────────────────── */
.scroll-progress {
    position: fixed;
    top: 0; left: 0;
    height: 2px;
    width: 0%;
    background: var(--clr-primary);
    z-index: 9999;
    transition: width 0.1s linear;
}

/* ── Blink dot ───────────────────────────────────── */
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.3} }
.hero-eyebrow .dot { animation: blink 2.5s ease-in-out infinite; }

/* ── Accordion ───────────────────────────────────── */
.accordion-item {
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color var(--transition);
    margin-bottom: 0.75rem;
}
.accordion-item.open { border-color: var(--clr-border-2); }
.accordion-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    background: var(--clr-surface);
    font-family: var(--font-ui);
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--clr-text);
    text-align: left;
    transition: background var(--transition);
    cursor: pointer;
    border: none;
}
.accordion-trigger:hover { background: var(--clr-surface-2); }
.accordion-icon {
    width: 22px; height: 22px;
    border: 1px solid var(--clr-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.9rem;
    transition: transform var(--transition);
    color: var(--clr-primary);
}
.accordion-item.open .accordion-icon { transform: rotate(45deg); }
.accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4,0,0.2,1);
}
.accordion-item.open .accordion-body { max-height: 400px; }
.accordion-content {
    padding: 0 1.5rem 1.5rem;
    font-size: var(--fs-sm);
    color: var(--clr-text-3);
    line-height: 1.7;
}

/* ── Scroll arrow buttons ────────────────────────── */
.scroll-arrow {
    width: 28px; height: 28px;
    border: 1px solid var(--clr-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}
.scroll-arrow:hover { border-color: var(--clr-primary); color: var(--clr-primary); }

/* ── Ripple ──────────────────────────────────────── */
.ripple { position: relative; overflow: hidden; }
.ripple::after {
    content: '';
    position: absolute;
    width: 0; height: 0;
    background: rgba(0,0,0,0.08);
    border-radius: 50%;
    top: 50%; left: 50%;
    transform: translate(-50%,-50%) scale(0);
    opacity: 0;
}
.ripple:active::after {
    width: 200%; height: 200%;
    transform: translate(-50%,-50%) scale(1);
    opacity: 1;
    transition: transform 0s, opacity 0s;
}

/* ── Gradient border ─────────────────────────────── */
.gradient-border { position: relative; background: var(--clr-surface); border-radius: var(--radius-lg); }
.gradient-border::before {
    content: '';
    position: absolute;
    inset: -1px;
    background: var(--grad-primary);
    border-radius: inherit;
    z-index: -1;
    opacity: 0.4;
    transition: opacity var(--transition);
}
.gradient-border:hover::before { opacity: 0.8; }

/* ── Prefers reduced motion ──────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }
    .reveal-up,.reveal-fade,.reveal-left,.reveal-right,.reveal-scale {
        opacity: 1 !important;
        transform: none !important;
    }
}
