/**
 * Scorpio Towers - Aplicaciones Móviles Page Styles
 * Color Theme: Orange (#ff4c00, #a12a0b, #460f04)
 */

:root {
    --orange-primary: #ff4c00;
    --orange-medium: #a12a0b;
    --orange-dark: #460f04;
    --orange-glow: rgba(255, 76, 0, 0.35);
    --orange-glass: rgba(18, 8, 6, 0.55);
    --orange-border: rgba(255, 76, 0, 0.15);
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Prevenir clics fantasma en el menú HUD cuando está cerrado */
.sc-hud-overlay {
    pointer-events: none;
}
.sc-hud-overlay.open {
    pointer-events: auto;
}

/* Texto con resplandor degradado naranja de alto impacto */
.glow-text-orange {
    background: linear-gradient(135deg, #ffffff 20%, #ff5500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 25px rgba(255, 85, 0, 0.35));
    display: inline-block;
}

/* Modificar localmente los blobs de fondo para tener halo naranja */
.blob-purple {
    background: radial-gradient(circle, rgba(161, 42, 11, 0.28) 0%, rgba(70, 15, 4, 0.08) 70%);
    width: 600px;
    height: 600px;
    top: 5%;
    left: -10%;
}

.blob-cyan {
    background: radial-gradient(circle, rgba(255, 76, 0, 0.18) 0%, rgba(8, 10, 18, 0) 60%);
}

/* Estilos de Título y Sección Centrados */
.sw-section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px;
}

.sw-section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 16px;
    line-height: 1.2;
}

.sw-section-desc {
    font-size: 1.08rem;
    color: #94a3b8;
    line-height: 1.6;
    max-width: 680px;
    margin: 0 auto;
}

/* --- Hero Section --- */
.am-hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 140px 24px 80px;
    position: relative;
    overflow: hidden;
}

.am-hero-body {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.05fr);
    align-items: center;
    gap: clamp(30px, 5vw, 60px);
    z-index: 5;
    position: relative;
}

.am-hero-content {
    text-align: left;
    display: flex;
    flex-direction: column;
}

.am-badge {
    background: rgba(255, 76, 0, 0.08);
    border: 1px solid rgba(255, 76, 0, 0.25);
    color: #e2e8f0;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    padding: 8px 18px;
    border-radius: 999px;
    display: inline-block;
    margin-bottom: 24px;
    box-shadow: 0 0 15px rgba(255, 76, 0, 0.12);
    backdrop-filter: blur(8px);
    width: max-content;
}

.am-hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 3.8vw, 3.2rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: #ffffff;
    margin-bottom: 20px;
    max-width: 580px;
    white-space: normal;
}

.am-hero-desc {
    font-size: 1.05rem;
    color: #94a3b8;
    max-width: 580px;
    margin: 0 0 28px;
    line-height: 1.6;
}

/* Checklist Hero */
.am-hero-checklist {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 30px;
}

.am-checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.am-checklist-icon {
    width: 20px;
    height: 20px;
    background: rgba(255, 76, 0, 0.12);
    border: 1px solid rgba(255, 76, 0, 0.35);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--orange-primary);
    flex-shrink: 0;
    margin-top: 3px;
    box-shadow: 0 0 8px rgba(255, 76, 0, 0.2);
}

.am-checklist-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.am-checklist-text strong {
    font-size: 0.95rem;
    color: #ffffff;
    font-weight: 700;
}

.am-checklist-text span {
    font-size: 0.88rem;
    color: #94a3b8;
}

/* Botones Hero y CTA */
.hero-buttons-inline,
.am-btn-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    flex-wrap: nowrap;
    margin-top: 28px;
    width: 100%;
}

.am-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--orange-primary) 0%, var(--orange-medium) 100%);
    color: #ffffff;
    padding: 14px 24px;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 12px;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 
        0 4px 15px rgba(255, 76, 0, 0.35),
        0 0 30px rgba(255, 76, 0, 0.15);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.am-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 8px 24px rgba(255, 76, 0, 0.5),
        0 0 40px rgba(255, 76, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.2);
}

.am-btn-primary span {
    transition: transform 0.3s ease;
}

.am-btn-primary:hover span {
    transform: translateX(4px);
}

.am-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.03);
    color: #e2e8f0;
    padding: 14px 24px;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 12px;
    text-decoration: none;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
}

.am-btn-secondary:hover {
    background: rgba(255, 76, 0, 0.08);
    border-color: rgba(255, 76, 0, 0.3);
    color: #ffffff;
    transform: translateY(-3px);
}

/* --- Columna Derecha: Smartphone Wireframe 3D --- */
.am-hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    position: relative;
    perspective: 1000px;
}

.am-phone-wrapper {
    width: 290px;
    height: 580px;
    background: rgba(10, 5, 5, 0.65);
    border: 3px solid rgba(255, 76, 0, 0.35);
    border-radius: 46px;
    padding: 14px;
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.7), 
        0 0 40px rgba(255, 76, 0, 0.1),
        inset 0 0 25px rgba(255, 76, 0, 0.05);
    position: relative;
    backdrop-filter: blur(12px);
    overflow: visible;
    transform: rotateY(-18deg) rotateX(10deg) rotateZ(2deg);
    transform-style: preserve-3d;
    animation: phoneFloat 6s infinite ease-in-out;
}

@keyframes phoneFloat {
    0%, 100% { transform: rotateY(-18deg) rotateX(10deg) rotateZ(2deg) translateY(0); }
    50% { transform: rotateY(-15deg) rotateX(8deg) rotateZ(1deg) translateY(-15px); }
}

/* Auricular y Cámara Superior del Smartphone */
.am-phone-speaker {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 18px;
    background: rgba(8, 4, 4, 0.95);
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    z-index: 25;
    border: 1px solid rgba(255, 76, 0, 0.15);
    border-top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.am-phone-speaker::before {
    content: '';
    width: 4px;
    height: 4px;
    background: var(--orange-primary);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--orange-primary);
}

/* Pantalla del Smartphone */
.am-phone-screen {
    background: rgba(8, 4, 4, 0.9);
    border: 1px solid rgba(255, 76, 0, 0.15);
    border-radius: 36px;
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
}

.am-phone-screen-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 30px 20px 20px;
    box-sizing: border-box;
    transition: all 0.5s ease-in-out;
}

.am-screen-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    opacity: 0.7;
}

.am-screen-logo {
    width: 50px;
    height: 8px;
    background: var(--orange-primary);
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(255, 76, 0, 0.4);
}

.am-screen-signal {
    display: flex;
    gap: 4px;
}

.am-screen-signal span {
    width: 4px;
    height: 8px;
    background: #475569;
    border-radius: 1px;
}

.am-screen-signal span.active {
    background: var(--orange-primary);
    box-shadow: 0 0 4px var(--orange-primary);
}

/* Slider de Pantallas Simuladas */
.am-screen-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}

.screen-card-visual {
    height: 140px;
    background: rgba(255, 76, 0, 0.04);
    border: 1px solid rgba(255, 76, 0, 0.15);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
}

.screen-card-visual svg {
    width: 80%;
    height: 80px;
}

.screen-card-visual svg path {
    stroke: var(--orange-primary);
    stroke-width: 2;
    fill: none;
}

.screen-text-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.screen-title-text {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    font-family: var(--font-heading);
}

.screen-desc-text {
    font-size: 0.78rem;
    color: #94a3b8;
    line-height: 1.4;
}

.screen-btn {
    width: 100%;
    height: 42px;
    background: var(--orange-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 700;
    font-family: var(--font-heading);
    box-shadow: 0 0 15px rgba(255, 76, 0, 0.35);
    margin-top: auto;
    border: none;
    cursor: pointer;
}

/* Gesto de Toque (Tap) */
.am-tap-indicator {
    position: absolute;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 76, 0, 0.3);
    border: 1px solid var(--orange-primary);
    transform: scale(0);
    opacity: 0;
    pointer-events: none;
    z-index: 30;
}

.am-tap-indicator.tap-animate {
    animation: tapPulseAnim 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes tapPulseAnim {
    0% { transform: scale(0); opacity: 0.8; }
    100% { transform: scale(2.2); opacity: 0; box-shadow: 0 0 20px var(--orange-primary); }
}

/* --- SECCIÓN 2: Soluciones (Cuadrícula 2x2 Simétrica) --- */
.am-solutions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 991px) {
    .am-solutions-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.am-sol-card {
    background: var(--orange-glass);
    border: 1px solid var(--orange-border);
    border-radius: 20px;
    padding: 35px;
    backdrop-filter: blur(12px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
}

.am-sol-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 76, 0, 0.35);
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.6),
        0 0 30px rgba(255, 76, 0, 0.15);
}

.am-sol-header {
    height: 110px;
    background: linear-gradient(135deg, rgba(20, 10, 8, 0.8) 0%, rgba(8, 4, 4, 0.95) 100%);
    border: 1px solid rgba(255, 76, 0, 0.15);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
    transition: all 0.4s ease;
}

.am-sol-card:hover .am-sol-header {
    border-color: rgba(255, 76, 0, 0.35);
    background: linear-gradient(135deg, rgba(255, 76, 0, 0.12) 0%, rgba(12, 6, 5, 0.95) 100%);
    box-shadow: inset 0 0 25px rgba(255, 76, 0, 0.12);
}

.am-sol-svg {
    width: 100%;
    height: 85px;
    overflow: hidden;
}

/* Micro-animaciones precisas sin deformación */
.svg-radar-ring {
    animation: radarPulse 2s infinite ease-out;
    transform-origin: center;
    transform-box: fill-box;
}

@keyframes radarPulse {
    0% { r: 5px; opacity: 1; stroke-width: 2px; }
    100% { r: 20px; opacity: 0; stroke-width: 0.5px; }
}

.svg-bag {
    animation: bagFloat 3s infinite ease-in-out;
}

@keyframes bagFloat {
    0%, 100% { transform: translate(200px, 22px); }
    50% { transform: translate(200px, 18px); }
}

.svg-glow-dot {
    animation: glowPulse 2s infinite ease-in-out;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; filter: drop-shadow(0 0 6px #ff5500); }
}

.am-sol-title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
}

.am-sol-desc {
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* --- SECCIÓN 3: Stack Tecnológico Móvil --- */
.am-stack-container {
    display: grid;
    grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.05fr);
    align-items: center;
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
}

.am-stack-left {
    display: flex;
    flex-direction: column;
}

.am-stack-list {
    display: flex;
    flex-direction: column;
    gap: 28px;
    margin-top: 35px;
}

.am-stack-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.am-stack-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 76, 0, 0.08);
    border: 1px solid rgba(255, 76, 0, 0.25);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--orange-primary);
    flex-shrink: 0;
    box-shadow: 0 0 10px rgba(255, 76, 0, 0.15);
}

.am-stack-icon svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.am-stack-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.am-stack-text h3 {
    font-size: 1.15rem;
    color: #ffffff;
    font-weight: 700;
}

.am-stack-text p {
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Grilla de Logos de Tecnologías Móviles */
.am-tech-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.tech-item {
    background: rgba(18, 8, 6, 0.65);
    border: 1px solid rgba(255, 76, 0, 0.15);
    border-radius: 16px;
    height: 110px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: default;
    user-select: none;
    color: #cbd5e1;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    backdrop-filter: blur(10px);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    z-index: 2;
    pointer-events: auto;
}

.tech-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, var(--brand-color, #ff5500) 0%, transparent 75%);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.tech-item:hover::before {
    opacity: 0.22;
}

.tech-item:hover {
    border-color: var(--brand-color, #ff5500);
    box-shadow: 
        0 10px 25px rgba(0, 0, 0, 0.6),
        0 0 25px var(--brand-color, #ff5500),
        inset 0 0 15px var(--brand-color, #ff5500);
    transform: translateY(-5px) scale(1.04);
}

.tech-item span {
    transition: color 0.35s ease, text-shadow 0.35s ease;
    position: relative;
    z-index: 1;
}

.tech-item:hover span {
    color: #ffffff;
    text-shadow: 0 0 10px var(--brand-color, #ff5500);
}

.tech-item svg,
.tech-icon-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    transition: all 0.35s ease;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.4));
    position: relative;
    z-index: 1;
}

.tech-item:hover svg,
.tech-item:hover .tech-icon-img {
    transform: scale(1.15) translateY(-2px);
    filter: drop-shadow(0 0 14px var(--brand-color, #ff5500)) drop-shadow(0 0 4px var(--brand-color, #ff5500));
}

/* --- SECCIÓN 4: Proceso de Trabajo (Timeline) --- */
section#proceso.sw-section {
    padding-top: 50px;
    padding-bottom: 40px;
}

section#contacto.am-cta-section {
    padding-top: 30px;
    padding-bottom: 60px;
}

.am-process-flow {
    position: relative;
    max-width: 1000px;
    margin: 24px auto 0;
    padding: 16px 0;
}

/* Línea naranja horizontal centrada exactamente en los nodos (1, 2, 3, 4) */
.am-process-line {
    position: absolute;
    top: 39px;
    left: 12.5%;
    right: 12.5%;
    height: 2px;
    background: linear-gradient(90deg, rgba(255, 85, 0, 0.3) 0%, var(--orange-primary) 50%, rgba(255, 85, 0, 0.3) 100%);
    box-shadow: 0 0 10px rgba(255, 85, 0, 0.6);
    z-index: 1;
}

.am-process-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    position: relative;
    z-index: 2;
}

.am-step-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.am-step-node {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #090303;
    border: 3px solid var(--orange-primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 24px;
    box-shadow: 0 0 15px rgba(255, 76, 0, 0.35);
    transition: all 0.3s ease;
}

.am-step-card:hover .am-step-node {
    background: var(--orange-primary);
    box-shadow: 0 0 25px rgba(255, 76, 0, 0.7);
    transform: scale(1.1);
}

.am-step-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
}

.am-step-desc {
    color: #94a3b8;
    font-size: 0.88rem;
    line-height: 1.5;
    padding: 0 10px;
}

/* --- SECCIÓN 5: CTA Final --- */
.am-cta-section {
    padding: 120px 24px;
    background: transparent;
    text-align: center;
}

.am-cta-card {
    max-width: 900px;
    margin: 0 auto;
    background: var(--orange-glass);
    border: 1px solid var(--orange-border);
    border-radius: 24px;
    padding: 60px 40px;
    backdrop-filter: blur(15px);
    box-shadow: none;
    position: relative;
}

.am-cta-card .am-btn-primary,
.am-cta-card .am-btn-primary:hover {
    box-shadow: none;
}

.am-cta-title {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 18px;
    line-height: 1.2;
}

.am-cta-desc {
    color: #cbd5e1;
    font-size: 1.15rem;
    max-width: 650px;
    margin: 0 auto 40px;
    line-height: 1.6;
}

/* --- Animaciones de Entrada (Scroll) --- */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-on-scroll.active {
    opacity: 1;
    transform: translateY(0);
}

/* Delay escalonado */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* --- Responsividad --- */
@media (max-width: 991px) {
    .am-hero-body {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 50px;
    }
    
    .am-hero-content {
        text-align: center;
        align-items: center;
    }
    
    .hero-buttons-inline,
    .am-btn-group {
        justify-content: center;
    }
    
    .am-stack-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .hero-buttons-inline,
    .am-btn-group {
        flex-direction: column;
        width: 100%;
        align-items: center;
        gap: 14px;
        justify-content: center;
    }

    .hero-buttons-inline .am-btn-primary,
    .hero-buttons-inline .am-btn-secondary,
    .am-btn-group .am-btn-primary,
    .am-btn-group .am-btn-secondary {
        width: 100%;
        max-width: 340px;
        text-align: center;
        justify-content: center;
    }

    .am-process-line {
        display: none;
    }
    
    .am-process-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .am-step-node {
        margin-bottom: 12px;
    }
    
    .am-tech-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .tech-item.hide-on-mobile {
        display: none !important;
    }
}

.blob-purple {
    background: radial-gradient(circle, rgba(161, 42, 11, 0.28) 0%, rgba(70, 15, 4, 0.08) 70%);
    width: 600px;
    height: 600px;
    top: 5%;
    left: -10%;
}

.blob-cyan {
    background: radial-gradient(circle, rgba(255, 76, 0, 0.18) 0%, rgba(8, 10, 18, 0) 60%);
}
