/* ============================================================
   HERO EDITORIAL — ATYC v2
   ============================================================ */

.hero-ed {
    --clr-cream: #f4f0e8;
    --clr-dark: #342615;
    --clr-copper: #c19869;
    --clr-rust: #cf7255;
    --clr-terracota: #cf7255;
    --clr-olive: #636b2f;
    --clr-sand: #e8ddc8;
    --font-display: 'Playfair Display', 'Georgia', serif;
    --font-sans: 'Cormorant Garamond', 'Garamond', serif;

    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 680px;
    display: flex;
    overflow: hidden;
    cursor: none;
    background: var(--clr-dark);
    max-width: 100vw;
}

/* ============================================================
   PANELES
   ============================================================ */
.hero-ed__panel {
    position: relative;
    flex: 1;
    overflow: hidden;
    transition: flex 0.9s cubic-bezier(0.77, 0, 0.175, 1);
}

.hero-ed__panel--left {
    flex: 0 0 45%;
}

.hero-ed__panel--right {
    flex: 0 0 55%;
    overflow: hidden;
}

@media (hover: hover) and (pointer: fine) {
    .hero-ed:hover .hero-ed__panel--left:hover {
        flex: 0 0 52%;
    }

    .hero-ed:hover .hero-ed__panel--right:hover {
        flex: 0 0 62%;
    }
}

.hero-ed__panel-img-wrap {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-ed__panel-img {
    position: absolute;
    inset: -4%;
    width: 108%;
    height: 108%;
    object-fit: cover;
    object-position: center;
    filter: saturate(0.85) contrast(1.05);
    transition: transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        filter 1.0s ease;
    will-change: transform;
}

@media (hover: hover) and (pointer: fine) {
    .hero-ed__panel:hover .hero-ed__panel-img {
        transform: scale(1.04);
        filter: saturate(1.05) contrast(1.08);
    }
}

.hero-ed__panel-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            rgba(13, 12, 10, 0.55) 0%,
            rgba(13, 12, 10, 0.20) 60%,
            rgba(193, 152, 105, 0.10) 100%);
    transition: opacity 0.6s ease;
}

.hero-ed__panel-overlay--dark {
    background: linear-gradient(135deg,
            rgba(13, 12, 10, 0.82) 0%,
            rgba(13, 12, 10, 0.60) 50%,
            rgba(13, 12, 10, 0.38) 100%);
}

@media (hover: hover) and (pointer: fine) {
    .hero-ed__panel:hover .hero-ed__panel-overlay {
        opacity: 0.7;
    }
}

/* ============================================================
   ETIQUETAS VERTICALES
   ============================================================ */
.hero-ed__vertical-label {
    position: absolute;
    top: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: translateY(-50%);
    font-family: var(--font-display);
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(244, 240, 232, 0.55);
    transition: color 0.4s ease;
    z-index: 3;
}

.hero-ed__vertical-label--left {
    left: 1.4rem;
}

.hero-ed__vertical-label--right {
    right: 1.4rem;
}

@media (hover: hover) and (pointer: fine) {
    .hero-ed__panel:hover .hero-ed__vertical-label {
        color: rgba(244, 240, 232, 0.88);
    }
}

.hero-ed__vertical-dot {
    display: inline-block;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--clr-copper);
    writing-mode: horizontal-tb;
    flex-shrink: 0;
}

/* ============================================================
   FIX 5 — SLIDE NUM rediseñado
   Antes: número flotando sin contexto
   Ahora: barra de progreso visual con numeración clara
   ============================================================ */
.hero-ed__slide-num {
    position: absolute;
    bottom: 2.2rem;
    left: 3rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    z-index: 4;
}

.hero-ed__slide-num-current {
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--clr-copper);
    line-height: 1;
}

/* Barra de progreso — más comunicativa que un guión */
.hero-ed__slide-num-track {
    width: 36px;
    height: 1px;
    background: rgba(244, 240, 232, 0.18);
    position: relative;
    overflow: hidden;
}

.hero-ed__slide-num-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    /* JS actualiza esto según slide actual */
    height: 100%;
    background: var(--clr-copper);
    transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-ed__slide-num-total {
    font-family: var(--font-display);
    font-size: 0.65rem;
    letter-spacing: 0.14em;
    color: rgba(244, 240, 232, 0.35);
    line-height: 1;
}

/* ============================================================
   CONTENIDO EDITORIAL
   ============================================================ */
.hero-ed__content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem 3.5rem 3rem 4rem;
    z-index: 4;
    box-sizing: border-box;
    overflow: hidden;
}

.hero-ed__eyebrow {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--clr-copper);
    margin-bottom: 2rem;
}

.hero-ed__eyebrow-line {
    display: inline-block;
    width: 36px;
    height: 1px;
    background: var(--clr-copper);
    flex-shrink: 0;
}

.hero-ed__title {
    margin: 0 0 2rem;
    font-family: var(--font-display);
    font-size: clamp(3rem, 5.5vw, 6rem);
    font-weight: 700;
    line-height: 0.95;
    letter-spacing: -0.03em;
    color: var(--clr-cream);
    display: flex;
    flex-direction: column;
    gap: 0.1em;
}

.hero-ed__title em {
    font-style: italic;
    color: var(--clr-terracota);
    text-shadow: 0 2px 24px rgba(207, 114, 85, 0.18);
}

.hero-ed__title-line {
    display: block;
    overflow: hidden;
}

/* ============================================================
   FIX 3 — PÁRRAFO
   Antes: hyphens: auto causaba "biofí-lico" en medio de pantalla
   Ahora: sin guiones, max-width generoso, balance natural
   ============================================================ */
.hero-ed__desc {
    width: 100%;
    max-width: 480px;
    /* ← ampliado de 400px, evita cortes prematuros */
    font-family: var(--font-sans);
    font-size: 1.12rem;
    line-height: 1.85;
    color: rgba(244, 240, 232, 0.82);
    margin-bottom: 2.5rem;
    font-weight: 500;
    text-shadow: 0 1px 12px rgba(13, 12, 10, 0.55);
    hyphens: none;
    /* ← OFF, el texto tiene espacio suficiente */
    word-break: normal;
    /* ← solo rompe en espacios naturales */
    overflow-wrap: normal;
}

/* ============================================================
   BOTONES
   ============================================================ */
.hero-ed__actions {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    flex-wrap: wrap;
}

.hero-ed__btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.9rem 1.8rem;
    font-family: var(--font-display);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 3px;
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.3s ease;
    cursor: none;
}

.hero-ed__btn::before {
    content: '';
    position: absolute;
    inset: 0;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.45s cubic-bezier(0.77, 0, 0.175, 1);
    z-index: 0;
}

.hero-ed__btn-text,
.hero-ed__btn-arrow {
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

/* Primario — sin cambios, funciona perfecto */
.hero-ed__btn--primary {
    background: var(--clr-terracota);
    color: #ffffff;
    box-shadow: 0 8px 28px rgba(207, 114, 85, 0.38);
}

.hero-ed__btn--primary::before {
    background: #b85e42;
}

@media (hover: hover) and (pointer: fine) {
    .hero-ed__btn--primary:hover::before {
        transform: scaleX(1);
    }

    .hero-ed__btn--primary:hover .hero-ed__btn-text,
    .hero-ed__btn--primary:hover .hero-ed__btn-arrow {
        color: #ffffff;
    }

    .hero-ed__btn--primary:hover {
        transform: translateY(-3px);
        box-shadow: 0 14px 36px rgba(207, 114, 85, 0.50);
    }
}

/* ============================================================
   FIX 1 — BOTÓN GHOST
   Antes: borde blanco frío rgba(244,240,232,0.40) — rompía la paleta
   Ahora: borde cobre cálido coherente con el resto del diseño
   ============================================================ */
.hero-ed__btn--ghost {
    background: transparent;
    color: rgba(244, 240, 232, 0.85);
    border: 1px solid rgba(193, 152, 105, 0.55);
    /* ← cobre, no blanco */
}

.hero-ed__btn--ghost::before {
    background: rgba(193, 152, 105, 0.12);
}

@media (hover: hover) and (pointer: fine) {
    .hero-ed__btn--ghost:hover::before {
        transform: scaleX(1);
    }

    .hero-ed__btn--ghost:hover {
        border-color: rgba(193, 152, 105, 0.9);
        color: var(--clr-copper);
        transform: translateY(-3px);
    }
}

/* ============================================================
   FIX 2 — TAGS
   Antes: border blanco + border-radius alto = SaaS pill genérica
   Ahora: borde terracota cálido + esquinas casi rectas = editorial premium
   ============================================================ */
.hero-ed__tags {
    position: absolute;
    bottom: 2.2rem;
    left: 4rem;
    right: 1rem;
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    z-index: 5;
    padding-right: 0.5rem;
}

.hero-ed__tag {
    display: inline-flex;
    align-items: center;
    padding: 0.38rem 0.85rem;
    border: 1px solid rgba(193, 152, 105, 0.30);
    /* ← cobre, no blanco */
    border-radius: 2px;
    /* ← casi recto, arquitectónico */
    font-family: var(--font-display);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(193, 152, 105, 0.75);
    /* ← texto cobre suave */
    background: rgba(13, 12, 10, 0.35);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: color 0.3s ease,
        border-color 0.3s ease,
        background 0.3s ease;
    white-space: nowrap;
}

@media (hover: hover) and (pointer: fine) {
    .hero-ed__tag:hover {
        color: var(--clr-copper);
        border-color: rgba(193, 152, 105, 0.7);
        background: rgba(193, 152, 105, 0.10);
    }
}

/* ============================================================
   DIVISOR CENTRAL
   ============================================================ */
.hero-ed__divider {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 45%;
    width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    pointer-events: none;
}

.hero-ed__divider-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    background: linear-gradient(to bottom,
            transparent 0%,
            rgba(193, 152, 105, 0.5) 25%,
            rgba(193, 152, 105, 0.8) 50%,
            rgba(193, 152, 105, 0.5) 75%,
            transparent 100%);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 1.2s cubic-bezier(0.77, 0, 0.175, 1) 0.4s;
}

.hero-ed__divider-line.is-visible {
    transform: scaleY(1);
}

.hero-ed__divider-pill {
    position: relative;
    z-index: 2;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--clr-dark);
    border: 1px solid rgba(193, 152, 105, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--clr-copper);
    opacity: 0;
    transform: scale(0);
    transition: opacity 0.5s ease 1.4s,
        transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 1.4s;
}

.hero-ed__divider-pill.is-visible {
    opacity: 1;
    transform: scale(1);
}

/* ============================================================
   FIX 4 — SCROLL INDICATOR
   "Descubrir" eliminado — solo track animado limpio
   ============================================================ */
.hero-ed__scroll {
    position: absolute;
    bottom: 2.2rem;
    right: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    /* sin gap, no hay label */
    z-index: 6;
}

.hero-ed__scroll-track {
    width: 1px;
    height: 52px;
    background: rgba(244, 240, 232, 0.15);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.hero-ed__scroll-thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: var(--clr-copper);
    border-radius: 999px;
    animation: scrollThumb 2.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes scrollThumb {
    0% {
        top: 0%;
        opacity: 1;
    }

    80% {
        top: 70%;
        opacity: 0.6;
    }

    100% {
        top: 100%;
        opacity: 0;
    }
}

/* ============================================================
   ANIMACIONES REVEAL
   ============================================================ */
.js-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

.js-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.hero-ed__title-line {
    clip-path: inset(0 0 100% 0);
    transition: clip-path 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-ed__title.is-visible .hero-ed__title-line[data-line="1"] {
    clip-path: inset(0 0 0% 0);
    transition-delay: 0.14s;
}

.hero-ed__title.is-visible .hero-ed__title-line[data-line="2"] {
    clip-path: inset(0 0 0% 0);
    transition-delay: 0.26s;
}

.hero-ed__title.is-visible .hero-ed__title-line[data-line="3"] {
    clip-path: inset(0 0 0% 0);
    transition-delay: 0.38s;
}

/* ============================================================
   RESPONSIVE — 1100px
   ============================================================ */
@media (max-width: 1100px) {
    .hero-ed__content {
        padding: 2.5rem 2.5rem 2.5rem 3rem;
    }

    .hero-ed__tags {
        left: 3rem;
    }

    .hero-ed__desc {
        font-size: 1.05rem;
        max-width: 420px;
    }
}

/* ============================================================
   RESPONSIVE — 900px (tablets landscape / mobile grande)
   ============================================================ */
@media (max-width: 900px) {
    .hero-ed {
        flex-direction: column;
        height: auto;
        min-height: 100svh;
        overflow-x: hidden;
        cursor: auto;
    }

    .hero-ed__panel--left {
        flex: 0 0 40vh;
        min-height: 40vh;
        max-height: 45vh;
    }

    .hero-ed__panel--right {
        flex: 1;
        min-height: 60vh;
        overflow: hidden;
    }

    .hero-ed:hover .hero-ed__panel--left:hover,
    .hero-ed:hover .hero-ed__panel--right:hover {
        flex: unset;
    }

    .hero-ed__divider {
        left: 0;
        right: 0;
        top: 40vh;
        bottom: auto;
        height: 0;
        width: 100%;
        flex-direction: row;
    }

    .hero-ed__divider-line {
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        bottom: auto;
        width: 100%;
        height: 1px;
        transform: scaleX(0);
        transform-origin: left;
    }

    .hero-ed__divider-line.is-visible {
        transform: scaleX(1);
    }

    .hero-ed__vertical-label {
        display: none;
    }

    .hero-ed__content {
        padding: 2.5rem 2rem 6rem 2rem;
        justify-content: flex-start;
        padding-top: 2rem;
    }

    .hero-ed__eyebrow {
        margin-bottom: 1.2rem;
    }

    .hero-ed__title {
        font-size: clamp(2.4rem, 9vw, 4rem);
        margin-bottom: 1.2rem;
    }

    .hero-ed__desc {
        max-width: 100%;
        font-size: 1rem;
        line-height: 1.8;
        margin-bottom: 1.8rem;
    }

    .hero-ed__tags {
        position: absolute;
        bottom: 1.5rem;
        left: 2rem;
        right: 1rem;
        margin-top: 0;
        padding-right: 0;
    }

    .hero-ed__scroll {
        bottom: 1.5rem;
        right: 1.2rem;
    }

    .hero-ed__slide-num {
        left: 1.5rem;
        bottom: 1.5rem;
    }

    .hero-ed__btn {
        cursor: pointer;
    }
}

/* ============================================================
   RESPONSIVE — 600px (mobile portrait)
   ============================================================ */
@media (max-width: 600px) {
    .hero-ed {
        min-height: 100svh;
    }

    .hero-ed__panel--left {
        flex: 0 0 38vh;
        min-height: 38vh;
        max-height: 42vh;
    }

    .hero-ed__panel--right {
        flex: 1;
        min-height: 62vh;
    }

    .hero-ed__divider {
        top: 38vh;
    }

    .hero-ed__content {
        padding: 1.5rem 1.25rem 7rem 1.25rem;
    }

    .hero-ed__eyebrow {
        font-size: 0.62rem;
        gap: 0.7rem;
        margin-bottom: 1rem;
    }

    .hero-ed__eyebrow-line {
        width: 24px;
    }

    .hero-ed__title {
        font-size: clamp(2rem, 10.5vw, 2.8rem);
        margin-bottom: 1rem;
        gap: 0.08em;
    }

    /* Mobile: párrafo sin cortes, fluye naturalmente */
    .hero-ed__desc {
        max-width: 100%;
        font-size: 0.97rem;
        line-height: 1.75;
        margin-bottom: 1.5rem;
        hyphens: none;
        word-break: normal;
    }

    .hero-ed__actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.85rem;
    }

    .hero-ed__btn {
        justify-content: center;
        cursor: pointer;
        padding: 1rem 1.5rem;
        font-size: 0.78rem;
    }

    /* Tags en mobile — más compactas pero legibles */
    .hero-ed__tags {
        bottom: 1rem;
        left: 1.25rem;
        right: 0.75rem;
        gap: 0.4rem;
    }

    .hero-ed__tag {
        font-size: 0.58rem;
        padding: 0.32rem 0.7rem;
        letter-spacing: 0.12em;
    }

    .hero-ed__scroll {
        bottom: 1rem;
        right: 0.8rem;
    }

    .hero-ed__scroll-track {
        height: 40px;
    }

    .hero-ed__slide-num {
        left: 1.2rem;
        bottom: 1.2rem;
    }

    .hero-ed__slide-num-current {
        font-size: 0.7rem;
    }

    .hero-ed__slide-num-track {
        width: 28px;
    }

    .hero-ed__slide-num-total {
        font-size: 0.58rem;
    }
}

/* ============================================================
   RESPONSIVE — 400px (iPhone SE, mobile muy pequeño)
   ============================================================ */
@media (max-width: 400px) {
    .hero-ed__panel--left {
        flex: 0 0 35vh;
        min-height: 35vh;
        max-height: 38vh;
    }

    .hero-ed__panel--right {
        flex: 1;
        min-height: 65vh;
    }

    .hero-ed__divider {
        top: 35vh;
    }

    .hero-ed__content {
        padding: 1.2rem 1rem 7rem 1rem;
    }

    .hero-ed__title {
        font-size: clamp(1.85rem, 11vw, 2.4rem);
    }

    .hero-ed__desc {
        font-size: 0.92rem;
        line-height: 1.7;
    }

    .hero-ed__btn {
        padding: 0.9rem 1.2rem;
        font-size: 0.74rem;
    }

    .hero-ed__tag {
        font-size: 0.54rem;
        padding: 0.28rem 0.6rem;
        letter-spacing: 0.1em;
    }

    /* Slide num muy pequeño — solo número activo */
    .hero-ed__slide-num-track,
    .hero-ed__slide-num-total {
        display: none;
    }
}

/* ============================================================
   RESPONSIVE — landscape mobile (altura limitada)
   ============================================================ */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 520px) {
    .hero-ed {
        flex-direction: row;
        height: 100vh;
        min-height: unset;
    }

    .hero-ed__panel--left {
        flex: 0 0 40%;
        max-height: unset;
        min-height: unset;
    }

    .hero-ed__panel--right {
        flex: 0 0 60%;
        min-height: unset;
    }

    .hero-ed__divider {
        left: 40%;
        top: 0;
        bottom: 0;
        height: auto;
        width: 0;
        flex-direction: column;
    }

    .hero-ed__divider-line {
        position: absolute;
        top: 0;
        bottom: 0;
        left: 50%;
        width: 1px;
        height: auto;
        transform: scaleY(0);
        transform-origin: top;
    }

    .hero-ed__divider-line.is-visible {
        transform: scaleY(1);
    }

    .hero-ed__content {
        padding: 1.5rem 1.5rem 4rem 2rem;
        justify-content: center;
    }

    .hero-ed__title {
        font-size: clamp(1.6rem, 5vw, 2.5rem);
        margin-bottom: 0.8rem;
    }

    .hero-ed__desc {
        font-size: 0.88rem;
        line-height: 1.6;
        margin-bottom: 1rem;
    }

    .hero-ed__eyebrow {
        margin-bottom: 0.8rem;
    }

    .hero-ed__actions {
        flex-direction: row;
    }

    .hero-ed__btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.74rem;
    }

    .hero-ed__tags {
        bottom: 0.8rem;
        left: 2rem;
    }

    .hero-ed__tag {
        font-size: 0.56rem;
        padding: 0.28rem 0.6rem;
    }

    .hero-ed__scroll {
        display: none;
    }
}

/* ============================================================
   ACCESIBILIDAD — reducción de movimiento
   ============================================================ */
@media (prefers-reduced-motion: reduce) {

    .hero-ed__panel,
    .hero-ed__panel-img,
    .hero-ed__panel-overlay,
    .hero-ed__divider-line,
    .hero-ed__divider-pill,
    .js-reveal {
        transition: none !important;
        animation: none !important;
    }

    .hero-ed__scroll-thumb {
        animation: none;
    }

    .js-reveal {
        opacity: 1;
        transform: none;
    }

    .hero-ed__title-line {
        clip-path: none;
    }
} 