/* ========================================
   BASE & RESET
   ======================================== */
html {
    scroll-behavior: auto; /* GSAP handles smoothness */
}

body {
    background-color: #fbf9f8;
    color: #1b1c1c;
    overflow-x: hidden;
}

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    display: inline-block;
    vertical-align: middle;
}

/* ========================================
   NAVIGATION
   ======================================== */
.active-dot::after {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    background-color: #bc000a;
    border-radius: 50%;
    margin-left: 4px;
    vertical-align: middle;
}

.nav-link {
    position: relative;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: currentColor;
    transition: width 0.3s ease;
}

.nav-link:hover::before {
    width: 100%;
}

/* ========================================
   SCROLLYTELLING — Canvas Frame Sequence
   ======================================== */
.sticky-canvas-wrap {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background-color: #0a0a0a;
}

#scrolly-canvas {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Decorative parallax circles behind the canvas content */
.scrolly-circle-outer {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80vw;
    height: 80vw;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    pointer-events: none;
    will-change: transform;
}

.scrolly-circle-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40vw;
    height: 40vw;
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 50%;
    pointer-events: none;
    will-change: transform;
}

/* Overlay text panels */
.scrolly-overlay {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    padding: 0 clamp(24px, 5vw, 80px);
    z-index: 10;
    pointer-events: none;
    opacity: 0;
    will-change: opacity, transform;
}

.scrolly-overlay.is-visible {
    pointer-events: auto;
}

.scrolly-overlay-bottom {
    top: auto;
    bottom: 12%;
    transform: none;
}

.scrolly-overlay button {
    pointer-events: auto;
}

/* Dark gradient overlays for text readability */
.sticky-canvas-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.05) 40%,
        rgba(0, 0, 0, 0.05) 60%,
        rgba(0, 0, 0, 0.4) 100%
    );
    z-index: 2;
    pointer-events: none;
}

/* Side progress track */
#scrolly-progress-track {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 120px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
    z-index: 20;
    overflow: hidden;
}

#scrolly-progress-fill {
    width: 100%;
    height: 0%;
    background: linear-gradient(180deg, #bc000a, #e2241f);
    border-radius: 3px;
    transition: height 0.1s ease-out;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero-gradient {
    background: radial-gradient(circle at center, rgba(251, 249, 248, 0) 0%, rgba(251, 249, 248, 1) 100%);
}

/* Hero cascade items — GSAP sets initial state via JS */
.hero-cascade-item {
    will-change: transform, opacity;
}

/* Scroll-driven pulse for play & mute buttons */
@keyframes scroll-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.5); }
    50%  { box-shadow: 0 0 0 12px rgba(255, 255, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

.scroll-pulse.is-scrolling {
    animation: scroll-pulse 1.2s ease-in-out infinite;
}

/* Play button hover pulse */
@keyframes pulse-subtle {
    0%   { transform: scale(1);    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4); }
    70%  { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(255, 255, 255, 0); }
    100% { transform: scale(1);    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

.play-button-pulse {
    animation: pulse-subtle 2s infinite;
}

/* ========================================
   REVEAL ANIMATIONS (CSS fallback, GSAP overrides)
   ======================================== */
.cascade-reveal {
    opacity: 0;
    transform: translateY(30px);
}

.cascade-child {
    opacity: 0;
    transform: translateY(20px);
}

/* Service cards: directional slide-in */
.slide-from-left {
    opacity: 0;
    transform: translateX(-80px);
}

.slide-from-right {
    opacity: 0;
    transform: translateX(80px);
}

.slide-from-bottom {
    opacity: 0;
    transform: translateY(80px);
}

/* Bento cards */
.bento-card {
    opacity: 0;
    transform: scale(0.92) translateY(40px);
}

/* Footer items */
.footer-item {
    opacity: 0;
    transform: translateY(20px);
}

/* ========================================
   SCROLL PROGRESS INDICATOR (top bar)
   ======================================== */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #bc000a, #e2241f);
    z-index: 9999;
    pointer-events: none;
}

/* ========================================
   REDUCED MOTION
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    .cascade-reveal,
    .cascade-child,
    .slide-from-left,
    .slide-from-right,
    .slide-from-bottom,
    .bento-card,
    .footer-item,
    .scrolly-overlay {
        animation: none !important;
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}
