/* ----------------------------------------------------------------------------------------
* Foundry Space - Enhanced Interactions & Animations
* Adds: scroll progress, marquee bands, project gallery, approach, core values,
*       team carousel, achievement counters, animated stat dock, custom cursor,
*       back-to-top progress ring, section nav dots, scroll-reveal utilities
* -------------------------------------------------------------------------------------- */

/* ============== Scroll Progress Bar ============== */
.scroll-progress-bar{
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-color) 0%, #D4691F 50%, var(--accent-color) 100%);
    background-size: 200% 100%;
    z-index: 9999;
    box-shadow: 0 0 14px var(--accent-color);
    transition: width 0.1s linear;
    animation: scrollProgressShimmer 3s linear infinite;
}
@keyframes scrollProgressShimmer{
    0%{ background-position: 0% 0; }
    100%{ background-position: 200% 0; }
}

/* ============== Custom Cursor Follower ============== */
.cursor-follower{
    position: fixed;
    top: 0;
    left: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent-color);
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 99998;
    mix-blend-mode: difference;
    transition: width 0.25s ease, height 0.25s ease, opacity 0.25s ease;
    opacity: 0.85;
}
.cursor-follower.is-hover{
    width: 50px;
    height: 50px;
    opacity: 0.4;
}
@media (max-width: 991px){ .cursor-follower{ display: none; } }

/* ============== Floating Hero Shapes ============== */
.hero{ position: relative; overflow: hidden; }
.hero-floating-shapes{
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}
.hero-floating-shapes span{
    position: absolute;
    display: block;
    border-radius: 50%;
    opacity: 0.45;
    filter: blur(0.5px);
    animation: floatShape 14s ease-in-out infinite;
}
.hero-floating-shapes span:nth-child(1){ width: 80px; height: 80px; top: 12%; left: 6%;  background: var(--accent-color); animation-delay: 0s; }
.hero-floating-shapes span:nth-child(2){ width: 30px; height: 30px; top: 70%; left: 12%; background: var(--accent-color); animation-delay: 2s; }
.hero-floating-shapes span:nth-child(3){ width: 60px; height: 60px; top: 30%; right: 8%; background: var(--accent-color); animation-delay: 4s; }
.hero-floating-shapes span:nth-child(4){ width: 18px; height: 18px; top: 80%; right: 20%; background: var(--accent-color); animation-delay: 6s; }
.hero-floating-shapes span:nth-child(5){ width: 45px; height: 45px; top: 50%; left: 45%; background: #D4691F; animation-delay: 3s; opacity: 0.25; }
@keyframes floatShape{
    0%, 100% { transform: translate(0, 0) scale(1); }
    25%      { transform: translate(20px, -30px) scale(1.1); }
    50%      { transform: translate(-15px, -50px) scale(0.95); }
    75%      { transform: translate(-25px, 20px) scale(1.05); }
}

/* ============== Section Reveal Utility ============== */
.reveal-on-scroll{
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 1s cubic-bezier(0.23, 1, 0.32, 1), transform 1s cubic-bezier(0.23, 1, 0.32, 1);
    will-change: opacity, transform;
}
.reveal-on-scroll.revealed{
    opacity: 1;
    transform: translateY(0);
}
.reveal-left{ transform: translateX(-80px); }
.reveal-left.revealed{ transform: translateX(0); }
.reveal-right{ transform: translateX(80px); }
.reveal-right.revealed{ transform: translateX(0); }
.reveal-zoom{ transform: scale(0.85); }
.reveal-zoom.revealed{ transform: scale(1); }
.reveal-rotate{ transform: rotate(-6deg) translateY(60px); }
.reveal-rotate.revealed{ transform: rotate(0) translateY(0); }
.reveal-delay-1{ transition-delay: 0.15s; }
.reveal-delay-2{ transition-delay: 0.3s; }
.reveal-delay-3{ transition-delay: 0.45s; }
.reveal-delay-4{ transition-delay: 0.6s; }

/* ============== Scrolling Marquee Band ============== */
.marquee-band{
    background: var(--primary-color);
    color: var(--white-color);
    padding: 28px 0;
    overflow: hidden;
    position: relative;
    border-top: 1px solid var(--dark-divider-color);
    border-bottom: 1px solid var(--dark-divider-color);
}
.marquee-band.light{
    background: var(--secondary-color);
    color: var(--primary-color);
}
.marquee-track{
    display: flex;
    width: max-content;
    animation: marqueeScroll 28s linear infinite;
    gap: 50px;
}
.marquee-band.reverse .marquee-track{
    animation-direction: reverse;
    animation-duration: 36s;
}
.marquee-band:hover .marquee-track{ animation-play-state: paused; }
.marquee-item{
    display: inline-flex;
    align-items: center;
    gap: 40px;
    font-size: clamp(28px, 4.4vw, 64px);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1;
    white-space: nowrap;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255,255,255,0.55);
    transition: -webkit-text-stroke 0.3s ease, color 0.3s ease;
}
.marquee-band.light .marquee-item{
    -webkit-text-stroke: 1px rgba(15,15,15,0.5);
}
.marquee-item:hover{
    color: var(--accent-color);
    -webkit-text-stroke: 1px var(--accent-color);
}
.marquee-band.light .marquee-item:hover{
    color: var(--accent-color);
    -webkit-text-stroke: 1px var(--accent-color);
}
.marquee-dot{
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--accent-color); display: inline-block;
    animation: pulseDot 2s ease-in-out infinite;
}
.marquee-band.light .marquee-dot{ background: var(--accent-color); }
@keyframes marqueeScroll{
    0%{ transform: translateX(0); }
    100%{ transform: translateX(-50%); }
}
@keyframes pulseDot{
    0%, 100%{ transform: scale(1); opacity: 1; }
    50%    { transform: scale(1.4); opacity: 0.6; }
}

/* ============== Our Approach Section ============== */
.our-approach{ padding: 120px 0; background: var(--bg-color); }
.approach-item-list{ display: flex; flex-direction: column; gap: 24px; }
.approach-item{
    display: flex;
    gap: 22px;
    padding: 30px;
    border-radius: 14px;
    background: var(--secondary-color);
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1), background-color 0.4s ease, color 0.4s ease;
    cursor: pointer;
    align-items: flex-start;
}
.approach-item .icon-box{
    width: 64px; height: 64px;
    flex-shrink: 0;
    background: var(--bg-color);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.5s ease, background-color 0.4s ease;
}
.approach-item:hover{
    background: var(--primary-color);
    transform: translateX(10px);
}
.approach-item:hover .icon-box{
    background: var(--accent-color);
    transform: rotate(360deg);
}
.approach-item:hover .approach-item-content h3,
.approach-item:hover .approach-item-content p{ color: var(--white-color); }
.approach-item-content h3{ font-size: 22px; margin-bottom: 10px; transition: color 0.4s ease; }
.approach-item-content p{ font-size: 15px; margin-bottom: 0; transition: color 0.4s ease; }
.approach-image-box{ position: relative; border-radius: 18px; overflow: hidden; }
.approach-image figure{ overflow: hidden; border-radius: 18px; }
.approach-image img{
    width: 100%; height: 500px; object-fit: cover; display: block;
    transition: transform 1.4s cubic-bezier(0.23, 1, 0.32, 1);
}
.approach-image-box:hover .approach-image img{ transform: scale(1.06); }
.approach-counter-box{
    position: absolute;
    bottom: 20px; left: 20px; right: 20px;
    display: flex; gap: 20px;
    background: rgba(28, 31, 34,0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 14px;
    padding: 26px;
}
.approach-counter-item{ flex: 1; color: var(--white-color); border-right: 1px solid rgba(255,255,255,0.15); padding-right: 20px; }
.approach-counter-item:last-child{ border-right: none; }
.approach-counter-item h2{ color: var(--accent-color); font-size: 44px; margin-bottom: 6px; }
.approach-counter-item p{ color: var(--white-color); font-size: 14px; margin: 0; opacity: 0.85; }

/* ============== Project Gallery Section ============== */
.our-project{ padding: 120px 0; background: var(--secondary-color); }
.project-list{ display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.project-item{
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 4/5;
    cursor: pointer;
    transform: translateY(0);
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.5s ease;
    background: var(--primary-color);
}
.project-item:nth-child(even){ transform: translateY(40px); }
.project-item:hover{ transform: translateY(-10px); box-shadow: 0 30px 60px rgba(28, 31, 34,0.25); }
.project-item:nth-child(even):hover{ transform: translateY(30px); }
.project-item-image{ width: 100%; height: 100%; overflow: hidden; }
.project-item-image img{
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 1.4s cubic-bezier(0.23, 1, 0.32, 1), filter 0.6s ease;
    filter: saturate(0.9);
}
.project-item:hover .project-item-image img{ transform: scale(1.12); filter: saturate(1.1); }
.project-item-content{
    position: absolute;
    inset: 0;
    padding: 24px;
    display: flex; flex-direction: column; justify-content: flex-end;
    background: linear-gradient(180deg, transparent 0%, transparent 50%, rgba(28, 31, 34,0.92) 100%);
    color: var(--white-color);
    transition: background 0.5s ease;
}
.project-item:hover .project-item-content{
    background: linear-gradient(180deg, transparent 0%, rgba(28, 31, 34,0.5) 50%, rgba(28, 31, 34,0.95) 100%);
}
.project-item-tag{
    display: inline-flex;
    align-self: flex-start;
    background: var(--accent-color);
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 50px;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transform: translateY(-10px);
    opacity: 0;
    transition: transform 0.45s ease 0.05s, opacity 0.45s ease 0.05s;
}
.project-item:hover .project-item-tag{ transform: translateY(0); opacity: 1; }
.project-item-content h3{
    color: var(--white-color);
    font-size: 22px;
    margin-bottom: 8px;
    transform: translateY(15px);
    opacity: 0.95;
    transition: transform 0.5s ease 0.1s;
}
.project-item:hover .project-item-content h3{ transform: translateY(0); }
.project-item-content p{
    color: var(--white-color);
    opacity: 0;
    font-size: 14px;
    margin: 0 0 14px;
    transform: translateY(20px);
    transition: transform 0.5s ease 0.18s, opacity 0.5s ease 0.18s;
}
.project-item:hover .project-item-content p{ opacity: 0.85; transform: translateY(0); }
.project-item-arrow{
    position: absolute; top: 18px; right: 18px;
    width: 44px; height: 44px;
    background: var(--accent-color);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    opacity: 0;
    transform: scale(0.5) rotate(-45deg);
    transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.project-item:hover .project-item-arrow{ opacity: 1; transform: scale(1) rotate(0); }
@media (max-width: 1199px){ .project-list{ grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575px){ .project-list{ grid-template-columns: 1fr; } .project-item:nth-child(even){ transform: translateY(0); } }

/* ============== Core Values Section ============== */
.our-core-values{ padding: 120px 0; background: var(--primary-color); color: var(--white-color); }
.our-core-values .section-title h2,
.our-core-values .section-title h3{ color: var(--white-color); }
.core-value-grid{ display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; }
.core-value-card{
    position: relative;
    padding: 38px 30px;
    border-radius: 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    overflow: hidden;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1), background 0.4s ease, border-color 0.4s ease;
    cursor: pointer;
}
.core-value-card::before{
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(212, 175, 55, 0.18) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
}
.core-value-card:hover{
    transform: translateY(-12px);
    background: rgba(212, 175, 55, 0.05);
    border-color: var(--accent-color);
}
.core-value-card:hover::before{ opacity: 1; }
.core-value-icon{
    width: 70px; height: 70px;
    border-radius: 16px;
    background: var(--accent-color);
    display: flex; align-items: center; justify-content: center;
    color: var(--primary-color);
    font-size: 28px;
    margin-bottom: 24px;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.core-value-card:hover .core-value-icon{ transform: rotate(-15deg) scale(1.08); }
.core-value-card h3{ color: var(--white-color); font-size: 24px; margin-bottom: 14px; position: relative; z-index: 1; }
.core-value-card p{ color: rgba(255,255,255,0.7); margin: 0; position: relative; z-index: 1; }
.core-value-num{
    position: absolute;
    top: 14px; right: 22px;
    font-size: 80px;
    font-weight: 700;
    line-height: 1;
    color: rgba(212, 175, 55, 0.08);
    pointer-events: none;
}
@media (max-width: 991px){ .core-value-grid{ grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575px){ .core-value-grid{ grid-template-columns: 1fr; } }

/* ============== Team Section ============== */
.our-team{ padding: 120px 0; }
.team-grid{ display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 40px; }
.team-card{
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: var(--secondary-color);
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}
.team-card:hover{ transform: translateY(-12px); }
.team-card-image{ overflow: hidden; aspect-ratio: 3/4; }
.team-card-image img{
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 1.2s cubic-bezier(0.23, 1, 0.32, 1), filter 0.5s ease;
    filter: grayscale(0.4);
}
.team-card:hover .team-card-image img{ transform: scale(1.1); filter: grayscale(0); }
.team-card-body{ padding: 22px; text-align: center; }
.team-card-body h3{ font-size: 20px; margin-bottom: 4px; }
.team-card-body p{ margin: 0; font-size: 14px; color: var(--text-color); }
.team-card-socials{
    position: absolute;
    top: 0; right: 0;
    padding: 18px;
    display: flex; flex-direction: column; gap: 10px;
    transform: translateX(60px);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.team-card:hover .team-card-socials{ transform: translateX(0); }
.team-card-socials a{
    width: 38px; height: 38px;
    background: var(--accent-color); color: var(--primary-color);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.3s ease, transform 0.3s ease;
    font-size: 14px;
}
.team-card-socials a:hover{ background: var(--white-color); transform: scale(1.15); }
@media (max-width: 991px){ .team-grid{ grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575px){ .team-grid{ grid-template-columns: 1fr; } }

/* ============== Achievement Stat Dock ============== */
.our-achievements{
    background: var(--primary-color);
    padding: 100px 0;
    position: relative;
    overflow: hidden;
    color: var(--white-color);
}
.our-achievements::before{
    content: "";
    position: absolute;
    width: 600px; height: 600px;
    top: -200px; right: -200px;
    background: radial-gradient(circle, rgba(212, 175, 55,0.12) 0%, transparent 70%);
    border-radius: 50%;
    animation: orbit 18s linear infinite;
}
@keyframes orbit{
    0%   { transform: rotate(0deg) translate(60px) rotate(0deg); }
    100% { transform: rotate(360deg) translate(60px) rotate(-360deg); }
}
.achievement-stat-dock{
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    margin-top: 50px;
    position: relative;
    z-index: 1;
}
.achievement-stat-item{
    padding: 30px;
    text-align: center;
    border-right: 1px solid rgba(255,255,255,0.12);
    transition: background-color 0.4s ease, transform 0.4s ease;
    cursor: default;
}
.achievement-stat-item:last-child{ border-right: none; }
.achievement-stat-item:hover{
    background: rgba(212, 175, 55,0.06);
    transform: translateY(-6px);
}
.achievement-stat-item h2{
    color: var(--accent-color);
    font-size: 64px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1;
}
.achievement-stat-item h3{ color: var(--white-color); font-size: 18px; margin-bottom: 6px; }
.achievement-stat-item p{ color: rgba(255,255,255,0.6); margin: 0; font-size: 14px; }
.achievement-stat-icon{
    width: 56px; height: 56px;
    background: rgba(212, 175, 55,0.12);
    color: var(--accent-color);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 18px;
    font-size: 22px;
    transition: transform 0.5s ease, background 0.4s ease;
}
.achievement-stat-item:hover .achievement-stat-icon{
    transform: rotate(360deg) scale(1.1);
    background: var(--accent-color);
    color: var(--primary-color);
}
@media (max-width: 991px){ .achievement-stat-dock{ grid-template-columns: repeat(2, 1fr); } .achievement-stat-item{ border-bottom: 1px solid rgba(255,255,255,0.12); } .achievement-stat-item:nth-child(2){ border-right: none; } }
@media (max-width: 575px){ .achievement-stat-dock{ grid-template-columns: 1fr; } .achievement-stat-item{ border-right: none; } }

/* ============== Back-to-Top Button with Progress Ring ============== */
.back-to-top{
    position: fixed;
    bottom: 32px; right: 32px;
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--primary-color);
    color: var(--accent-color);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.7) translateY(20px);
    transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-size: 18px;
}
.back-to-top.visible{
    opacity: 1;
    pointer-events: auto;
    transform: scale(1) translateY(0);
}
.back-to-top:hover{ background: var(--accent-color); color: var(--primary-color); }
.back-to-top svg{
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}
.back-to-top svg circle{
    fill: none;
    stroke: var(--accent-color);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 163.36;
    stroke-dashoffset: 163.36;
    transition: stroke-dashoffset 0.1s linear;
}
.back-to-top span{ position: relative; z-index: 1; }

/* ============== Section Nav Dots ============== */
.section-nav-dots{
    position: fixed;
    top: 50%;
    right: 18px;
    transform: translateY(-50%);
    z-index: 990;
    display: flex; flex-direction: column; gap: 14px;
    opacity: 0;
    transition: opacity 0.5s ease;
}
.section-nav-dots.visible{ opacity: 1; }
.section-nav-dot{
    width: 12px; height: 12px;
    border-radius: 50%;
    background: rgba(28, 31, 34,0.25);
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
    position: relative;
}
.section-nav-dot::after{
    content: attr(data-label);
    position: absolute;
    right: 22px; top: 50%;
    transform: translateY(-50%) translateX(8px);
    background: var(--primary-color);
    color: var(--accent-color);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.section-nav-dot:hover{ background: var(--primary-color); transform: scale(1.35); }
.section-nav-dot:hover::after{ opacity: 1; transform: translateY(-50%) translateX(0); }
.section-nav-dot.active{ background: var(--accent-color); transform: scale(1.5); box-shadow: 0 0 0 2px var(--primary-color); }
@media (max-width: 991px){ .section-nav-dots{ display: none; } }

/* ============== Marquee Light Variant Adjustments ============== */
.marquee-band.tilted{ transform: rotate(-2deg); margin: -10px 0; }

/* ============== Animated Underline for Links ============== */
.fancy-link{
    position: relative;
    display: inline-block;
    color: var(--primary-color);
    font-weight: 500;
}
.fancy-link::after{
    content: "";
    position: absolute;
    left: 0; bottom: -3px;
    width: 0%;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}
.fancy-link:hover::after{ width: 100%; }

/* ============== Tilt Hover for Cards ============== */
.tilt-hover{ transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1); transform-style: preserve-3d; }

/* ============== Magnetic Button Wrapper ============== */
.magnetic-wrap{ display: inline-block; transition: transform 0.2s ease; }

/* ============== Spotlight Effect for Sections ============== */
.spotlight-section{
    position: relative;
    overflow: hidden;
}
.spotlight-section::before{
    content: "";
    position: absolute;
    width: 500px; height: 500px;
    background: radial-gradient(circle, var(--accent-color) 0%, transparent 70%);
    opacity: 0.08;
    border-radius: 50%;
    top: var(--spot-y, 50%);
    left: var(--spot-x, 50%);
    transform: translate(-50%, -50%);
    pointer-events: none;
    transition: top 0.5s ease, left 0.5s ease;
}

/* ============== Counter Stagger Animation ============== */
.stat-animate-in{ opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.stat-animate-in.revealed{ opacity: 1; transform: translateY(0); }

/* ============== Image Parallax (scroll-driven) ============== */
.parallax-img{ will-change: transform; transition: transform 0.1s linear; }

/* ============== Full-Width Layout Override ============== */
/* Remove width caps so the site and its sections span the full viewport. */
.container{
    max-width: 100%;
}

.bg-section{
    max-width: 100%;
    border-radius: 0;
    margin: 0;
}

/* Header sits flush at the top with no side gutters or rounded corners. */
header.main-header{
    margin: 0;
}
header.main-header .header-sticky,
header.main-header .header-sticky.hide{
    border-radius: 0;
}
