/*!
 * andwms.com — app-extend.css
 * Capa de extensión sobre app.css (Tailwind compilado).
 *
 * Por qué un archivo aparte:
 *  - Los componentes de aquí son composiciones, no utilities
 *  - No requiere rebuild del Tailwind para iterar
 *  - Rollback inmediato quitando el <link> en meta.php
 *
 * Convenciones:
 *  - Prefijo .awms- para todo lo nuevo
 *  - Tokens nuevos como CSS vars sobre :root
 *  - Comentarios por bloque explicando el "porqué"
 *
 * Versión 1 · Mayo 2026
 */

/* ============================================================
   TOKENS NUEVOS
   Extienden la paleta existente sin sustituirla.
   ============================================================ */
:root {
    /* Negro más profundo que --color-ink (#1A1A1A) para anclas oscuras */
    --awms-ink-deepest: #0A0A0A;

    /* Magenta más brillante para pivots sobre fondo oscuro */
    --awms-magenta-bright: #E91E8A;

    /* Brillos magenta para halo y glow en anclas */
    --awms-magenta-glow:      rgba(184, 23, 120, 0.22);
    --awms-magenta-glow-soft: rgba(184, 23, 120, 0.12);
    --awms-magenta-tint:      #FDF2F7; /* equivale a magenta-50 de tu Tailwind */
}

/* ============================================================
   DUOTONE — Movido aquí desde inline en index.php
   Patrón:
     1. La <img> se desatura y se aumenta el contraste
     2. ::after con un degradado magenta + mix-blend-mode: multiply
   Resultado: duotone tipo Spotify Wrapped, no flat.
   Reutilizable en cualquier página del spoke.
   ============================================================ */
.awms-duotone {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: #2A2722; /* fallback oscuro mientras carga la imagen */
    isolation: isolate;
}

.awms-duotone img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.15);
    transform: scale(1.01);
}

.awms-duotone::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #B81778 0%, #6B0E47 100%);
    mix-blend-mode: multiply;
    opacity: 0.72;
    pointer-events: none;
    z-index: 1;
}

.awms-duotone-caption {
    position: absolute;
    bottom: 14px;
    left: 16px;
    right: 16px;
    z-index: 2;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 500;
    color: #FFFFFF;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

.awms-duotone-hero   { aspect-ratio: 4 / 3; max-width: 100%; }
.awms-duotone-square { aspect-ratio: 1 / 1; }

@media (max-width: 1023px) {
    .awms-hero-photo { display: none; }
}

/* ============================================================
   HERO HALO — gradiente sutil rosado detrás del headline.
   Aporta calidez al fondo blanco sin saturar.
   ============================================================ */
.awms-hero-halo {
    position: relative;
    isolation: isolate;
}

.awms-hero-halo::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -100px;
    width: 600px;
    height: 500px;
    background: radial-gradient(ellipse, var(--awms-magenta-tint) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

/* ============================================================
   HERO GRID — proporción texto/foto.
   No depende de Tailwind JIT (que requiere rebuild para arbitrary values).
   Mobile: stack vertical. Desktop: texto domina, foto a la derecha.
   ============================================================ */
.awms-hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
}

@media (min-width: 1024px) {
    .awms-hero-grid {
        grid-template-columns: 1.7fr 1fr;
        gap: 3rem;
    }
}

/* ============================================================
   HEADLINES con escala dramática.
   Sobre la tipografía actual (font-weight 500), permitimos saltar
   a 700 SOLO en momentos elegidos: hero y section displays.
   ============================================================ */
.awms-hero-display {
    font-family: 'Inter', sans-serif;
    font-size: clamp(40px, 8vw, 88px);
    line-height: 0.98;
    letter-spacing: -0.035em;
    font-weight: 700;
    text-wrap: balance;
    color: #1A1A1A;
}

.awms-section-display {
    font-family: 'Inter', sans-serif;
    font-size: clamp(32px, 5.5vw, 64px);
    line-height: 1.0;
    letter-spacing: -0.03em;
    font-weight: 700;
    text-wrap: balance;
    color: #1A1A1A;
}

/* ============================================================
   DARK ANCHOR — Sección oscura con resplandores magenta.
   Se usa en momentos argumentativos clave: 1-2 por página máximo.
   ============================================================ */
.awms-dark-anchor {
    position: relative;
    overflow: hidden;
    background: var(--awms-ink-deepest);
    color: #FFFFFF;
    padding-top: clamp(64px, 10vw, 120px);
    padding-bottom: clamp(64px, 10vw, 120px);
}

.awms-dark-anchor::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -10%;
    width: 60%;
    height: 100%;
    background: radial-gradient(ellipse, var(--awms-magenta-glow) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.awms-dark-anchor::after {
    content: '';
    position: absolute;
    bottom: -30%;
    right: -10%;
    width: 60%;
    height: 100%;
    background: radial-gradient(ellipse, var(--awms-magenta-glow-soft) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.awms-dark-anchor > .container-page {
    position: relative;
    z-index: 1;
}

/* Tipografía dentro de dark anchor */
.awms-dark-anchor .awms-section-display,
.awms-dark-anchor h1,
.awms-dark-anchor h2,
.awms-dark-anchor h3 {
    color: #FFFFFF;
}

.awms-dark-anchor p {
    color: rgba(255, 255, 255, 0.78);
}

/* Eyebrow sobre fondo oscuro: invertir el pill */
.awms-dark-anchor .eyebrow {
    background-color: rgba(233, 30, 138, 0.15);
    color: var(--awms-magenta-bright);
}

/* Pivote magenta brillante para legibilidad sobre dark */
.awms-pivot-bright {
    color: var(--awms-magenta-bright);
}

/* ============================================================
   STATS TEATRALES — número grande con + o % en magenta.
   Cuadrícula con bordes compartidos estilo periódico.
   ============================================================ */
.awms-stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    border-top: 1px solid #EBE7DE;
    border-bottom: 1px solid #EBE7DE;
    margin-top: clamp(24px, 4vw, 48px);
}

.awms-stat {
    padding: clamp(32px, 5vw, 56px) clamp(20px, 3vw, 32px);
    border-bottom: 1px solid #EBE7DE;
}

.awms-stat:last-child {
    border-bottom: none;
}

@media (min-width: 640px) {
    .awms-stats-grid { grid-template-columns: 1fr 1fr; }
    .awms-stat:nth-child(odd) {
        border-right: 1px solid #EBE7DE;
    }
    .awms-stat:nth-last-child(2) {
        border-bottom: 1px solid #EBE7DE;
    }
}

@media (min-width: 1024px) {
    .awms-stats-grid { grid-template-columns: repeat(4, 1fr); }
    .awms-stat {
        border-right: 1px solid #EBE7DE;
        border-bottom: none;
    }
    .awms-stat:last-child {
        border-right: none;
    }
}

.awms-stat-number {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: clamp(56px, 9vw, 104px);
    line-height: 0.88;
    letter-spacing: -0.04em;
    color: #1A1A1A;
    margin-bottom: 12px;
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.awms-stat-number .suffix {
    color: #B81778;
    font-weight: 700;
}

.awms-stat-label {
    font-size: 14px;
    font-weight: 500;
    color: #1A1A1A;
    margin-bottom: 4px;
}

.awms-stat-note {
    font-size: 13px;
    color: #6B6B6B;
    line-height: 1.5;
    max-width: 26ch;
}

/* ============================================================
   EDITORIAL QUOTE — para citas con autoridad (ej. Gartner).
   Tipografía serif italic centrada, comilla magenta gigante.
   ============================================================ */
.awms-editorial-quote {
    text-align: center;
    max-width: 760px;
    margin: 0 auto;
}

.awms-editorial-quote-mark {
    font-family: Georgia, 'Times New Roman', serif;
    font-style: italic;
    font-weight: 400;
    font-size: clamp(120px, 18vw, 200px);
    line-height: 0.7;
    color: #B81778;
    user-select: none;
    display: block;
    margin-bottom: -10px;
}

.awms-editorial-quote-body {
    font-family: Georgia, 'Times New Roman', serif;
    font-style: italic;
    font-weight: 400;
    font-size: clamp(22px, 3vw, 36px);
    line-height: 1.25;
    letter-spacing: -0.005em;
    color: #1A1A1A;
    margin-bottom: 32px;
    max-width: 26ch;
    margin-left: auto;
    margin-right: auto;
}

.awms-editorial-quote-attribution {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #6B6B6B;
}

.awms-editorial-quote-attribution strong {
    color: #1A1A1A;
    font-weight: 700;
}

/* ============================================================
   GHOST NUMBER en tarjetas (Situaciones A/B/C)
   Numerales grandes ghosted en esquina superior derecha.
   ============================================================ */
.awms-card-with-ghost {
    position: relative;
    overflow: hidden;
}

.awms-card-ghost-number {
    position: absolute;
    top: 16px;
    right: 20px;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 44px;
    line-height: 1;
    color: #EBE7DE;
    letter-spacing: -0.03em;
    user-select: none;
    pointer-events: none;
}

/* ============================================================
   CTA FINAL DARK — Reemplaza al panel-warm en cierre del home.
   Genera el mismo efecto teatral que el ancla oscura
   pero contenido en un bloque con border-radius.
   ============================================================ */
.awms-cta-dark {
    position: relative;
    overflow: hidden;
    background: var(--awms-ink-deepest);
    color: #FFFFFF;
    border-radius: 12px;
    padding: clamp(48px, 7vw, 80px) clamp(24px, 4vw, 48px);
    text-align: center;
}

.awms-cta-dark::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at top right, var(--awms-magenta-glow) 0%, transparent 50%),
        radial-gradient(ellipse at bottom left, var(--awms-magenta-glow-soft) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.awms-cta-dark > * {
    position: relative;
    z-index: 1;
}

.awms-cta-dark .amp {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(56px, 9vw, 96px);
    line-height: 1;
    color: var(--awms-magenta-bright);
    display: block;
    margin-bottom: 12px;
}

.awms-cta-dark h2 {
    color: #FFFFFF;
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin-bottom: 20px;
    text-wrap: balance;
}

.awms-cta-dark p {
    color: rgba(255, 255, 255, 0.78);
    max-width: 60ch;
    margin: 0 auto 28px auto;
}

/* ============================================================
   BTN GHOST LIGHT — botón secundario sobre fondos oscuros.
   Equivalente a tu .btn-secondary pero invertido.
   ============================================================ */
.btn-ghost-light {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1rem;
    background: transparent;
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.25);
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.btn-ghost-light:hover {
    border-color: rgba(255, 255, 255, 0.6);
    background-color: rgba(255, 255, 255, 0.05);
}

@media (min-width: 640px) {
    .btn-ghost-light { padding: 0.75rem 1.25rem; }
}

/* ============================================================
   REVEAL on scroll — animación sutil de entrada.
   Funciona con IntersectionObserver en app.js (opcional).
   Si no se agrega el JS, los elementos quedan estáticos visibles.
   ============================================================ */
.awms-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

/* ============================================================
   METHOD LIST — Pasos numerados, optimizado para dark anchor.
   Se usa en metodologia.php y verticales.php.
   ============================================================ */
.awms-method-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-width: 880px;
}

.awms-method-step {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 20px;
    padding: 24px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    align-items: start;
}

@media (min-width: 768px) {
    .awms-method-step {
        grid-template-columns: 100px 1fr;
        gap: 40px;
        padding: 32px 0;
    }
}

.awms-method-step-last {
    border-bottom: none;
}

.awms-method-step-num {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: clamp(36px, 5vw, 56px);
    line-height: 0.9;
    letter-spacing: -0.04em;
    color: var(--awms-magenta-bright);
}

.awms-method-step-title {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: clamp(20px, 2.5vw, 26px);
    line-height: 1.15;
    letter-spacing: -0.015em;
    color: #FFFFFF;
    margin-bottom: 10px;
}

.awms-method-step-desc {
    font-size: 15px;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.72);
    max-width: 62ch;
}

/* Variante light — para usar en verticales.php sección "Cómo lo decidimos"
   (esa sección no es dark anchor, va sobre paper-warm) */
.awms-method-list-light .awms-method-step {
    border-bottom-color: #EBE7DE;
}
.awms-method-list-light .awms-method-step-num {
    color: var(--color-magenta, #B81778);
}
.awms-method-list-light .awms-method-step-title {
    color: #1A1A1A;
}
.awms-method-list-light .awms-method-step-desc {
    color: #6B6B6B;
}
.awms-method-list-light .awms-method-step-desc strong {
    color: #1A1A1A;
    font-weight: 700;
}

/* ============================================================
   CTA DARK con layout SPLIT — para CTAs con grid 1.5fr_1fr
   (wms.php, verticales.php)
   ============================================================ */
.awms-cta-dark-split {
    position: relative;
    overflow: hidden;
    background: var(--awms-ink-deepest);
    color: #FFFFFF;
    border-radius: 12px;
    padding: clamp(40px, 6vw, 64px) clamp(28px, 4vw, 48px);
}

.awms-cta-dark-split::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at top right, var(--awms-magenta-glow) 0%, transparent 50%),
        radial-gradient(ellipse at bottom left, var(--awms-magenta-glow-soft) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.awms-cta-dark-split > .awms-cta-dark-split-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: center;
}

@media (min-width: 1024px) {
    .awms-cta-dark-split > .awms-cta-dark-split-inner {
        grid-template-columns: 1.6fr 1fr;
        gap: 48px;
    }
}

.awms-cta-dark-split .eyebrow {
    background-color: rgba(233, 30, 138, 0.15);
    color: var(--awms-magenta-bright);
}

.awms-cta-dark-split h2 {
    color: #FFFFFF;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: clamp(28px, 4vw, 44px);
    letter-spacing: -0.025em;
    line-height: 1.05;
    margin-bottom: 16px;
    text-wrap: balance;
}

.awms-cta-dark-split p {
    color: rgba(255, 255, 255, 0.78);
    margin-bottom: 0;
}