@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #ffffff;
    color: #000000;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    height: 100vh;
    max-width: 1400px;
    background: radial-gradient(circle at center,
            rgba(139, 92, 246, 0.18) 0%,
            rgba(59, 130, 246, 0.12) 30%,
            rgba(236, 72, 153, 0.08) 60%,
            transparent 100%);
    pointer-events: none;
    z-index: 0;
}

/* iPad: Make cards stretch vertically */
@media (min-width: 768px) and (max-width: 1023px) {
    #bentoGrid {
        align-items: stretch;
    }

    #bentoGrid>div:nth-child(n+2):nth-child(-n+5) {
        height: 100%;
        min-height: 0;
    }
}

.slogan-container {
    position: relative;
    display: inline-block;
    min-height: 3.3em;
    overflow: hidden;
}

.slogan {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.slogan.active {
    position: relative;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.slogan.exit {
    opacity: 0;
    transform: translateY(-20px);
}

/* Word-level animation */
.slogan .word {
    display: inline-block;
    opacity: 0;
    transform: translateX(-24px);
    margin-right: 0.28em;
}

.slogan.active .word {
    animation: wordIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: var(--d, 0ms);
}

.slogan.exit .word {
    animation: wordOut 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: var(--d, 0ms);
}

@keyframes wordIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes wordOut {
    to {
        opacity: 0;
        transform: translateX(32px);
    }
}

/* Center icon burst */
.icon-burst {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    pointer-events: none;
}

.icon-burst i {
    position: absolute;
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.35);
    opacity: 0;
    animation: iconZoomSeq 4.5s ease-in-out forwards;
}

/* delays set inline via JS */

@keyframes iconZoomSeq {
    0% {
        opacity: 0;
        transform: scale(0.2);
    }

    45% {
        opacity: 1;
        transform: scale(1.4);
    }

    100% {
        opacity: 0;
        transform: scale(9);
    }
}

/* Icon grid wiggle */
.icon-grid {
    display: grid;
    place-items: center;
    width: 100%;
    pointer-events: none;
}

.icon-grid-inner {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    width: 100%;
    justify-items: center;
}

.icon-grid i {
    font-size: 2.2rem;
    color: rgba(255, 255, 255, 0.6);
    animation: iconWiggle 4s ease-in-out infinite;
}

.icon-grid i:nth-child(1) {
    animation-delay: 0s;
}

.icon-grid i:nth-child(2) {
    animation-delay: 0.2s;
}

.icon-grid i:nth-child(3) {
    animation-delay: 0.4s;
}

.icon-grid i:nth-child(4) {
    animation-delay: 0.6s;
}

.icon-grid i:nth-child(5) {
    animation-delay: 0.8s;
}

.icon-grid i:nth-child(6) {
    animation-delay: 1.0s;
}

.icon-grid i:nth-child(7) {
    animation-delay: 1.2s;
}

.icon-grid i:nth-child(8) {
    animation-delay: 1.4s;
}

.icon-grid i:nth-child(9) {
    animation-delay: 1.6s;
}

@keyframes iconWiggle {
    0% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0.75;
    }

    25% {
        transform: translate(4px, -6px) rotate(6deg);
        opacity: 1;
    }

    50% {
        transform: translate(-5px, 5px) rotate(-6deg);
        opacity: 0.85;
    }

    75% {
        transform: translate(3px, -4px) rotate(4deg);
        opacity: 1;
    }

    100% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0.75;
    }
}

/* Load animations */
.animate-slide-in-left {
    animation: slideInLeft 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-slide-in-right {
    animation: slideInRight 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-card-in {
    animation: cardIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Generoute image fade transition */
#generouteImage {
    transition: opacity 400ms ease-in-out;
}

/* Single-image pan via object-position (no clipping) */
.pan-single {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 0% center;
    animation: panObjPos 10s ease-in-out 6s infinite alternate both;
    will-change: object-position;
}

@keyframes panObjPos {

    0%,
    30% {
        object-position: 0% center;
    }

    45%,
    65% {
        object-position: 50% center;
    }

    80%,
    100% {
        object-position: 100% center;
    }
}

@keyframes slideInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

/* Subtle shake for feature icons (first five cards) */
.icon-shake {
    animation: iconShake 0.6s ease-in-out;
}

@keyframes iconShake {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    20% {
        transform: translate(3px, -2px) rotate(2deg);
    }

    40% {
        transform: translate(-3px, 2px) rotate(-2deg);
    }

    60% {
        transform: translate(2px, -1px) rotate(1.5deg);
    }

    80% {
        transform: translate(-2px, 1px) rotate(-1.5deg);
    }

    100% {
        transform: translate(0, 0) rotate(0deg);
    }
}

/* Tag highlight animation */
.tag-item {
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.tag-highlight {
    border-color: white !important;
    color: white !important;
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4), 0 0 40px rgba(255, 255, 255, 0.2);
}