/* ============================================================
   Enlaza Grupo Logístico — theme.css
   Estilos de la landing institucional (Propuesta 1).
   Las variables se inyectan desde wp_head() (functions.php),
   los Tweaks en vivo las pisan al vuelo via :root style attr.
   ============================================================ */

:root {
    --enlaza-accent: #1FB6E8;
    --enlaza-accent-soft: #9fdcf0;
    --enlaza-bg-from: #eef1f5;
    --enlaza-bg-to: #dde3ec;
    --enlaza-text: #2a2a2a;
    --enlaza-text-muted: #7a7a7a;
    --enlaza-line: #c9d2dc;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Saira', system-ui, -apple-system, Segoe UI, sans-serif;
    color: var(--enlaza-text);
    background: radial-gradient(120% 80% at 50% 0%, var(--enlaza-bg-from) 0%, var(--enlaza-bg-to) 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

a { color: inherit; }

.screen-reader-text {
    position: absolute; left: -9999px; top: auto;
    width: 1px; height: 1px; overflow: hidden;
}
.screen-reader-text:focus {
    left: 16px; top: 16px; width: auto; height: auto;
    background: #fff; padding: 8px 12px; z-index: 100;
}

/* ============================================================
   Header
   ============================================================ */
.enlaza-header {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 28px 56px;
}
.enlaza-header__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}
.enlaza-header__wordmark {
    display: flex;
    flex-direction: column;
    line-height: 1;
}
.enlaza-header__wordmark-top {
    font-family: 'Saira Condensed', 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 22px;
    letter-spacing: 4px;
    color: #6b6b6b;
}
.enlaza-header__wordmark-bot {
    font-family: 'Saira Condensed', 'Barlow Condensed', sans-serif;
    font-weight: 400;
    font-size: 10px;
    letter-spacing: 3px;
    color: #9a9a9a;
    margin-top: 4px;
}
.enlaza-header__contact {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #5a5a5a;
    text-decoration: none;
    font-size: 15px;
    letter-spacing: 0.3px;
    transition: color .2s;
}
.enlaza-header__contact:hover { color: var(--enlaza-accent); }

/* ============================================================
   Canvas de la red de nodos (fondo decorativo)
   ============================================================ */
.enlaza-main { position: relative; overflow: hidden; }
.enlaza-network {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ============================================================
   Hero
   ============================================================ */
.enlaza-hero {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0px 0px 0px;
    min-height: calc(100vh - 100px);
    text-align: center;
}

.enlaza-hero__mark {
    margin-top: 30px;
}
.enlaza-hero__wordmark {
    margin-top: -6px;
}

.enlaza-hero__divider {
    position: relative;
    margin: 22px 0 28px;
    width: 220px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.enlaza-hero__divider-line {
    position: absolute;
    left: 0; right: 0; top: 50%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #c4c9cf, transparent);
}
.enlaza-hero__divider-glow {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 18px;
    background: radial-gradient(ellipse at center, color-mix(in srgb, var(--enlaza-accent-soft) 50%, transparent), transparent 70%);
    filter: blur(2px);
}

.enlaza-hero__title {
    font-family: 'Saira', sans-serif;
    font-weight: 400;
    font-size: 30px;
    letter-spacing: 0.2px;
    color: #3a3a3a;
    margin: 0;
}
.enlaza-hero__subtitle {
    font-family: 'Saira', sans-serif;
    font-weight: 300;
    font-size: 15px;
    color: var(--enlaza-text-muted);
    margin: 14px 0 0;
    max-width: 460px;
    line-height: 1.6;
}

/* ============================================================
   Fila de marcas
   ============================================================ */
.enlaza-marcas {
    margin: 10px auto 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 100%;
    max-width: 1040px;
    flex-wrap: nowrap;
}
.enlaza-marca {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 12px;
    min-height: 90px;
}
.enlaza-marca a { display: inline-flex; }
.enlaza-marca__logo {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    filter: grayscale(0);
    transition: transform .25s ease, filter .25s ease;
}
.enlaza-marca__logo--sm { max-height: 44px; }
.enlaza-marca__logo--md { max-height: 60px; }
.enlaza-marca__logo--lg { max-height: 120px; }
.enlaza-marca a:hover .enlaza-marca__logo {
    transform: translateY(-2px);
}
.enlaza-marca__fallback {
    font-family: 'Saira Condensed', sans-serif;
    font-weight: 700;
    font-size: 22px;
    letter-spacing: 2px;
    color: var(--enlaza-text-muted);
}
.enlaza-marcas__sep {
    width: 1px;
    height: 70px;
    background: #d4d8dd;
    flex: 0 0 auto;
}

/* ============================================================
   CTA
   ============================================================ */
.enlaza-cta {
    margin-top: 64px;
    background: transparent;
    border: 1.5px solid #b5bcc4;
    border-radius: 999px;
    padding: 14px 36px;
    display: inline-flex;
    align-items: center;
    gap: 18px;
    color: #3a3a3a;
    font-family: 'Saira', sans-serif;
    font-size: 16px;
    letter-spacing: 0.3px;
    text-decoration: none;
    cursor: pointer;
    transition: all .25s;
}
.enlaza-cta:hover {
    border-color: var(--enlaza-accent);
    box-shadow: 0 6px 24px color-mix(in srgb, var(--enlaza-accent) 20%, transparent);
}

/* ============================================================
   Scroll indicator + floor glow
   ============================================================ */
.enlaza-scroll {
    position: absolute;
    left: 50%;
    bottom: 64px;
    transform: translateX(-50%);
}
.enlaza-scroll__mouse {
    width: 28px;
    height: 44px;
    border: 1.5px solid #b5bcc4;
    border-radius: 14px;
    position: relative;
    background: rgba(255, 255, 255, 0.5);
}
.enlaza-scroll__dot {
    position: absolute;
    left: 50%;
    top: 8px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--enlaza-accent);
    transform: translateX(-50%);
    animation: enlazaScrollDot 1.8s ease-in-out infinite;
}
@keyframes enlazaScrollDot {
    0%, 100% { transform: translate(-50%, 0); opacity: 1; }
    50%      { transform: translate(-50%, 14px); opacity: 0.3; }
}

.enlaza-hero__floor {
    position: absolute;
    left: 50%;
    bottom: 32px;
    width: 360px;
    height: 30px;
    transform: translateX(-50%);
    background: radial-gradient(ellipse at center,
        color-mix(in srgb, var(--enlaza-accent-soft) 35%, transparent) 0%,
        transparent 70%);
    filter: blur(6px);
    pointer-events: none;
}

/* ============================================================
   Footer mínimo
   ============================================================ */
.enlaza-footer {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0px;
    color: var(--enlaza-text-muted);
}

/* ============================================================
   Páginas internas (page.php)
   ============================================================ */
.enlaza-main--plain { min-height: auto; }
.enlaza-page {
    max-width: 800px;
    margin: 40px auto 80px;
    padding: 0 24px;
}
.enlaza-page__title {
    font-family: 'Saira Condensed', sans-serif;
    font-weight: 700;
    font-size: 38px;
    letter-spacing: 1.5px;
    margin: 0 0 24px;
}
.enlaza-page__content { font-size: 16px; line-height: 1.7; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
    .enlaza-header { padding: 20px 28px; }
    .enlaza-hero { padding: 5px 24px 100px; }
    .enlaza-hero__title { font-size: 24px; }
    .enlaza-hero__subtitle { font-size: 14px; }
    .enlaza-marcas {
        margin-top: 10px;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 5px;
    }
    .enlaza-marca {
        padding: 18px 12px;
        background: rgba(255, 255, 255, 0);
        backdrop-filter: blur(4px);
        border-radius: 10px;
        border: 1px solid rgba(0, 0, 0, 0);
        min-height: 80px;
    }
    .enlaza-marcas__sep { display: none; }
    .enlaza-cta { margin-top: 36px; }
}
@media (max-width: 480px) {
    .enlaza-header__wordmark-top { font-size: 18px; }
    .enlaza-header__wordmark-bot { font-size: 9px; }
    .enlaza-hero__mark svg { width: 110px !important; height: 88px !important; }
    .enlaza-hero__wordmark svg { width: 320px !important; }
    .enlaza-marcas { grid-template-columns: 1fr 1fr; }
    .enlaza-hero__floor { display: none; }
}

/* ============================================================
   Accesibilidad: respeta prefers-reduced-motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    .enlaza-scroll__dot { animation: none; }
    #enlaza-network { display: none; }
}

/* ============================================================
   Panel de Tweaks (front-end live, ver tweaks.js)
   ============================================================ */
.enlaza-tw-btn {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 9000;
    background: #ffffff;
    border: 1px solid #d6dbe2;
    border-radius: 999px;
    padding: 10px 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Saira', sans-serif;
    font-size: 13px;
    color: #2a2a2a;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0,0,0,.10);
    transition: transform .2s, box-shadow .2s;
}
.enlaza-tw-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(0,0,0,.14); }
.enlaza-tw-btn svg { color: var(--enlaza-accent); }

.enlaza-tw-panel {
    position: fixed;
    right: 18px;
    bottom: 72px;
    z-index: 9001;
    width: 320px;
    max-height: 70vh;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #d6dbe2;
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0,0,0,.18);
    font-family: 'Saira', sans-serif;
    color: #2a2a2a;
    display: flex;
    flex-direction: column;
    transform-origin: bottom right;
    animation: enlazaTwIn .18s ease;
}
@keyframes enlazaTwIn {
    from { opacity: 0; transform: scale(.95) translateY(8px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
.enlaza-tw-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #eef0f3;
}
.enlaza-tw-panel__title {
    font-family: 'Saira Condensed', sans-serif;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #1a1a1a;
}
.enlaza-tw-panel__close {
    background: transparent; border: 0; cursor: pointer; padding: 4px;
    color: #777; font-size: 18px; line-height: 1;
}
.enlaza-tw-panel__body {
    padding: 16px 18px 18px;
    overflow-y: auto;
    overscroll-behavior: contain;
}
.enlaza-tw-section { margin-bottom: 18px; }
.enlaza-tw-section__title {
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #8a8a8a;
    margin: 0 0 10px;
}
.enlaza-tw-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}
.enlaza-tw-row label {
    font-size: 13px;
    color: #3a3a3a;
    flex: 1;
}
.enlaza-tw-row input[type=range] {
    flex: 1.4;
    accent-color: var(--enlaza-accent);
}
.enlaza-tw-row input[type=color] {
    width: 36px;
    height: 26px;
    padding: 0;
    border: 1px solid #d6dbe2;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
}
.enlaza-tw-swatches { display: flex; gap: 6px; }
.enlaza-tw-swatch {
    width: 22px; height: 22px; border-radius: 6px;
    border: 1px solid rgba(0,0,0,.08);
    cursor: pointer;
    transition: transform .15s;
}
.enlaza-tw-swatch:hover { transform: scale(1.1); }
.enlaza-tw-swatch--active {
    box-shadow: 0 0 0 2px var(--enlaza-accent);
}
.enlaza-tw-reset {
    width: 100%;
    background: #f3f5f8;
    border: 1px solid #e3e7ec;
    color: #3a3a3a;
    border-radius: 8px;
    padding: 10px;
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    margin-top: 4px;
    transition: background .15s;
}
.enlaza-tw-reset:hover { background: #ebeef3; }
.enlaza-tw-note {
    font-size: 11px;
    color: #8a8a8a;
    margin-top: 10px;
    line-height: 1.4;
}

/* Logo responsive */
.enlaza-hero__mark img {
    width: 500px; /* escritorio */
}

@media (max-width: 1024px) {
    .enlaza-hero__mark img {
        width: 260px; /* tablet */
    }
}

@media (max-width: 768px) {
    .enlaza-hero__mark img {
        width: 260px; /* tablet pequeño / móvil landscape */
    }
}

@media (max-width: 480px) {
    .enlaza-hero__mark img {
        width: 220px; /* iPhone */
    }
}