/* ═══════════════════════════════════════
   PREMIUM ANIMATIONS & OVERRIDES
   Glassmorphism, Glows, and New Sections
   ═══════════════════════════════════════ */

/* ── Glowing Background Orbs & Gradients ── */
.premium-bg {
    position: relative;
    z-index: 1;
}

/* Premium Geometric Grid Background */
.grid-bg {
    position: relative;
    z-index: 0;
}

.grid-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background-image:
        radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.5;
    mask-image: linear-gradient(to bottom, black 30%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 30%, transparent 100%);
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    pointer-events: none;
    z-index: -1;
    animation: float-slow 15s ease-in-out infinite alternate;
}

.glow-orb.orange {
    background: var(--orange);
}

.glow-orb.green {
    background: var(--green);
}

.glow-orb.top-left {
    top: -10%;
    left: -10%;
    width: 400px;
    height: 400px;
}

.glow-orb.bottom-right {
    bottom: -10%;
    right: -10%;
    width: 500px;
    height: 500px;
}

@keyframes float-slow {
    0% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(30px, 50px) scale(1.1);
    }

    100% {
        transform: translate(-20px, 20px) scale(0.95);
    }
}

/* ── Typography Enhancements ── */
.text-gradient {
    background: linear-gradient(135deg, #fff 0%, #d4d0c8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-orange {
    background: linear-gradient(135deg, #ff8555 0%, #ff6b35 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-green {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Glassmorphism Cards Overrides ── */
.stat-card,
.fix-card,
.price-card,
.testimonial-card,
.win-card,
.qual-card,
.speed-bar-visual {
    background: rgba(255, 255, 255, 0.03) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, border-color 0.4s ease !important;
    position: relative;
    overflow: hidden;
}

/* Internal card glow effect on hover */
.stat-card::after,
.fix-card::after,
.price-card::after,
.testimonial-card::after,
.win-card::after,
.qual-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.06), transparent 40%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
    z-index: 0;
}

.stat-card:hover::after,
.fix-card:hover::after,
.price-card:hover::after,
.testimonial-card:hover::after,
.win-card:hover::after,
.qual-card:hover::after {
    opacity: 1;
}

.stat-card>*,
.fix-card>*,
.price-card>*,
.testimonial-card>*,
.win-card>*,
.qual-card>*,
.speed-bar-visual>* {
    position: relative;
    z-index: 1;
}

/* Hover lifts with 3D perspective mapping */
.stat-card:hover,
.fix-card:hover,
.price-card:hover,
.testimonial-card:hover,
.win-card:hover,
.qual-card:hover,
.speed-bar-visual:hover {
    transform: perspective(1000px) rotateX(var(--rotate-x, 0deg)) rotateY(var(--rotate-y, 0deg)) scale(1.02) !important;
    box-shadow: 0 20px 40px 0 rgba(0, 0, 0, 0.4), 0 0 40px 0 rgba(255, 107, 53, 0.1) !important;
    border-color: rgba(255, 107, 53, 0.3) !important;
}

/* Base state for tilt */
.stat-card,
.fix-card,
.price-card,
.testimonial-card,
.win-card,
.qual-card,
.speed-bar-visual {
    transform: perspective(1000px) rotateX(0deg) rotateY(0deg) scale(1) !important;
    will-change: transform;
}

/* ── Magnetic Buttons Wrapper Base ── */
.btn {
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.3s, background 0.2s, border-color 0.2s;
    will-change: transform;
}

/* ── Animated Rotating Border (Fall-back approach) ── */
@property --border-angle {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}

.card-border-glow {
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 2px;
    background: conic-gradient(from var(--border-angle, 0deg), transparent 70%, var(--orange));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    z-index: 10;
    pointer-events: none;
    animation: spin-border 4s linear infinite;
}

@keyframes spin-border {
    to {
        --border-angle: 360deg;
    }
}

/* ── Floating Objects Keyframes ── */
@keyframes float-slow {
    0% {
        transform: translateY(0) rotate(0deg);
    }

    100% {
        transform: translateY(-20px) rotate(5deg);
    }
}

@keyframes float-medium {
    0% {
        transform: translateY(0) rotate(0deg);
    }

    100% {
        transform: translateY(15px) rotate(-10deg);
    }
}

/* ── Infinite Tools Marquee ── */
.marquee-wrapper {
    overflow: hidden;
    width: 100%;
    padding: 3rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    background: var(--navy-deep);
    position: relative;
}

.marquee-wrapper::before,
.marquee-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    width: 15%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.marquee-wrapper::before {
    left: 0;
    background: linear-gradient(to right, var(--navy-deep), transparent);
}

.marquee-wrapper::after {
    right: 0;
    background: linear-gradient(to left, var(--navy-deep), transparent);
}

.marquee-content {
    display: flex;
    width: max-content;
    animation: marquee 30s linear infinite;
    gap: 4rem;
    align-items: center;
}

.marquee-content:hover {
    animation-play-state: paused;
}

.marquee-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
}

.marquee-item:hover {
    color: var(--white);
}

.marquee-item svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
    opacity: 0.7;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* ── "Who This Is For" Section (Qualification) ── */
.qual-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 3rem;
}

.qual-card {
    padding: 2.5rem 2rem;
    border-radius: 20px;
}

.qual-card.for .qual-header {
    color: var(--green);
}

.qual-card.not-for .qual-header {
    color: var(--red);
}

.qual-header {
    font-family: var(--serif);
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.qual-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.qual-list li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    font-size: 1.05rem;
    color: var(--cream);
    line-height: 1.5;
}

.qual-list li .icon {
    flex-shrink: 0;
    margin-top: 0.1rem;
    font-size: 1.2rem;
}

/* ── Portfolio / Wins Section ── */
.wins-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.win-card {
    padding: 2rem;
    border-radius: 16px;
    text-align: left;
}

.win-industry {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--orange);
    font-weight: 700;
    margin-bottom: 1rem;
    display: inline-block;
    background: rgba(255, 107, 53, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

.win-metric {
    font-family: var(--serif);
    font-size: 2.8rem;
    color: var(--white);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.win-metric span {
    font-family: var(--sans);
    font-size: 1.2rem;
    color: var(--green);
    font-weight: 600;
    margin-left: 0.5rem;
}

.win-desc {
    color: var(--gray-mid);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.win-compare {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
}

.win-compare .before {
    color: var(--red);
    font-weight: 600;
}

.win-compare .arrow {
    color: var(--gray-dim);
}

.win-compare .after {
    color: var(--green);
    font-weight: 600;
}

/* ── Human Imagery Elements (Avatars & Headshots) ── */
.testimonial-author-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.t-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255, 107, 53, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
}

.t-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.founder-portrait {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    border: 3px solid rgba(255, 107, 53, 0.5);
    box-shadow: 0 0 40px rgba(255, 107, 53, 0.2), 0 10px 20px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    position: relative;
}

.founder-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ── Responsive Fixes ── */
@media (max-width: 768px) {
    .qual-grid {
        grid-template-columns: 1fr;
    }
}

/* Floating Image Animation */
.image-float {
    animation: float-img 6s ease-in-out infinite;
}

@keyframes float-img {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* Counter Animation class */
.counter-animate {
    display: inline-block;
}

/* ── Pro Hero Grid Layout ── */
.premium-hero {
    padding-top: 8rem;
    padding-bottom: 5rem;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
    align-items: center;
    position: relative;
    z-index: 10;
    padding: 0 2rem;
}

/* Hero Staggered Reveal */
.hero-content>* {
    opacity: 0;
    transform: translateY(30px);
    animation: hero-stagger 0.8s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

.hero-content>*:nth-child(1) {
    animation-delay: 0.1s;
}

.hero-content>*:nth-child(2) {
    animation-delay: 0.2s;
}

.hero-content>*:nth-child(3) {
    animation-delay: 0.3s;
}

.hero-content>*:nth-child(4) {
    animation-delay: 0.4s;
}

.hero-content>*:nth-child(5) {
    animation-delay: 0.5s;
}

.hero-visual {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
    animation: hero-stagger 1s cubic-bezier(0.23, 1, 0.32, 1) 0.4s forwards;
}

@keyframes hero-stagger {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.hero-content {
    max-width: 580px;
}

.hero-content h1 {
    font-family: var(--serif);
    font-size: clamp(3rem, 5vw, 4.5rem);
    font-weight: 400;
    line-height: 1.05;
    margin-bottom: 1.5rem;
}

.hero-content .subtitle {
    font-size: 1.15rem;
    color: var(--gray-mid);
    margin-bottom: 2.5rem;
    margin-left: 0;
    margin-right: 0;
}

.hero-content .hero-img,
.hero-content .hero-proof[style*="text-align: center"] {
    display: none;
    /* Hide if duplicated or keep in new structure */
}

/* ── CSS Browser Mockup (Replaces AI Image) ── */
.mockup-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    perspective: 1000px;
}

.css-mockup {
    width: 100%;
    height: 100%;
    background: rgba(15, 15, 26, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.1), 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: rotateY(-5deg) rotateX(5deg);
    transition: transform 0.5s ease;
}

.mockup-wrapper:hover .css-mockup {
    transform: rotateY(0deg) rotateX(0deg);
}

.mockup-header {
    height: 40px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    padding: 0 1rem;
    gap: 0.5rem;
}

.mockup-dots span {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
}

.mockup-dots span:nth-child(1) {
    background: #ef4444;
}

.mockup-dots span:nth-child(2) {
    background: #f59e0b;
}

.mockup-dots span:nth-child(3) {
    background: #10b981;
}

.mockup-body {
    flex: 1;
    padding: 2rem;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Speed comparison visualization inside mockup */
.mockup-speed-test {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mockup-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mockup-label {
    width: 80px;
    font-size: 0.8rem;
    color: var(--gray-dim);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
}

.mockup-bar-bg {
    flex: 1;
    height: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    overflow: hidden;
}

.mockup-bar-fill {
    height: 100%;
    border-radius: 6px;
    position: relative;
}

.mockup-bar-fill.slow {
    width: 85%;
    background: var(--red);
    box-shadow: 0 0 15px var(--red);
}

.mockup-bar-fill.fast {
    width: 15%;
    background: var(--green);
    box-shadow: 0 0 15px var(--green);
}

.mockup-time {
    font-family: var(--serif);
    font-size: 1.5rem;
    width: 60px;
    text-align: right;
}

.mockup-time.slow {
    color: var(--red);
}

.mockup-time.fast {
    color: var(--green);
}

/* Responsive Grid */
@media (max-width: 968px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content {
        margin: 0 auto;
    }

    .premium-hero {
        padding-top: 8rem;
    }
}