/* =====================================================================
   AVRYN · Unificación de sistema visual (2026-11-08)
   Alinea Vesta, Forja y páginas internas con los tokens de la home:
   tipografía AVRYN Inter, rótulos 10.5px/620/.18em, titulares 520/-.045em,
   botón primario con degradé, tarjetas con radio 18px.
   Revertir: quitar el enqueue 'avryn-unify' en inc/assets.php.
   ===================================================================== */

/* ---------- Tokens ---------- */
html body #vesta-contenido,
html body #forja-contenido {
    --av-sans: "AVRYN Inter", Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
    --av-mono: var(--av-sans);
    font-family: var(--av-sans);
}
html body .av-vesta-modal,
html body .av-forja-modal {
    font-family: "AVRYN Inter", Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ---------- Contenedor y ritmo vertical ---------- */
html body #vesta-contenido .av-vesta-container,
html body #forja-contenido .av-forja-container {
    width: min(1240px, calc(100% - 48px));
}
html body #vesta-contenido .av-vesta-section,
html body #forja-contenido .av-forja-section {
    padding-top: clamp(88px, 11vw, 160px);
    padding-bottom: clamp(88px, 11vw, 160px);
}

/* ---------- Rótulos de sección ---------- */
html body #vesta-contenido :is(.av-vesta-number, .av-vesta-kicker, .av-vesta-ref-tag, .av-vesta-scene-label),
html body #forja-contenido :is(.av-forja-number, .av-forja-kicker, .av-forja-scene-label) {
    font-family: var(--av-sans);
    font-size: 10.5px;
    font-weight: 620;
    letter-spacing: .18em;
    line-height: 1.35;
    text-transform: uppercase;
}
html body #vesta-contenido :is(.av-vesta-card > span),
html body #forja-contenido :is(.av-forja-card > span) {
    font-family: var(--av-sans);
    font-size: 10.5px;
    font-weight: 620;
    letter-spacing: .18em;
}
/* Rótulos chicos de interfaz (paneles ilustrativos) */
html body #vesta-contenido :is(.av-vesta-panel-top, .av-vesta-panel-status span, .av-vesta-msg small),
html body #forja-contenido :is(.av-forja-panel-top, .av-forja-workflow small) {
    font-family: var(--av-sans);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
}

/* ---------- Titulares ---------- */
html body #vesta-contenido .av-vesta-hero h1,
html body #forja-contenido .av-forja-hero h1 {
    font-size: clamp(46px, 5.85vw, 84px);
    font-weight: 520;
    letter-spacing: -.057em;
    line-height: .97;
}
html body #vesta-contenido :is(.av-vesta-head h2, .av-vesta-risk-inner h2, .av-vesta-close h2),
html body #forja-contenido :is(.av-forja-head h2, .av-forja-risk-inner h2, .av-forja-close h2) {
    font-size: clamp(38px, 5.05vw, 72px);
    font-weight: 520;
    letter-spacing: -.045em;
    line-height: 1;
}
/* em en fondos oscuros: mismo degradé que la home */
html body #vesta-contenido .av-vesta-section:not(.av-vesta-problem) :is(.av-vesta-head h2 em),
html body #vesta-contenido :is(.av-vesta-risk-inner h2 em, .av-vesta-close h2 em),
html body #forja-contenido .av-forja-section:not(.av-forja-problem) :is(.av-forja-head h2 em),
html body #forja-contenido :is(.av-forja-risk-inner h2 em, .av-forja-close h2 em) {
    background: linear-gradient(108deg, #F2F0E9 0%, #F2F0E9 28%, #A5A79E 67%, #B7D85A 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}
/* em en la sección clara: mismo gris que la home */
html body #vesta-contenido .av-vesta-problem .av-vesta-head h2 em,
html body #forja-contenido .av-forja-problem .av-forja-head h2 em {
    color: #62685D;
}

/* ---------- Textos ---------- */
html body #vesta-contenido .av-vesta-lead,
html body #forja-contenido .av-forja-lead {
    max-width: 600px;
    font-size: clamp(16.5px, 1.25vw, 18px);
    line-height: 1.64;
    color: #A6ADA3;
}
html body #vesta-contenido .av-vesta-section-lead {
    font-size: 16.5px;
    line-height: 1.65;
}
html body #vesta-contenido .av-vesta-intro,
html body #vesta-contenido .av-vesta-problem .av-vesta-intro {
    font-weight: 400;
    letter-spacing: -.01em;
}
html body #vesta-contenido .av-vesta-closing,
html body #forja-contenido .av-forja-risk-emphasis {
    font-weight: 520;
}
html body #vesta-contenido .av-vesta-closing-line {
    font-weight: 450;
}

/* ---------- Tarjetas y paneles ---------- */
html body #vesta-contenido :is(.av-vesta-card, .av-vesta-scene, .av-vesta-panel, .av-vesta-ref-custom),
html body #forja-contenido :is(.av-forja-card, .av-forja-scene, .av-forja-panel) {
    border-radius: 18px;
}
html body #forja-contenido .av-forja-workflow article {
    border-radius: 12px;
}
html body #vesta-contenido .av-vesta-card h3,
html body #forja-contenido .av-forja-card h3 {
    font-size: 19px;
    font-weight: 510;
    letter-spacing: -.02em;
    line-height: 1.25;
}
html body #vesta-contenido .av-vesta-ref h3 {
    font-size: 24px;
    font-weight: 510;
    letter-spacing: -.03em;
}
html body #vesta-contenido .av-vesta-scene h3,
html body #forja-contenido .av-forja-scene h3 {
    font-weight: 510;
    letter-spacing: -.02em;
}
html body #vesta-contenido .av-vesta-stats strong,
html body #forja-contenido .av-forja-stats strong {
    font-weight: 520;
    letter-spacing: -.045em;
}
html body #vesta-contenido .av-vesta-faq summary,
html body #forja-contenido .av-forja-faq summary {
    font-weight: 510;
    letter-spacing: -.01em;
}

/* ---------- Botones (mismo primario que la home) ---------- */
html body :is(#vesta-contenido, #forja-contenido, .av-vesta-modal, .av-forja-modal) :is(.av-vesta-button, .av-forja-button) {
    min-height: 50px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 650;
    letter-spacing: .01em;
}
html body :is(#vesta-contenido, #forja-contenido, .av-vesta-modal, .av-forja-modal) :is(.av-vesta-button--primary, .av-forja-button--primary) {
    border: 1px solid #B7D85A;
    background: linear-gradient(108deg, #B7D85A 0%, #F2F0E9 50%, #B7D85A 100%);
    background-size: 220% 100%;
    background-position: 100% 50%;
    color: #050505;
    box-shadow: 0 14px 34px rgba(182, 255, 59, .14);
    transition: transform .45s cubic-bezier(.16, 1, .3, 1), background-position .7s cubic-bezier(.16, 1, .3, 1), box-shadow .45s;
}
html body :is(#vesta-contenido, #forja-contenido, .av-vesta-modal, .av-forja-modal) :is(.av-vesta-button--primary, .av-forja-button--primary):hover {
    transform: translateY(-2px);
    background-position: 0% 50%;
    box-shadow: 0 20px 54px rgba(183, 216, 90, .2);
}
html body #vesta-contenido .av-vesta-button--secondary {
    border-color: rgba(165, 167, 158, .28);
}
html body :is(.av-vesta-modal-dialog, .av-forja-modal-dialog) {
    border-radius: 18px;
}

/* ---------- Páginas internas (Firma, Diagnóstico, Implementación, Enfoque, Perspectivas, Contacto, Privacidad) ---------- */
html body .avc-page-hero .avc-kicker {
    margin: 0 0 22px;
    color: #B7D85A;
    font-size: 10.5px;
    font-weight: 620;
    letter-spacing: .18em;
    line-height: 1.35;
    text-transform: uppercase;
}
html body .avc-page-section h2 {
    font-size: clamp(38px, 5.05vw, 72px) !important;
    font-weight: 520 !important;
    letter-spacing: -.045em !important;
    line-height: 1 !important;
}
/* Secciones oscuras: el titular estaba forzado a negro sobre negro */
html body .avc-page-section:not(.avc-page-section--light) h2 {
    color: #F2F0E9 !important;
}
html body .avc-page-card > span,
html body .avc-page-console header span,
html body .avc-page-console header strong,
html body .avc-page-console-grid span {
    font-size: 10.5px;
    font-weight: 620;
    letter-spacing: .16em;
    text-transform: uppercase;
}
html body .avc-page-section--light .avc-page-card > span {
    color: #4D6B1A;
}
html body .avc-page-card h3 {
    line-height: 1.15;
}
html body .avc-page-console-grid strong {
    font-weight: 510;
    letter-spacing: -.01em;
}

/* ---------- Forja: hero con rótulo, botón y línea de confianza (igual que Vesta) ---------- */
html body #forja-contenido .av-forja-hero .av-forja-kicker {
    margin: 0 0 22px;
    color: #B7D85A;
}
html body #forja-contenido .av-forja-hero .av-forja-actions {
    margin-top: 32px;
}
html body #forja-contenido .av-forja-trust {
    margin: 20px 0 0;
    color: #62685D;
    font-size: 12px;
    letter-spacing: .02em;
}

/* ---------- Forja: grillas sin tarjetas huérfanas ---------- */
@media (min-width: 1100px) {
    html body #forja-contenido #forja-capacidad .av-forja-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    html body #forja-contenido #forja-aplicacion .av-forja-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 761px) and (max-width: 1099px) {
    html body #forja-contenido :is(#forja-capacidad, #forja-aplicacion) .av-forja-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    html body #forja-contenido #forja-capacidad .av-forja-grid > :last-child { grid-column: 1 / -1; }
}

/* ---------- El primer pantallazo nunca depende de la animación (igual que el hero de la home) ---------- */
html body :is(.avc-page-hero, .av-vesta-hero, .av-forja-hero) [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
}

/* ---------- Titulares equilibrados (sin palabras sueltas) ---------- */
html body :is(#vesta-contenido, #forja-contenido) :is(h1, h2),
html body .avc-page-section h2,
html body .avc-page-cta h2 {
    text-wrap: balance;
}

/* ---------- Móvil ---------- */
@media (max-width: 760px) {
    html body #vesta-contenido .av-vesta-container,
    html body #forja-contenido .av-forja-container {
        width: calc(100% - 36px);
    }
}
