/*
 * responsive.css — Ticosoft Futuro Digital
 * Breakpoints, afinamiento responsive avanzado y adaptación multiformato
 * ETAPA 8: Responsive completo y afinamiento multidispositivo
 * ====================================================
 *
 * Breakpoints principales:
 *   Desktop XL   → >= 1600px
 *   Desktop      → 1200px – 1599px (con optimización 1200–1399px)
 *   Tablet       → 768px – 1199px (900–1199px nav / 768–899px burger)
 *   Mobile       → <= 767px (con afinamiento 360–390px)
 *
 * ====================================================
 */


/* --------------------------------------------------
   1. TABLET GENERAL  (768px – 1199px)
   -------------------------------------------------- */

@media (min-width: 768px) and (max-width: 1199px) {

    /* Contenedores generales */
    .container,
    .container-wide {
        padding-inline: var(--page-padding-tablet);
    }

    /* Visibilidad de capas */
    .desktop-only,
    .mobile-only {
        display: none !important;
    }

    .tablet-only {
        display: block;
    }

    /* Offset de scroll para header fijo en tablet */
    section[id] {
        scroll-margin-top: 90px;
    }

    /* ---- HEADER TABLET ---- */

    .site-header__inner {
        min-height: 78px;
        grid-template-columns: auto 1fr auto;
        gap: var(--space-6);
    }

    .site-header__logo-image {
        width: 145px;
    }

    .site-nav--desktop {
        gap: 20px;
        justify-content: center;
    }

    .site-nav__link {
        font-size: 0.72rem;
    }

    /* Ocultar "Contacto" en barra de nav tablet */
    .site-nav__link[href="#contacto"] {
        display: none;
    }

    /* Manifesto y CTA del header se ocultan */
    .site-header__manifest,
    .site-header__cta {
        display: none !important;
    }

    /* Mostrar botón hamburguesa */
    .mobile-menu-button {
        display: flex;
    }

    /* ---- HERO TABLET (ETAPA 3) ---- */

    .hero {
        min-height: clamp(620px, 70vh, 720px);
    }

    .hero__content {
        min-height: clamp(620px, 70vh, 720px);
        padding-top: 115px;
        padding-inline: var(--page-padding-tablet);
        padding-bottom: 28px;
    }

    .hero__background {
        background-position: center 38%;
    }

    .hero__main {
        top: 160px;
        left: var(--page-padding-tablet);
        transform: none;
        width: min(580px, 66%);
        text-align: left;
    }

    .hero__title {
        font-size: clamp(3.4rem, 6.8vw, 5.2rem);
        line-height: 0.94;
    }

    .hero__subtitle {
        max-width: 460px;
        line-height: 1.55;
        font-size: 0.64rem;
        letter-spacing: 0.28em;
    }

    /* Ocultar laterales secundarios en tablet */
    .hero__side--left-bottom,
    .hero__side--right-top {
        display: none !important;
    }

    .hero__side--left-top {
        top: 120px;
        left: var(--page-padding-tablet);
    }

    .hero__future {
        top: 200px;
        right: 36px;
        font-size: 1.05rem;
        text-align: right;
    }

    .hero__capabilities {
        left: 50%;
        transform: translateX(-50%);
        width: calc(100% - (var(--page-padding-tablet) * 2));
        bottom: 30px;
        gap: 8px;
    }

    .hero-capability {
        min-height: 42px;
        padding: 8px 12px;
        font-size: 0.72rem;
        gap: 6px;
    }

    /* En tablet acortar textos a una sola palabra clave */
    .hero-capability .text-secondary-term {
        display: none;
    }

    .hero-capability__arrow {
        display: inline-block;
        font-size: 0.85rem;
        color: var(--color-cyan);
    }

    /* ---- SECCIÓN SOLUCIONES EN TABLET (ETAPA 4) ---- */

    .solutions-section {
        padding: 90px 0 120px;
    }

    .solutions-section__header {
        margin-bottom: 36px;
    }

    .solutions-grid {
        display: flex;
        gap: 16px;
        width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        background: none;
        border: 0;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 12px;
    }

    .solutions-grid::-webkit-scrollbar {
        display: none;
    }

    .solution-panel {
        flex: 0 0 clamp(280px, 34vw, 360px);
        height: clamp(420px, 56vw, 540px);
        scroll-snap-align: start;
        border: 1px solid var(--color-border);
        border-radius: var(--radius-sm);
    }

    /* ---- SECCIÓN DE CONVICCIÓN EN TABLET (ETAPA 5) ---- */

    .conviction-section {
        padding: 120px 0 140px;
    }

    .conviction-section__layout {
        grid-template-columns: 140px minmax(0, 1fr);
        gap: 34px;
    }

    .conviction-section__title {
        font-size: clamp(3.4rem, 7.2vw, 5.8rem);
        max-width: 760px;
    }

    .conviction-section__description {
        max-width: 440px;
        margin-top: 44px;
    }

    /* ---- SECCIÓN DE PRODUCTOS EN TABLET (ETAPA 6) ---- */

    .products-section {
        padding: 80px 0 100px;
    }

    .products-section .container-wide {
        display: block;
    }

    .products-section__header {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 28px;
    }

    .products-list {
        display: flex;
        gap: 14px;
        width: 100%;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 8px;
    }

    .products-list::-webkit-scrollbar {
        display: none;
    }

    .product-panel {
        flex: 0 0 clamp(260px, 32vw, 320px);
        min-height: 108px;
        scroll-snap-align: start;
    }

    /* ---- CTA FINAL EN TABLET (ETAPA 7) ---- */

    .final-cta {
        padding: 120px 0 140px;
    }

    .final-cta__layout {
        grid-template-columns: 140px minmax(0, 1fr);
        gap: 34px;
    }

    .final-cta__title {
        font-size: clamp(3.4rem, 7.2vw, 5.8rem);
        max-width: 760px;
    }

    .final-cta__description {
        max-width: 440px;
    }

    /* ---- FOOTER EN TABLET (ETAPA 7) ---- */

    .site-footer {
        padding-top: 70px;
    }

    .site-footer__top {
        grid-template-columns: 1fr;
        gap: 60px;
        padding-bottom: 60px;
    }

    .site-footer__brand {
        max-width: 520px;
    }

    .site-footer__navigation {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 48px 40px;
    }

    .site-footer__bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

}


/* --------------------------------------------------
   2. TABLET PEQUEÑA  (768px – 899px)
   -------------------------------------------------- */

@media (min-width: 768px) and (max-width: 899px) {

    .site-header__inner {
        display: flex;
        justify-content: space-between;
        align-items: center;
        grid-template-columns: unset;
    }

    .site-nav--desktop {
        display: none !important;
    }

    .hero__main {
        width: 80%;
    }

    .hero__future {
        top: 240px;
        right: 24px;
    }

}


/* --------------------------------------------------
   3. MOBILE GENERAL  (<= 767px)
   -------------------------------------------------- */

@media (max-width: 767px) {

    /* Contenedores generales */
    .container,
    .container-wide {
        padding-inline: var(--page-padding-mobile);
    }

    /* Visibilidad de capas */
    .desktop-only,
    .tablet-only {
        display: none !important;
    }

    .mobile-only {
        display: block;
    }

    /* Offset de scroll para header fijo en mobile */
    section[id] {
        scroll-margin-top: 78px;
    }

    /* ---- HEADER MÓVIL ---- */

    .site-header__inner {
        min-height: 72px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-inline: var(--page-padding-mobile);
        grid-template-columns: unset;
        gap: 0;
    }

    .site-header__logo-image {
        width: 142px;
    }

    /* Ocultar elementos desktop */
    .site-nav--desktop,
    .site-header__manifest,
    .site-header__cta {
        display: none !important;
    }

    /* Botón hamburguesa accesible */
    .mobile-menu-button {
        display: flex;
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
    }

    /* Safe areas en menú móvil */
    .mobile-navigation {
        padding-top: calc(84px + env(safe-area-inset-top, 0px));
        padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
        padding-inline: var(--page-padding-mobile);
    }

    .mobile-navigation__link {
        min-height: 52px;
        font-size: clamp(1.8rem, 8.5vw, 2.8rem);
    }

    .mobile-navigation__cta {
        min-height: 52px;
    }

    /* Eyebrow móvil */
    .eyebrow {
        font-size: 0.60rem;
        letter-spacing: 0.18em;
    }

    .eyebrow::before {
        height: 22px;
    }

    /* ---- HERO MÓVIL (ETAPA 3) ---- */

    .hero {
        min-height: clamp(700px, 100svh, 860px);
    }

    .hero__content {
        min-height: clamp(700px, 100svh, 860px);
        padding: 98px var(--page-padding-mobile) 24px;
    }

    .hero__background {
        background-size: cover;
        background-position: 34% center;
    }

    .hero__overlay {
        background:
            linear-gradient(
                180deg,
                rgba(7, 9, 11, 0.28) 0%,
                rgba(7, 9, 11, 0.04) 45%,
                rgba(7, 9, 11, 0.40) 100%
            );
    }

    .hero__side--left-top {
        top: 92px;
        left: var(--page-padding-mobile);
        font-size: 0.52rem;
        letter-spacing: 0.20em;
    }

    .hero__side--left-top .hero__side-line {
        height: 52px;
    }

    .hero__side--left-bottom,
    .hero__side--right-top {
        display: none !important;
    }

    .hero__main {
        top: 172px;
        left: var(--page-padding-mobile);
        transform: none;
        width: calc(100% - (var(--page-padding-mobile) * 2));
        text-align: left;
    }

    .hero__title {
        max-width: 350px;
        font-size: clamp(2.9rem, 12.5vw, 4.4rem);
        line-height: 0.94;
        text-wrap: balance;
    }

    .hero__subtitle {
        max-width: 300px;
        margin-top: 16px;
        font-size: 0.56rem;
        line-height: 1.55;
        letter-spacing: 0.20em;
    }

    .hero__future {
        top: 350px;
        right: 20px;
        font-size: 0.90rem;
        text-align: right;
    }

    .hero__capabilities {
        left: var(--page-padding-mobile);
        bottom: 22px;
        transform: none;
        width: calc(100% - (var(--page-padding-mobile) * 2));
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .hero-capability {
        min-height: 48px;
        justify-content: flex-start;
        padding: 9px 12px;
        font-size: clamp(0.66rem, 2.9vw, 0.78rem);
        gap: 8px;
        white-space: normal;
    }

    .hero-capability__arrow {
        display: inline-block;
        margin-left: auto;
        font-size: 0.82rem;
        color: var(--color-cyan);
    }

    .hero-capability .text-secondary-term {
        display: inline;
    }

    /* ---- SECCIÓN SOLUCIONES EN CELULAR (ETAPA 4) ---- */

    .solutions-section {
        padding: 70px 0 90px;
    }

    .solutions-section__header {
        margin-bottom: 24px;
    }

    .solutions-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
        width: 100%;
        background: none;
        border: 0;
        overflow: visible;
    }

    .solution-panel {
        display: grid;
        grid-template-columns: 108px 1fr;
        height: auto;
        min-height: 98px;
        background: rgba(13, 16, 20, 0.72);
        border: 1px solid var(--color-border);
        border-radius: var(--radius-sm);
        overflow: hidden;
        padding: 8px 12px 8px 8px;
        gap: 14px;
        align-items: center;
        text-decoration: none;
    }

    .solution-panel__image {
        position: relative;
        inset: unset;
        width: 108px;
        height: 82px;
        border-radius: 6px;
        object-fit: cover;
        transform: none;
    }

    .solution-panel--01 .solution-panel__image {
        object-position: center 30%;
    }

    .solution-panel--02 .solution-panel__image {
        object-position: center 40%;
    }

    .solution-panel--03 .solution-panel__image {
        object-position: center;
    }

    .solution-panel--04 .solution-panel__image {
        object-position: center 25%;
    }

    .solution-panel--05 .solution-panel__image {
        object-position: center;
    }

    .solution-panel__overlay {
        display: none;
    }

    .solution-panel__content {
        position: relative;
        inset: unset;
        padding: 0;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        width: 100%;
    }

    .solution-panel__number {
        display: none;
    }

    .solution-panel__bottom {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        gap: 10px;
    }

    .solution-panel__copy {
        display: flex;
        flex-direction: column;
        gap: 4px;
        max-width: none;
    }

    .solution-panel__title {
        font-family: var(--font-display);
        font-size: clamp(0.98rem, 4vw, 1.15rem);
        line-height: 1.15;
        letter-spacing: -0.015em;
        color: var(--color-white);
        max-width: 180px;
    }

    .solution-panel__subtitle {
        font-family: var(--font-sans);
        font-size: 0.52rem;
        font-weight: 500;
        letter-spacing: 0.16em;
        text-transform: uppercase;
        color: var(--color-text-secondary);
        max-width: 180px;
        line-height: 1.35;
    }

    .solution-panel__arrow {
        width: 34px;
        height: 34px;
        flex: 0 0 34px;
        border: 1px solid var(--color-border-strong);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--color-white);
        font-size: 0.85rem;
        background: rgba(255, 255, 255, 0.04);
    }

    /* ---- SECCIÓN DE CONVICCIÓN EN CELULAR (ETAPA 5) ---- */

    .conviction-section {
        padding: 90px 0 100px;
    }

    .conviction-section__layout {
        display: block;
    }

    .conviction-section__meta {
        padding-top: 0;
        margin-bottom: 26px;
    }

    .conviction-section__title {
        max-width: 100%;
        font-size: clamp(2.8rem, 12vw, 4.4rem);
        line-height: 0.96;
        letter-spacing: -0.03em;
    }

    .conviction-section__description {
        max-width: 320px;
        margin-top: 36px;
        margin-left: 0;
        font-size: 0.90rem;
        line-height: 1.6;
        border-left: none;
        padding-left: 0;
    }

    /* ---- SECCIÓN DE PRODUCTOS EN CELULAR (ETAPA 6) ---- */

    .products-section {
        padding: 70px 0 80px;
    }

    .products-section .container-wide {
        display: block;
    }

    .products-section__header {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 22px;
    }

    .products-list {
        display: flex;
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }

    .product-panel {
        width: 100%;
        min-height: 96px;
    }

    .product-panel__card-link {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 14px;
        padding: 12px 14px;
    }

    .product-panel__visual {
        order: -1;
        width: 74px;
        height: 74px;
        flex: 0 0 74px;
        border-radius: var(--radius-sm);
    }

    .product-panel--01 .product-panel__image,
    .product-panel--02 .product-panel__image,
    .product-panel--03 .product-panel__image,
    .product-panel--04 .product-panel__image {
        object-position: center;
    }

    .product-panel__content {
        order: 1;
        flex: 1;
        min-width: 0;
    }

    .product-panel__name {
        font-size: 1.05rem;
    }

    .product-panel__tagline {
        font-size: 0.54rem;
        letter-spacing: 0.16em;
        max-width: 180px;
    }

    /* ---- CTA FINAL EN MOBILE (ETAPA 7) ---- */

    .final-cta {
        padding: 90px 0 100px;
    }

    .final-cta__layout {
        display: block;
    }

    .final-cta__meta {
        padding-top: 0;
        margin-bottom: 24px;
    }

    .final-cta__title {
        font-size: clamp(2.8rem, 12vw, 4.4rem);
        max-width: 100%;
        line-height: 0.95;
    }

    .final-cta__description {
        font-size: 0.88rem;
        max-width: 320px;
        margin-top: 22px;
        line-height: 1.6;
    }

    .final-cta__actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        margin-top: 32px;
    }

    .final-cta__button {
        width: auto;
        min-width: 160px;
        min-height: 52px;
        justify-content: center;
    }

    .final-cta__microcopy {
        font-size: 0.72rem;
        letter-spacing: 0.14em;
    }

    /* ---- FOOTER EN MOBILE (ETAPA 7) ---- */

    .site-footer {
        padding: 60px 0 24px;
    }

    .site-footer__top {
        display: block;
        padding-bottom: 46px;
    }

    .site-footer__brand {
        max-width: 100%;
        margin-bottom: 40px;
    }

    .site-footer__logo-image,
    .site-footer__logo-img {
        width: 142px;
    }

    .site-footer__statement {
        font-size: 0.82rem;
        max-width: 280px;
    }

    .site-footer__institutional {
        font-size: 0.84rem;
        margin-top: 14px;
    }

    .site-footer__origin {
        font-size: 0.65rem;
        letter-spacing: 0.10em;
        margin-top: 16px;
    }

    .site-footer__navigation {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 36px 20px;
    }

    .site-footer__column-title,
    .site-footer__col-title {
        font-size: 0.64rem;
        margin-bottom: 14px;
    }

    .site-footer__column a,
    .site-footer__link {
        font-size: 0.78rem;
        padding: 6px 0;
        min-height: 38px;
        display: inline-flex;
        align-items: center;
    }

    .site-footer__bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding-top: 24px;
    }

    .site-footer__legal {
        flex-wrap: wrap;
        gap: 14px;
    }

    .site-footer__legal a {
        min-height: 38px;
        display: inline-flex;
        align-items: center;
    }

}


/* --------------------------------------------------
   4. MOBILE PEQUEÑO  (<= 390px y 360px)
   -------------------------------------------------- */

@media (max-width: 390px) {

    .hero__title {
        font-size: clamp(2.5rem, 11vw, 3.4rem);
    }

    .hero-capability {
        padding: 8px 10px;
        font-size: 0.64rem;
        gap: 6px;
    }

    .solution-panel {
        grid-template-columns: 88px 1fr;
        gap: 10px;
        padding: 6px 8px 6px 6px;
    }

    .solution-panel__image {
        width: 88px;
        height: 76px;
    }

    .solution-panel__title {
        font-size: 0.92rem;
        max-width: 140px;
    }

    .solution-panel__subtitle {
        font-size: 0.48rem;
        max-width: 140px;
    }

    .solution-panel__arrow {
        width: 30px;
        height: 30px;
        flex: 0 0 30px;
        font-size: 0.75rem;
    }

    .conviction-section__title {
        font-size: clamp(2.4rem, 11vw, 3.2rem);
    }

    .final-cta__title {
        font-size: clamp(2.4rem, 11vw, 3.2rem);
    }

    .product-panel__name {
        font-size: 0.95rem;
    }

    .product-panel__tagline {
        font-size: 0.50rem;
    }

}


/* --------------------------------------------------
   5. DESKTOP COMPACTO  (1200px – 1399px)
   -------------------------------------------------- */

@media (min-width: 1200px) and (max-width: 1399px) {

    .site-header__inner {
        gap: 20px;
    }

    .site-header__logo-image {
        width: 155px;
    }

    .site-nav--desktop {
        gap: 22px;
    }

    .site-nav__link {
        font-size: 0.78rem;
    }

    .site-header__actions {
        gap: 16px;
    }

    .site-header__manifest {
        font-size: 0.52rem;
        padding-left: 14px;
        letter-spacing: 0.22em;
    }

    .site-header__cta {
        padding: 8px 18px;
        font-size: 0.80rem;
        gap: 8px;
        min-height: 40px;
    }

    .hero__main {
        top: 105px;
        width: min(840px, 72vw);
    }

    .hero__title {
        font-size: clamp(3.8rem, 5.4vw, 5.8rem);
    }

    .hero__subtitle {
        margin-top: 14px;
        font-size: 0.68rem;
        letter-spacing: 0.30em;
    }

    .hero__capabilities {
        bottom: 30px;
        width: min(800px, 76vw);
        gap: 10px;
    }

    .hero-capability {
        padding: 8px 14px;
        font-size: 0.76rem;
        min-height: 40px;
    }

    .hero__side--left-top {
        top: 130px;
    }

    .hero__side--left-bottom {
        bottom: 80px;
        font-size: 0.54rem;
    }

    .hero__side--right-top {
        top: 135px;
    }

    .hero__future {
        top: 230px;
        right: 40px;
        font-size: 0.95rem;
    }

}


/* --------------------------------------------------
   6. DESKTOP GRANDE  (>= 1600px)
   -------------------------------------------------- */

@media (min-width: 1600px) {

    body {
        font-size: 1.0625rem;
    }

    .hero__capabilities {
        bottom: 48px;
        width: min(920px, 60vw);
    }

    .hero__title {
        font-size: clamp(4.8rem, 6.2vw, 7.6rem);
    }

}


/* --------------------------------------------------
   7. INTERACCIONES HOVER (SOLO CON PUNTERO FINO)
   -------------------------------------------------- */

@media (hover: hover) and (pointer: fine) {

    .hero-capability:hover {
        border-color: rgba(255, 255, 255, 0.55);
        background: rgba(255, 255, 255, 0.045);
        transform: translateY(-2px);
    }

    .solution-panel:hover .solution-panel__image {
        transform: scale(1.06);
        filter: saturate(1.05) contrast(1.05);
    }

    .solution-panel:hover .solution-panel__arrow {
        background: var(--color-white);
        color: var(--color-bg);
        border-color: var(--color-white);
        transform: translateX(4px);
    }

    .product-panel:hover {
        border-color: var(--color-border-strong);
        background: var(--color-bg-card-hover);
        transform: translateY(-2px);
    }

    .product-panel:hover .product-panel__arrow {
        background: var(--color-white);
        color: var(--color-bg);
        border-color: var(--color-white);
        transform: translateX(3px);
    }

    .final-cta__button:hover {
        transform: translateY(-2px);
        box-shadow: 0 0 28px rgba(139, 92, 246, 0.22);
    }

}


/* --------------------------------------------------
   8. DISPOSITIVOS TÁCTILES (POINTER COARSE)
   -------------------------------------------------- */

@media (pointer: coarse) {

    .site-nav__link,
    .mobile-navigation__link,
    .hero-capability,
    .final-cta__button,
    .site-footer__column a,
    .site-footer__legal a {
        min-height: 44px;
    }

}


/* --------------------------------------------------
   9. REDUCCIÓN DE MOVIMIENTO (ACCESIBILIDAD)
   -------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .site-header,
    .site-nav__link,
    .site-nav__link::after,
    .site-header__cta,
    .mobile-menu-button,
    .mobile-menu-button span,
    .mobile-navigation,
    .mobile-navigation__link,
    .hero__title,
    .hero__subtitle,
    .hero__capabilities,
    .hero__side,
    .hero__future,
    .solution-panel,
    .solution-panel__image,
    .solution-panel__arrow,
    .conviction-section__title,
    .conviction-section__description,
    .conviction-section__impact::after,
    .product-panel,
    .product-panel__arrow,
    .final-cta__meta,
    .final-cta__title,
    .final-cta__description,
    .final-cta__actions,
    .final-cta__button,
    .site-footer a {
        transition: none !important;
        transform: none !important;
        opacity: 1 !important;
    }

}
