/* ─────────────────────────────────────────────────────────────
   MAA Tech — Landing Page Stylesheet
   Colors: Purple #6C3FF5 | Cyan #00D9FF | BG #0A0A0A
   ───────────────────────────────────────────────────────────── */

/* ── Reset ── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ── Design tokens ── */
:root {
    --purple:      #6C3FF5;
    --purple-mid:  #8B5CF6;
    --cyan:        #00D9FF;
    --black:       #0A0A0A;
    --white:       #FFFFFF;
    --muted:       rgba(255, 255, 255, 0.45);

    --glass-bg:    rgba(255, 255, 255, 0.04);
    --glass-edge:  rgba(255, 255, 255, 0.10);
    --glass-shine: rgba(255, 255, 255, 0.28);
}

/* ── Base ── */
html {
    scroll-behavior: smooth;
}

body {
    background: var(--black);
    color: var(--white);
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ─────────────────────────────────────────────
   CONTAINER
───────────────────────────────────────────── */
.container {
    width: min(75%, 1100px);
    margin: 0 auto;
}

@media (max-width: 1100px) {
    .container {
        width: 88%;
    }
}

@media (max-width: 768px) {
    .container {
        width: 95%;
    }
}

/* ─────────────────────────────────────────────
   BACKGROUND ORBS
───────────────────────────────────────────── */
.orbs {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    isolation: isolate;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    animation: drift 16s ease-in-out infinite alternate;
}

.orb-1 {
    width: 640px;
    height: 640px;
    background: rgba(108, 63, 245, 0.38);
    top: -180px;
    left: -160px;
}

.orb-2 {
    width: 460px;
    height: 460px;
    background: rgba(0, 217, 255, 0.28);
    top: 60px;
    right: -140px;
    animation-delay: -6s;
}

.orb-3 {
    width: 380px;
    height: 380px;
    background: rgba(108, 63, 245, 0.22);
    bottom: 100px;
    left: 35%;
    animation-delay: -11s;
}

@keyframes drift {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(36px, 28px) scale(1.06); }
}

/* ─────────────────────────────────────────────
   GLASS UTILITY
───────────────────────────────────────────── */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid var(--glass-edge);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.glass::after {
    content: '';
    position: absolute;
    top: 0;
    left: 12%;
    right: 12%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--glass-shine), transparent);
    pointer-events: none;
    z-index: 2;
}

/* ─────────────────────────────────────────────
   SECTION SHARED
───────────────────────────────────────────── */
section {
    position: relative;
    z-index: 1;
    padding: 80px 0;
}

/* ─────────────────────────────────────────────
   SECTION HEADING
───────────────────────────────────────────── */
.section-head {
    text-align: center;
    margin-bottom: 56px;
}

.section-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--cyan);
    padding: 6px 16px;
    border: 1px solid rgba(0, 217, 255, 0.3);
    border-radius: 40px;
    background: rgba(0, 217, 255, 0.06);
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(26px, 3.5vw, 40px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.8px;
    color: var(--white);
    margin-bottom: 14px;
}

.section-sub {
    font-size: clamp(15px, 2vw, 18px);
    color: var(--muted);
    line-height: 1.6;
}

/* ─────────────────────────────────────────────
   CTA BUTTON
───────────────────────────────────────────── */
.cta-wrap {
    margin-top: 32px;
    display: flex;
    justify-content: center;
}

.cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 17px 42px;
    border-radius: 50px;
    background: linear-gradient(135deg, #6C3FF5, #8B5CF6);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    box-shadow:
        0 0 40px rgba(108, 63, 245, 0.55),
        0 0 80px rgba(108, 63, 245, 0.2),
        0 4px 24px rgba(0, 0, 0, 0.35);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cta:hover {
    transform: translateY(-2px);
    box-shadow:
        0 0 60px rgba(108, 63, 245, 0.7),
        0 0 120px rgba(108, 63, 245, 0.3),
        0 8px 32px rgba(0, 0, 0, 0.4);
}

.cta:active {
    transform: translateY(0);
}

/* ─────────────────────────────────────────────
   FADE-IN ANIMATION
───────────────────────────────────────────── */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ─────────────────────────────────────────────
   1 — HERO
───────────────────────────────────────────── */
.hero {
    padding: 100px 0 60px;
}

.hero-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.brand {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.38);
    margin-bottom: 40px;
}

.headline {
    font-size: clamp(28px, 4.2vw, 54px);
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -1.2px;
    text-align: center;
    margin-bottom: 22px;
    max-width: 100%;
    overflow-wrap: break-word;
}

.headline .grad {
    background: linear-gradient(90deg, var(--purple), var(--cyan), var(--purple), var(--cyan));
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradFlow 4s linear infinite;
}

@keyframes gradFlow {
    0%   { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

.sub {
    font-size: clamp(15px, 2vw, 18px);
    font-weight: 400;
    color: var(--muted);
    text-align: center;
    line-height: 1.6;
}

/* ─────────────────────────────────────────────
   2 — VSL
───────────────────────────────────────────── */
.vsl-section {
    padding: 0 0 80px;
}

.vsl-card {
    width: 100%;
    border-radius: 20px;
    box-shadow:
        0 0 80px 20px rgba(108, 63, 245, 0.25),
        0 0 160px 40px rgba(108, 63, 245, 0.10);
    overflow: hidden;
}

.vsl-card wistia-player {
    display: block;
    width: 100%;
}

/* ─────────────────────────────────────────────
   3 — TESTIMONIALS
───────────────────────────────────────────── */

/* 3a — Video testimonials */
.video-testi-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    max-width: 540px;
    margin: 0 auto 64px;
    perspective: 1000px;
}

.video-testi-card {
    border-radius: 18px;
    overflow: hidden;
    box-shadow:
        0 0 40px rgba(108, 63, 245, 0.2),
        0 20px 60px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.55s ease;
    will-change: transform;
}

/* Card 1 tilts left */
.video-testi-card:nth-child(1) {
    transform: rotateY(12deg) rotateX(3deg) rotate(-2deg);
    transform-origin: right center;
}

/* Card 2 tilts right */
.video-testi-card:nth-child(2) {
    transform: rotateY(-12deg) rotateX(3deg) rotate(2deg);
    transform-origin: left center;
}

/* Flat state — toggled on click */
.video-testi-card.is-flat,
.video-testi-card.is-flat:nth-child(1),
.video-testi-card.is-flat:nth-child(2) {
    transform: rotateY(0deg) rotateX(0deg) rotate(0deg);
    box-shadow:
        0 0 60px rgba(108, 63, 245, 0.35),
        0 30px 80px rgba(0, 0, 0, 0.6);
}

.video-testi-card wistia-player {
    display: block;
    width: 100%;
}

/* 3b — Pinterest masonry gallery */
.gallery-masonry {
    columns: 3;
    column-gap: 16px;
}

.gallery-card {
    break-inside: avoid;
    margin-bottom: 16px;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    display: block;
    transition: transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.38s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gallery-card img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 16px;
}

.gallery-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow:
        0 20px 56px rgba(108, 63, 245, 0.38),
        0 0 0 1px rgba(108, 63, 245, 0.35);
    z-index: 2;
    position: relative;
}

/* ─────────────────────────────────────────────
   4 — BOOKING
   No backdrop-filter — it creates a stacking
   context that kills iframe touch events on
   mobile Safari/Chrome. Simple border + bg only.
───────────────────────────────────────────── */
.booking-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 24px;
    padding: 32px;
    position: relative;
    box-shadow: 0 0 60px rgba(108, 63, 245, 0.12);
}

.booking-card::after {
    content: '';
    position: absolute;
    top: 0; left: 12%; right: 12%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
    pointer-events: none;
}

.booking-card iframe {
    display: block;
    width: 100%;
    min-height: 700px;
    border: none;
    border-radius: 12px;
}

/* Mobile booking button — hidden on desktop */
.booking-mobile {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
    padding: 48px 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 24px;
    box-shadow: 0 0 60px rgba(108, 63, 245, 0.12);
}

.booking-mobile-text {
    font-size: 17px;
    color: var(--muted);
    line-height: 1.6;
}

.booking-mobile-btn {
    font-size: 17px;
    padding: 18px 44px;
}

/* ─────────────────────────────────────────────
   LIGHTBOX
───────────────────────────────────────────── */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9000;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.open {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-img {
    max-width: 100%;
    max-height: 88vh;
    border-radius: 16px;
    object-fit: contain;
    box-shadow: 0 0 80px rgba(108, 63, 245, 0.4);
    transform: scale(0.88);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lightbox.open .lightbox-img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    transition: background 0.2s, transform 0.2s;
}

.lightbox-close:hover {
    background: rgba(108, 63, 245, 0.5);
    transform: scale(1.1);
}

/* ─────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────── */

/* Tablet ≤900px */
@media (max-width: 900px) {
    .gallery-masonry {
        columns: 2;
        column-gap: 12px;
    }
}

/* Mobile ≤600px */
@media (max-width: 600px) {
    .headline {
        letter-spacing: -0.8px;
    }

    .cta {
        padding: 15px 28px;
        font-size: 15px;
    }

    /* Video testimonials — keep 2 cols side by side, remove tilt */
    .video-testi-grid {
        grid-template-columns: 1fr 1fr;
        max-width: 100%;
        gap: 10px;
    }

    .video-testi-card:nth-child(1),
    .video-testi-card:nth-child(2) {
        transform: none;
    }

    .video-testi-card.is-flat,
    .video-testi-card.is-flat:nth-child(1),
    .video-testi-card.is-flat:nth-child(2) {
        transform: none;
    }

    /* Gallery — Pinterest 2-col on mobile */
    .gallery-masonry {
        columns: 2;
        column-gap: 10px;
    }

    .gallery-card {
        margin-bottom: 10px;
    }

    /* Booking — hide iframe, show button on mobile */
    .booking-desktop {
        display: none;
    }

    .booking-mobile {
        display: flex;
    }
}
