/* ==========================================================================
   HERO — Sticky scroll animation on DESKTOP, static 100vh on mobile
   ========================================================================== */

/* Desktop: 250vh scroll canvas so the shrink-morph animation plays */
.hero-scroll-wrapper {
    position: relative;
    height: 250vh;   /* scroll space for animation on desktop */
    background-color: #000;
    z-index: 10;
}
.hero-sticky-frame {
    position: sticky; top: 0;
    width: 100%; height: 100vh;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    --progress: 0;   /* driven by JS */
}
.hero-layout {
    /* morphs as --progress goes 0→1 */
    width:      calc(100% - (var(--edge-padding) * 2 * var(--progress)));
    height:     calc(100vh - (18vh * var(--progress)));
    border-radius: calc(14px * var(--progress));
    margin-top: calc((var(--nav-height) * 0.5) * var(--progress));
    position: relative; overflow: hidden;
    will-change: width, height, border-radius, margin-top;
    /* Removed box-shadow to avoid "black outline" effect */
    transition: none; /* driven by rAF */
}
.hero-media { position: absolute; inset: 0; width: 100%; height: 100%; background-color: #000; }
.hero-media img {
    width: 100%; height: 100%; object-fit: cover; opacity: 0.80;
    transform: scale(1.08);
    transition: transform 2.5s var(--ease-out-expo);
}
body.loaded .hero-media img { transform: scale(1); }

.hero-content {
    position: relative; z-index: 3;
    display: flex; flex-direction: column; justify-content: flex-end;
    padding: clamp(36px, 5vw, 72px);
    padding-bottom: clamp(60px, 10vh, 120px);
    height: 100%; isolation: isolate;
}
/* WHITE headline (over image) */
.hero-headline {
    font-size: clamp(3rem, 5.5vw, 7rem);
    font-weight: 500;
    color: #ffffff;   /* Changed back to white */
    max-width: 900px; letter-spacing: -2px; line-height: 1.15;
    text-shadow: 0 4px 30px rgba(0,0,0,0.3); /* Added subtle shadow for readability */
}
/* Scroll-down indicator */
.hero-scroll-hint {
    position: absolute; bottom: 36px; left: 50%;
    transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    color: rgba(255,255,255,0.6); font-size: 0.78rem;
    font-family: var(--font-head); letter-spacing: 2px; text-transform: uppercase;
    z-index: 4; animation: bounceHint 2s ease-in-out infinite;
}
.hero-scroll-hint span { writing-mode: vertical-lr; }
@keyframes bounceHint {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%       { transform: translateX(-50%) translateY(6px); }
}

/* ==========================================================================
   INTRO / ABOUT SECTION
   ========================================================================== */
.intro-grid {
    display: grid; grid-template-columns: 4fr 5fr;
    gap: var(--grid-gap); align-items: center;
}
.intro-meta { display: flex; flex-direction: column; gap: 36px; }
.intro-text {
    font-size: clamp(1rem, 1.35vw, 1.15rem);
    color: var(--color-text-muted); line-height: 1.8; max-width: 90%;
}
.intro-image-mini { width: 80%; max-width: 300px; aspect-ratio: 4/5; border-radius: 4px; overflow: hidden; }
.intro-image-mini img { width: 100%; height: 100%; object-fit: cover; }
.intro-statement {
    font-family: var(--font-head); font-size: clamp(1.8rem, 3.1vw, 3.1rem);
    font-weight: 500; line-height: 1.2; letter-spacing: -1px; color: var(--color-text-main);
}

/* ==========================================================================
   EXPERTISE CAROUSEL
   ========================================================================== */
.expertise-header-wrap {
    display: flex; justify-content: space-between; align-items: flex-end;
    margin-bottom: var(--space-md); padding-bottom: 20px;
    border-bottom: 1px solid var(--color-border);
}
.section-header-left { flex: 1; }

.expertise-cards-wrapper { position: relative; }
.carousel-nav {
    position: absolute; top: 50%; left: 0; width: 100%;
    display: flex; justify-content: space-between;
    transform: translateY(-50%); z-index: 10; pointer-events: none; padding: 0 8px;
}
.nav-arrow {
    font-size: 1.8rem; background: var(--color-accent); border: none;
    color: #fff; cursor: pointer; pointer-events: auto;
    width: 44px; height: 44px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.4s ease, background 0.3s ease;
    box-shadow: 0 4px 16px rgba(30,79,216,0.25);
}
.nav-arrow:hover { transform: scale(1.12); background: var(--color-accent-dark); }

.expertise-cards-grid {
    display: flex; gap: clamp(18px, 2.5vw, 26px);
    overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    padding-bottom: 32px; margin: 0 44px;
}
.expertise-cards-grid::-webkit-scrollbar { display: none; }

.exp-card {
    flex: 0 0 calc((100% - (clamp(18px, 2.5vw, 26px) * 3)) / 3.5);
    min-width: 240px; scroll-snap-align: start;
    position: relative; aspect-ratio: 3/4.5; border-radius: 10px; overflow: hidden;
    background-color: var(--color-text-main); color: #fff;
    display: flex; flex-direction: column; justify-content: space-between;
    padding: clamp(18px, 2vw, 26px); cursor: pointer;
}
.exp-card-bg {
    position: absolute; inset: 0; width: 100%; height: 100%;
    z-index: 0; opacity: 0.45;
    transition: opacity 0.8s var(--ease-out-expo), transform 1.5s var(--ease-out-expo);
}
.exp-card-bg img { width: 100%; height: 100%; object-fit: cover; }
.exp-card:hover .exp-card-bg { opacity: 0.75; transform: scale(1.05); }

.exp-card-content {
    position: relative; z-index: 1; display: flex;
    flex-direction: column; height: 100%; justify-content: space-between;
}
.exp-num { font-family: var(--font-body); font-size: clamp(1rem, 1.5vw, 1.6rem); font-weight: 300; opacity: 0.75; }
.exp-bottom { transform: translateY(20px); transition: transform 0.6s var(--ease-out-expo); }
.exp-card:hover .exp-bottom { transform: translateY(0); }
.exp-title {
    font-family: var(--font-head); font-size: clamp(1.1rem, 1.6vw, 1.7rem);
    font-weight: 600; line-height: 1.1; letter-spacing: -0.5px; margin-bottom: 12px;
}
.exp-arrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--font-head); text-transform: uppercase;
    font-size: 0.8rem; font-weight: 700; letter-spacing: 2px;
    opacity: 0; transform: translateX(-12px);
    transition: all 0.6s var(--ease-out-expo);
}
.exp-card:hover .exp-arrow { opacity: 1; transform: translateX(0); }

/* ==========================================================================
   SERVICES — Sticky scroll (image LEFT, list RIGHT on desktop)
   ========================================================================== */
.services-layout {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: var(--grid-gap); align-items: flex-start; position: relative;
}
.services-visuals { position: sticky; top: calc(var(--nav-height) + 36px); }
.services-intro {
    font-size: clamp(1rem, 1.35vw, 1.15rem);
    color: var(--color-text-muted); margin-bottom: 36px; line-height: 1.6; max-width: 90%;
}
.services-img-stack {
    position: relative; width: 85%; aspect-ratio: 4/5;
    border-radius: 6px; overflow: hidden; background-color: var(--color-curtain);
}
.service-img-wrap {
    position: absolute; inset: 0; width: 100%; height: 100%;
    opacity: 0; z-index: 1; transition: opacity 0.8s var(--ease-out-expo); cursor: pointer;
}
.service-img-wrap.is-active { opacity: 1; z-index: 2; }
.service-img-wrap img {
    width: 100%; height: 100%; object-fit: cover;
    transform: scale(1.08); transition: transform 1.2s var(--ease-out-expo);
}
.service-img-wrap.is-active img { transform: scale(1); }
.watermark { display: none; }

.services-list {
    padding-top: 8vh; padding-bottom: 18vh;
    display: flex; flex-direction: column;
}
.service-item {
    font-family: var(--font-head); font-size: clamp(1.7rem, 2.7vw, 3.6rem);
    font-weight: 600; color: #c8d2e8;
    display: flex; justify-content: space-between; align-items: center;
    transition: color 0.4s ease, transform 0.6s var(--ease-out-expo);
    line-height: 1.1; padding: clamp(16px, 2.8vw, 30px) 0;
    cursor: pointer; letter-spacing: -0.5px;
    border-bottom: 1px solid transparent;
}
.service-item.is-active { color: var(--color-accent); transform: translateX(12px); }
.service-arrow {
    display: inline-flex; align-items: center; justify-content: center;
    width: clamp(36px, 3.5vw, 54px); height: clamp(36px, 3.5vw, 54px);
    border-radius: 50%; background-color: var(--color-accent); color: #fff;
    font-size: 1.3rem; opacity: 0;
    transform: scale(0.5) translateX(-36px);
    transition: all 0.6s var(--ease-out-expo);
}
.service-item.is-active .service-arrow { opacity: 1; transform: scale(1) translateX(0); }

/* ==========================================================================
   FAQ
   ========================================================================== */
#faq .expertise-header-wrap { flex-direction: column; align-items: center; text-align: center; border-bottom: none; margin-bottom: 30px; }
.faq-list { max-width: 800px; margin: 0 auto; border-top: 1px solid var(--color-border); }
.faq-item { border-bottom: 1px solid var(--color-border); cursor: pointer; overflow: hidden; }
.faq-question {
    font-family: var(--font-head); font-weight: 600;
    font-size: clamp(1.05rem, 1.5vw, 1.3rem);
    padding: 28px 0; display: flex; justify-content: space-between;
    align-items: center; transition: color 0.3s ease;
}
.faq-item:hover .faq-question { color: var(--color-accent); }
.faq-icon { font-size: 1.6rem; font-weight: 300; transition: transform 0.6s var(--ease-out-expo); font-family: var(--font-body); }
.faq-item.is-open .faq-icon { transform: rotate(45deg); color: var(--color-accent); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.8s var(--ease-out-expo); }
.faq-answer p { font-size: clamp(0.95rem, 1.15vw, 1.05rem); color: var(--color-text-muted); padding-bottom: 36px; padding-right: 5%; }

/* ==========================================================================
   CTA BANNER
   ========================================================================== */
.cta-section {
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
    padding: var(--space-md) 0; margin-top: var(--space-lg);
    display: flex; flex-direction: column; align-items: center;
    text-align: center; gap: 36px; border-radius: 16px;
}
.cta-section h2 {
    font-size: clamp(2rem, 3.2vw, 3.6rem); max-width: 900px;
    line-height: 1.1; letter-spacing: -1px; color: #ffffff;
}
.cta-section .btn-solid {
    background-color: #ffffff; color: var(--color-accent);
    border-color: #ffffff;
}
.cta-section .btn-solid:hover { background-color: var(--color-text-main); border-color: var(--color-text-main); color: #fff; }
.cta-section .btn-solid::before { background-color: var(--color-text-main); }

/* ==========================================================================
   RESPONSIVE (Index Page)
   ========================================================================== */
@media (max-width: 1200px) {
    .intro-grid { grid-template-columns: 1fr; }
    .intro-image-mini { display: none; }
    .exp-card { flex: 0 0 calc((100% - clamp(18px, 2.5vw, 26px)) / 2.2); }
    .services-layout { grid-template-columns: 1fr; }
    .services-visuals {
        width: 100%; position: sticky; top: var(--nav-height);
        z-index: 10; background-color: var(--color-bg);
        padding-bottom: 16px; padding-top: 8px; margin-bottom: 32px;
    }
    .services-img-stack { width: 100%; aspect-ratio: 16/9; }
    .services-list { width: 100%; padding-top: 0; padding-bottom: 0; position: relative; z-index: 1; }
}

@media (max-width: 768px) {
    /* Mobile hero: collapse to 100vh, no scroll animation */
    .hero-scroll-wrapper { height: 100vh !important; }
    .hero-sticky-frame   { position: relative; }
    .hero-layout {
        width: 100% !important; height: 100% !important;
        border-radius: 0 !important; margin-top: 0 !important;
        box-shadow: none !important;
    }
    /* Headline stays readable on small screens */
    .hero-headline { font-size: clamp(2.2rem, 8vw, 3.5rem); letter-spacing: -1px; color: #000000; }

    .section-header-left { flex: unset; width: 100%; margin-bottom: 16px; }
    .expertise-header-wrap { flex-direction: column; align-items: flex-start; }
    .exp-card { flex: 0 0 calc(100% - clamp(18px, 2.5vw, 26px)); }

    /* Services — stacked mobile layout */
    .services-list { display: none; }
    .services-visuals { position: relative; top: 0; padding-bottom: 0; background: none; margin-bottom: 0; }
    .services-img-stack {
        display: flex; flex-direction: column; gap: 18px;
        aspect-ratio: auto; overflow: visible; background-color: transparent;
    }
    .service-img-wrap {
        position: relative; opacity: 1 !important; z-index: 1 !important;
        aspect-ratio: 4/3; border-radius: 10px; overflow: hidden;
    }
    .service-img-wrap img { transform: none !important; }
    .service-img-wrap::after {
        content: ''; position: absolute; inset: 0;
        background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 55%);
        z-index: 5;
    }
    .watermark {
        display: block; position: absolute; bottom: 12px; left: 14px;
        color: #fff; font-family: var(--font-head);
        font-size: clamp(1rem, 3.5vw, 1.3rem); font-weight: 600;
        text-transform: uppercase; z-index: 10; letter-spacing: 1px;
    }

    /* CTA */
    .cta-section { border-radius: 12px; }
}
