/* ============================================
   STUDIO PAGE — Crea Studio
   ============================================ */

.studio-body {
    background: var(--white);
    color: var(--black);
    overflow-x: hidden;
}

.studio-main {
    position: relative;
    padding-top: clamp(100px, 14vh, 160px);
}

/* ============================================
   HERO
   ============================================ */
.studio-hero {
    padding: 0 clamp(24px, 4vw, 64px);
    padding-bottom: clamp(60px, 10vh, 120px);
}

.studio-hero__title {
    font-family: var(--font);
    font-weight: 900;
    font-size: clamp(2.8rem, 7vw, 8rem);
    line-height: 0.95;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    color: var(--black);
}

/* ============================================
   WORLD / GLOBE SECTION
   ============================================ */
.studio-world {
    padding: 0 clamp(24px, 4vw, 64px);
    padding-bottom: clamp(60px, 8vh, 100px);
}

.studio-world__label {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gray);
    margin-bottom: clamp(24px, 3vh, 48px);
}

.studio-world__content {
    display: flex;
    align-items: flex-start;
    gap: clamp(40px, 5vw, 80px);
}

.studio-world__globe-wrap {
    flex: 0 0 clamp(280px, 28vw, 600px);
    aspect-ratio: 1;
    position: relative;
}

#globeCanvas {
    width: 100%;
    height: 100%;
    display: block;
}

.globe-label {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.globe-label__city {
    font-size: clamp(0.85rem, 1vw, 1rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--black);
}

.globe-label__address {
    font-size: clamp(0.65rem, 0.75vw, 0.8rem);
    font-weight: 400;
    letter-spacing: 0.06em;
    color: var(--gray);
}

.studio-world__info {
    flex: 1;
    padding-top: clamp(20px, 4vh, 60px);
}

.studio-world__desc {
    font-size: clamp(0.95rem, 1.1vw, 1.15rem);
    line-height: 1.65;
    color: var(--black);
    max-width: 35vw;
    margin-bottom: clamp(24px, 4vh, 48px);
}

.studio-world__coords {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    font-family: var(--font);
    color: var(--gray);
}

.coord-icon {
    font-size: 1.1rem;
    color: var(--black);
}

.studio-world__hq {
    margin-left: auto;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    align-self: flex-end;
}

.studio-world__hq-img {
    width: clamp(180px, 18vw, 360px);
    height: auto;
    border-radius: 6px;
    filter: grayscale(0.2) contrast(1.05);
    transition: filter 0.3s ease;
    margin-bottom: 12px;
}

.studio-world__hq-img:hover {
    filter: grayscale(0) contrast(1.1);
}

.studio-world__hq-name {
    font-size: clamp(0.7rem, 0.8vw, 0.85rem);
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--gray);
}

/* ============================================
   DIVIDER
   ============================================ */
.studio-divider {
    width: 100%;
    height: 1px;
    background: rgba(0, 0, 0, 0.12);
    margin: clamp(20px, 3vh, 40px) 0;
}

/* ============================================
   ABOUT TEXT
   ============================================ */
.studio-about {
    padding: clamp(40px, 6vh, 80px) clamp(24px, 4vw, 64px);
}

.studio-about__text {
    font-size: clamp(1.3rem, 2.5vw, 2.2rem);
    line-height: 1.45;
    font-weight: 400;
    color: var(--black);
    max-width: 65vw;
    margin-bottom: clamp(24px, 3vh, 40px);
}

.studio-about__text:last-child {
    margin-bottom: 0;
}

/* ============================================
   CAPABILITIES
   ============================================ */
.studio-capabilities {
    padding: clamp(40px, 6vh, 80px) clamp(24px, 4vw, 64px);
    display: flex;
    gap: clamp(40px, 6vw, 120px);
}

.studio-capabilities__left {
    flex: 0 0 clamp(140px, 15vw, 200px);
}

.studio-capabilities__label {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--black);
}

.studio-capabilities__list {
    flex: 1;
}

.capability-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(14px, 2vh, 22px) 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
    cursor: default;
    transition: padding-left 0.3s ease;
}

.capability-item:first-child {
    border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.capability-item:hover {
    padding-left: 12px;
}

.capability-name {
    font-size: clamp(0.95rem, 1.2vw, 1.15rem);
    font-weight: 400;
}

.capability-num {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    color: var(--gray);
}

/* ============================================
   STORY
   ============================================ */
.studio-story {
    padding: clamp(40px, 6vh, 80px) clamp(24px, 4vw, 64px);
}

.studio-story__text {
    font-size: clamp(1.3rem, 2.5vw, 2.2rem);
    line-height: 1.45;
    font-weight: 400;
    color: var(--black);
    max-width: 65vw;
    margin-bottom: clamp(24px, 3vh, 40px);
}

.studio-story__text:last-child {
    margin-bottom: 0;
}

/* ============================================
   PHOTO GALLERY SCROLLER
   ============================================ */
.studio-gallery {
    padding: clamp(40px, 6vh, 80px) 0;
    overflow: hidden;
}

.studio-gallery__label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gray);
    margin-bottom: clamp(24px, 3vh, 40px);
    padding-left: clamp(24px, 4vw, 64px);
}

.studio-gallery-row {
    overflow: hidden;
    margin-bottom: clamp(8px, 1vw, 14px);
}

.studio-gallery-track {
    display: flex;
    gap: clamp(8px, 1vw, 14px);
    width: max-content;
    will-change: transform;
    /* Force GPU layer immediately — avoids promotion stutter on first frame */
    transform: translateZ(0);
}

.studio-gallery-row-1 .studio-gallery-track {
    animation: studioScrollLeft 40s linear infinite;
}

.studio-gallery-row-2 .studio-gallery-track {
    animation: studioScrollRight 45s linear infinite;
}

.studio-gallery-item {
    flex: 0 0 auto;
    width: clamp(220px, 22vw, 340px);
    height: clamp(150px, 16vw, 240px);
    border-radius: 6px;
    overflow: hidden;
}

.studio-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
    will-change: transform;
}

.studio-gallery-item:hover img {
    transform: scale(1.05);
}

@keyframes studioScrollLeft {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes studioScrollRight {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

/* ============================================
   TEAM
   ============================================ */
/* HQ + Team Statement */
.studio-hq {
    padding: clamp(60px, 10vh, 120px) clamp(24px, 4vw, 64px);
    display: flex;
    align-items: center;
    gap: clamp(40px, 5vw, 80px);
}

.studio-hq__img-wrap {
    flex: 0 0 clamp(160px, 18vw, 280px);
    border-radius: 6px;
    overflow: hidden;
}

.studio-hq__img {
    width: 100%;
    height: auto;
    display: block;
    filter: grayscale(0.3) contrast(1.05);
    transition: filter 0.4s ease;
}

.studio-hq__img:hover {
    filter: grayscale(0) contrast(1.1);
}

.studio-hq__statement {
    flex: 1;
}

.studio-team-statement__text {
    font-size: clamp(1.8rem, 3.5vw, 3rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--black);
    margin-bottom: clamp(16px, 2.5vh, 28px);
}

.studio-team-statement__sub {
    font-size: clamp(0.85rem, 1vw, 1.05rem);
    line-height: 1.7;
    color: var(--gray);
    max-width: 35vw;
}

@media (max-width: 768px) {
    .studio-hq {
        flex-direction: column;
        text-align: center;
    }
    .studio-hq__img-wrap {
        flex: none;
        width: clamp(140px, 50vw, 220px);
    }
    .studio-team-statement__sub {
        margin: 0 auto;
    }
}

/* ============================================
   CTA + FOOTER
   ============================================ */
/* Force visibility on studio page (home JS adds .visible class, studio doesn't) */
.studio-body .cta-section {
    opacity: 1 !important;
    transform: none !important;
}

.cta-info {
    display: flex;
    justify-content: center;
    gap: clamp(40px, 6vw, 140px);
    padding: clamp(40px, 5vh, 80px) clamp(24px, 4vw, 64px);
    border-top: 1px solid rgba(0,0,0,0.08);
    margin-bottom: clamp(20px, 3vh, 40px);
}

.cta-info__label {
    display: block;
    font-size: clamp(0.65rem, 0.5vw, 0.85rem);
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gray);
    margin-bottom: 12px;
}

.cta-info__col p,
.cta-info__col a {
    font-size: clamp(0.82rem, 0.7vw, 1.1rem);
    line-height: 1.8;
    color: var(--black);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.cta-info__col a:hover {
    opacity: 0.6;
}

.cta-footer {
    text-align: center;
    padding: clamp(20px, 3vh, 32px) clamp(24px, 4vw, 64px);
    border-top: 1px solid rgba(0,0,0,0.06);
}

.cta-footer__brand {
    display: block;
    font-size: clamp(0.65rem, 0.5vw, 0.8rem);
    font-weight: 600;
    letter-spacing: 0.12em;
    color: var(--gray);
}

.cta-footer__sub {
    display: block;
    font-size: clamp(0.6rem, 0.45vw, 0.75rem);
    color: var(--gray);
    letter-spacing: 0.08em;
    margin-top: 4px;
    opacity: 0.6;
}

@media (max-width: 768px) {
    .cta-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 28px;
    }
}

.studio-footer__link:hover {
    opacity: 0.5;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    /* Main container: prevent horizontal overflow */
    .studio-main {
        overflow-x: hidden;
    }

    /* Hero title: reduce bottom padding to save vertical space */
    .studio-hero {
        padding-bottom: clamp(40px, 6vh, 80px);
    }

    /* Hero title: already uses clamp but ensure no overflow */
    .studio-hero__title {
        word-break: break-word;
    }

    /* World section */
    .studio-world__content {
        flex-direction: column;
    }

    .studio-world__globe-wrap {
        flex: none;
        width: 100%;
        max-width: 360px;
        margin: 0 auto;
    }

    /* Label sotto il globo nel flusso normale: l'absolute desktop si sovrapponeva al canvas su mobile */
    .globe-label {
        position: static;
        transform: none;
        margin-top: 14px;
    }

    .studio-world__info {
        padding-top: 0;
        width: 100%;
    }

    /* CRITICAL: 35vw = ~131px at 375px — far too narrow for text. Reset to full. */
    .studio-world__desc {
        max-width: 100%;
    }

    .studio-world__coords {
        flex-wrap: wrap;
        gap: 8px;
        font-size: 0.7rem;
    }

    .studio-world__hq {
        align-items: flex-start;
        margin-left: 0;
        width: 100%;
    }

    /* HQ image: fill available width */
    .studio-world__hq-img {
        width: 100%;
        max-width: 340px;
    }

    /* Capabilities: stack label above list */
    .studio-capabilities {
        flex-direction: column;
        gap: 20px;
    }

    .studio-capabilities__left {
        flex: none;
        width: auto;
    }

    .capability-item:hover {
        padding-left: 0;
    }

    /* About / story text: 65vw = ~244px at 375px — too narrow for readable text */
    .studio-about__text,
    .studio-story__text {
        max-width: 100%;
        font-size: clamp(1.1rem, 4.5vw, 1.8rem);
    }

    /* Gallery items: keep horizontal scrolling marquee intact but
       ensure no container overflow on narrow screens */
    .studio-gallery-item {
        width: clamp(180px, 48vw, 280px);
        height: clamp(120px, 32vw, 190px);
    }

    /* Team statement: 35vw = ~131px at 375px — reset to full width */
    .studio-team-statement__text {
        font-size: clamp(1.5rem, 5.5vw, 2.4rem);
    }

    .studio-team-statement__sub {
        max-width: 100%;
        font-size: 0.9rem;
    }

    .studio-team__grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .studio-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
    }

    .studio-footer__right {
        align-items: flex-start;
    }

    /* HQ section: stack image above text, center-align */
    .studio-hq {
        flex-direction: column;
        gap: 20px;
        padding: clamp(40px, 6vh, 80px) clamp(24px, 4vw, 64px);
        text-align: center;
        align-items: center;
    }

    .studio-hq__img-wrap {
        flex: none;
        width: clamp(140px, 50vw, 220px);
    }
}

/* Small mobile 480px */
@media (max-width: 480px) {
    .studio-hero__title {
        font-size: clamp(2.2rem, 9vw, 3.5rem);
    }

    .studio-world__globe-wrap {
        max-width: 300px;
    }

    .studio-about__text,
    .studio-story__text {
        font-size: clamp(1rem, 4vw, 1.5rem);
    }

    .studio-gallery-item {
        width: clamp(160px, 44vw, 240px);
        height: clamp(108px, 30vw, 160px);
    }

    .capability-name {
        font-size: 0.9rem;
    }
}

/* ============================================
   ULTRAWIDE (34"+)
   ============================================ */
@media (min-width: 2200px) {
    .studio-hero__title {
        font-size: clamp(6rem, 6vw, 10rem);
    }

    .studio-gallery-item {
        width: clamp(300px, 20vw, 500px);
        height: clamp(200px, 14vw, 340px);
    }

    .studio-world__hq-img {
        width: clamp(250px, 18vw, 400px);
    }

    /* About/story text: 65vw would be excessively wide at 3440px — cap it */
    .studio-about__text,
    .studio-story__text {
        max-width: min(65vw, 1100px);
    }

    /* World desc and team sub: 35vw at 3440px = 1204px — cap it */
    .studio-world__desc,
    .studio-team-statement__sub {
        max-width: min(35vw, 700px);
    }

    .capability-name {
        font-size: clamp(1.1rem, 1vw, 1.4rem);
    }

    .capability-item {
        padding: clamp(18px, 2vh, 28px) 0;
    }

    /* CTA info labels: the 0.5vw scalar would be ~17px at 3440px.
       The clamp max of 0.85rem caps it correctly — no change needed.
       But col values using 0.7vw would be ~24px — cap via explicit override. */
    .cta-info__label {
        font-size: clamp(0.75rem, 0.5vw, 1rem);
    }

    .cta-info__col p,
    .cta-info__col a {
        font-size: clamp(0.95rem, 0.7vw, 1.25rem);
    }

    .cta-info .social-icons svg {
        width: 28px;
        height: 28px;
    }

    .cta-info .social-icons {
        gap: 20px;
    }

    /* Footer brand label */
    .cta-footer__brand {
        font-size: clamp(0.75rem, 0.5vw, 1rem);
    }

    .cta-footer__sub {
        font-size: clamp(0.65rem, 0.45vw, 0.9rem);
    }
}
