/* ============================================
   TOTAL CLEAN — Design System
   ============================================ */
:root {
    --ink: #0E2430;
    --ink-soft: #1B3A47;
    --primary: #14C4C4;
    --primary-dark: #0FA3A3;
    --primary-light: #D6F5F5;
    --accent: #D6F23C;
    --bg: #F5FBFB;
    --bg-alt: #E9F8F8;
    --white: #FFFFFF;
    --border: #D2ECEC;
    --text: #395560;
    --font-display: 'Bricolage Grotesque', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
    --radius-sm: 10px;
    --radius: 20px;
    --radius-lg: 32px;
    --shadow: 0 20px 50px -10px rgba(11, 31, 28, 0.15);
    --shadow-soft: 0 10px 30px -8px rgba(11, 31, 28, 0.1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    color: var(--ink);
    margin: 0 0 0.5em;
    line-height: 1.05;
    letter-spacing: -0.02em;
    font-weight: 800;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }

.ts-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.ts-center { text-align: center; }

.ts-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary-dark);
    background: var(--primary-light);
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 18px;
    font-weight: 500;
}

.ts-eyebrow::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary);
    display: inline-block;
}

/* ===== HEADER ===== */
.ts-header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: rgba(245, 251, 250, 0.75);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}

.ts-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
}

.ts-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--ink);
}

.ts-logo__mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ts-logo__mark svg { width: 20px; height: 20px; }

.ts-nav__list {
    display: flex;
    gap: 32px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.ts-nav__list a {
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    padding-bottom: 4px;
}

.ts-nav__list a::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 0; height: 2px;
    background: var(--primary);
    transition: width 0.25s ease;
}

.ts-nav__list a:hover::after { width: 100%; }

.ts-header__cta {
    display: flex;
    align-items: center;
    gap: 14px;
}

.ts-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
}

.ts-menu-toggle span {
    display: block;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
}

/* ===== BOTONES ===== */
.ts-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 15px 28px;
    border-radius: 999px;
    font-weight: 700;
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    border: none;
    cursor: pointer;
}

.ts-btn--primary {
    background: var(--ink);
    color: var(--white);
    box-shadow: var(--shadow-soft);
}

.ts-btn--primary:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.ts-btn--accent {
    background: var(--accent);
    color: var(--ink);
}

.ts-btn--accent:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.ts-btn--outline {
    border: 2px solid var(--ink);
    color: var(--ink);
    background: transparent;
}

.ts-btn--outline:hover {
    background: var(--ink);
    color: #fff;
}

.ts-btn--sm { padding: 10px 20px; font-size: 0.85rem; }

/* ===== HERO ===== */
.ts-hero {
    padding: 70px 0 40px;
    position: relative;
}

.ts-hero__grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 60px;
    align-items: center;
}

.ts-hero h1 {
    font-size: clamp(2.4rem, 4.8vw, 3.9rem);
    margin-bottom: 22px;
}

.ts-hero h1 .ts-underline {
    position: relative;
    display: inline-block;
}

.ts-hero h1 .ts-underline::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 2px;
    height: 12px;
    background: var(--accent);
    z-index: -1;
    border-radius: 4px;
}

.ts-hero p {
    font-size: 1.15rem;
    max-width: 480px;
    margin-bottom: 30px;
    color: var(--text);
}

.ts-hero__ctas {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.ts-hero__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ts-badge {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--ink-soft);
    background: var(--white);
    border: 1px solid var(--border);
    padding: 7px 12px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ts-badge::before { content: '✓'; color: var(--primary-dark); font-weight: 700; }

/* ===== SLIDER ANTES/DESPUES (firma visual) ===== */
.ts-compare {
    position: relative;
    aspect-ratio: 4/3.4;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    user-select: none;
    border: 1px solid var(--border);
}

.ts-compare__before, .ts-compare__after {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 22px;
}

.ts-compare__before {
    background:
        radial-gradient(circle at 20% 30%, rgba(0,0,0,0.08) 0, transparent 40%),
        radial-gradient(circle at 70% 60%, rgba(0,0,0,0.06) 0, transparent 35%),
        repeating-linear-gradient(0deg, rgba(0,0,0,0.05) 0 2px, transparent 2px 26px),
        repeating-linear-gradient(90deg, rgba(0,0,0,0.05) 0 2px, transparent 2px 26px),
        #C9C3B4;
    filter: saturate(0.6) brightness(0.92);
}

.ts-compare__after {
    background: linear-gradient(135deg, var(--primary-light), #ffffff 55%, var(--primary-light));
    width: 50%;
    overflow: hidden;
    box-shadow: 6px 0 24px rgba(0,0,0,0.12);
}

.ts-compare__after::before {
    content: '';
    position: absolute;
    top: -50%; left: -20%;
    width: 60%; height: 200%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,0.65), transparent);
    animation: ts-shine 3.2s ease-in-out infinite;
}

@keyframes ts-shine {
    0% { transform: translateX(-40%); }
    100% { transform: translateX(340%); }
}

.ts-compare__tag {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(11,31,28,0.75);
    color: #fff;
}

.ts-compare__after .ts-compare__tag {
    background: var(--ink);
    color: var(--accent);
}

.ts-compare__handle {
    position: absolute;
    top: 0; bottom: 0;
    left: 50%;
    width: 0;
    z-index: 5;
    pointer-events: none;
}

.ts-compare__handle::before {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    left: -1.5px;
    width: 3px;
    background: #fff;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.08);
}

.ts-compare__grip {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 46px; height: 46px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(0,0,0,0.2);
    font-size: 1.1rem;
    color: var(--ink);
}

.ts-compare__range {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: ew-resize;
    z-index: 10;
}

/* ===== TICKER ===== */
.ts-ticker {
    background: var(--accent);
    transform: rotate(-1.4deg);
    margin: 46px 0 -18px;
    overflow: hidden;
    white-space: nowrap;
    box-shadow: 0 4px 0 rgba(11,31,28,0.08);
    position: relative;
    z-index: 5;
}

.ts-ticker__track {
    display: inline-flex;
    animation: ts-marquee 26s linear infinite;
}

.ts-ticker__track span {
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ink);
    padding: 12px 28px;
    display: inline-flex;
    align-items: center;
    gap: 28px;
}

.ts-ticker__track span::after { content: '●'; font-size: 0.5rem; opacity: 0.5; }

@keyframes ts-marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* ===== SECCIONES GENERALES ===== */
section { padding: 100px 0; position: relative; }

.ts-section-head {
    max-width: 640px;
    margin: 0 0 50px;
}

.ts-section-head.ts-center { margin: 0 auto 50px; }

.ts-section-head h2 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); }

/* ===== SERVICIOS ===== */
.ts-servicios { background: var(--bg); }

.ts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.ts-grid--3 { grid-template-columns: repeat(3, 1fr); }

.ts-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 34px 28px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s;
}

.ts-card::before {
    content: '';
    position: absolute;
    top: 0; left: -60%;
    width: 40%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(14,165,160,0.12), transparent);
    transition: left 0.6s ease;
}

.ts-card:hover::before { left: 130%; }

.ts-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

.ts-card__icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 18px;
}

.ts-card h3 { font-size: 1.25rem; margin-bottom: 10px; }
.ts-card p { font-size: 0.96rem; margin-bottom: 16px; }

.ts-link {
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 0.92rem;
}

/* ===== BENTO "POR QUÉ ELEGIRNOS" ===== */
.ts-porque { background: var(--white); }

.ts-bento {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 20px;
}

.ts-bento__item {
    background: var(--bg-alt);
    border-radius: var(--radius);
    padding: 30px;
    border: 1px solid var(--border);
}

.ts-bento__item--big {
    grid-row: span 2;
    background: var(--ink);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.ts-bento__item--big h3 { color: #fff; font-size: 1.8rem; }
.ts-bento__item--big p { color: rgba(255,255,255,0.75); }

.ts-bento__item--wide {
    grid-column: span 2;
}

.ts-bento__icon { font-size: 1.8rem; margin-bottom: 12px; }
.ts-bento__item h4 { font-size: 1.1rem; margin-bottom: 8px; }
.ts-bento__item p { font-size: 0.92rem; color: var(--text); margin: 0; }

/* ===== PROCESO ===== */
.ts-proceso { background: var(--bg); }

.ts-timeline {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    position: relative;
}

.ts-timeline::before {
    content: '';
    position: absolute;
    top: 26px;
    left: 6%;
    right: 6%;
    height: 2px;
    background-image: linear-gradient(to right, var(--border) 60%, transparent 40%);
    background-size: 16px 2px;
}

.ts-timeline__item { position: relative; }

.ts-timeline__num {
    width: 52px; height: 52px;
    border-radius: 50%;
    background: var(--ink);
    color: var(--accent);
    font-family: var(--font-mono);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    font-size: 1.1rem;
    position: relative;
    z-index: 2;
}

.ts-timeline__item h4 { font-size: 1.05rem; margin-bottom: 8px; }
.ts-timeline__item p { font-size: 0.9rem; margin: 0; }

/* ===== CTA FINAL ===== */
.ts-cta-final {
    background: var(--ink);
    color: #fff;
    clip-path: polygon(0 4%, 100% 0, 100% 96%, 0 100%);
    margin: 20px 0 -20px;
    padding: 110px 0;
}

.ts-cta-final h2 {
    color: #fff;
    font-size: clamp(2rem, 4vw, 3.2rem);
    max-width: 640px;
}

.ts-cta-final .ts-underline::after { background: var(--accent); }

.ts-cta-final p { opacity: 0.75; margin-bottom: 30px; max-width: 480px; }

.ts-cta-final__grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
}

/* ===== PÁGINAS GENÉRICAS ===== */
.ts-page { padding: 90px 0; }
.ts-page h1 { font-size: clamp(2.2rem, 4vw, 3.2rem); }
.ts-content { font-size: 1.05rem; }
.ts-content ul { padding-left: 20px; }

/* ===== QUIENES SOMOS ===== */
.ts-valor {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px;
    transition: transform 0.3s;
}
.ts-valor:hover { transform: translateY(-6px); }

/* ===== CONTACTO ===== */
.ts-contacto__grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 40px;
    margin-top: 30px;
}

.ts-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: var(--white);
    padding: 36px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
}

.ts-form label {
    font-weight: 700;
    font-size: 0.85rem;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--ink-soft);
}

.ts-form input, .ts-form textarea {
    padding: 13px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 1rem;
    background: var(--bg);
}

.ts-form input:focus, .ts-form textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.ts-contacto__info {
    padding: 30px;
    background: var(--ink);
    color: #fff;
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    gap: 14px;
    height: fit-content;
}

.ts-contacto__info h3 { color: #fff; }
.ts-contacto__info p { margin: 0; opacity: 0.85; }

.ts-alert {
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    margin: 20px 0;
    font-weight: 600;
    font-size: 0.95rem;
}

.ts-alert--exito { background: #DCFCE7; color: #166534; }
.ts-alert--error { background: #FEE2E2; color: #991B1B; }

/* ===== FOOTER ===== */
.ts-footer {
    background: var(--ink);
    color: rgba(255,255,255,0.65);
    padding: 64px 0 0;
    margin-top: 60px;
    position: relative;
}

.ts-footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.ts-footer__top {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 50px;
    padding-bottom: 44px;
}

.ts-logo--footer {
    color: #fff;
    margin-bottom: 16px;
    display: inline-flex;
}

.ts-footer__tagline {
    max-width: 320px;
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 22px;
}

.ts-footer__heading {
    color: #fff;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-family: var(--font-mono);
    font-weight: 500;
    margin-bottom: 20px;
}

.ts-footer__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 0.95rem;
}

.ts-footer__list a { transition: color 0.2s; }
.ts-footer__list a:hover { color: var(--accent); }

.ts-footer__list--contact li { display: flex; gap: 8px; }

.ts-footer__social {
    display: flex;
    gap: 10px;
    margin-top: 22px;
}

.ts-footer__social-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    color: #fff;
    transition: background 0.2s, border-color 0.2s;
}

.ts-footer__social-icon:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.ts-footer__bottom {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    font-size: 0.85rem;
    font-family: var(--font-mono);
}

/* ===== WHATSAPP FLOTANTE ===== */
.ts-whatsapp-float {
    position: fixed;
    bottom: 26px;
    right: 26px;
    width: 60px;
    height: 60px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.28);
    z-index: 999;
    transition: transform 0.25s;
}

.ts-whatsapp-float:hover { transform: scale(1.1) rotate(6deg); }

/* ===== ANIMACIÓN SCROLL REVEAL ===== */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .ts-compare__after::before, .ts-ticker__track { animation: none; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 980px) {
    .ts-hero__grid { grid-template-columns: 1fr; }
    .ts-bento { grid-template-columns: 1fr 1fr; }
    .ts-bento__item--big { grid-row: span 1; grid-column: span 2; }
    .ts-timeline { grid-template-columns: repeat(2, 1fr); }
    .ts-timeline::before { display: none; }
    .ts-footer__top { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 768px) {
    .ts-header__cta .ts-btn { display: none; }
    .ts-menu-toggle { display: flex; }

    .ts-nav {
        position: absolute;
        top: 100%; left: 0; right: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .ts-nav.is-open { max-height: 400px; }

    .ts-nav__list {
        flex-direction: column;
        gap: 0;
        padding: 10px 24px 20px;
    }

    .ts-nav__list li { padding: 12px 0; border-bottom: 1px solid var(--border); }

    .ts-grid, .ts-bento { grid-template-columns: 1fr; }
    .ts-bento__item--big { grid-column: span 1; }
    .ts-timeline { grid-template-columns: 1fr; }
    .ts-contacto__grid { grid-template-columns: 1fr; }
    section { padding: 70px 0; }
    .ts-cta-final__grid { flex-direction: column; align-items: flex-start; }
}
