/* Academia Nexialista - Custom Styles */

/* ========================================
   PALETA DE CORES OFICIAL
   ======================================== */
:root {
    --nexus-deep: #0A0A0A;
    --gold-experience: #D4AF37;
    --nexus-power: #1C1C1C;
    --digital-clarity: #F5F5F5;
    --gold-legacy: #B8860B;
    
    /* Cores complementares */
    --gold-experience-alpha: rgba(212, 175, 55, 0.1);
    --gold-experience-alpha-20: rgba(212, 175, 55, 0.2);
    --gold-experience-alpha-30: rgba(212, 175, 55, 0.3);
    --red-alert: #DC2626;
    --green-success: #10B981;
    --blue-info: #3B82F6;
    
    /* Gradientes */
    --gradient-gold: linear-gradient(135deg, var(--gold-experience), var(--gold-legacy));
    --gradient-dark: linear-gradient(135deg, var(--nexus-deep), var(--nexus-power));
}

/* ========================================
   RESET E BASE STYLES
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--nexus-deep);
    color: var(--digital-clarity);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */
.font-playfair {
    font-family: 'Playfair Display', serif;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.5em;
}

p {
    margin-bottom: 1em;
}

/* ========================================
   CUSTOM COMPONENTS
   ======================================== */

/* Touch targets for mobile (minimum 44px) */
button, 
.btn-primary, 
.btn-secondary,
input[type="submit"],
input[type="button"] {
    min-height: 44px;
    min-width: 44px;
}

/* Botões personalizados */
.btn-primary {
    background: var(--gradient-gold);
    color: var(--nexus-deep);
    font-weight: 600;
    padding: 1rem 2rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--gold-experience);
    font-weight: 600;
    padding: 1rem 2rem;
    border: 2px solid var(--gold-experience);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-secondary:hover {
    background: var(--gold-experience);
    color: var(--nexus-deep);
    transform: translateY(-2px);
}

/* Cards */
.nexus-card {
    background: rgba(28, 28, 28, 0.8);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 1rem;
    padding: 2rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.nexus-card:hover {
    border-color: rgba(212, 175, 55, 0.4);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Seções - Mobile First */
.section-padding {
    padding: 3rem 0;
}

@media (min-width: 768px) {
    .section-padding {
        padding: 4rem 0;
    }
}

@media (min-width: 1024px) {
    .section-padding {
        padding: 5rem 0;
    }
}

/* ========================================
   NAVIGATION ENHANCEMENTS
   ======================================== */
nav {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 40;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ========================================
   HERO SECTION ENHANCEMENTS
   ======================================== */
.hero-bg {
    background: linear-gradient(135deg, var(--nexus-deep) 0%, var(--nexus-power) 50%, var(--nexus-deep) 100%);
    position: relative;
    overflow: hidden;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(212, 175, 55, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* Animação de typing para o título */
.typing-animation {
    border-right: 2px solid var(--gold-experience);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { border-color: var(--gold-experience); }
    51%, 100% { border-color: transparent; }
}

/* ========================================
   PROBLEM SECTION ENHANCEMENTS
   ======================================== */
.problem-card {
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.problem-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(transparent, rgba(220, 38, 38, 0.1), transparent);
    animation: rotate 8s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.problem-card:hover::before {
    opacity: 1;
}

.problem-card:hover {
    border-color: rgba(220, 38, 38, 0.5);
    transform: translateY(-5px);
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

/* ========================================
   METHOD SECTION ENHANCEMENTS
   ======================================== */
.method-phase {
    background: rgba(28, 28, 28, 0.5);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 1.5rem;
    padding: 2.5rem;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.method-phase::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.1), transparent);
    transition: left 0.5s ease;
}

.method-phase:hover {
    border-color: rgba(212, 175, 55, 0.4);
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.method-phase:hover::before {
    left: 100%;
}

.phase-number {
    width: 5rem;
    height: 5rem;
    background: var(--gold-experience-alpha-20);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold-experience);
    margin: 0 auto 1.5rem;
    position: relative;
}

.phase-number::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--gradient-gold);
    border-radius: 50%;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.method-phase:hover .phase-number::after {
    opacity: 1;
}

/* ========================================
   AUTHORITY SECTION (YUAN)
   ======================================== */
.authority-timeline {
    position: relative;
    padding-left: 2rem;
}

.authority-timeline::before {
    content: '';
    position: absolute;
    left: 1.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gradient-gold);
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -0.5rem;
    top: 0.25rem;
    width: 1rem;
    height: 1rem;
    background: var(--gold-experience);
    border-radius: 50%;
    box-shadow: 0 0 0 4px var(--nexus-power);
}

/* ========================================
   NEWSLETTER SECTION
   ======================================== */
.newsletter-form {
    background: rgba(28, 28, 28, 0.5);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 1.5rem;
    padding: 3rem;
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.newsletter-form::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        transparent, 
        rgba(212, 175, 55, 0.1), 
        transparent, 
        rgba(212, 175, 55, 0.05),
        transparent
    );
    animation: rotate-slow 20s linear infinite;
}

@keyframes rotate-slow {
    100% { transform: rotate(360deg); }
}

/* Form styles */
.form-field {
    position: relative;
}

.form-field input {
    width: 100%;
    padding: 1rem 1.25rem;
    background: var(--nexus-deep);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 0.5rem;
    color: var(--digital-clarity);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-field input:focus {
    outline: none;
    border-color: var(--gold-experience);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.form-field input::placeholder {
    color: rgba(245, 245, 245, 0.5);
}

/* ========================================
   AI AGENT MODAL
   ======================================== */
.ai-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.ai-modal.active {
    opacity: 1;
    visibility: visible;
}

.ai-modal-content {
    background: var(--nexus-power);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 1.5rem;
    width: 100%;
    max-width: 56rem;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.ai-modal.active .ai-modal-content {
    transform: scale(1);
}

.chat-message {
    display: flex;
    margin-bottom: 1rem;
    animation: fadeInUp 0.3s ease;
}

.chat-message.user {
    flex-direction: row-reverse;
}

.chat-message .avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin: 0 0.75rem;
}

.chat-message.ai .avatar {
    background: rgba(212, 175, 55, 0.2);
    color: var(--gold-experience);
}

.chat-message.user .avatar {
    background: rgba(59, 130, 246, 0.2);
    color: #60A5FA;
}

.chat-bubble {
    background: var(--nexus-deep);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    max-width: 70%;
    position: relative;
}

.chat-message.user .chat-bubble {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

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

/* ========================================
   LOADING ANIMATIONS
   ======================================== */
.loading-dots {
    display: inline-flex;
    gap: 0.25rem;
}

.loading-dots span {
    width: 0.5rem;
    height: 0.5rem;
    background: var(--gold-experience);
    border-radius: 50%;
    animation: pulse 1.4s ease-in-out infinite both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes pulse {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ========================================
   SCROLL ANIMATIONS
   ======================================== */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.6s ease;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.6s ease;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ========================================
   RESPONSIVE DESIGN - MOBILE FIRST
   ======================================== */

/* Base styles - Mobile First (320px+) */
.hero-title {
    font-size: 2rem;
    line-height: 1.1;
}

.section-title {
    font-size: 1.75rem;
    line-height: 1.2;
}

.method-phase {
    padding: 1.5rem;
}

.newsletter-form {
    padding: 2rem;
}

.ai-modal-content {
    margin: 0.5rem;
    max-height: 95vh;
}

.btn-primary,
.btn-secondary {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
}

/* Small screens and up (640px+) */
@media (min-width: 640px) {
    .btn-primary,
    .btn-secondary {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
}

/* Medium screens and up (768px+) */
@media (min-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .ai-modal-content {
        margin: 1rem;
        max-height: 90vh;
    }
    
    .yuan-photo-container .yuan-photo-frame {
        width: 18rem;
        height: 18rem;
    }
}

/* Large screens and up (1024px+) */
@media (min-width: 1024px) {
    .hero-title {
        font-size: 3.75rem;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
    
    .method-phase {
        padding: 2.5rem;
    }
    
    .newsletter-form {
        padding: 3rem;
    }
    
    .yuan-photo-container .yuan-photo-frame {
        width: 20rem;
        height: 20rem;
    }
}

/* Extra large screens and up (1280px+) */
@media (min-width: 1280px) {
    .hero-title {
        font-size: 4rem;
    }
    
    .section-title {
        font-size: 3rem;
    }
}

/* ========================================
   IMAGE OPTIMIZATIONS
   ======================================== */
.yuan-photo {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.yuan-photo:hover {
    transform: scale(1.02);
    box-shadow: 0 25px 50px rgba(212, 175, 55, 0.3);
}

.logo-nexialista {
    transition: transform 0.2s ease;
}

.logo-nexialista:hover {
    transform: scale(1.1);
}

/* Professional photo styling */
.yuan-photo-container {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.yuan-photo-container .yuan-photo-frame {
    position: relative;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    margin: 0 auto;
}

.yuan-photo-container:hover .yuan-photo-frame {
    transform: scale(1.02);
    box-shadow: 0 30px 60px rgba(212, 175, 55, 0.4);
}

/* Enhanced photo positioning */
.yuan-photo-frame img {
    object-position: center 20%; /* Adjust to center face better */
}

/* Badge animations */
.credential-badge {
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.credential-badge:hover {
    transform: translateY(-5px) scale(1.05);
    background: var(--nexus-deep);
    border-color: var(--gold-experience);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.3);
}

.founder-badge {
    transition: all 0.3s ease;
    background: linear-gradient(135deg, var(--gold-experience), var(--gold-legacy));
    cursor: default;
}

.founder-badge:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 15px 30px rgba(212, 175, 55, 0.5);
}

/* Mobile responsive badges */
@media (max-width: 640px) {
    .yuan-photo-container .credential-badge {
        padding: 0.75rem;
    }
    
    .yuan-photo-container .credential-badge i {
        font-size: 1.25rem;
    }
    
    .yuan-photo-container .credential-badge div {
        font-size: 0.75rem;
    }
    
    .founder-badge {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }
}

/* Scroll indicator animation */
@keyframes scroll-hint {
    0%, 100% { opacity: 1; transform: translateY(0); }
    50% { opacity: 0.5; transform: translateY(5px); }
}

.scroll-indicator {
    animation: scroll-hint 2s ease-in-out infinite;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.text-gradient {
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.border-gradient {
    border: 1px solid transparent;
    background: linear-gradient(var(--nexus-power), var(--nexus-power)) padding-box,
                var(--gradient-gold) border-box;
}

.shadow-gold {
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.2);
}

.hover-lift {
    transition: transform 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
}

/* ========================================
   ACCESSIBILITY
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles for keyboard navigation */
button:focus,
input:focus,
a:focus {
    outline: 2px solid var(--gold-experience);
    outline-offset: 2px;
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    .ai-modal,
    nav,
    footer {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* ========================================
   CUSTOM SCROLLBAR
   ======================================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--nexus-deep);
}

::-webkit-scrollbar-thumb {
    background: var(--gold-experience);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold-legacy);
}