/* ==========================================================================
   Inicio
   ========================================================================== */

/* ---- Intro de marca (una vez por sesión) ------------------------------- */

.df-intro {
    --marca-d: var(--c4);
    --marca-m: var(--c3);
    --marca-l: var(--c2);
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    background: radial-gradient(90% 90% at 50% 40%, var(--navy) 0%, var(--navy-4) 100%);
    transition: transform .9s var(--ease), opacity .5s ease .45s, visibility 0s linear .95s;
    animation: dfIntroSalida .8s var(--ease) 3.4s forwards;
}
.df-intro.is-fin { transform: translateY(-100%); opacity: 0; visibility: hidden; }
.no-js .df-intro, html.intro-visto .df-intro { display: none; }
body.intro-bloqueo { overflow: hidden; }
@keyframes dfIntroSalida { to { transform: translateY(-100%); visibility: hidden; } }

.df-intro-centro { display: grid; justify-items: center; gap: 26px; }
.df-intro-marca { width: 132px; height: auto; overflow: visible; }
.df-intro-trazo { stroke: var(--c2); stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round; }
.df-intro .df-marca-d { fill: var(--marca-d); }
.df-intro .df-marca-m { fill: var(--marca-m); }
.df-intro .df-marca-l { fill: var(--marca-l); }

.df-intro-texto {
    display: grid;
    justify-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateY(10px);
    animation: dfIntroTexto .8s var(--ease-out) 1.05s forwards;
}
.df-intro-nombre {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.df-intro-desc {
    color: var(--c2);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .3em;
    text-transform: uppercase;
}
@keyframes dfIntroTexto { to { opacity: 1; transform: none; } }

/* ---- Hero -------------------------------------------------------------- */

.df-hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background: radial-gradient(110% 120% at 82% -10%, #3c4f94 0%, var(--navy) 46%, var(--navy-3) 100%);
    color: #fff;
}
.df-hero::before {
    content: "";
    position: absolute;
    z-index: -1;
    width: 760px; height: 760px;
    right: -200px; top: -300px;
    background: radial-gradient(circle, rgba(95, 176, 201, .34), transparent 60%);
}
.df-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: radial-gradient(rgba(255, 255, 255, .075) 1px, transparent 1px);
    background-size: 22px 22px;
    mask-image: radial-gradient(120% 90% at 25% 20%, #000 25%, transparent 78%);
    -webkit-mask-image: radial-gradient(120% 90% at 25% 20%, #000 25%, transparent 78%);
}
.df-hero-marca {
    position: absolute;
    z-index: -1;
    right: -4%;
    bottom: -22%;
    width: auto;
    height: 125%;
    color: rgba(167, 224, 219, .16);
    pointer-events: none;
}
.df-hero-marca path { stroke-width: .3; }

.df-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
    align-items: center;
    gap: clamp(40px, 5vw, 80px);
    padding-block: clamp(64px, 8vw, 108px) clamp(84px, 10vw, 128px);
}
.df-hero h1 {
    max-width: 12.5ch;
    margin-top: 24px;
    color: #fff;
    font-size: clamp(2.8rem, 5.8vw, 4.75rem);
    line-height: 1.01;
    letter-spacing: -.028em;
}
.df-hero h1 em {
    padding-right: .06em;
    background: linear-gradient(96deg, var(--c2) 10%, var(--c3) 90%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.df-hero-sub { max-width: 46ch; margin-top: 26px; color: var(--on-dark-2); font-size: 1.16rem; line-height: 1.62; }
.df-hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; }
.df-hero-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 36px; }

/* Entrada escalonada: home.js marca el hero como listo tras la intro */
.js .df-hero-anim {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
    transition-delay: var(--rd, 0s);
}
.js .df-hero.is-listo .df-hero-anim { opacity: 1; transform: none; }

/* Tarjeta ilustrativa de seguimiento */
.df-hero-visual { position: relative; width: 100%; max-width: 500px; justify-self: end; }
.df-track {
    position: relative;
    padding: 26px 26px 22px;
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 26px;
    background: linear-gradient(160deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .04));
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    box-shadow: 0 50px 90px -50px rgba(4, 6, 30, .8), inset 0 1px 0 rgba(255, 255, 255, .14);
}
.df-track-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.df-track-kicker {
    color: var(--on-dark-3);
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .2em;
    text-transform: uppercase;
}
.df-track-titulo { margin-top: 6px; color: #fff; font-family: var(--font-serif); font-size: 1.32rem; font-weight: 560; }

.df-estado {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: none;
    padding: 6px 12px;
    border: 1px solid rgba(167, 224, 219, .3);
    border-radius: 999px;
    background: rgba(167, 224, 219, .12);
    color: var(--c2);
    font-size: .76rem;
    font-weight: 700;
}
.df-estado i {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--c2);
    animation: dfLatido 2s ease-out infinite;
}
@keyframes dfLatido {
    0% { box-shadow: 0 0 0 0 rgba(167, 224, 219, .6); }
    70% { box-shadow: 0 0 0 10px rgba(167, 224, 219, 0); }
    100% { box-shadow: 0 0 0 0 rgba(167, 224, 219, 0); }
}

.df-ruta {
    display: grid;
    grid-template-columns: auto minmax(24px, 1fr) auto;
    align-items: center;
    gap: 12px;
    margin-top: 22px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 18px;
    background: rgba(8, 10, 38, .26);
}
.df-ruta-punto { display: flex; align-items: center; gap: 10px; min-width: 0; }
.df-ruta-punto.is-fin { text-align: right; }
.df-ruta-icono {
    display: grid;
    place-items: center;
    flex: none;
    width: 38px; height: 38px;
    border-radius: 12px;
    background: rgba(95, 176, 201, .18);
    color: var(--c2);
}
.df-ruta-icono .df-icono { width: 20px; height: 20px; }
.df-ruta-texto small {
    display: block;
    color: var(--on-dark-3);
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}
.df-ruta-texto strong { color: #fff; font-size: .88rem; font-weight: 700; line-height: 1.3; }
.df-ruta-linea {
    position: relative;
    height: 2px;
    background: repeating-linear-gradient(90deg, rgba(167, 224, 219, .55) 0 6px, transparent 6px 12px);
}
.df-ruta-linea::after {
    content: "";
    position: absolute;
    top: 50%; left: 0;
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--c2);
    box-shadow: 0 0 14px var(--c2);
    transform: translate(-50%, -50%);
    animation: dfViaje 3.4s var(--ease) infinite;
}
@keyframes dfViaje {
    0% { left: 0; opacity: 0; }
    12% { opacity: 1; }
    88% { opacity: 1; }
    100% { left: 100%; opacity: 0; }
}

.df-pasos { margin-top: 16px; }
.df-paso {
    display: grid;
    grid-template-columns: 30px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 11px 4px;
}
.df-paso + .df-paso { border-top: 1px dashed rgba(255, 255, 255, .1); }
.df-paso-check {
    display: grid;
    place-items: center;
    width: 30px; height: 30px;
    border-radius: 50%;
    background: rgba(167, 224, 219, .14);
    color: var(--c2);
}
.df-paso-check svg { width: 16px; height: 16px; }
.df-paso-check path { stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.df-paso-texto { color: #fff; font-size: .92rem; font-weight: 600; }
.df-paso-estado { color: var(--on-dark-3); font-size: .74rem; font-weight: 700; }
.df-paso.is-actual .df-paso-estado { color: var(--c2); }
.df-paso.is-actual .df-paso-check { background: transparent; }
.df-giro {
    width: 22px; height: 22px;
    border: 2px solid rgba(167, 224, 219, .22);
    border-top-color: var(--c2);
    border-radius: 50%;
    animation: dfGiro 1.1s linear infinite;
}
@keyframes dfGiro { to { transform: rotate(360deg); } }

.df-progreso {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    color: var(--on-dark-3);
    font-size: .76rem;
    font-weight: 700;
}
.df-progreso-barra {
    flex: 1;
    height: 6px;
    overflow: hidden;
    border-radius: 99px;
    background: rgba(255, 255, 255, .1);
}
.df-progreso-barra span {
    display: block;
    width: 76%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--c3), var(--c2));
}
.js .df-progreso-barra span { width: 0; transition: width 1.8s var(--ease) 1.1s; }
.js .df-hero.is-listo .df-progreso-barra span { width: 76%; }

.df-hero-badge {
    position: absolute;
    left: -44px;
    bottom: -58px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 22px 16px 18px;
    border-radius: 20px;
    background: #fff;
    color: var(--ink);
    box-shadow: var(--shadow);
    animation: dfFlotar 7s ease-in-out infinite;
}
.df-hero-badge .n { color: var(--navy); font-family: var(--font-serif); font-size: 2.7rem; font-weight: 600; line-height: 1; }
.df-hero-badge .t { max-width: 11ch; color: var(--muted); font-size: .8rem; font-weight: 700; line-height: 1.25; }

.df-hero-iso {
    position: absolute;
    right: -26px;
    top: -52px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px 10px 12px;
    border-radius: 16px;
    background: #fff;
    color: var(--navy);
    box-shadow: var(--shadow-sm);
    animation: dfFlotar 7s ease-in-out -3.5s infinite;
}
.df-hero-iso .df-icono { width: 26px; height: 26px; color: var(--c4); }
.df-hero-iso strong { display: block; font-size: .9rem; line-height: 1.1; }
.df-hero-iso small { color: var(--muted); font-size: .7rem; font-weight: 700; }
@keyframes dfFlotar { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

@media (max-width: 1180px) {
    .df-hero-iso { right: -6px; }
    .df-hero-badge { left: -16px; }
    .df-ruta { gap: 8px; padding: 12px; }
    .df-ruta-icono { width: 34px; height: 34px; }
}

/* ---- Cifras ------------------------------------------------------------ */

.df-cifras { background: var(--paper); border-bottom: 1px solid var(--line); }
.df-cifras-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 1.3fr);
    align-items: center;
    gap: 24px;
    padding-block: 46px;
}
.df-cifra { position: relative; text-align: center; }
.df-cifra + .df-cifra::before {
    content: "";
    position: absolute;
    left: -12px; top: 12%; bottom: 12%;
    width: 1px;
    background: var(--line-strong);
}
.df-cifra .n {
    display: block;
    color: var(--navy);
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 4.4vw, 3.5rem);
    font-weight: 600;
    letter-spacing: -.02em;
    line-height: 1;
    font-variant-numeric: lining-nums tabular-nums;
}
.df-cifra .l {
    display: block;
    margin-top: 12px;
    color: var(--muted);
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .15em;
    text-transform: uppercase;
}
.df-cifra-destacada {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--c1), var(--c2));
    color: var(--navy);
    box-shadow: 0 16px 30px -20px rgba(62, 109, 156, .7);
}
.df-cifra-destacada .df-icono { width: 36px; height: 36px; stroke-width: 1.5; }
.df-cifra-destacada span { font-size: .86rem; font-weight: 600; line-height: 1.3; }
.df-cifra-destacada strong { display: block; font-family: var(--font-serif); font-size: 1.35rem; font-weight: 600; }

/* ---- Nosotros ---------------------------------------------------------- */

.df-nos-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
    align-items: start;
    gap: clamp(40px, 6vw, 96px);
}
.df-nos-texto h2 { margin-top: 18px; font-size: clamp(2.05rem, 3.9vw, 3.15rem); max-width: 16ch; }
.df-nos-texto p { margin-top: 20px; color: var(--muted); font-size: 1.07rem; }
.df-agentes-mini {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 30px 0 26px;
    padding-top: 26px;
    border-top: 1px solid var(--line);
}
.df-agente-mini { display: flex; align-items: center; gap: 12px; }
.df-agente-mini strong { display: block; color: var(--navy); font-size: .95rem; line-height: 1.25; }
.df-agente-mini small { color: var(--muted); font-size: .8rem; font-weight: 600; }

.df-nos-linea {
    padding: 34px 34px 16px;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: linear-gradient(180deg, var(--paper), #fff);
}
.df-nos-linea-titulo {
    margin-bottom: 24px;
    color: var(--c4);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .22em;
    text-transform: uppercase;
}
.df-linea { position: relative; padding-left: 34px; }
.df-linea::before {
    content: "";
    position: absolute;
    left: 7px; top: 10px; bottom: 30px;
    width: 2px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--c3), var(--c2));
    transform-origin: top;
}
.js .df-linea::before { transform: scaleY(0); transition: transform 1.8s var(--ease); }
.js .df-linea.in::before { transform: scaleY(1); }
.df-hito { position: relative; padding-bottom: 24px; }
.df-hito::before {
    content: "";
    position: absolute;
    left: -32px; top: 7px;
    width: 14px; height: 14px;
    border: 2.5px solid var(--c3);
    border-radius: 50%;
    background: #fff;
}
.df-hito.is-hoy::before { background: var(--c3); box-shadow: 0 0 0 5px rgba(95, 176, 201, .2); }
.js .df-hito { opacity: 0; transform: translateX(-8px); transition: opacity .6s ease, transform .6s var(--ease-out); transition-delay: calc(var(--i, 0) * .22s + .2s); }
.js .df-linea.in .df-hito { opacity: 1; transform: none; }
.df-hito-anio { color: var(--navy); font-family: var(--font-serif); font-size: 1.55rem; font-weight: 600; line-height: 1; }
.df-hito p { margin-top: 6px; color: var(--muted); font-size: .95rem; }

/* ---- Servicios --------------------------------------------------------- */

.df-serv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.df-serv {
    display: flex;
    flex-direction: column;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: #fff;
    --bleed: #fff;
    transition: transform .3s var(--ease-out), box-shadow .3s;
}
.df-serv:hover { transform: translateY(-5px); box-shadow: var(--shadow-sm); }
.df-serv-visual {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    aspect-ratio: 2 / 1;
    border-radius: 20px;
    background: radial-gradient(120% 140% at 80% 0%, #3c4f94 0%, var(--navy) 55%, var(--navy-3) 100%);
}
.df-serv-visual::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: radial-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px);
    background-size: 18px 18px;
}
.df-serv-visual .df-ilustra { position: absolute; inset: 8% 4% 0; width: 92%; height: 92%; }
.df-serv-cuerpo { display: flex; flex-direction: column; gap: 16px; flex: 1; padding: 26px 22px 22px; }
.df-serv-cuerpo h3 { color: var(--navy); font-size: 1.75rem; }
.df-serv-cuerpo > p { color: var(--muted); }
.df-serv-cuerpo .df-link { margin-top: auto; align-self: flex-start; }

/* ---- Cobertura --------------------------------------------------------- */

.df-cobertura .df-mapa { margin-top: -8px; }
.df-suc-lista {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-top: 12px;
    border-top: 1px solid var(--line);
}
.df-suc { padding: 22px 18px 24px; transition: background-color .25s; }
.df-suc + .df-suc { border-left: 1px solid var(--line); }
.df-suc.is-activa, .df-suc:hover { background: linear-gradient(180deg, var(--paper), rgba(243, 250, 249, 0)); }
.df-suc-num { color: var(--c3); font-family: var(--font-serif); font-size: .95rem; font-weight: 600; }
.df-suc h3 { margin-top: 6px; color: var(--navy); font-size: 1.28rem; }
.df-suc-tipo {
    display: inline-block;
    margin-top: 8px;
    color: var(--c4);
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .15em;
    text-transform: uppercase;
}
.df-suc p { margin-top: 8px; color: var(--muted); font-size: .9rem; line-height: 1.5; }
.df-cobertura-link { margin-top: 30px; }

/* ---- Recursos ---------------------------------------------------------- */

.df-recursos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.df-recurso {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 28px 24px 26px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: #fff;
    transition: transform .3s var(--ease-out), box-shadow .3s, border-color .3s;
}
.df-recurso::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--c3), var(--c2));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .45s var(--ease);
}
.df-recurso:hover { transform: translateY(-5px); box-shadow: var(--shadow-sm); border-color: transparent; }
.df-recurso:hover::after { transform: scaleX(1); }
.df-recurso-icono {
    display: grid;
    place-items: center;
    width: 52px; height: 52px;
    border-radius: 15px;
    background: var(--c1);
    color: var(--c4);
}
.df-recurso-icono .df-icono { width: 26px; height: 26px; }
.df-recurso-meta {
    margin-top: 22px;
    color: var(--c4);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}
.df-recurso h3 { margin-top: 8px; color: var(--navy); font-size: 1.3rem; }
.df-recurso p { margin-top: 10px; color: var(--muted); font-size: .94rem; }
.df-recurso-ir {
    display: grid;
    place-items: center;
    width: 38px; height: 38px;
    margin-top: 22px;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    color: var(--navy);
    transition: background-color .25s, color .25s, border-color .25s, transform .3s var(--ease-out);
}
.df-recurso-ir .df-icono { width: 17px; height: 17px; }
.df-recurso:hover .df-recurso-ir { background: var(--navy); border-color: var(--navy); color: #fff; transform: translateX(4px); }
