/* =========================================================================
   QVERSE · CAPA DE DISEÑO (manual de marca)
   Se carga después de style.css y lo refina sin tocar la estructura.

   Manual de marca:
   · Paleta     #124e94 (primario) · #000 · #39577f · #6189b7 · #b7d0ee · #fff
   · Títulos    Playfair Display (cursiva, secundaria) + Poppins (principal),
                con ligero solapamiento y eco en negro
   · Cuerpo     Poppins
   · Gráficos   figuras abstractas de líneas (contornos / ondas), bajo el texto
   · Texturas   holográficas, discretas
   · Logo       versión oscura sobre fondos claros, clara sobre oscuros
   ========================================================================= */

:root {
    /* Paleta oficial */
    --qv-blue: #124e94;
    --qv-ink: #000000;
    --qv-slate: #39577f;
    --qv-sky: #6189b7;
    --qv-mist: #b7d0ee;
    --qv-white: #ffffff;

    /* Matices dentro de la misma gama cromática (permitido por el manual) */
    --qv-deep: #0a2f5c;
    --qv-paper: #f3f7fc;
    --qv-line: #dbe6f3;

    --font-main: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;

    --ease: cubic-bezier(0.22, 0.7, 0.2, 1);

    /* Se reasignan las variables de style.css: todo hereda la marca */
    --primary-color: var(--qv-blue);
    --primary-light: var(--qv-slate);
    --accent-color: var(--qv-sky);
    --secondary-color: var(--qv-slate);
    --text-color: #0b1626;
    --bg-light: var(--qv-paper);
    --border-color: var(--qv-line);
    --container-width: 1240px;
}

::selection {
    background: var(--qv-blue);
    color: #fff;
}

html {
    scroll-padding-top: 90px;
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
    font-family: var(--font-main);
    color: var(--qv-blue);
    letter-spacing: -0.015em;
}

p {
    color: rgba(0, 0, 0, 0.78);
}

/* ---- Barra de progreso de lectura ------------------------------------ */

.qv-progress {
    position: fixed;
    inset: 0 0 auto 0;
    height: 3px;
    z-index: 1100;
    background: linear-gradient(90deg, var(--qv-sky), var(--qv-blue));
    transform-origin: 0 50%;
    transform: scaleX(var(--progress, 0));
    pointer-events: none;
}

/* ---- Títulos de marca: Playfair (secundaria) + Poppins (principal) ----- */

.t-sec {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    letter-spacing: -0.01em;
    color: var(--qv-sky);
}

.t-key {
    font-family: var(--font-main);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--qv-blue);
    /* Eco en negro de la tipografía principal (manual de marca) */
    text-shadow: 0.028em 0.028em 0 rgba(0, 0, 0, 0.16);
}

.on-dark .t-sec,
.page-header .t-sec {
    color: var(--qv-mist);
}

.on-dark .t-key,
.page-header .t-key {
    color: #fff;
    text-shadow: 0.032em 0.032em 0 rgba(0, 0, 0, 0.45);
}

.section-header h2,
.section-title h2,
.about-text h2,
.join-content h2,
.recruitment-intro h2 {
    font-size: clamp(2.1rem, 4.2vw, 3.4rem);
    line-height: 1.12;
    font-weight: 400;
    text-wrap: balance;
}

.about-text h2 {
    font-size: clamp(1.9rem, 3.4vw, 2.8rem);
}

.section-title h2 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.eyebrow {
    color: var(--qv-sky);
    font-family: var(--font-main);
    font-size: 0.74rem;
    letter-spacing: 0.22em;
}

.eyebrow--light {
    color: var(--qv-mist);
}

/* ---- Estructura y ritmo ------------------------------------------------ */

.section {
    position: relative;
    padding: clamp(80px, 11vw, 150px) 0;
    overflow: clip;
}

.page-section {
    padding: clamp(48px, 7vw, 90px) 0;
}

.bg-light {
    background-color: var(--qv-paper);
}

.section > .container {
    position: relative;
    z-index: 1;
}

.section-header {
    margin-bottom: clamp(36px, 5vw, 64px);
}

.section-header p {
    color: var(--qv-slate);
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.2rem;
}

/* Trazo bajo los títulos que se dibuja al entrar en pantalla */
.section-header h2::after,
.section-title h2::after {
    content: '';
    display: block;
    width: 72px;
    height: 2px;
    margin: 20px auto 0;
    background: linear-gradient(90deg, var(--qv-blue), var(--qv-sky));
    transform-origin: 50% 50%;
    transition: transform 0.9s var(--ease) 0.25s;
}

.section-title h2::after {
    margin-left: 0;
    transform-origin: 0 50%;
}

.qv-js .section-header h2::after,
.qv-js .section-title h2::after {
    transform: scaleX(0);
}

.qv-js .section-header.is-in h2::after,
.qv-js .section-title.is-in h2::after {
    transform: scaleX(1);
}

.divider {
    display: none;
}

/* ---- Decoración de marca: figuras de líneas con parallax ------------- */

.about-section::after,
.bg-light::after {
    content: '';
    position: absolute;
    pointer-events: none;
    z-index: 0;
    background-repeat: no-repeat;
    background-size: contain;
    opacity: 0.4;
    will-change: transform;
}

.about-section::after {
    right: -12%;
    top: -14%;
    width: min(42vw, 560px);
    aspect-ratio: 1100 / 1152;
    background-image: url('img/brand/ondas-claro.webp');
    transform: translate3d(0, calc(var(--sp, 0) * -70px), 0) rotate(calc(var(--sp, 0) * 4deg));
}

.bg-light::after {
    left: -8%;
    bottom: -6%;
    width: min(70vw, 900px);
    aspect-ratio: 1500 / 904;
    background-image: url('img/brand/contornos-claro.webp');
    transform: translate3d(calc(var(--sp, 0) * 50px), calc(var(--sp, 0) * -40px), 0);
}

/* ---- Botones ----------------------------------------------------------- */

.btn {
    border-radius: 999px;
    font-family: var(--font-main);
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: transform 0.35s var(--ease), background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.btn-primary {
    background-color: var(--qv-blue);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--qv-slate);
}

.btn-outline-dark {
    border-width: 1.5px;
    border-color: var(--qv-blue);
    color: var(--qv-blue);
}

.btn-outline-dark:hover {
    background-color: var(--qv-blue);
    color: #fff;
    transform: translateY(-2px);
}

.read-more {
    position: relative;
    color: var(--qv-blue);
    font-weight: 500;
}

/* ---- Barra de navegación ------------------------------------------------ */

.navbar {
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 20px 0;
    transition: padding 0.4s var(--ease), transform 0.4s var(--ease);
}

/* El fondo va en un pseudo-elemento: así el desenfoque no crea un bloque
   contenedor que rompa el menú móvil (position: fixed). */
.navbar::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.82);
    -webkit-backdrop-filter: saturate(1.5) blur(16px);
    backdrop-filter: saturate(1.5) blur(16px);
    box-shadow: 0 1px 0 rgba(18, 78, 148, 0.12), 0 12px 30px -18px rgba(10, 47, 92, 0.35);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.navbar.is-scrolled {
    padding: 10px 0;
}

.navbar.is-scrolled::before {
    opacity: 1;
}

.nav-container {
    position: relative;
    gap: 24px;
}

.logo {
    position: relative;
    z-index: 1002;
    display: block;
    flex: none;
}

.logo img {
    height: 38px;
    width: auto;
    display: block;
    transition: height 0.4s var(--ease);
}

.navbar.is-scrolled .logo img {
    height: 32px;
}

.logo .logo-on-light {
    display: none;
}

.navbar.is-scrolled .logo-on-dark {
    display: none;
}

.navbar.is-scrolled .logo-on-light {
    display: block;
}

.nav-menu {
    gap: clamp(14px, 2vw, 30px);
}

.nav-link {
    position: relative;
    padding: 6px 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.88rem;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1.5px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: 100% 50%;
    transition: transform 0.4s var(--ease);
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
    transform-origin: 0 50%;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    font-weight: 400;
}

.navbar.is-scrolled .nav-link {
    color: var(--qv-slate);
}

.navbar.is-scrolled .nav-link:hover,
.navbar.is-scrolled .nav-link.active {
    color: var(--qv-blue);
}

.nav-link.button-primary {
    padding: 9px 22px;
    border-radius: 999px;
    border: 1.5px solid rgba(255, 255, 255, 0.7);
    background: transparent;
    color: #fff;
    font-weight: 500;
}

.nav-link.button-primary::after {
    display: none;
}

.nav-link.button-primary:hover {
    background: #fff;
    color: var(--qv-blue);
}

.navbar.is-scrolled .nav-link.button-primary {
    background: var(--qv-blue);
    border-color: var(--qv-blue);
    color: #fff;
}

.navbar.is-scrolled .nav-link.button-primary:hover {
    background: var(--qv-slate);
    border-color: var(--qv-slate);
    color: #fff;
}

.hamburger,
.hamburger::before,
.hamburger::after {
    height: 2px;
    border-radius: 2px;
    background-color: #fff;
    transition: transform 0.35s var(--ease), background-color 0.3s ease, top 0.3s ease, bottom 0.3s ease;
}

.navbar.is-scrolled .hamburger,
.navbar.is-scrolled .hamburger::before,
.navbar.is-scrolled .hamburger::after {
    background-color: var(--qv-blue);
}

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

.hero-section {
    min-height: 640px;
    background: radial-gradient(120% 90% at 20% 10%, #1a62b4 0%, var(--qv-blue) 45%, var(--qv-deep) 100%);
}

.hero-section::before {
    content: '';
    position: absolute;
    z-index: 1;
    pointer-events: none;
    background-repeat: no-repeat;
    background-size: contain;
    will-change: transform;
}

.hero-section::before {
    left: -8%;
    bottom: -4%;
    width: min(78vw, 1100px);
    aspect-ratio: 1500 / 904;
    background-image: url('img/brand/contornos-oscuro.webp');
    opacity: 0.5;
    transform: translate3d(calc(var(--hp, 0) * -60px), calc(var(--hp, 0) * -110px), 0);
}

.hero-content {
    max-width: 980px;
    transform: translate3d(0, calc(var(--hp, 0) * -70px), 0);
    opacity: calc(1 - var(--hp, 0) * 1.25);
    will-change: transform, opacity;
}

.hero-title {
    margin-bottom: 26px;
    font-size: clamp(3.2rem, 10.5vw, 8.4rem);
    line-height: 0.92;
    letter-spacing: -0.03em;
}

.quantum-title {
    display: inline-block;
}

.hero-title .t-sec,
.hero-title .t-key {
    display: block;
}

.hero-title .t-sec {
    color: var(--qv-mist);
    font-size: 0.62em;
    margin-bottom: -0.16em;
    padding-right: 1.6em;
}

.hero-title .t-key {
    color: #fff;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    text-shadow: 0.03em 0.03em 0 rgba(0, 0, 0, 0.42);
}

/* Las copias del efecto de superposición no llevan eco */
.hero-title .qt-ghost .t-key,
.hero-title .qt-ghost .t-sec {
    text-shadow: none;
}

.hero-subtitle {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(1.05rem, 1.7vw, 1.45rem);
    color: rgba(255, 255, 255, 0.92);
    opacity: 1;
}

.hero-buttons .btn-primary {
    background-color: #fff;
    border-color: #fff;
    color: var(--qv-blue);
    box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.45);
}

.hero-buttons .btn-primary:hover {
    background-color: var(--qv-mist);
    border-color: var(--qv-mist);
    box-shadow: 0 16px 34px -10px rgba(0, 0, 0, 0.5);
}

.hero-buttons .btn {
    font-weight: 500;
}

/* ---- Quiénes somos ------------------------------------------------------- */

.about-grid {
    gap: clamp(36px, 6vw, 96px);
}

.about-text p {
    color: rgba(0, 0, 0, 0.8);
    font-size: 1.08rem;
    line-height: 1.8;
}

/* Texto que se ilumina palabra a palabra con el scroll */
.qv-words .w {
    color: rgba(18, 78, 148, 0.28);
    transition: color 0.45s ease;
}

.qv-words .w.is-lit {
    color: rgba(0, 0, 0, 0.82);
}

.stats {
    gap: 16px;
}

.stat {
    position: relative;
    overflow: hidden;
    padding: 22px 28px;
    border: 1px solid var(--qv-line);
    border-left: 1px solid var(--qv-line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.78);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 18px 40px -26px rgba(10, 47, 92, 0.4);
    transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease), border-color 0.3s ease;
}

.stat::before {
    content: '';
    position: absolute;
    left: 0;
    top: 22px;
    bottom: 22px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: linear-gradient(var(--qv-blue), var(--qv-sky));
}

.stat:hover {
    transform: translateX(6px);
    border-color: var(--qv-mist);
    box-shadow: 0 24px 46px -24px rgba(10, 47, 92, 0.5);
}

.stat dd {
    font-family: var(--font-main);
    font-size: clamp(2.6rem, 4vw, 3.6rem);
    font-weight: 600;
    letter-spacing: -0.04em;
}

.stat dt {
    color: var(--qv-slate);
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.05rem;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
}

/* ---- Tarjetas (proyectos destacados en cuadrícula "bento") --------------- */

.featured-card,
.card,
.tl-card,
.offer-link,
.team-member {
    position: relative;
    border-radius: 22px;
}

.featured-card {
    background: #fff;
    border: 1px solid var(--qv-line);
    box-shadow: 0 20px 44px -30px rgba(10, 47, 92, 0.45);
    transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), border-color 0.3s ease;
}

.featured-card:hover {
    transform: translateY(-6px);
    border-color: var(--qv-mist);
    box-shadow: 0 34px 60px -30px rgba(10, 47, 92, 0.55);
}

.featured-link {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.featured-media {
    background-color: var(--qv-blue);
}

/* Reflejo que sigue al cursor */
.featured-card::after,
.card::after,
.team-member::after,
.stat::after,
.tl-card::after,
.offer-link::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(97, 137, 183, 0.2), transparent 55%);
    transition: opacity 0.35s ease;
}

.featured-card:hover::after,
.card:hover::after,
.team-member:hover::after,
.stat:hover::after,
.tl-card:hover::after,
.offer-link:hover::after {
    opacity: 1;
}

#proyectos-destacados .featured-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 26px;
}

#proyectos-destacados .featured-card:nth-child(1) {
    grid-column: span 7;
    grid-row: span 2;
}

#proyectos-destacados .featured-card:nth-child(n + 2) {
    grid-column: span 5;
}

#proyectos-destacados .featured-card:nth-child(1) .featured-media {
    flex: 1;
    aspect-ratio: auto;
    min-height: 340px;
}

#proyectos-destacados .featured-card:nth-child(1) h3 {
    font-size: clamp(1.5rem, 2.4vw, 2rem);
}

#proyectos-destacados .featured-card:nth-child(n + 2) .featured-link {
    flex-direction: row;
}

#proyectos-destacados .featured-card:nth-child(n + 2) .featured-media {
    flex: 0 0 40%;
    aspect-ratio: auto;
    min-height: 100%;
}

.featured-body {
    padding: 26px 28px 28px;
}

.featured-body .area {
    color: var(--qv-sky);
    font-size: 0.7rem;
    letter-spacing: 0.18em;
}

.featured-body h3 {
    font-weight: 600;
    letter-spacing: -0.02em;
}

.featured-body p {
    color: rgba(0, 0, 0, 0.7);
}

.status {
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.status-active { background-color: rgba(255, 255, 255, 0.92); color: var(--qv-blue); }
.status-award  { background-color: rgba(255, 255, 255, 0.92); color: var(--qv-ink); }
.status-done   { background-color: rgba(255, 255, 255, 0.92); color: var(--qv-slate); }

/* ---- Próximos eventos ------------------------------------------------------ */

.events-empty {
    position: relative;
    max-width: 760px;
    padding: clamp(32px, 5vw, 56px);
    border: 1px solid var(--qv-line);
    border-radius: 28px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(243, 247, 252, 0.94)),
        url('img/brand/textura-clara.webp') center / cover;
    box-shadow: 0 30px 60px -40px rgba(10, 47, 92, 0.5);
}

.events-empty-title {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(1.5rem, 2.6vw, 2rem);
}

/* ---- Franja de colaboradores ---------------------------------------------- */

.partners-strip {
    padding: 56px 0 40px;
    border-top: 1px solid var(--qv-line);
}

.partners-title {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.15rem;
    letter-spacing: 0.02em;
    text-transform: none;
    color: var(--qv-slate);
}

/* ---- Cabeceras de páginas internas ---------------------------------------- */

.page-header,
.page-header--texture {
    position: relative;
    overflow: hidden;
    padding: clamp(150px, 20vw, 210px) 0 clamp(70px, 9vw, 120px);
    background: radial-gradient(120% 120% at 15% 0%, #1a62b4 0%, var(--qv-blue) 48%, var(--qv-deep) 100%);
}

.page-header > .container {
    position: relative;
    z-index: 2;
}

/* Las líneas de esta imagen terminan en seco por su borde izquierdo: se voltea
   en horizontal para que ese borde quede pegado (y escondido) en el derecho */
.page-header::before,
.page-header--texture::before {
    content: '';
    position: absolute;
    right: -2%;
    bottom: -30%;
    width: min(72vw, 980px);
    aspect-ratio: 1500 / 904;
    z-index: 1;
    pointer-events: none;
    background: url('img/brand/contornos-oscuro.webp') no-repeat center / contain;
    opacity: 0.5;
    transform: translate3d(calc(var(--sp, 0) * -50px), calc(var(--sp, 0) * 70px), 0) scaleX(-1);
    will-change: transform;
}

.page-header h1,
.page-header--texture h1 {
    font-size: clamp(2.6rem, 7vw, 5.2rem);
    font-weight: 400;
    line-height: 1.04;
    color: #fff;
}

.page-header p {
    font-family: var(--font-display);
    font-style: italic;
    font-size: clamp(1.1rem, 1.8vw, 1.4rem);
    opacity: 0.92;
    color: #fff;
}

.page-header--texture .page-header-content {
    z-index: 2;
}

.page-header--texture h1,
.page-header--texture .page-header-content {
    text-shadow: none;
}

/* ---- Tarjetas genéricas y etiquetas ---------------------------------------- */

.card {
    border: 1px solid var(--qv-line);
    box-shadow: 0 20px 44px -32px rgba(10, 47, 92, 0.45);
    background: #fff;
    overflow: hidden;
    transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), border-color 0.3s ease;
}

.card:hover {
    transform: translateY(-6px);
    border-color: var(--qv-mist);
    box-shadow: 0 32px 56px -30px rgba(10, 47, 92, 0.55);
}

.card h3 {
    font-weight: 600;
}

.tag {
    border-radius: 999px;
}

/* ---- Equipo ------------------------------------------------------------------ */

.team-member {
    background: #fff;
    border: 1px solid var(--qv-line);
    box-shadow: 0 20px 44px -32px rgba(10, 47, 92, 0.45);
    transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), border-color 0.3s ease;
}

.team-member:hover {
    transform: translateY(-6px);
    border-color: var(--qv-mist);
    box-shadow: 0 32px 56px -30px rgba(10, 47, 92, 0.55);
}

.team-avatar {
    transition: transform 0.8s var(--ease), filter 0.5s ease;
    filter: saturate(0.9);
}

.team-member:hover .team-avatar {
    transform: scale(1.04);
    filter: saturate(1.05);
}

.team-member h3 {
    color: var(--qv-ink);
    font-size: 1.02rem;
    font-weight: 600;
    white-space: normal;
}

.team-member .role {
    color: var(--qv-sky);
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    font-size: 1.05rem;
}

.grid.team-grid {
    gap: 28px;
}

/* ---- Línea temporal (eventos) ---------------------------------------------- */

.tl-year {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(2.4rem, 4vw, 3.4rem);
    color: var(--qv-blue);
}

.tl-list::before {
    background-color: var(--qv-line);
}

/* Relleno del raíl: avanza con el scroll (--lp) y usa el mismo azul que los puntos */
.tl-list::after {
    content: '';
    position: absolute;
    left: var(--tl-rail);
    top: 0;
    width: 2px;
    height: calc(var(--lp, 1) * 100%);
    translate: -50% 0;
    background-color: var(--qv-blue);
    border-radius: 2px;
}

.tl-item::before {
    border-color: var(--qv-blue);
    background-color: var(--qv-blue);
    transition: background-color 0.35s ease;
}

/* Con la animación activa, los puntos son huecos hasta que la línea los atraviesa */
.tl-list.is-live .tl-item:not(.is-passed)::before {
    background-color: #fff;
}

.tl-card {
    border-color: var(--qv-line);
    box-shadow: 0 20px 44px -34px rgba(10, 47, 92, 0.45);
}

.tl-body h4 {
    font-weight: 600;
}

.cat-talk    { background-color: #e6eef8; color: var(--qv-blue); }
.cat-award   { background-color: #0b1626; color: #fff; }
.cat-visit   { background-color: #e6eef8; color: var(--qv-slate); }
.cat-contest { background-color: var(--qv-mist); color: var(--qv-deep); }

/* ---- Carreras (tablón) ---------------------------------------------------- */

.offer-link {
    border-radius: 18px;
    border-color: var(--qv-line);
}

.offer-date {
    border-radius: 14px;
    background: var(--qv-paper);
}

.offer-title {
    font-weight: 600;
}

.chip {
    font-family: var(--font-main);
    font-weight: 500;
}

/* ---- Artículo --------------------------------------------------------------- */

.article-hero h1 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(2.2rem, 5.4vw, 4rem);
    color: #fff;
}

.article-content {
    font-size: 1.05rem;
    line-height: 1.85;
}

.article-content p {
    color: rgba(0, 0, 0, 0.82);
}

.article-content h2 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(1.7rem, 2.6vw, 2.2rem);
    color: var(--qv-blue);
}

.article-lead {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(1.25rem, 2vw, 1.6rem);
    line-height: 1.5;
    color: var(--qv-slate);
}

.article-content img {
    border-radius: 18px;
}

.toc-list a.is-active {
    color: var(--qv-blue);
}

/* ---- Colaboraciones / unirse ---------------------------------------------- */

.join-banner {
    position: relative;
    overflow: hidden;
    border: 0;
    border-radius: 28px;
    color: #fff;
    background:
        linear-gradient(120deg, rgba(10, 47, 92, 0.78), rgba(18, 78, 148, 0.5)),
        url('img/brand/textura-oscura.webp') center / cover;
    box-shadow: 0 34px 70px -40px rgba(10, 47, 92, 0.7);
}

.join-content h2,
.join-content p {
    color: #fff;
}

.collab-logos-wrapper,
.collab-logo-wrap {
    border-radius: 22px;
}

.list-item,
.position-item {
    border-radius: 16px;
}

/* ---- Pie de página -------------------------------------------------------------- */

footer {
    position: relative;
    overflow: hidden;
    padding: clamp(70px, 9vw, 110px) 0 28px;
    color: #fff;
    background:
        linear-gradient(180deg, rgba(10, 47, 92, 0.92), rgba(7, 33, 66, 0.97)),
        url('img/brand/textura-oscura.webp') center / cover;
}

footer::before {
    content: '';
    position: absolute;
    left: -10%;
    bottom: -25%;
    width: min(80vw, 1100px);
    aspect-ratio: 1500 / 904;
    background: url('img/brand/contornos-oscuro.webp') no-repeat center / contain;
    opacity: 0.22;
    pointer-events: none;
    transform: translate3d(calc(var(--sp, 0) * 60px), calc(var(--sp, 0) * -50px), 0);
    will-change: transform;
}

footer > .container,
footer .footer-bottom {
    position: relative;
    z-index: 1;
}

.footer-content {
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: clamp(30px, 5vw, 80px);
    margin-bottom: 56px;
}

.footer-col img {
    height: auto !important;
    width: min(220px, 70%);
    margin-bottom: 0 !important;
}

.footer-col h4 {
    color: var(--qv-mist);
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.25rem;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
}

.footer-col p,
.footer-col a {
    color: rgba(255, 255, 255, 0.86);
}

.social-links a {
    position: relative;
    display: inline-block;
    opacity: 1;
    color: #fff;
}

.social-links a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: 100% 50%;
    transition: transform 0.4s var(--ease);
}

.social-links a:hover {
    color: var(--qv-mist);
}

.social-links a:hover::after {
    transform: scaleX(1);
    transform-origin: 0 50%;
}

.footer-bottom {
    border-top-color: rgba(183, 208, 238, 0.22);
    color: rgba(183, 208, 238, 0.8);
}

.footer-bottom p {
    color: inherit;
}

/* ---- Volver arriba y navegación lateral de secciones ----------------------- */

.qv-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 900;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(18, 78, 148, 0.25);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    color: var(--qv-blue);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 14px 30px -14px rgba(10, 47, 92, 0.55);
    opacity: 0;
    transform: translateY(14px);
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s var(--ease), background-color 0.3s ease, color 0.3s ease;
}

.qv-top.is-visible {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

.qv-top:hover {
    background: var(--qv-blue);
    color: #fff;
}

.qv-dots {
    position: fixed;
    right: 26px;
    top: 50%;
    z-index: 800;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transform: translateY(-50%);
}

.qv-dots a {
    position: relative;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1.5px solid var(--qv-blue);
    background: transparent;
    transition: background-color 0.3s ease, transform 0.3s var(--ease);
}

.qv-dots a.is-active {
    background: var(--qv-blue);
    transform: scale(1.35);
}

.qv-dots a span {
    position: absolute;
    right: 22px;
    top: 50%;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--qv-blue);
    color: #fff;
    font-size: 0.72rem;
    white-space: nowrap;
    opacity: 0;
    transform: translate(6px, -50%);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s var(--ease);
}

.qv-dots a:hover span {
    opacity: 1;
    transform: translate(0, -50%);
}

/* Sobre fondos oscuros (hero / pie) los puntos pasan a claro */
.qv-dots.on-dark a {
    border-color: #fff;
}

.qv-dots.on-dark a.is-active {
    background: #fff;
}

/* ---- Aparición al hacer scroll --------------------------------------------- */

.qv-js .qv-reveal {
    opacity: 0;
    transform: translate3d(0, 34px, 0);
    transition:
        opacity 0.9s var(--ease) calc(var(--i, 0) * 90ms),
        transform 0.9s var(--ease) calc(var(--i, 0) * 90ms);
}

.qv-js .qv-reveal.is-in {
    opacity: 1;
    transform: none;
}

/* ---- Responsive ------------------------------------------------------------------ */

@media (max-width: 1100px) {
    .qv-dots {
        display: none;
    }

    #proyectos-destacados .featured-card:nth-child(1),
    #proyectos-destacados .featured-card:nth-child(n + 2) {
        grid-column: span 12;
        grid-row: auto;
    }

    #proyectos-destacados .featured-card:nth-child(1) .featured-media {
        flex: none;
        aspect-ratio: 16 / 9;
        min-height: 0;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 14px 0;
    }

    /* Menú móvil: panel de marca a pantalla completa */
    .nav-menu {
        top: 0;
        left: 0;
        min-height: 100vh;
        min-height: 100dvh;
        align-items: flex-start;
        gap: 6px;
        padding: 110px 28px 40px;
        background:
            linear-gradient(180deg, rgba(10, 47, 92, 0.95), rgba(18, 78, 148, 0.97)),
            url('img/brand/textura-oscura.webp') center / cover;
        box-shadow: none;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-link,
    .navbar.is-scrolled .nav-link {
        display: block;
        padding: 10px 0;
        color: #fff;
        font-family: var(--font-display);
        font-style: italic;
        font-size: 2rem;
        font-weight: 400;
    }

    .nav-link::after {
        display: none;
    }

    .nav-link.button-primary,
    .navbar.is-scrolled .nav-link.button-primary {
        display: inline-block;
        margin-top: 16px;
        padding: 12px 28px;
        background: #fff;
        border-color: #fff;
        color: var(--qv-blue);
        font-family: var(--font-main);
        font-style: normal;
        font-size: 1rem;
    }

    .navbar.menu-open .logo-on-dark {
        display: block;
    }

    .navbar.menu-open .logo-on-light {
        display: none;
    }

    .navbar.menu-open .hamburger,
    .navbar.menu-open .hamburger::before,
    .navbar.menu-open .hamburger::after {
        background-color: #fff;
    }

    .nav-toggle {
        position: relative;
        z-index: 1002;
    }

    .hero-section::before {
        width: 140vw;
        left: -30%;
    }

    .hero-buttons {
        align-items: center;
    }

    .hero-title {
        font-size: clamp(3.4rem, 17vw, 5rem);
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    #proyectos-destacados .featured-card:nth-child(n + 2) .featured-link {
        flex-direction: column;
    }

    #proyectos-destacados .featured-card:nth-child(n + 2) .featured-media {
        flex: none;
        aspect-ratio: 16 / 10;
        min-height: 0;
    }

    .qv-top {
        right: 14px;
        bottom: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .qv-js .qv-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .hero-content,
    .hero-section::before,
    .about-section::after,
    .bg-light::after,
    .page-header::before,
    footer::before {
        transform: none !important;
    }

    .qv-words .w {
        color: rgba(0, 0, 0, 0.82);
    }
}
