:root {
    --bg: #ffffff;
    --bg-2: #f8fafc;
    --bg-dark: #0f172a;
    --surface: #f1f5f9;
    --border: #e2e8f0;
    --fg: #0f172a;
    --fg-muted: #64748b;
    --accent: #1e40af;
    --accent-dark: #1e3a8a;
    --accent-light: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.15);
    --success: #22c55e;
    --radius: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --transition: 320ms cubic-bezier(0.25, 0.1, 0.25, 1);
}

* {
    font-family: 'Manrope', sans-serif;
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

/* ========== HERO ========== */
.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
}
.hero-slide.active { opacity: 1; }
.hero-overlay {
    background: linear-gradient(135deg, rgba(15,23,42,0.95) 0%, rgba(15,23,42,0.6) 40%, rgba(30,64,175,0.3) 100%);
}
@media (max-width: 768px) {
    .hero-overlay {
        background: linear-gradient(to bottom, rgba(15,23,42,0.65) 0%, rgba(15,23,42,0.92) 100%);
    }
}

/* ========== CARDS ========== */
.card-hover {
    transition: transform var(--transition), box-shadow var(--transition);
    cursor: pointer;
}
.card-hover:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 48px rgba(0,0,0,0.12);
}
@media (max-width: 768px) {
    .card-hover:hover { transform: none; }
}

/* ========== GALLERY ITEMS ========== */
.gallery-item { cursor: pointer; }
.gallery-item:hover img { transform: scale(1.08); }

/* ========== LIGHTBOX ========== */
#lightbox { transition: opacity 0.3s ease; }
#lightbox.hidden { opacity: 0; pointer-events: none; }
#lightbox-img, #lightbox-video {
    max-height: 85vh;
    max-width: 90vw;
    object-fit: contain;
}
@media (max-width: 640px) {
    #lightbox-img, #lightbox-video { max-height: 70vh; max-width: 95vw; }
}

button, a { min-height: 44px; }
h1, h2, h3, p { overflow-wrap: break-word; word-wrap: break-word; }

/* ========== SWIPE GALLERY ========== */
.swipe-gallery {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 1rem;
}
.swipe-gallery::-webkit-scrollbar { display: none; }
.swipe-gallery-item {
    flex: 0 0 280px;
    scroll-snap-align: start;
}
@media (min-width: 768px) { .swipe-gallery-item { flex: 0 0 320px; } }

/* ========== GRADIENT TEXT ========== */
.gradient-text {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========== GALLERY GRID ========== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}
@media (min-width: 640px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 0.75rem; } }
@media (min-width: 1024px) { .gallery-grid { grid-template-columns: repeat(4, 1fr); gap: 1rem; } }

.gallery-page { display: none; animation: fadeIn 0.4s ease; }
.gallery-page.active { display: grid; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0);    }
}

/* ========== PAGINATION ========== */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
}
.page-dot {
    width: 8px; height: 8px; min-height: 8px;
    border-radius: 50%;
    background: #cbd5e1;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    padding: 0;
}
.page-dot.active { background: var(--accent); transform: scale(1.3); }
.page-dot:hover { background: var(--accent-light); }
.page-btn {
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; min-height: 32px;
    border-radius: 50%;
    background: var(--accent);
    color: white; border: none;
    cursor: pointer;
    transition: background var(--transition);
}
.page-btn:hover { background: var(--accent-dark); }
.page-btn:disabled { background: #cbd5e1; cursor: not-allowed; }

/* ========== GALLERY CARDS ========== */
.gallery-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--bg-2);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform var(--transition), box-shadow var(--transition);
    cursor: pointer;
}
.gallery-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.gallery-card img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    transition: transform 0.5s ease;
}
@media (max-width: 639px) {
    .gallery-card { border-radius: 0.375rem; }
    .gallery-card img { aspect-ratio: 1; }
}
.gallery-card:hover img { transform: scale(1.06); }

/* ========== GALLERY TAB FILTERS ========== */
.gallery-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 2rem;
}
.gallery-tab {
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    border: 2px solid var(--border);
    background: transparent;
    color: var(--fg-muted);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition);
    letter-spacing: 0.02em;
}
.gallery-tab:hover {
    border-color: var(--accent-light);
    color: var(--accent);
}
.gallery-tab.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

/* ========== VIDEO SECTION ========== */
.video-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    background: #000;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    transition: transform var(--transition), box-shadow var(--transition);
}
.video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.18);
}
.video-card video {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
}
.video-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.35);
    transition: background var(--transition);
}
.video-card:hover .video-play-overlay {
    background: rgba(0,0,0,0.2);
}
.video-play-btn {
    width: 64px; height: 64px;
    background: rgba(255,255,255,0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition);
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}
.video-card:hover .video-play-btn { transform: scale(1.1); }
.video-play-btn svg { margin-left: 3px; }

/* ========== SCROLL REVEAL ANIMATIONS ========== */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s cubic-bezier(0.25, 0.1, 0.25, 1), 
                transform 0.7s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}
.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}
.reveal-scale {
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-scale.visible {
    opacity: 1;
    transform: scale(1);
}

/* Stagger delays for children */
.stagger-children > *:nth-child(1) { transition-delay: 0ms; }
.stagger-children > *:nth-child(2) { transition-delay: 100ms; }
.stagger-children > *:nth-child(3) { transition-delay: 200ms; }
.stagger-children > *:nth-child(4) { transition-delay: 300ms; }
.stagger-children > *:nth-child(5) { transition-delay: 400ms; }
.stagger-children > *:nth-child(6) { transition-delay: 500ms; }
.stagger-children > *:nth-child(7) { transition-delay: 600ms; }
.stagger-children > *:nth-child(8) { transition-delay: 700ms; }
.stagger-children > *:nth-child(9) { transition-delay: 800ms; }
.stagger-children > *:nth-child(10) { transition-delay: 900ms; }
.stagger-children > *:nth-child(11) { transition-delay: 1000ms; }
.stagger-children > *:nth-child(12) { transition-delay: 1100ms; }

/* ========== COUNTER ANIMATION ========== */
.counter-value {
    display: inline-block;
    font-variant-numeric: tabular-nums;
}

/* ========== ABOUT SECTION OVERLAP TREATMENT ========== */
.about-images {
    position: relative;
}
.about-images .img-main {
    border-radius: var(--radius-xl);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
    position: relative;
    z-index: 2;
}
.about-images .img-float {
    position: absolute;
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 28px rgba(0,0,0,0.15);
    border: 4px solid white;
    z-index: 3;
}
.about-images .img-float-1 {
    bottom: -24px;
    left: -16px;
    width: 45%;
}
.about-images .img-float-2 {
    top: -16px;
    right: -16px;
    width: 40%;
}
@media (max-width: 1023px) {
    .about-images .img-float-1 { bottom: -12px; left: 0; width: 42%; }
    .about-images .img-float-2 { top: -8px; right: 0; width: 38%; }
}

/* ========== SOP STEPPER ========== */
.sop-step .sop-circle {
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}
.sop-step.visible .sop-circle {
    transform: scale(1);
    box-shadow: 0 0 0 8px var(--accent-glow);
}

/* ========== SECTION DIVIDER ========== */
.section-accent-line {
    width: 48px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
    margin-top: 0.75rem;
}

/* ========== FLOATING BADGE ========== */
.floating-badge {
    animation: floatBadge 3s ease-in-out infinite;
}
@keyframes floatBadge {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* ========== STATS COUNTER BAR ========== */
.stats-grid > div {
    position: relative;
}
.stats-grid > div:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 25%;
    height: 50%;
    width: 1px;
    background: rgba(255,255,255,0.2);
}
@media (max-width: 767px) {
    .stats-grid > div:not(:last-child)::after { display: none; }
}

/* ========== MARQUEE (client ticker) ========== */
.marquee-track {
    display: flex;
    gap: 3rem;
    animation: marquee 20s linear infinite;
    width: max-content;
}
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ========== LIGHTBOX VIDEO ========== */
#lightbox-video {
    border-radius: var(--radius);
}

/* ========== SUBTLE GRAIN OVERLAY ========== */
.grain-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
