/* =============================================================
   TUL CON GLITTER — hoja de página (prefijo tg-)
   Arletex Design System v3.5

   Solo componentes que NO existen en el sistema global:
   landing-producto.css (hero/galería/swatch/sticky/sheet/tabla),
   tergal-catalan.css (grids) y style.css (.tarjeta-beneficio,
   .btn-timeline-whatsapp, .contenedor-imagen-redondeado-1) ya
   cubren el resto.

   §A. COLOR WALL   — muestrario fotográfico de 27 colores
   §B. STATEMENT    — franja ink de puntuación (registro @manifest)
   §C. USO GRID     — tarjetas H3 dentro de .tarjeta-beneficio

   Reglas: radius 0 (N-06) · sombras sólidas sin blur (N-07) ·
   nada visible < 14px · prefers-reduced-motion respetado.
   ============================================================= */


/* =============================================================
   §A. COLOR WALL — 27 colores en contact-sheet
   Registro: @gallery · Apertura: SwatchHead · Marco: Crop-marks
   Hover: caption-reveal (el nombre NUNCA se esconde; lo que
   aparece es la acción de cotizar).
   ============================================================= */
.tg-colorwall {
    padding: clamp(64px, 8vw, 96px) 0;
    background: var(--ax-paper, #FAF6EE);
}

.tg-colorwall__inner {
    position: relative;
    max-width: 1380px;
    margin: 0 auto;
    padding: clamp(32px, 6vw, 56px) clamp(24px, 4vw, 48px);
    /* Crop-marks — cuatro ticks en L, los lados quedan abiertos */
    --tg-crop: 24px;
    --tg-crop-w: 2px;
    --tg-crop-c: var(--ax-ink, #1F2530);
    background-image:
        linear-gradient(var(--tg-crop-c) 0 0), linear-gradient(var(--tg-crop-c) 0 0),
        linear-gradient(var(--tg-crop-c) 0 0), linear-gradient(var(--tg-crop-c) 0 0),
        linear-gradient(var(--tg-crop-c) 0 0), linear-gradient(var(--tg-crop-c) 0 0),
        linear-gradient(var(--tg-crop-c) 0 0), linear-gradient(var(--tg-crop-c) 0 0);
    background-repeat: no-repeat;
    background-position:
        left top, left top, right top, right top,
        left bottom, left bottom, right bottom, right bottom;
    background-size:
        var(--tg-crop) var(--tg-crop-w), var(--tg-crop-w) var(--tg-crop),
        var(--tg-crop) var(--tg-crop-w), var(--tg-crop-w) var(--tg-crop),
        var(--tg-crop) var(--tg-crop-w), var(--tg-crop-w) var(--tg-crop),
        var(--tg-crop) var(--tg-crop-w), var(--tg-crop-w) var(--tg-crop);
}

/* — Apertura SwatchHead: tira de muestras sobre el titular — */
.tg-swatchhead {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0 0 var(--ax-space-5, 20px);
}
.tg-swatchhead__chip {
    width: 26px;
    height: 26px;
    border: 1px solid var(--ax-ink, #1F2530);
    flex: none;
}

.tg-colorwall__title {
    font-family: var(--ax-font-display, 'Anton', 'Arial Narrow', sans-serif);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    line-height: 0.94;
    font-size: clamp(2rem, 5.2vw, 3.4rem);
    color: var(--ax-ink, #1F2530);
    margin: 0 0 var(--ax-space-4, 16px);
}
.tg-colorwall__title em {
    font-family: var(--ax-font-accent, 'Fraunces', Georgia, serif);
    font-style: italic;
    font-weight: 600;
    text-transform: lowercase;
    letter-spacing: -0.01em;
    color: var(--ax-orange, #F15A29);
}

.tg-colorwall__lead {
    font-family: var(--ax-font-body, 'Lato', system-ui, sans-serif);
    font-size: clamp(15px, 1.5vw, 17px);
    line-height: 1.65;
    color: var(--ax-ink, #1F2530);
    max-width: 74ch;
    margin: 0 0 var(--ax-space-3, 12px);
    text-align: justify;
}

.tg-colorwall__count {
    display: inline-block;
    font-family: var(--ax-font-mono, ui-monospace, monospace);
    font-size: 14px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ax-ink, #1F2530);
    background: var(--ax-yellow, #FFEB3B);
    border: 2px solid var(--ax-ink, #1F2530);
    padding: 5px 12px;
    margin: 0 0 var(--ax-space-8, 32px);
}

/* — Carrusel de color (slick: infinito + autoplay) —
   Estado PRE-init: flex con overflow oculto, para que las 27 fotos no
   caigan apiladas mientras slick (defer) todavía no corre.
   Estado POST-init: slick maneja el layout; el gap lo dan los paddings
   del tile compensados con el margin negativo de .slick-list. */
.tg-carousel {
    display: flex;
    overflow: hidden;
    margin: 0;
    padding: 0;
    list-style: none;
}
.tg-carousel .tg-tile {
    flex: 0 0 16.6666%;
    min-width: 0;
    margin: 0;
    padding: 0 10px;
}
.tg-carousel.slick-initialized {
    display: block;
    overflow: visible;
}
.tg-carousel.slick-initialized .tg-tile { flex: none; }
.tg-carousel .slick-list { margin: 0 -10px; }
.tg-carousel .slick-track { display: flex; align-items: flex-start; }

/* Flechas — cuadrado ink (radius 0, N-06). El !important pelea contra
   `.slick-arrow { border-radius: 50px; background:#D9DBDD }` de style.css. */
.tg-carousel .slick-prev.slick-arrow,
.tg-carousel .slick-next.slick-arrow {
    position: absolute;
    top: 38%;
    z-index: 2;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: var(--ax-ink, #1F2530);
    color: var(--ax-paper, #FAF6EE);
    border: 2px solid var(--ax-ink, #1F2530);
    border-radius: 0 !important;
    font-size: 15px;
    line-height: 1;
    text-decoration: none;
    transition: background-color var(--ax-motion-base, 240ms) var(--ax-ease-out, cubic-bezier(.22, 1, .36, 1));
}
.tg-carousel .slick-arrow i { color: inherit; font-size: 15px; }
.tg-carousel .slick-arrow::before { display: none; }
.tg-carousel .slick-prev.slick-arrow { left: -22px; }
.tg-carousel .slick-next.slick-arrow { right: -22px; }
.tg-carousel .slick-arrow:hover,
.tg-carousel .slick-arrow:focus {
    background: var(--ax-orange, #F15A29);
    color: var(--ax-ink, #1F2530);
    text-decoration: none;
}
.tg-carousel .slick-arrow:focus-visible {
    outline: 3px solid var(--ax-orange, #F15A29);
    outline-offset: 3px;
}
@media (max-width: 767.98px) {
    .tg-carousel .slick-prev.slick-arrow { left: -12px; }
    .tg-carousel .slick-next.slick-arrow { right: -12px; }
}

.tg-tile {
    margin: 0;
}

.tg-tile__link {
    position: relative;
    display: block;
    text-decoration: none;
    color: inherit;
}
.tg-tile__link:hover,
.tg-tile__link:focus {
    text-decoration: none;
    color: inherit;
}
.tg-tile__link:focus-visible {
    outline: 3px solid var(--ax-orange, #F15A29);
    outline-offset: 4px;
}

.tg-tile__figure {
    position: relative;
    margin: 0;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border: 2px solid var(--ax-ink, #1F2530);
    background: var(--ax-cream, #F2EDE4);
    transition: border-color var(--ax-motion-base, 240ms) var(--ax-ease-out, cubic-bezier(.22, 1, .36, 1));
}
.tg-tile__figure img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* caption-reveal — panel ink que sube con la acción (no con el nombre).
   Sin transform en el tile: dentro de .slick-list (overflow:hidden) una
   sombra offset se recortaría en los slides de los extremos. */
.tg-tile__action {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    transform: translateY(100%);
    background: var(--ax-ink, #1F2530);
    color: var(--ax-paper, #FAF6EE);
    font-family: var(--ax-font-body, 'Lato', system-ui, sans-serif);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-align: center;
    padding: 9px 8px;
    transition: transform var(--ax-motion-base, 240ms) var(--ax-ease-out, cubic-bezier(.22, 1, .36, 1));
}
.tg-tile__action i {
    color: var(--ax-whatsapp, #25D366);
    margin-right: 6px;
}
.tg-tile__link:hover .tg-tile__action,
.tg-tile__link:focus-visible .tg-tile__action {
    transform: translateY(0);
}
.tg-tile__link:hover .tg-tile__figure,
.tg-tile__link:focus-visible .tg-tile__figure {
    border-color: var(--ax-orange, #F15A29);
}

/* El nombre vive fuera de la foto: siempre visible (SEO + a11y) */
.tg-tile__name {
    font-family: var(--ax-font-body, 'Lato', system-ui, sans-serif);
    font-size: 15px;
    font-weight: 900;
    line-height: 1.3;
    color: var(--ax-ink, #1F2530);
    margin: 12px 0 0;
    text-align: center;
}

/* Nº de tiles visibles antes de que slick corra — espeja los breakpoints
   del init en tul-glitter.js para que no haya salto al inicializar. */
@media (max-width: 1199.98px) { .tg-carousel .tg-tile { flex-basis: 20%; } }
@media (max-width: 991.98px)  { .tg-carousel .tg-tile { flex-basis: 25%; } }
@media (max-width: 767.98px)  { .tg-carousel .tg-tile { flex-basis: 33.3333%; } }
@media (max-width: 575.98px)  { .tg-carousel .tg-tile { flex-basis: 50%; } }

@media (hover: none) {
    .tg-tile__action { position: static; transform: none; }
}


/* =============================================================
   §B. STATEMENT — franja ink de puntuación entre bloques
   Registro: @manifest · Apertura: ManifestoClaim · Marco: Double-rule
   ============================================================= */
.tg-statement {
    background: var(--ax-ink, #1F2530);
    border-top: 1px solid var(--ax-orange, #F15A29);
    border-bottom: 1px solid var(--ax-orange, #F15A29);
    padding: clamp(48px, 7vw, 80px) 0;
}

.tg-statement__inner {
    max-width: 1380px;
    margin: 0 auto;
    padding: 0 clamp(20px, 4vw, 56px);
    display: grid;
    gap: var(--ax-space-8, 32px);
    align-items: center;
}
@media (min-width: 992px) {
    .tg-statement__inner {
        grid-template-columns: 7fr 5fr;
        gap: clamp(32px, 5vw, 64px);
    }
}

.tg-statement__label {
    font-family: var(--ax-font-mono, ui-monospace, monospace);
    font-size: 14px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ax-orange, #F15A29);
    margin: 0 0 var(--ax-space-4, 16px);
    display: flex;
    align-items: center;
    gap: 10px;
}
.tg-statement__label::before {
    content: "";
    width: 10px;
    height: 10px;
    background: var(--ax-orange, #F15A29);
    flex: none;
}

.tg-statement__claim {
    font-family: var(--ax-font-display, 'Anton', 'Arial Narrow', sans-serif);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    line-height: 0.94;
    font-size: clamp(2rem, 5.6vw, 3.6rem);
    color: var(--ax-white, #FFFFFF);
    margin: 0;
}
.tg-statement__claim em {
    font-family: var(--ax-font-accent, 'Fraunces', Georgia, serif);
    font-style: italic;
    font-weight: 600;
    text-transform: lowercase;
    color: var(--ax-orange, #F15A29);
}

.tg-statement__facts {
    display: grid;
    gap: var(--ax-space-3, 12px);
    margin: 0;
    padding: 0;
    list-style: none;
}
.tg-statement__facts li {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    align-items: baseline;
    border-top: 1px solid rgba(255, 255, 255, .22);
    padding-top: var(--ax-space-3, 12px);
}
.tg-statement__num {
    font-family: var(--ax-font-display, 'Anton', 'Arial Narrow', sans-serif);
    font-size: clamp(1.6rem, 3.4vw, 2.2rem);
    line-height: 1;
    color: var(--ax-yellow, #FFEB3B);
}
.tg-statement__fact {
    font-family: var(--ax-font-body, 'Lato', system-ui, sans-serif);
    font-size: 15px;
    line-height: 1.5;
    color: var(--ax-muted-dark, #A8A39A);
}
.tg-statement__fact strong { color: var(--ax-white, #FFFFFF); }


/* =============================================================
   §C. USO GRID — tarjetas H3 con foto dentro de .tarjeta-beneficio
   Marco: Brick-stack (top-rule alternado por hijo)
   Hover: ink-flood en el pie de la tarjeta
   ============================================================= */
.tg-usogrid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--ax-space-6, 24px);
    margin: var(--ax-space-6, 24px) 0 0;
    padding: 0;
    list-style: none;
}
/* Una sola columna en todos los anchos: la tarjeta usa el ancho completo
   y se vuelve horizontal a partir de 768px (ver más abajo). */

.tg-uso {
    display: flex;
    flex-direction: column;
    background: var(--ax-white, #FFFFFF);
    border: 2px solid var(--ax-ink, #1F2530);
    border-top-width: 4px;
    border-top-color: var(--ax-ink, #1F2530);
    margin: 0;
    transition:
        transform var(--ax-motion-base, 240ms) var(--ax-ease-out, cubic-bezier(.22, 1, .36, 1)),
        box-shadow var(--ax-motion-base, 240ms) var(--ax-ease-out, cubic-bezier(.22, 1, .36, 1));
}
.tg-usogrid > .tg-uso:nth-child(odd) { border-top-color: var(--ax-orange, #F15A29); }
.tg-uso:hover {
    transform: translate(-3px, -3px);
    box-shadow: 5px 5px 0 var(--ax-ink, #1F2530);
}

.tg-uso__figure { margin: 0; }
.tg-uso__figure img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

/* — Tarjeta HORIZONTAL en ≥768px: foto a la izquierda a toda la altura,
     texto y CTA apilados a la derecha. Se hace con grid sin tocar el
     markup: la figura ocupa las dos filas de la columna 1.
     El marco pasa de Brick-stack (raya arriba) a Side-rule (raya
     izquierda), que es la lectura correcta cuando la tarjeta es
     horizontal. Debajo de 768px sigue el flex column de siempre. — */
@media (min-width: 768px) {
    .tg-uso {
        display: grid;
        grid-template-columns: minmax(150px, 28%) 1fr;
        grid-template-rows: 1fr auto;
        border-top-width: 2px;
        border-top-color: var(--ax-ink, #1F2530);
        border-left-width: 5px;
    }
    .tg-usogrid > .tg-uso:nth-child(odd) {
        border-top-color: var(--ax-ink, #1F2530);
        border-left-color: var(--ax-orange, #F15A29);
    }
    /* La foto se saca del flujo dentro de su celda: si no, su alto natural
       manda sobre el de la tarjeta y la columna de texto queda con un
       hueco enorme debajo. Así la altura la fija el texto. */
    .tg-uso__figure {
        position: relative;
        grid-column: 1;
        grid-row: 1 / 3;
        min-height: 100%;
        overflow: hidden;
        border-right: 2px solid var(--ax-ink, #1F2530);
    }
    .tg-uso__figure picture {
        position: absolute;
        inset: 0;
        display: block;
    }
    .tg-uso__figure img {
        height: 100%;
        aspect-ratio: auto;
    }
    .tg-uso__body { grid-column: 2; grid-row: 1; }
    .tg-uso__cta  { grid-column: 2; grid-row: 2; }
    .tg-uso__title { text-align: left; }
    /* A ancho completo la medida se dispara: se acota la línea de lectura */
    .tg-uso__text { max-width: 72ch; }
    /* Con la tarjeta ancha caben más líneas antes de plegar */
    .tg-uso__text.is-clamped {
        -webkit-line-clamp: 3;
        line-clamp: 3;
        max-height: 4.8em;
    }
    .tg-uso__cta {
        text-align: left;
        padding-left: var(--ax-space-5, 20px);
    }
}

.tg-uso__body {
    display: flex;
    flex-direction: column;
    gap: var(--ax-space-3, 12px);
    padding: var(--ax-space-5, 20px);
    flex: 1 1 auto;
}

.tg-uso__title {
    font-family: var(--ax-font-body, 'Lato', system-ui, sans-serif);
    font-size: 17px;
    font-weight: 900;
    line-height: 1.25;
    color: var(--ax-ink, #1F2530);
    margin: 0;
}

.tg-uso__text {
    font-family: var(--ax-font-body, 'Lato', system-ui, sans-serif);
    font-size: 15px;
    line-height: 1.6;
    color: var(--ax-muted, #6E6A60);
    margin: 0;
    flex: 1 1 auto;
    text-align: left;
}
.tg-uso__text strong { color: var(--ax-ink, #1F2530); }

/* Descripción plegada — el texto SIGUE en el DOM (no se oculta con
   display:none), solo se recorta a 4 líneas; el botón lo despliega.
   La clase y el botón los pone tul-glitter.js: sin JS la tarjeta se
   ve como siempre, con el texto completo. */
.tg-uso__text.is-clamped {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    /* Red de seguridad: si el navegador ignora line-clamp, el alto
       igual queda acotado a 4 líneas (4 × line-height 1.6). */
    max-height: 6.4em;
    flex: 0 1 auto;
}

.tg-uso__more {
    align-self: flex-start;
    margin: 0;
    padding: 2px 0;
    background: none;
    border: 0;
    border-bottom: 2px solid var(--ax-orange, #F15A29);
    font-family: var(--ax-font-body, 'Lato', system-ui, sans-serif);
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ax-ink, #1F2530);
    cursor: pointer;
    transition: color var(--ax-motion-base, 240ms) var(--ax-ease-out, cubic-bezier(.22, 1, .36, 1));
}
.tg-uso__more:hover { color: var(--ax-orange, #F15A29); }
.tg-uso__more:focus-visible {
    outline: 3px solid var(--ax-orange, #F15A29);
    outline-offset: 3px;
}
.tg-uso__more::after {
    content: " \002B";           /* + */
    font-weight: 700;
}
.tg-uso__more[aria-expanded="true"]::after {
    content: " \2212";           /* − */
}

/* ink-flood — el pie se invierte al pasar el cursor */
.tg-uso__cta {
    display: block;
    margin-top: auto;
    padding: 12px 14px;
    text-align: center;
    font-family: var(--ax-font-body, 'Lato', system-ui, sans-serif);
    font-size: 15px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ax-ink, #1F2530);
    background: var(--ax-cream, #F2EDE4);
    border-top: 2px solid var(--ax-ink, #1F2530);
    text-decoration: none;
    transition:
        background-color var(--ax-motion-base, 240ms) var(--ax-ease-out, cubic-bezier(.22, 1, .36, 1)),
        color var(--ax-motion-base, 240ms) var(--ax-ease-out, cubic-bezier(.22, 1, .36, 1));
}
.tg-uso__cta i { color: var(--ax-whatsapp, #25D366); margin-right: 6px; }
.tg-uso__cta:hover,
.tg-uso__cta:focus {
    background: var(--ax-ink, #1F2530);
    color: var(--ax-white, #FFFFFF);
    text-decoration: none;
}
.tg-uso__cta:focus-visible {
    outline: 3px solid var(--ax-orange, #F15A29);
    outline-offset: 2px;
}


/* =============================================================
   Accesibilidad — sin movimiento cuando el usuario lo pide
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
    .tg-tile__figure,
    .tg-tile__action,
    .tg-carousel .slick-arrow,
    .tg-uso,
    .tg-uso__cta,
    .tg-uso__more {
        transition: none;
    }
    .tg-uso:hover { transform: none; }
    .tg-tile__action { position: static; transform: none; }
}


/* =============================================================
   §D. SUBHEAD — segundo titular del hero (H2 bajo el H1)
   ============================================================= */
.tg-subhead {
    font-family: var(--ax-font-accent, 'Fraunces', Georgia, serif);
    font-style: italic;
    font-weight: 600;
    font-size: clamp(1.1rem, 2.2vw, 1.45rem);
    line-height: 1.25;
    color: var(--ax-orange, #F15A29);
    margin: var(--ax-space-2, 8px) 0 0;
    text-transform: none;
}


/* =============================================================
   §E. SPEC TITLE — rótulo de la ficha dentro del hero
   Apertura LabelLateral: barra orange + label mono en ink.
   ============================================================= */
.tg-spec-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--ax-font-mono, ui-monospace, monospace);
    font-size: clamp(0.86rem, 1.1vw, 1rem);
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ax-ink, #1F2530);
    margin: var(--ax-space-8, 32px) 0 var(--ax-space-3, 12px);
}
.tg-spec-title::before {
    content: "";
    width: 28px;
    height: 3px;
    background: var(--ax-orange, #F15A29);
    flex: none;
}
