/* assets/css/main.css */
@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
    --primary-color: #0d6efd;
    --secondary-color: #003366;
    --hover-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    --timing-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    overflow-x: hidden;
    /* Prevent horizontal scroll from GSAP animations */
    background:
        linear-gradient(180deg, #ffffff 0%, #f8fbff 44%, #ffffff 100%);
    color: #1f2937;
}

.site-nav {
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
}

.hero-section {
    background:
        radial-gradient(circle at 12% 18%, rgba(13, 110, 253, 0.12), transparent 28rem),
        radial-gradient(circle at 78% 12%, rgba(16, 185, 129, 0.12), transparent 24rem),
        linear-gradient(180deg, #f8fbff 0%, #ffffff 72%);
}

.hero-section::after {
    content: "";
    position: absolute;
    right: -8rem;
    top: 12rem;
    width: 28rem;
    height: 28rem;
    border: 1px solid rgba(13, 110, 253, 0.12);
    border-radius: 999px;
    pointer-events: none;
}

.trust-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(203, 213, 225, 0.8);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.86);
    color: #334155;
    font-size: 0.88rem;
    font-weight: 800;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.trust-chip svg {
    color: var(--primary-color);
}

.hero-visual-card {
    position: relative;
    padding: 1.25rem;
    border: 1px solid rgba(203, 213, 225, 0.78);
    border-radius: 2rem;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.9)),
        radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.16), transparent 34%);
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.12);
    overflow: hidden;
}

.hero-visual-card::before {
    content: "";
    position: absolute;
    inset: 1rem;
    border: 1px solid rgba(13, 110, 253, 0.08);
    border-radius: 1.5rem;
    pointer-events: none;
}

.hero-availability-card {
    position: absolute;
    left: 1.5rem;
    right: 1.5rem;
    bottom: 1.5rem;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(14px);
}

.hero-rating-card {
    top: 2rem;
    left: -1.25rem;
    bottom: auto;
    z-index: 4;
    max-width: 13.5rem;
}

.stats-band {
    background: linear-gradient(90deg, #ffffff, #f8fbff 45%, #ffffff);
}

.stat-tile {
    min-height: 7rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, 0.78);
}

/* Skeleton Loaders */
.skeleton {
    background: #f3f4f6;
    background: linear-gradient(110deg, #ececec 8%, #f5f5f5 18%, #ececec 33%);
    background-size: 200% 100%;
    animation: shimmer 1.5s linear infinite;
}

@keyframes shimmer {
    to {
        background-position-x: -200%;
    }
}

/* Blur-up Lazy Loading */
.blur-up {
    filter: blur(12px);
    transition: filter 0.5s var(--timing-smooth);
}

.blur-up.loaded {
    filter: blur(0);
}

/* Slot Cards 3D effect base */
.slot-wrapper {
    perspective: 1000px;
}

.slot-card {
    transform-style: preserve-3d;
    transition: transform 0.3s var(--timing-smooth), box-shadow 0.3s var(--timing-smooth);
}

.slot-card:hover:not(:disabled) {
    transform: translateY(-4px) scale(1.03);
    box-shadow: var(--hover-shadow);
}

.slot-card.selected {
    /* Flipped state handled by GSAP */
}

/* Interactive CTA */
.primary-cta {
    transition: transform 0.3s var(--timing-smooth), box-shadow 0.3s var(--timing-smooth);
}

.primary-cta:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: var(--hover-shadow);
}

/* Ripple Effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    animation: ripple-effect 0.6s linear;
    background-color: rgba(255, 255, 255, 0.4);
}

@keyframes ripple-effect {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Form Validation */
.input-valid {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2) !important;
}

.input-invalid {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2) !important;
}

/* Toasts */
.toast-success {
    border-left: 4px solid #10b981;
}

.toast-error {
    border-left: 4px solid #ef4444;
}

/* Booking Sidebar Panel */
#booking-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    height: 100dvh;
    width: 100%;
    max-width: 480px;
    background: white;
    z-index: 100;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    /* Hidden initially */
    overflow-y: auto;
}

@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .pb-safe {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

.overlay-bg {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 90;
    opacity: 0;
    pointer-events: none;
}

/* Scroll animated booking panel */
.booking-scroll-section {
    min-height: 130vh;
    padding: 7rem 0 9rem;
    perspective: 1000px;
}

.booking-scroll-section::before {
    content: "";
    position: absolute;
    inset: 8% -10% auto;
    height: 34rem;
    background:
        radial-gradient(circle at 20% 30%, rgba(13, 110, 253, 0.16), transparent 34%),
        radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.12), transparent 30%),
        linear-gradient(180deg, rgba(224, 242, 254, 0.65), rgba(255, 255, 255, 0));
    pointer-events: none;
}

.booking-scroll-stage {
    position: sticky;
    top: 6rem;
    transform-style: preserve-3d;
}

.booking-scroll-copy,
.booking-scroll-card {
    will-change: transform, opacity;
}

.booking-scroll-card {
    transform-origin: center top;
    box-shadow:
        0 0 0 rgba(0, 0, 0, 0.30),
        0 9px 20px rgba(0, 0, 0, 0.18),
        0 37px 37px rgba(0, 0, 0, 0.13),
        0 84px 50px rgba(0, 51, 102, 0.08);
}

.booking-benefits {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.booking-benefits span {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.65rem 0.85rem;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid rgba(219, 234, 254, 0.9);
    color: #334155;
    font-size: 0.82rem;
    font-weight: 800;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.booking-benefits svg {
    color: #10b981;
}

.booking-card-shell {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.98)),
        radial-gradient(circle at 8% 0%, rgba(13, 110, 253, 0.09), transparent 24rem);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 24px 65px rgba(15, 23, 42, 0.12);
}

.booking-step {
    padding: 1rem;
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(226, 232, 240, 0.74);
}

.step-number {
    width: 1.85rem;
    height: 1.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--primary-color);
    color: #ffffff;
    font-size: 0.8rem;
    box-shadow: 0 10px 20px rgba(13, 110, 253, 0.22);
}

.about-scroll-section {
    min-height: 125vh;
    perspective: 1000px;
}

.about-scroll-section::before {
    content: "";
    position: absolute;
    inset: 12% auto auto -12%;
    width: 42rem;
    height: 42rem;
    background:
        radial-gradient(circle at 45% 45%, rgba(13, 110, 253, 0.14), transparent 38%),
        radial-gradient(circle at 70% 25%, rgba(16, 185, 129, 0.10), transparent 34%);
    pointer-events: none;
}

.about-scroll-stage {
    position: sticky;
    top: 6rem;
    transform-style: preserve-3d;
}

.about-scroll-visual,
.about-scroll-card,
.about-scroll-copy {
    will-change: transform, opacity;
}

.about-scroll-visual {
    transform-origin: center top;
}

.about-scroll-card {
    border: 4px solid #6c6c6c;
    background: #222;
    padding: 0.5rem;
    box-shadow:
        0 0 0 rgba(0, 0, 0, 0.30),
        0 9px 20px rgba(0, 0, 0, 0.24),
        0 37px 37px rgba(0, 0, 0, 0.20),
        0 84px 50px rgba(0, 51, 102, 0.12);
    transform-origin: center top;
}

.about-scroll-card img {
    border-radius: 1.25rem;
}

.services-scroll-section {
    min-height: 145vh;
    padding: 7rem 0 9rem;
    perspective: 1000px;
}

.services-scroll-section::before {
    content: "";
    position: absolute;
    inset: 10% -8% auto;
    height: 38rem;
    background:
        radial-gradient(circle at 18% 18%, rgba(13, 110, 253, 0.14), transparent 32%),
        radial-gradient(circle at 82% 34%, rgba(0, 51, 102, 0.12), transparent 30%),
        linear-gradient(180deg, rgba(239, 246, 255, 0.9), rgba(255, 255, 255, 0));
    pointer-events: none;
}

.services-scroll-stage {
    position: sticky;
    top: 6rem;
    transform-style: preserve-3d;
}

.services-scroll-copy,
.services-scroll-panel {
    will-change: transform, opacity;
}

.services-scroll-panel {
    border: 4px solid #6c6c6c;
    border-radius: 30px;
    padding: 0.75rem;
    background: #222;
    box-shadow:
        0 0 0 rgba(0, 0, 0, 0.30),
        0 9px 20px rgba(0, 0, 0, 0.29),
        0 37px 37px rgba(0, 0, 0, 0.26),
        0 84px 50px rgba(0, 0, 0, 0.15),
        0 149px 60px rgba(0, 0, 0, 0.04);
    transform-origin: center top;
}

.services-scroll-panel .scroll-card-grid {
    background: #f8fafc;
    border-radius: 22px;
    padding: 1rem;
    overflow: hidden;
}

.service-grid {
    align-items: stretch;
}

.service-scroll-card {
    display: flex;
    flex-direction: column;
    min-height: 16.5rem;
    background: linear-gradient(180deg, #eff6ff, #ffffff);
}

.service-scroll-card:nth-child(2n) {
    background: linear-gradient(180deg, #ecfdf5, #ffffff);
    border-color: #bbf7d0;
}

.service-scroll-card:nth-child(3n) {
    background: linear-gradient(180deg, #fffbeb, #ffffff);
    border-color: #fde68a;
}

.service-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: auto;
    padding-top: 1.25rem;
    color: var(--primary-color);
    font-weight: 800;
    font-size: 0.88rem;
}

.service-link svg {
    transition: transform 0.2s var(--timing-smooth);
}

.service-link:hover svg,
.service-link:focus-visible svg {
    transform: translate(2px, -2px);
}

.contact-card {
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.06);
}

.contact-method {
    width: 100%;
    max-width: 18rem;
    padding: 1rem;
    border-radius: 1.25rem;
    background: #f8fafc;
    border: 1px solid #eef2f7;
}

.scroll-card-section {
    perspective: 1200px;
}

.scroll-card-grid {
    transform-style: preserve-3d;
}

.service-scroll-card,
.tip-scroll-card,
.scroll-card-heading {
    will-change: transform, opacity;
}

.service-scroll-card,
.tip-scroll-card {
    transform-origin: center bottom;
}

@media (max-width: 768px) {
    .site-nav {
        box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
    }

    .hero-section {
        padding-top: 7rem;
    }

    .hero-section::after {
        display: none;
    }

    .trust-chip {
        justify-content: center;
        padding: 0.75rem 0.85rem;
    }

    .stat-tile {
        min-height: 6.5rem;
    }

    .booking-scroll-section {
        min-height: auto;
        padding: 5rem 0;
        perspective: none;
    }

    .services-scroll-section {
        min-height: auto;
        padding: 5rem 0;
        perspective: none;
    }

    .about-scroll-section {
        min-height: auto;
        perspective: none;
    }

    .booking-scroll-stage {
        position: relative;
        top: auto;
    }

    .services-scroll-stage {
        position: relative;
        top: auto;
    }

    .about-scroll-stage {
        position: relative;
        top: auto;
    }

    .services-scroll-panel {
        border-width: 2px;
        padding: 0.5rem;
    }

    .about-scroll-card {
        border-width: 2px;
    }

    .booking-benefits {
        justify-content: flex-start;
    }

    .booking-benefits span {
        width: 100%;
        justify-content: center;
    }

    .booking-step {
        padding: 0.75rem;
    }

    .service-scroll-card {
        min-height: auto;
    }

    .contact-method {
        max-width: 100%;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .blur-up {
        filter: none !important;
    }

    .booking-scroll-card,
    .booking-scroll-copy,
    .about-scroll-card,
    .about-scroll-copy,
    .about-scroll-visual,
    .services-scroll-panel,
    .services-scroll-copy,
    .service-scroll-card,
    .tip-scroll-card,
    .scroll-card-heading {
        transform: none !important;
        opacity: 1 !important;
    }
}
