/* GACS performance & mobile-first design system */

:root {
    --gacs-navy: #071226;
    --gacs-navy-elevated: #0b1120;
    --gacs-gold: #d4a017;
    --gacs-gold-light: #e0b84c;
    --gacs-orange: #d97706;
    --gacs-touch: 44px;
    --gacs-container: 80rem;
    --gacs-header-h: 4.5rem;
    --gacs-space-1: 0.25rem;
    --gacs-space-2: 0.5rem;
    --gacs-space-3: 0.75rem;
    --gacs-space-4: 1rem;
    --gacs-space-6: 1.5rem;
    --gacs-space-8: 2rem;
    --gacs-text-xs: clamp(0.65rem, 0.6rem + 0.15vw, 0.75rem);
    --gacs-text-sm: clamp(0.8rem, 0.75rem + 0.2vw, 0.875rem);
    --gacs-text-base: clamp(0.9rem, 0.85rem + 0.25vw, 1rem);
    --gacs-text-lg: clamp(1rem, 0.95rem + 0.35vw, 1.125rem);
    --gacs-text-xl: clamp(1.15rem, 1rem + 0.6vw, 1.35rem);
    --gacs-text-2xl: clamp(1.35rem, 1.1rem + 1vw, 1.75rem);
    --gacs-text-hero: clamp(2rem, 1.5rem + 3vw, 3.5rem);
    --gacs-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--gacs-header-h);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-size: var(--gacs-text-base);
    line-height: 1.55;
    overflow-x: hidden;
}

img,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

.gacs-img {
    background-color: rgba(255, 255, 255, 0.04);
}

.gacs-img[data-gacs-lazy-img]:not(.is-loaded) {
    background: linear-gradient(110deg, rgba(255, 255, 255, 0.05) 8%, rgba(255, 255, 255, 0.1) 18%, rgba(255, 255, 255, 0.05) 33%);
    background-size: 200% 100%;
    animation: gacsSkeleton 1.2s ease-in-out infinite;
}

.gacs-container {
    width: 100%;
    max-width: var(--gacs-container);
    margin-inline: auto;
    padding-inline: clamp(1rem, 4vw, 2rem);
}

/* Touch-friendly controls */
a,
button,
input,
select,
textarea,
[role="button"] {
    touch-action: manipulation;
}

button,
.gacs-btn,
a.gacs-btn {
    min-height: var(--gacs-touch);
    min-width: var(--gacs-touch);
}

@media (hover: hover) and (pointer: fine) {
    .gacs-hover-lift {
        transition: transform 0.25s var(--gacs-ease), box-shadow 0.25s var(--gacs-ease);
    }
    .gacs-hover-lift:hover {
        transform: translateY(-3px);
    }
}

@media (hover: none) {
    .gacs-hover-lift:active {
        transform: scale(0.98);
        opacity: 0.92;
    }
}

/* Skeleton loaders */
.gacs-skeleton {
    border-radius: 0.75rem;
    background: linear-gradient(110deg, rgba(255, 255, 255, 0.06) 8%, rgba(255, 255, 255, 0.12) 18%, rgba(255, 255, 255, 0.06) 33%);
    background-size: 200% 100%;
    animation: gacsSkeleton 1.2s ease-in-out infinite;
}

.gacs-skeleton--text {
    height: 0.85rem;
    margin-bottom: 0.5rem;
}

.gacs-skeleton--title {
    height: 1.5rem;
    width: 70%;
    margin-bottom: 0.75rem;
}

.gacs-skeleton--media {
    aspect-ratio: 16 / 10;
    width: 100%;
}

@keyframes gacsSkeleton {
    to {
        background-position: -200% 0;
    }
}

.gacs-skeleton-wrap.is-loaded .gacs-skeleton {
    display: none;
}

/* CLS: reserve media aspect */
.gacs-aspect-video {
    aspect-ratio: 16 / 9;
}
.gacs-aspect-photo {
    aspect-ratio: 4 / 5;
}

/* Mobile hero: static image preferred */
.gacs-hero-video-wrap.is-mobile-static video {
    display: none !important;
}

.gacs-hero-video-wrap.is-mobile-static .gacs-hero-fallback-img {
    display: block !important;
}

.gacs-hero-fallback-img {
    display: none;
}

/* Reduced data / motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .gacs-skeleton,
    .gacs-img[data-gacs-lazy-img]:not(.is-loaded) {
        animation: none;
    }
}

@media (prefers-reduced-data: reduce) {
    .gacs-hero-video-wrap video,
    .gacs-marquee,
    .gacs-sponsor-carousel-track {
        animation: none !important;
    }
}

/* Breakpoint utilities */
@media (max-width: 767px) {
    #site-header .gacs-header-inner {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
    .gacs-hide-mobile {
        display: none !important;
    }
    .gacs-stack-mobile {
        flex-direction: column !important;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .gacs-hide-tablet {
        display: none !important;
    }
}

@media (min-width: 1024px) {
    .gacs-hide-desktop {
        display: none !important;
    }
}

/* Content visibility for below-fold sections */
.gacs-defer-paint {
    content-visibility: auto;
    contain-intrinsic-size: auto 600px;
}

/* Focus visible for a11y */
:focus-visible {
    outline: 2px solid #d4a017;
    outline-offset: 3px;
}

/* Instant navigation feel */
.gacs-page-enter {
    animation: gacsPageIn 0.35s var(--gacs-ease) both;
}

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