/* ═══════════════════════════════════════════════════════════════
   Aura Colectiva — Landing Page Styles
   Separated from index.php for SoC compliance.
   Uses design tokens via CSS custom properties.
   ═══════════════════════════════════════════════════════════════ */

/* ── Design Tokens (CSS Custom Properties) ──────────────────── */
:root {
    --color-primary: #3c405a;
    --color-primary-light: #5a5e7b;
    --color-accent: #dca773;
    --color-accent-hover: #c4914e;
    --color-blue-accent: #2fa4e7;
    --color-bg-light: #f0f0f0;
    --color-bg-dark: #1a1b26;
    --color-card-dark: #24283b;
    --color-text-light: #333333;
    --color-text-dark: #c0caf5;

    --color-celeste: #2fa4e7;
    --color-amarillo: #fff200;
    --color-naranja: #ff972f;

    --font-display: 'Inter', sans-serif;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-2xl: 32px;

    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.08);
    --shadow-elevated: 0 25px 50px -12px rgba(0, 0, 0, 0.15);

    --transition-base: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

body {
    font-family: var(--font-display);
    overflow-x: hidden;
}

/* ── 1. PRELOADER ───────────────────────────────────────────── */
.preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background-color: var(--color-bg-dark);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease-out;
    will-change: opacity;
}

#icon-display {
    font-size: 5.5rem;
    margin-bottom: 2.5rem;
    filter: drop-shadow(0 0 15px var(--color-blue-accent));
    transition: all 0.2s ease;
    user-select: none;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

.progress-wrapper {
    width: 320px;
    max-width: 80%;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    position: relative;
    overflow: visible;
}

#progress-bar {
    width: 0%;
    height: 100%;
    background: var(--color-blue-accent);
    border-radius: 20px;
    box-shadow: 0 0 20px var(--color-blue-accent);
    transition: width 0.1s linear, background-color 0.2s ease, box-shadow 0.2s ease;
}

.particle {
    position: absolute;
    background: white;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
}

@keyframes rise {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0.8;
    }

    100% {
        transform: translateY(-140px) scale(0);
        opacity: 0;
    }
}



/* Lock body during preloader */
body.is-loading {
    overflow: hidden;
    height: 100vh;
}

/* ── 2. HERO VIDEO SCROLL ──────────────────────────────────── */
.hero-scroll {
    position: relative;
    min-height: 280vh;
    background: var(--color-bg-dark);
}

.hero-scroll__sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-scroll__grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 12px;
    width: 90vw;
    max-width: 1200px;
    height: 80vh;
    position: relative;
}

.hero-scroll__scaler {
    grid-column: 2 / 5;
    grid-row: 1 / 4;
    position: relative;
    z-index: 10;
    overflow: hidden;
    border-radius: var(--radius-xl);
    will-change: transform;
}

.hero-scroll__scaler video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-scroll__thumb {
    overflow: hidden;
    border-radius: var(--radius-lg);
    opacity: 0;
    transform: scale(0);
    will-change: transform, opacity;
}

.hero-scroll__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Thumbnail grid positions */
.hero-scroll__thumb--1 {
    grid-column: 1;
    grid-row: 1;
}

.hero-scroll__thumb--2 {
    grid-column: 1;
    grid-row: 2;
}

.hero-scroll__thumb--3 {
    grid-column: 1;
    grid-row: 3;
}

.hero-scroll__thumb--4 {
    grid-column: 5;
    grid-row: 1;
}

.hero-scroll__thumb--5 {
    grid-column: 5;
    grid-row: 2;
}

.hero-scroll__thumb--6 {
    grid-column: 5;
    grid-row: 3;
}

.hero-scroll__thumb--7 {
    grid-column: 2;
    grid-row: 1;
    z-index: 5;
}

.hero-scroll__thumb--8 {
    grid-column: 4;
    grid-row: 1;
    z-index: 5;
}

/* ── 3. SCROLL TEXT LINES ──────────────────────────────────── */
.text-lines {
    padding: 8rem 0;
    overflow: hidden;
    background: var(--color-bg-dark);
    position: relative;
}

.text-lines::before,
.text-lines::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 120px;
    z-index: 2;
    pointer-events: none;
}

.text-lines::before {
    top: 0;
    background: linear-gradient(to bottom, var(--color-bg-dark), transparent);
}

.text-lines::after {
    bottom: 0;
    background: linear-gradient(to top, var(--color-bg-dark), transparent);
}

.text-lines__row {
    display: flex;
    gap: 2rem;
    white-space: nowrap;
    will-change: transform;
    padding: 0.5rem 0;
}

.text-lines__row span {
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    transition: opacity 0.3s ease;
    flex-shrink: 0;
}

.text-lines__row span.is-accent {
    color: var(--color-naranja);
}

.text-lines__row span.is-blue {
    color: var(--color-celeste);
}

.text-lines__row span.is-white {
    color: #ffffff;
}

.text-lines__row span.is-gradient {
    background: linear-gradient(135deg, var(--color-blue-accent), #473F99);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── 4. SCROLL-TRIGGERED CARDS ─────────────────────────────── */
.features {
    padding: 6rem 0;
    background: var(--color-bg-light);
}

.feature-card {
    opacity: 0;
    transform: translateY(60px);
    will-change: transform, opacity;
    transition: box-shadow var(--transition-base);
}

.feature-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.feature-card:hover {
    transform: translateY(-8px) !important;
    box-shadow: var(--shadow-elevated);
}

/* ── 5. HORIZONTAL SCROLL GALLERY ──────────────────────────── */
.gallery-scroll__header-outer {
    text-align: center;
    padding: 6rem 0 2rem;
    background: var(--color-bg-dark);
}

.gallery-scroll {
    position: relative;
    height: 350vh;
    background: var(--color-bg-dark);
}

.gallery-scroll__sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}



.gallery-scroll__track-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 0 2rem;
}

.gallery-scroll__track {
    display: flex;
    gap: 1.5rem;
    will-change: transform;
}

.gallery-scroll__item {
    flex-shrink: 0;
    width: 380px;
    height: 520px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    position: relative;
}

.gallery-scroll__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.gallery-scroll__item:hover img {
    transform: scale(1.05);
}

.gallery-scroll__item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    color: white;
}

.gallery-scroll__item-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.gallery-scroll__item-subtitle {
    font-size: 0.875rem;
    opacity: 0.7;
}

/* ── CTA SECTION ───────────────────────────────────────────── */
.cta-section {
    background: var(--color-bg-dark);
}

.cta-blob {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    animation: blob-float 15s ease-in-out infinite alternate;
}

.cta-blob--delay {
    animation-delay: 2s;
    animation-duration: 20s;
}

@keyframes blob-float {
    0% {
        transform: scale(1) translate(0, 0) rotate(0deg);
    }

    33% {
        transform: scale(1.1) translate(30px, -50px) rotate(10deg);
    }

    66% {
        transform: scale(0.9) translate(-20px, 20px) rotate(-5deg);
    }

    100% {
        transform: scale(1.2) translate(50px, 50px) rotate(15deg);
    }
}

.floating-particle {
    animation: float-particle 6s ease-in-out infinite;
}

.floating-particle-reverse {
    animation: float-particle 8s ease-in-out infinite reverse;
}

@keyframes float-particle {

    0%,
    100% {
        transform: translateY(0) translateX(0);
    }

    50% {
        transform: translateY(-30px) translateX(15px);
    }
}

/* FLIP CARD EFFECTS */
#contact-flip-card.is-flipped {
    transform: rotateY(180deg);
}

.flip-front,
.flip-back {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* ── SHARED UTILITIES ──────────────────────────────────────── */
.gradient-text {
    background: linear-gradient(135deg, var(--color-blue-accent) 0%, #473F99 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── ANIMATED LOGO CSS ─────────────────────────────────────────── */
.logo-container {
    width: 200px;
    max-width: 100%;
}

.logo-part {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    transform-origin: center;
}

.animate-in {
    animation: popIn 0.6s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.8);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.hero-gradient {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-bg-dark) 50%, var(--color-card-dark) 100%);
}

.card-hover {
    transition: all var(--transition-base);
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-elevated);
}

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 768px) {
    .hero-scroll__grid {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(3, 1fr);
        gap: 8px;
    }

    .hero-scroll__scaler {
        grid-column: 1 / 4;
        grid-row: 1 / 3;
    }

    .hero-scroll__thumb--1 {
        grid-column: 1;
        grid-row: 3;
    }

    .hero-scroll__thumb--2 {
        grid-column: 2;
        grid-row: 3;
    }

    .hero-scroll__thumb--3 {
        grid-column: 3;
        grid-row: 3;
    }

    .hero-scroll__thumb--4,
    .hero-scroll__thumb--5,
    .hero-scroll__thumb--6,
    .hero-scroll__thumb--7,
    .hero-scroll__thumb--8 {
        display: none;
    }

    .text-lines__row span {
        font-size: clamp(1.8rem, 5vw, 3rem);
    }

    .gallery-scroll__item {
        width: 320px;
        height: 440px;
    }

    .gallery-scroll {
        height: 250vh;
    }


}

@media (max-width: 480px) {
    .gallery-scroll__item {
        width: 280px;
        height: 400px;
    }
}