:root {
    --primary: #1D3557; /* Deep Space Blue */
    --accent-steel: #457B9D; /* Steel Blue */
    --accent-frost: #A8DADC; /* Frosted Blue */
    --accent-red: #E63946; /* Strawberry Red */
    --bg: #F1FAEE; /* Honeydew (Off-white/Pale Green) */
    --bg-alt: #ffffff;
    --text: #1D3557;
    --text-muted: #457B9D;
    --grid-color: rgba(69, 123, 157, 0.1);
    --border: #A8DADC;
    --mono: 'JetBrains Mono', monospace;
    --sans: 'Outfit', sans-serif;
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --mouse-x: 50%;
    --mouse-y: 50%;
}


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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    line-height: 1.6;
    overflow-x: hidden;
}

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

.mono-text {
    font-family: var(--mono);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    color: var(--accent-steel);
}


/* --- Layout Grid + Spotlight Background --- */
body {
    background-color: var(--bg);
    background-image: 
        radial-gradient(circle at var(--mouse-x) var(--mouse-y), rgba(69, 123, 157, 0.15) 0%, transparent 60%),
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 100% 100%, 40px 40px, 40px 40px;
    background-attachment: fixed, fixed, fixed;
}

/* --- Global Cursor --- */
html, body, * {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='%23E63946' stroke='white' stroke-width='1'%3E%3Cpath d='M7 2l12 11.2-5.8.8 3.5 6-3 1.7-3.5-6-3.2 4.3z'/%3E%3C/svg%3E"), auto !important;
}

a, button, [role="button"], .project-card, .price-card {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='%23E63946' stroke='white' stroke-width='1'%3E%3Cpath d='M7 2l12 11.2-5.8.8 3.5 6-3 1.7-3.5-6-3.2 4.3z'/%3E%3C/svg%3E"), pointer !important;
}

/* --- Navbar --- */
#navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 2rem 0;
    transition: var(--transition);
}

#navbar.scrolled {
    padding: 1rem 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

#navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.05em;
}

.logo span {
    color: var(--accent-red);
}


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

.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--accent-red);
}

.contact-meta a {
    text-decoration: none;
    transition: var(--transition);
}

.contact-meta a:hover {
    color: var(--accent-red);
}

/* --- Hamburger Menu --- */
.hamburger {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    z-index: 1001; /* Above mobile menu */
}

.hamburger .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background-color: var(--primary);
    border-radius: 2px;
}


/* --- Hero --- */
#hero {
    min-height: 85vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 60px;
}

.hero-content {
    max-width: 800px;
    z-index: 2;
}

#hero h1 {
    font-size: clamp(3rem, 8vw, 5rem);
    line-height: 1.1;
    margin: 1.5rem 0;
    color: var(--primary);
    letter-spacing: -0.02em;
}

#hero .highlight {
    color: var(--accent-red);
    position: relative;
    background: linear-gradient(90deg, var(--accent-red), #ff7b86, var(--accent-red));
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: shine 3s linear infinite;
}

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


#hero .subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    max-width: 600px;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-steel);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(69, 123, 157, 0.2);
}


.btn-secondary {
    background: transparent;
    color: var(--primary);
    margin-left: 1rem;
    text-decoration: underline;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-outline:hover {
    background: var(--bg-alt);
    border-color: var(--primary);
}

/* --- Sections --- */
section {
    padding: 3rem 0;
}

h2 {
    font-size: 3rem;
    margin-bottom: 2rem;
    color: var(--primary);
}


/* --- Sentido Section --- */
.section-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}

.philosophy-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 4rem;
}

.phil-item h3 {
    margin: 1rem 0;
    font-size: 1.5rem;
}

/* --- Code Window Visual --- */
.code-window {
    background: #0f172a;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 20px 20px 60px rgba(0,0,0,0.1);
    position: relative;
}

.window-header {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #475569;
}

.code-window code {
    font-family: var(--mono);
    color: #94a3b8;
    font-size: 0.9rem;
}

.keyword { color: #c678dd; }
.fn { color: #61afef; }
.str { color: #98c379; }

/* --- Soluciones Section --- */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 4rem;
}

.price-card {
    background: white;
    border: 1px solid var(--border);
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card-badge {
    position: absolute;
    top: 20px;
    right: -35px;
    background: var(--accent-red);
    color: white;
    padding: 5px 40px;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    transform: rotate(45deg);
    letter-spacing: 0.1em;
    box-shadow: 0 5px 15px rgba(230, 57, 70, 0.2);
    z-index: 10;
}

.price-card.accent {
    background: #ebf5f7;
    border-color: rgba(168, 218, 220, 0.5);
}

.price-card.accent:hover {
    border-color: var(--accent-frost);
    background: #e1f0f2;
}

.price-card.featured {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(29, 53, 87, 0.15);
}

.price-card.featured .mono-text { color: var(--accent-frost); }

.price-card.featured h3, 
.price-card.featured .price { color: white; }
.price-card.featured .btn-primary { background: white; color: var(--primary); }

.price-card h3 {
    font-size: 2rem;
    margin: 1rem 0;
}

.price {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 2rem;
    color: var(--primary);
    position: relative;
    cursor: help;
    display: inline-block;
}

.price span {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    vertical-align: middle;
}

.price-card.featured .price span {
    color: var(--accent-frost);
}


.price-card ul {
    list-style: none;
    margin-bottom: 3rem;
}

.price-card li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
    position: relative;
    cursor: help;
}

.price-card.featured li { border-color: rgba(255,255,255,0.1); }

/* --- Proyectos Section --- */
.projects-grid {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding: 1rem 0 3rem 0;
    margin-top: 2rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* Hide for cleaner look, use indicator instead */
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    /* Gentler mask to show there is more content */
    mask-image: linear-gradient(to right, black 80%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, black 80%, transparent 100%);
}

.projects-grid::-webkit-scrollbar {
    display: none;
}

.projects-grid::-webkit-scrollbar-track {
    background: rgba(29, 53, 87, 0.05);
    border-radius: 10px;
}

.projects-grid::-webkit-scrollbar-thumb {
    background-color: var(--primary);
    border-radius: 10px;
}

.project-card {
    flex: 0 0 85%; /* Peek next card */
    scroll-snap-align: center;
    display: block;
    text-decoration: none;
    color: inherit;
    background: linear-gradient(135deg, var(--bg-alt) 0%, #f8fafc 100%);
    border: 1px solid rgba(168, 218, 220, 0.4);
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition);
    position: relative;
}

@media (min-width: 768px) {
    .projects-grid {
        gap: 2.5rem;
        mask-image: none;
        -webkit-mask-image: none;
    }
    .project-card {
        flex: 0 0 calc(50% - 1.25rem);
        scroll-snap-align: start;
    }
}

@media (min-width: 1024px) {
    .project-card {
        flex: 0 0 calc(33.333% - 1.666rem);
    }
}

/* --- Scroll Hint Indicator --- */
.scroll-indicator {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: -1rem;
    color: var(--text-muted);
}

.scroll-line {
    height: 2px;
    background: var(--border);
    flex-grow: 1;
    position: relative;
    border-radius: 2px;
}

.scroll-line::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 30%;
    background: var(--primary);
    border-radius: 2px;
    animation: slideHint 3s infinite ease-in-out;
}

@keyframes slideHint {
    0% { left: 0; }
    50% { left: 70%; }
    100% { left: 0; }
}

.scroll-indicator span {
    font-size: 0.75rem;
    font-family: var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

@media (min-width: 768px) {
    .scroll-indicator { display: none; }
}

.project-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 25px 50px -12px rgba(29, 53, 87, 0.15);
}

.project-image {
    padding: 3rem 2.5rem;
    background: transparent;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 400px;
    height: 100%;
}

.project-overlay {
    position: absolute;
    top: 2rem;
    right: 2.5rem;
    font-size: 0.70rem;
    font-weight: 800;
    background: var(--primary);
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 30px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(29, 53, 87, 0.3);
}

.project-card:hover .project-overlay {
    background: var(--accent-red);
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(230, 57, 70, 0.4);
}

.mockup-content {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transform: translateY(15px);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(168, 218, 220, 0.3);
}

.project-card:hover .mockup-content {
    transform: translateY(0);
    box-shadow: 0 15px 40px rgba(29, 53, 87, 0.1);
}

.mockup-content .mono-text {
    color: var(--accent-red);
    font-weight: 600;
}

.mockup-content h4 {
    font-size: 1.8rem;
    margin: 0.8rem 0;
    color: var(--primary);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.mockup-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 0;
}

/* --- Tooltip System --- */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    width: 240px;
    background: var(--primary);
    color: white;
    padding: 0.8rem 1rem;
    font-size: 0.75rem;
    line-height: 1.4;
    border-radius: 6px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 100;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    pointer-events: none;
    margin-bottom: 12px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.1);
}

/* Tooltip Arrow */
[data-tooltip]::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    border: 6px solid transparent;
    border-top-color: var(--primary);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 101;
    margin-bottom: 0px;
}

[data-tooltip]:hover::after,
[data-tooltip]:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Tooltip style for elements inside featured card */
.featured [data-tooltip]::after {
    background: white;
    color: var(--primary);
    border: none;
}
.featured [data-tooltip]::before {
    border-top-color: white;
}

/* --- Galería Section --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(29, 53, 87, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    color: white;
    padding: 2rem;
    text-align: center;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(29, 53, 87, 0.15);
    border-color: var(--accent-steel);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

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

.gallery-label {
    margin-top: 1.5rem;
    padding: 0.6rem 1.4rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: var(--transition);
    backdrop-filter: blur(5px);
}

.gallery-item:hover .gallery-label {
    background: var(--accent-red);
    border-color: var(--accent-red);
    transform: translateY(-2px);
}

/* --- Image Modal --- */
.image-modal {
    display: none;
    position: fixed;
    z-index: 3000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(8px);
}

.modal-content {
    margin: auto;
    display: block;
    width: 90%;
    max-width: 1200px;
    border-radius: 8px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease-out;
}

.modal-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 1200px;
    text-align: center;
    color: var(--accent-frost);
    padding: 2rem 0;
    font-size: 1rem;
    animation: fadeIn 0.5s ease-out;
}

@keyframes zoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: 300;
    transition: 0.3s;
    cursor: pointer;
    z-index: 3001;
}

.modal-close:hover {
    color: var(--accent-red);
    transform: rotate(90deg);
}

@media only screen and (max-width: 700px){
    .modal-content {
        width: 95%;
        margin-top: 40px;
    }
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Contacto --- */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}

input, textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border);
    background: var(--bg-alt);
    border-radius: 4px;
    font-family: inherit;
    transition: var(--transition);
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--accent-steel);
    background: white;
}


/* --- Footer --- */
footer {
    padding: 3rem 0;
    border-top: 1px solid var(--border);
}

/* --- WhatsApp Float --- */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 1000;
    transition: var(--transition);
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.4);
}


.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- Animations & 3D Reveal --- */
.reveal {
    opacity: 0;
    transform: translateY(40px) scale(0.95) rotateX(-5deg);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: top;
}

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

/* --- Cookie Banner --- */
.cookie-banner {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    right: 2rem;
    background: rgba(29, 53, 87, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem 0;
    z-index: 2000;
    color: white;
    display: none; /* Hidden by default, shown by JS */
}

.cookie-banner.visible {
    display: block;
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.cookie-content p {
    font-size: 0.9rem;
    margin: 0;
}

.cookie-content .btn {
    padding: 0.6rem 1.5rem;
    white-space: nowrap;
}

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

@media (max-width: 900px) {
    /* Mobile Navigation */
    .hamburger {
        display: block;
    }

    /* Mobile Footer */
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    footer {
        padding-bottom: 6rem; /* Extra space for whatsapp/cookies */
    }

    .nav-links {
        position: fixed;
        left: -100%;
        top: 0;
        gap: 0;
        flex-direction: column;
        background-color: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(15px);
        width: 100%;
        height: 100vh;
        text-align: center;
        transition: 0.4s;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        justify-content: center;
        align-items: center;
        z-index: 100;
        padding-top: 60px; /* Space for navbar */
    }

    .nav-links.nav-active {
        left: 0;
    }

    .nav-links li {
        margin: 1.5rem 0;
    }

    .nav-links a {
        font-size: 1.5rem;
    }

    /* Hamburger Animation */
    .hamburger.toggle .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
        background-color: var(--accent-red);
    }
    .hamburger.toggle .bar:nth-child(2) {
        opacity: 0;
    }
    .hamburger.toggle .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
        background-color: var(--accent-red);
    }

    .section-layout, .pricing-grid, .contact-layout, .philosophy-grid {
        grid-template-columns: 1fr;
    }
    
    .section-layout { gap: 3rem; }
    #hero h1 { font-size: 3.5rem; }
    
    .price-card {
        padding: 2rem;
    }
    
    /* On small mobile, adjust tooltip positioning to avoid screen overflow */
    @media (max-width: 480px) {
        .price-card li::after {
            width: 180px;
            font-size: 0.7rem;
        }

        .cookie-content {
            flex-direction: column;
            text-align: center;
            gap: 1rem;
        }

        .footer-content p {
            font-size: 0.75rem;
            line-height: 1.4;
        }
    }
}

/* --- Disable animations on Mobile/Tablet for Projects --- */
@media (max-width: 1024px) {
    #proyectos .reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .project-card, 
    .project-card:hover,
    .mockup-content,
    .project-card:hover .mockup-content,
    .project-overlay,
    .project-card:hover .project-overlay {
        transform: none !important;
        transition: none !important;
    }

    .mockup-content {
        transform: none !important;
        box-shadow: 0 10px 30px rgba(0,0,0,0.05) !important;
    }

    /* Remove the scroll hint for a cleaner look */
    .scroll-indicator {
        display: none !important;
    }
    
    .projects-grid {
        mask-image: none !important;
        -webkit-mask-image: none !important;
    }
}

