:root {
    --primary: #FF8C00;
    --dark: #1D1D1F;
    --soft-gray: #F5F5F7;
    --white: #FFFFFF;
    --accent-blue: #0071E3;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; color: var(--dark); background: var(--white); overflow-x: hidden; }

.main-container { max-width: 1400px; margin: 0 auto; padding: 0 5%; }
.section { padding: 100px 0; }
.alt-bg { background: var(--soft-gray); }
.text-center { text-align: center; margin-bottom: 60px; }

/* NAVBAR GLASSMORPHISM */
.glass-nav { position: fixed; top: 20px; left: 0; right: 0; z-index: 1000; }
.nav-grid { 
    background: rgba(255, 255, 255, 0.7); 
    backdrop-filter: blur(20px); 
    padding: 15px 40px; 
    border-radius: 100px; 
    border: 1px solid rgba(0,0,0,0.05);
    display: flex; justify-content: space-between; align-items: center;
}
.logo { 
    font-weight: 900; 
    font-size: 1.4rem; 
    color: var(--dark); /* El CODE se queda en oscuro para que se vea claro */
}

.logo span { 
    color: var(--primary); /* El IF se queda en naranja */
}
.links a { text-decoration: none; color: var(--dark); margin-left: 2rem; font-weight: 600; font-size: 0.9rem; }
.btn-cta { background: var(--dark); color: white !important; padding: 10px 25px; border-radius: 50px; }

/* HERO */
.hero { min-height: 100vh; position: relative; display: flex; align-items: center; padding-top: 100px; overflow: hidden; }
.hero-bg-blobs { 
    position: absolute; top: -10%; right: -10%; width: 600px; height: 600px; 
    background: radial-gradient(circle, rgba(255,140,0,0.12) 0%, rgba(255,255,255,0) 70%); 
    z-index: -1; 
}
.content-center { display: flex; flex-direction: column; align-items: center; text-align: center; width: 100%; }

.hero-copy h1 { font-size: clamp(2.5rem, 6vw, 5rem); line-height: 1.1; font-weight: 900; letter-spacing: -2px; margin-bottom: 25px; }
.hero-copy span { color: var(--primary); }
.hero-copy p { font-size: 1.25rem; color: #555; max-width: 750px; margin: 0 auto 40px; }
.btn-group { display: flex; gap: 20px; justify-content: center; margin-bottom: 80px; }

.btn-solid { background: var(--primary); color: white; text-decoration: none; padding: 18px 40px; border-radius: 12px; font-weight: 700; border: none; transition: 0.3s; }
.btn-ghost { border: 2px solid var(--dark); color: var(--dark); text-decoration: none; padding: 18px 40px; border-radius: 12px; font-weight: 700; transition: 0.3s; }
.btn-solid:hover { transform: scale(1.05); }

/* TERMINAL */
.terminal-box { width: 100%; max-width: 800px; perspective: 1000px; }
.t-inner { 
    background: #1a1a1a; border-radius: 20px; overflow: hidden; 
    box-shadow: 0 40px 80px rgba(0,0,0,0.1); 
    transform: rotateX(5deg); transition: 0.4s;
}
.t-inner:hover { transform: rotateX(0deg); }
.t-head { background: #2a2a2a; padding: 15px 25px; display: flex; align-items: center; justify-content: space-between; }
.t-dots { display: flex; gap: 8px; }
.t-dots span { width: 12px; height: 12px; border-radius: 50%; background: #555; }
.t-name { color: #888; font-family: monospace; font-size: 0.8rem; }
.t-body { padding: 40px; text-align: left; font-family: 'Consolas', monospace; color: #eee; font-size: 1rem; }
.c-1 { color: var(--primary); }
.c-2 { color: #569CD6; }
.c-info { color: #666; margin: 5px 0; }
.c-success { color: #4ADE80; font-weight: bold; margin-top: 20px; }
/* Busca y reemplaza tu .cursor por este */
.cursor {
    display: inline-block;
    width: 8px; /* Un poco más grueso para que se vea pro */
    background-color: #fff;
    margin-left: 5px;
    animation: blink 0.8s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

/* GRIDS */
.section-intro { text-align: center; margin-bottom: 80px; }
.section-intro h2 { font-size: 2.8rem; font-weight: 900; }
.section-intro span { color: var(--primary); }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.info-card { background: white; padding: 50px; border-radius: 25px; border: 1px solid #eee; transition: 0.3s; }
.info-card h3 { margin-bottom: 20px; font-size: 1.4rem; color: var(--dark); }

/* ==========================================================================
   SECCIÓN PROYECTOS: INTERACTIVIDAD "X-RAY", BRILLO Y CORRECCIÓN DE COLOR
   ========================================================================== */

.projects-layout { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); 
    gap: 30px; 
}

/* 1. Tarjeta-Botón: Quitamos el estilo de link por defecto */
.p-item { 
    text-decoration: none;
    display: block;
    position: relative;
    background: var(--white); 
    padding: 60px 30px; 
    border-radius: 35px; 
    border: 1px solid #e2e2e2; 
    overflow: hidden; 
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    /* Reset de color para que no se pongan moradas las letras */
    color: var(--dark); 
}

/* 2. Capa de contenido: Aseguramos colores constantes */
.p-content {
    position: relative;
    z-index: 2;
    transition: all 0.4s ease;
}

.p-item h4 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--dark); /* Color oscuro original */
}

.p-item p {
    font-size: 0.95rem;
    color: #666; /* Gris original */
    line-height: 1.6;
}

/* 3. Capa de imagen (Vista previa) */
.p-preview {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.1);
    transition: all 0.5s ease;
    z-index: 1;
}

.p-preview::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255, 255, 255, 0.377); /* Un poco más oscuro para que el brillo destaque */
}

/* 4. Íconos con Brillo Metálico */
.p-icon { 
    font-size: 3rem; 
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
}

.p-icon i {
    background: linear-gradient(to right, #FF8C00 10%, #ffcf94 25%, #ffcf94 35%, #FF8C00 50%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shineIcon 4s linear infinite;
    display: inline-block;
}

/* --- ESTADO HOVER (EFECTOS VISUALES) --- */
.p-item:hover {
    border-color: var(--primary);
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(255, 140, 0, 0.15);
}

.p-item:hover .p-content {
    opacity: 0; /* El texto desaparece para mostrar la imagen */
    transform: translateY(-20px);
}

.p-item:hover .p-preview {
    opacity: 1; 
    transform: scale(1);
}

@keyframes shineIcon {
    to { background-position: 200% center; }
}

/* PRECIOS */
.pricing-layout { 
    display: flex; 
    gap: 30px; 
    justify-content: center; 
    flex-wrap: wrap; 
    padding: 40px 0; /* Añadimos aire arriba y abajo del contenedor */
}

.p-box { 
    background: white; 
    border: 1px solid #eee; 
    padding: 60px 40px; 
    border-radius: 40px; 
    width: 350px; 
    text-align: center; 
    position: relative; 
    transition: transform 0.3s ease; /* Para que el movimiento sea fluido */
}

.p-box.featured { 
    border: 2px solid var(--primary); 
    box-shadow: 0 20px 40px rgba(255,140,0,0.1); 
    transform: translateY(-5px); 
    margin: 10px; /* Esto evita que los bordes naranjas se toquen entre sí o con lo de arriba */
}

.price { font-size: 2.8rem; font-weight: 900; margin: 20px 0; }
.price span { font-size: 1.2rem; color: #999; }

.tag { 
    position: absolute; 
    top: -15px; 
    left: 50%; 
    transform: translateX(-50%); 
    background: var(--primary); 
    color: white; 
    padding: 8px 20px; 
    border-radius: 50px; 
    font-size: 0.8rem; 
    font-weight: 800; 
    z-index: 10; /* Asegura que la etiqueta siempre esté visible */
}

.p-link { color: var(--primary); font-weight: 800; text-decoration: none; border-bottom: 2px solid transparent; }
.p-link:hover { border-bottom-color: var(--primary); }

/* CONTACTO */
.contact-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.contact-info h2 { font-size: 3rem; line-height: 1.1; margin-bottom: 20px; }
.contact-info span { color: var(--primary); }
.contact-form { display: flex; flex-direction: column; gap: 15px; }
.contact-form input, .contact-form textarea { padding: 18px; border-radius: 12px; border: 1px solid #ddd; font-family: inherit; font-size: 1rem; outline-color: var(--primary); }

footer { padding: 60px; text-align: center; border-top: 1px solid #eee; color: #999; font-size: 0.9rem; }

/* --- REVELACIÓN DE TARJETAS (SCROLL) --- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.9s ease-out;
}

.reveal.active {
    opacity: 1 !important;
    transform: translateY(0) !important;
}
/*FOOTER*/
.main-footer {
    padding: 80px 0 40px;
    background: #fafafa;
    border-top: 1px solid #eee;
}

.footer-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    text-align: center;
}

.footer-brand p {
    color: #888;
    margin-top: 15px;
    font-size: 0.95rem;
}

.footer-social {
    display: flex;
    gap: 25px;
}

.footer-social a {
    font-size: 1.5rem;
    color: var(--dark);
    transition: 0.3s;
}

.footer-social a:hover {
    color: var(--primary);
    transform: translateY(-3px);
}

.footer-copy {
    border-top: 1px solid #eee;
    padding-top: 30px;
    width: 100%;
    color: #999;
    font-size: 0.85rem;
}

.dev-signature {
    margin-top: 10px;
    font-weight: 500;
}

.dev-signature span {
    color: var(--dark);
    font-weight: 700;
    letter-spacing: 1px;
}

.dev-signature i {
    color: #ff4d4d; /* Color del corazón */
    font-size: 0.8rem;
}

/* --- ESTILOS DEL MENSAJE DE ÉXITO IFCODE (Corrección Naranja) --- */
#successMessage {
    /* Usamos el color de su variable para el borde */
    border: 1px solid var(--primary) !important; 
    /* Fondo naranja muy sutil (5% de opacidad) */
    background: rgba(255, 140, 0, 0.05) !important;
    animation: fadeInSuccess 0.6s ease-out forwards;
}

@keyframes fadeInSuccess {
    from { 
        opacity: 0; 
        transform: translateY(20px) scale(0.95); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

/* Efecto de enfoque premium para los inputs (en Naranja) */
.contact-form input:focus, .contact-form textarea:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(255, 140, 0, 0.1);
    outline: none;
}

#submitBtn:disabled {
    background: #ccc !important;
    color: #888 !important;
    cursor: not-allowed;
    transform: none !important;
}

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
    .nav-grid { top: 10px; padding: 10px 20px; width: 95%; margin: 0 auto; }
    .links { display: none; }
    .hero-copy h1 { font-size: 2.8rem; }
    .contact-wrapper { grid-template-columns: 1fr; text-align: center; }
    .p-box { width: 100%; }
}

/* --- ANIMACIÓN DE TERMINAL --- */
.terminal-line {
    opacity: 0;
    transform: translateY(5px);
    transition: all 0.4s ease;
}

/* Colores Pro */
.c-1 { color: #ff8c00; font-weight: bold; } 
.c-2 { color: #569cd6; }                    
.c-info { color: #888888; }                 
.c-success { color: #4ec9b0; }              

.cursor {
    color: #ff8c00; 
    font-weight: bold;
    animation: blink 0.8s infinite;
}
/* Estilos para precios de Lanzamiento */
.price-container {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.old-price {
    text-decoration: line-through;
    color: #999;
    font-size: 1.1rem;
    font-weight: 500;
}

.launch-price {
    margin: 0 !important;
    position: relative;
    display: inline-block;
    color: var(--primary);
    /* Efecto de Brillo (Shimmer) */
    background: linear-gradient(to right, #FF8C00 20%, #ffcf94 40%, #ffcf94 60%, #FF8C00 80%);
    background-size: 200% auto;
    color: #000;
    background-clip: text;
    text-fill-color: transparent;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 3s linear infinite;
}

/* Forzar que todas las cajas se vean destacadas */
.p-box.featured {
    border: 2px solid var(--primary);
    box-shadow: 0 20px 40px rgba(255,140,0,0.1);
    transform: translateY(-5px);
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}

/* Ajuste para que el símbolo asterisco no brille tanto si prefieres */
.launch-price span {
    color: #999;
    -webkit-text-fill-color: #999;
}