/* =========================================
   TRUST SECTION / TRAYECTORIA — v3 Museo 10/10
   ATYC
========================================= */

:root {
    --atyc-terra: #c0542a;
    --atyc-terra-rgb: 192, 84, 42;
    --atyc-terra-soft: rgba(192, 84, 42, 0.07);
    --atyc-terra-mid: rgba(192, 84, 42, 0.18);
    --atyc-terra-line: rgba(192, 84, 42, 0.14);
    --atyc-gold: #b89a5c;
    --atyc-gold-faint: rgba(184, 154, 92, 0.12);
    --atyc-ink: #171717;
    --atyc-ink-60: rgba(23, 23, 23, 0.60);
    --atyc-ink-38: rgba(23, 23, 23, 0.38);
    --atyc-cream: #f6f2eb;
}

/* =========================================
   BASE
========================================= */

.atyc-trust {
    position: relative;
    padding: clamp(5.5rem, 8vw, 8rem) 0 clamp(4.5rem, 6vw, 6rem);
    background: var(--atyc-cream);
    overflow: hidden;
}

/* Textura papel */
.atyc-trust::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.032'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

/* Luz radial terracota esquina inferior izquierda */
.atyc-trust::after {
    content: "";
    position: absolute;
    bottom: -4rem;
    left: -8rem;
    width: 30rem;
    height: 30rem;
    border-radius: 50%;
    background: radial-gradient(circle,
            rgba(192, 84, 42, 0.055) 0%,
            rgba(184, 154, 92, 0.03) 45%,
            transparent 72%);
    pointer-events: none;
    filter: blur(6px);
    z-index: 0;
}

/* Watermark editorial */
.atyc-trust__watermark {
    position: absolute;
    right: -2rem;
    top: 50%;
    transform: translateY(-52%);
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(20rem, 30vw, 34rem);
    font-weight: 300;
    line-height: 1;
    letter-spacing: -0.1em;
    color: rgba(192, 84, 42, 0.038);
    pointer-events: none;
    user-select: none;
    z-index: 0;
    will-change: transform;
}

.atyc-trust__shell {
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.atyc-trust__top {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: clamp(2.5rem, 5vw, 6rem);
    align-items: start;
}

/* =========================================
   INTRO — IZQUIERDA
========================================= */

.atyc-trust__intro {
    max-width: 640px;
    padding-right: clamp(0rem, 1vw, 1rem);
}

.atyc-trust__eyebrow {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 1.8rem;
    font-family: "Cormorant Garamond", serif;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.34em;
    text-transform: uppercase;
    color: var(--atyc-ink-60);
    opacity: 0;
    transform: translateX(-14px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.atyc-trust__eyebrow.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.atyc-trust__eyebrow::before {
    content: "";
    width: 2.8rem;
    height: 1px;
    background: linear-gradient(90deg, var(--atyc-terra) 0%, rgba(192, 84, 42, 0.2) 100%);
    flex-shrink: 0;
}

.atyc-trust__title {
    margin: 0;
    max-width: 11ch;
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(3.8rem, 7vw, 6rem);
    line-height: 0.95;
    font-weight: 400;
    letter-spacing: -0.05em;
    color: var(--atyc-ink);
    text-wrap: balance;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.85s ease 0.12s, transform 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.12s;
}

.atyc-trust__title.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.atyc-trust__title-em {
    font-style: italic;
    position: relative;
    display: inline-block;
}

.atyc-trust__title-em::after {
    content: "";
    position: absolute;
    bottom: -3px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--atyc-terra), rgba(192, 84, 42, 0.18));
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.5s;
}

.atyc-trust__title-em.is-underlined::after {
    transform: scaleX(1);
}

.atyc-trust__description {
    margin: 2.1rem 0 0;
    max-width: 48ch;
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(1.08rem, 1.5vw, 1.28rem);
    font-weight: 300;
    line-height: 1.7;
    color: var(--atyc-ink-60);
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.75s ease 0.28s, transform 0.75s ease 0.28s;
}

.atyc-trust__description.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.atyc-trust__cta {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    margin-top: 2.6rem;
    padding-bottom: 0.95rem;
    border-bottom: 1px solid rgba(192, 84, 42, 0.32);
    text-decoration: none;
    font-family: "Cormorant Garamond", serif;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--atyc-ink);
    opacity: 0;
    transform: translateY(10px);
    transition:
        opacity 0.7s ease 0.42s,
        transform 0.7s ease 0.42s,
        color 0.35s,
        border-color 0.35s,
        gap 0.35s;
}

.atyc-trust__cta.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.atyc-trust__cta:hover,
.atyc-trust__cta:focus-visible {
    color: var(--atyc-terra);
    border-color: rgba(192, 84, 42, 0.7);
    gap: 1.55rem;
    transform: translateY(-2px) !important;
}

.atyc-trust__cta-arrow {
    font-size: 1.15rem;
    line-height: 1;
    color: var(--atyc-terra);
    transition: transform 0.35s ease;
}

.atyc-trust__cta:hover .atyc-trust__cta-arrow,
.atyc-trust__cta:focus-visible .atyc-trust__cta-arrow {
    transform: translateX(5px);
}

/* =========================================
   STATS — DERECHA
========================================= */

.atyc-trust__stats {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-height: 440px;
    padding: clamp(0.5rem, 1.2vw, 1.4rem) 0;
    align-items: stretch;
}

/* Línea vertical — terracota sutil */
.atyc-trust__stats::before {
    content: "";
    position: absolute;
    top: 4%;
    bottom: 4%;
    left: 50%;
    width: 1px;
    transform: translateX(-50%);
    background: linear-gradient(to bottom,
            transparent 0%,
            var(--atyc-terra-line) 20%,
            var(--atyc-terra-line) 80%,
            transparent 100%);
    pointer-events: none;
    z-index: 0;
}

/* Línea horizontal — terracota sutil */
.atyc-trust__stats::after {
    content: "";
    position: absolute;
    left: 4%;
    right: 4%;
    top: 50%;
    height: 1px;
    transform: translateY(-50%);
    background: linear-gradient(to right,
            transparent 0%,
            var(--atyc-terra-line) 20%,
            var(--atyc-terra-line) 80%,
            transparent 100%);
    pointer-events: none;
    z-index: 0;
}

.atyc-trust__stat {
    position: relative;
    z-index: 1;
    padding: clamp(1.6rem, 2.8vw, 2.6rem) clamp(1.2rem, 2.2vw, 2.2rem);
    opacity: 0;
    transform: translateY(40px);
    transition:
        opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
    cursor: default;
}

.atyc-trust__stat::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--atyc-terra-soft);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: -1;
}

.atyc-trust__stat:hover::before {
    opacity: 1;
}

.atyc-trust__stat.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.atyc-trust__stat:hover {
    transform: translateY(-6px) !important;
}

.atyc-trust__stat--projects {
    justify-self: start;
    align-self: start;
}

.atyc-trust__stat--clients {
    justify-self: end;
    align-self: start;
}

.atyc-trust__stat--area {
    justify-self: start;
    align-self: end;
}

.atyc-trust__stat--years {
    justify-self: end;
    align-self: end;
}

.atyc-trust__stat-number-wrap {
    display: inline-flex;
    align-items: flex-start;
    gap: 0.18rem;
    margin-bottom: 1.1rem;
    line-height: 0.86;
}

.atyc-trust__stat-number {
    display: inline-block;
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(4rem, 6.2vw, 5.8rem);
    font-weight: 400;
    letter-spacing: -0.07em;
    color: var(--atyc-ink);
}

/* ═══════════════════════════════════════
   + TERRACOTA — el que no se toca jamás
═══════════════════════════════════════ */
.atyc-trust__stat-plus {
    display: inline-block;
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(2.4rem, 3.8vw, 3.6rem);
    font-weight: 300;
    line-height: 1;
    color: var(--atyc-terra);
    /* #c0542a terracota ladrillo */
    transform: translateY(0.3rem);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.atyc-trust__stat:hover .atyc-trust__stat-plus {
    transform: translateY(0.05rem) scale(1.22);
}

.atyc-trust__stat-label {
    margin: 0 0 0.65rem;
    font-family: "Cormorant Garamond", serif;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    line-height: 1.2;
    text-transform: uppercase;
    color: var(--atyc-ink);
    position: relative;
}

.atyc-trust__stat-label::after {
    content: "";
    display: block;
    width: 0;
    height: 1px;
    background: var(--atyc-terra);
    margin-top: 6px;
    transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.atyc-trust__stat:hover .atyc-trust__stat-label::after {
    width: 2.2rem;
}

.atyc-trust__stat-text {
    margin: 0;
    max-width: 200px;
    font-family: "Cormorant Garamond", serif;
    font-size: 1.06rem;
    font-weight: 300;
    line-height: 1.6;
    font-style: italic;
    color: var(--atyc-ink-60);
}

/* =========================================
   BRANDS — MARQUEE PREMIUM
========================================= */

.atyc-trust__brands {
    margin-top: clamp(5rem, 8vw, 7rem);
    padding-top: 2.2rem;
    border-top: 1px solid rgba(192, 84, 42, 0.13);
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.8s ease 0.5s, transform 0.8s ease 0.5s;
}

.atyc-trust__brands.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.atyc-trust__brands-title {
    margin: 0 0 2rem;
    font-family: "Cormorant Garamond", serif;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.36em;
    text-transform: uppercase;
    color: var(--atyc-ink-38);
}

.atyc-trust__brands-track {
    position: relative;
    overflow: hidden;
}

.atyc-trust__brands-track::before,
.atyc-trust__brands-track::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 10rem;
    z-index: 2;
    pointer-events: none;
}

.atyc-trust__brands-track::before {
    left: 0;
    background: linear-gradient(to right, var(--atyc-cream) 20%, transparent);
}

.atyc-trust__brands-track::after {
    right: 0;
    background: linear-gradient(to left, var(--atyc-cream) 20%, transparent);
}

.atyc-trust__brands-slider {
    display: flex;
    align-items: center;
    width: max-content;
    animation: atyc-marquee 28s linear infinite;
}

.atyc-trust__brands-slider:hover {
    animation-play-state: paused;
}

@keyframes atyc-marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.atyc-trust__brand {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 2.8rem;
    min-width: 148px;
    position: relative;
    transition: filter 0.4s ease, transform 0.4s ease;
}

.atyc-trust__brand img {
    max-width: 128px;
    max-height: 42px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(1) opacity(0.48) contrast(1.06);
    transition: filter 0.45s ease, transform 0.4s ease;
}

.atyc-trust__brand:hover img {
    filter: grayscale(0) opacity(1) contrast(1);
    transform: scale(1.07);
}

.atyc-trust__brand:not(:last-child)::after {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(192, 84, 42, 0.45);
}

/* =========================================
   LARGE DESKTOP
========================================= */

@media (min-width: 1400px) {
    .atyc-trust__top {
        grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    }

    .atyc-trust__stats {
        min-height: 480px;
    }
}

/* =========================================
   TABLET
========================================= */

@media (max-width: 1100px) {
    .atyc-trust__top {
        grid-template-columns: 1fr;
        gap: 3.5rem;
    }

    .atyc-trust__intro {
        max-width: 760px;
    }

    .atyc-trust__title {
        max-width: 14ch;
    }

    .atyc-trust__stats {
        min-height: auto;
        max-width: 820px;
    }

    .atyc-trust__stat--projects,
    .atyc-trust__stat--clients,
    .atyc-trust__stat--area,
    .atyc-trust__stat--years {
        justify-self: start;
        align-self: auto;
    }

    .atyc-trust__watermark {
        font-size: 20rem;
    }
}

/* =========================================
   MOBILE
========================================= */

@media (max-width: 767px) {
    .atyc-trust {
        padding: 4rem 0 3.5rem;
        overflow: hidden;
        /* ← corta el glow/círculo que se sale */
    }

    .atyc-trust__shell {
        width: min(100% - 32px, 1280px);
    }

    .atyc-trust__watermark {
        display: none;
    }

    .atyc-trust__eyebrow {
        margin-bottom: 1.2rem;
        font-size: 0.7rem;
        letter-spacing: 0.24em;
    }

    .atyc-trust__eyebrow::before {
        width: 1.8rem;
    }

    .atyc-trust__title {
        max-width: 100%;
        /* ← que no se corte */
        font-size: clamp(2.8rem, 11vw, 4rem);
        line-height: 0.97;
    }

    .atyc-trust__description {
        margin-top: 1.4rem;
        font-size: 1rem;
        max-width: 100%;
        /* ← evita el corte */
        overflow-wrap: break-word;
        word-break: break-word;
    }

    .atyc-trust__cta {
        margin-top: 1.8rem;
        padding-bottom: 0.75rem;
        font-size: 0.78rem;
        letter-spacing: 0.2em;
    }

    /* Stats: 2 columnas en mobile — más compacto */
    .atyc-trust__stats {
        grid-template-columns: 1fr 1fr;
        min-height: auto;
        gap: 0;
    }

    .atyc-trust__stat {
        padding: 1.4rem 1rem;
    }

    .atyc-trust__stat-number {
        font-size: clamp(2.8rem, 11vw, 4rem);
    }

    .atyc-trust__stat-plus {
        font-size: clamp(1.8rem, 7vw, 2.4rem);
    }

    .atyc-trust__stat-label {
        font-size: 0.68rem;
        letter-spacing: 0.2em;
    }

    .atyc-trust__stat-text {
        font-size: 0.92rem;
        line-height: 1.5;
    }

    /* Ocultar el glow/after decorativo en mobile */
    .atyc-trust::after {
        display: none;
    }

    .atyc-trust__brands {
        margin-top: 3rem;
        padding-top: 1.4rem;
    }

    .atyc-trust__brands-title {
        font-size: 0.68rem;
        letter-spacing: 0.22em;
        margin-bottom: 1.2rem;
    }

    /* Fade menos agresivo en mobile */
    .atyc-trust__brands-track::before,
    .atyc-trust__brands-track::after {
        width: 3rem;
    }

    .atyc-trust__brand {
        padding: 0.5rem 1.6rem;
        min-width: 100px;
    }

    .atyc-trust__brand img {
        max-width: 90px;
        max-height: 32px;
    }
}

/* 480px — teléfonos pequeños */
@media (max-width: 480px) {
    .atyc-trust__title {
        font-size: clamp(2.5rem, 11vw, 3.4rem);
    }

    /* En móviles muy pequeños sí va a 1 columna */
    .atyc-trust__stats {
        grid-template-columns: 1fr;
    }

    .atyc-trust__stats::before,
    .atyc-trust__stats::after {
        display: none;
    }

    .atyc-trust__stat {
        padding: 1.2rem 0;
        border-bottom: 1px solid rgba(192, 84, 42, 0.1);
    }

    .atyc-trust__stat--years {  
        border-bottom: none;
    }
}