@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@600;700&family=Plus+Jakarta+Sans:wght@300;400;500;600&display=swap');

:root {
    /* Cinematic Dark Theme */
    --bg-color: #030303;
    --bg-surface: #0a0a0c;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    
    /* Elegant Accents */
    --accent-primary: #e2e8f0; /* Silver / Metallic */
    --accent-glow: rgba(56, 189, 248, 0.4); /* Subtle teal glow */
    --accent-secondary: #334155; /* Slate */
    
    --card-bg: rgba(15, 15, 17, 0.6);
    --card-border: rgba(255, 255, 255, 0.04);
    --card-border-hover: rgba(255, 255, 255, 0.15);
    
    --font-heading: 'Chakra Petch', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Background Effects */
.bg-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    overflow: hidden;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.12;
    animation: float 20s infinite ease-in-out;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: #38bdf8;
    top: -100px;
    right: -100px;
}

.orb-2 {
    width: 600px;
    height: 600px;
    background: #818cf8;
    bottom: -200px;
    left: -200px;
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    opacity: 0.02;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Typography & Layout */
h1, h2, h3 {
    font-family: var(--font-heading);
    line-height: 1.2;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 8rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(90deg, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 650px;
    margin: 1rem auto 0;
    font-weight: 300;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 0;
    z-index: 100;
    transition: all 0.3s ease;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(3, 3, 3, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.logo:hover {
    color: #38bdf8;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.3s ease;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.nav-links a:hover {
    color: #fff;
}

/* Hero Section */
.hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 90vh;
    padding: 2rem 1rem;
    position: relative;
}

/* Badge superior */
.pill-badge {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
    padding: 0.4rem 1.2rem;
    border-radius: 9999px;
    margin-bottom: 2rem;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
}

/* Título de Marca */
.brand-title {
    font-size: clamp(3rem, 7vw, 6rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ffffff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
    line-height: 1.05;
    text-shadow: 0 10px 40px rgba(255, 255, 255, 0.05);
}

/* Subtítulo Nombre Real */
.brand-subtitle {
    font-family: var(--font-body);
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    font-weight: 300;
    color: #cbd5e1;
    letter-spacing: 0.01em;
    margin-top: 1rem;
    margin-bottom: 3rem;
}

.location-tag {
    font-weight: 400;
    opacity: 0.5;
    font-size: 0.7em;
    margin-left: 0.5rem;
}

/* Bullets descriptivos */
.features-list {
    list-style: none;
    padding: 0;
    margin: 0 0 3.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.features-list li {
    font-size: 0.95rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-weight: 400;
}

.features-list .icon {
    color: #475569;
    font-size: 0.75rem;
}

/* Botones CTA */
.cta-group {
    display: flex;
    gap: 1.2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-discover {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: #000;
    background: linear-gradient(135deg, #f8fafc, #cbd5e1);
    padding: 0.85rem 2.5rem;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.btn-discover:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, #ffffff, #e2e8f0);
}

.btn-secondary {
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    color: var(--text-primary);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.85rem 2.5rem;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Manifesto Section */
.manifesto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 3.5rem 2.5rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    border-color: var(--card-border-hover);
}

.card-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.card:hover .card-icon {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 300;
}

/* Services Section */
.services-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.service-item {
    display: flex;
    align-items: flex-start;
    gap: 2.5rem;
    padding: 3.5rem;
    background: linear-gradient(90deg, var(--card-bg) 0%, transparent 100%);
    border-left: 2px solid rgba(255,255,255,0.05);
    border-radius: 0 12px 12px 0;
    transition: all 0.4s ease;
}

.service-item:hover {
    background: linear-gradient(90deg, rgba(255,255,255, 0.03) 0%, transparent 100%);
    border-left-color: rgba(255,255,255, 0.3);
    padding-left: 4.5rem;
}

.service-number {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.15);
    transition: all 0.4s ease;
    margin-top: -0.5rem;
}

.service-item:hover .service-number {
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.5);
    color: rgba(255, 255, 255, 0.05);
}

.service-content h3 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.service-content p {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 300;
    max-width: 700px;
}

/* Sistemas & IA Section */
.sistemas-section {
    background: rgba(255, 255, 255, 0.01);
    border-top: 1px solid rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.sys-header {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.sys-p {
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.tech-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: auto;
}

.tech-badge {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
}

/* Contact Section */
.contact-box {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 6rem 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.contact-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
    z-index: -1;
}

.contact-box h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.contact-box p {
    color: var(--text-secondary);
    margin-bottom: 3.5rem;
    font-size: 1.05rem;
    font-weight: 300;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 3.5rem;
}

.cta-subtext {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.7;
}

.cta-subtext::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

.btn-primary {
    display: inline-block;
    padding: 1rem 3rem;
    background: linear-gradient(135deg, #f8fafc, #cbd5e1);
    color: #000;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 6px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.05);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, #ffffff, #e2e8f0);
}

.social-links {
    margin-top: 5rem;
    display: flex;
    justify-content: center;
    gap: 2.5rem;
}

.social-link {
    color: #64748b;
    text-decoration: none;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: color 0.3s ease;
    font-weight: 500;
}

.social-link:hover {
    color: #fff;
}

/* Footer */
footer {
    text-align: center;
    padding: 3rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.02);
    margin-top: 2rem;
}

footer p {
    color: #475569;
    font-size: 0.8rem;
}

/* Animations & Reveal */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s cubic-bezier(0.2, 1, 0.3, 1), transform 0.8s cubic-bezier(0.2, 1, 0.3, 1);
}

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

/* --- Gumroad Course & Button --- */
.course-highlight {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-secondary {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: transparent;
    color: #f8fafc;
    border: 1px solid rgba(255,255,255,0.2);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.4);
}

/* --- Portfolio Section --- */
.portfolio-section {
    padding: 8rem 0;
    background: var(--bg-color);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.portfolio-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    cursor: pointer;
}

.portfolio-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s cubic-bezier(0.2, 1, 0.3, 1);
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.1) 100%);
    opacity: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    transition: opacity 0.4s ease;
}

.portfolio-item:hover .portfolio-image {
    transform: scale(1.05);
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 0.5rem;
    transform: translateY(10px);
    transition: transform 0.4s ease;
}

.portfolio-overlay p {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: #cbd5e1;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transform: translateY(10px);
    transition: transform 0.4s ease 0.1s;
}

.portfolio-item:hover .portfolio-overlay h3,
.portfolio-item:hover .portfolio-overlay p {
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .service-item {
        flex-direction: column;
        padding: 2.5rem;
    }
    
    .service-item:hover {
        padding-left: 2.5rem;
    }
    
    .contact-box {
        padding: 4rem 2rem;
    }
    
    .brand-title {
        font-size: 3.5rem;
    }
    
    section {
        padding: 5rem 0;
    }
}

/* --- A/B Audio Player Styles --- */
.audio-player-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 2rem;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.8) 70%, transparent 100%);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease 0.1s;
    z-index: 10;
}

.portfolio-item:hover .audio-player-container {
    opacity: 1;
    transform: translateY(0);
}

.player-controls {
    display: flex;
    justify-content: center;
}

.play-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    padding-left: 4px; /* visually center the play icon */
}

.play-btn.playing {
    padding-left: 0; /* reset for pause icon or let JS change it */
}

.play-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.slider-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.slider-wrapper .label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    min-width: 45px;
    text-align: center;
    font-weight: 600;
    transition: color 0.3s ease;
}

.slider-wrapper .before-label.active {
    color: #38bdf8; /* Highlight when mainly listening to before */
}

.slider-wrapper .after-label.active {
    color: #10b981; /* Highlight when mainly listening to after */
}

.ab-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.ab-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    transition: transform 0.2s ease;
}

.ab-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* Force audio player visible on mobile devices to avoid hover issues */
@media (max-width: 768px) {
    .portfolio-item .audio-player-container {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }
    .portfolio-overlay {
        padding-bottom: 5rem; /* Make room for the audio player */
    }
}
