/* ================= CSS VARIABLES & SETUP ================= */
:root {
    --header-height: 4.5rem;
    
    /* Colors - Premium Corporativo */
    --hue: 215; /* Blue hue */
    --primary-color: hsl(var(--hue), 85%, 35%); /* Deep Tech Blue */
    --primary-color-alt: hsl(var(--hue), 85%, 25%);
    --secondary-color: hsl(28, 95%, 53%); /* Vibrant Orange Accent */
    --secondary-color-alt: hsl(28, 95%, 45%);
    --title-color: hsl(var(--hue), 30%, 15%);
    --text-color: hsl(var(--hue), 15%, 35%);
    --text-color-light: hsl(var(--hue), 15%, 55%);
    --body-color: hsl(var(--hue), 20%, 98%);
    --container-color: #ffffff;
    --border-color: hsl(var(--hue), 20%, 90%);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);

    /* Fonts & Typography */
    --body-font: 'Inter', sans-serif;
    --title-font: 'Outfit', sans-serif;
    
    --h1-font-size: 2.25rem;
    --h2-font-size: 1.75rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: 1rem;
    --small-font-size: 0.875rem;

    /* Font weight */
    --font-regular: 400;
    --font-medium: 500;
    --font-semi: 600;
    --font-bold: 700;

    /* Margins/Paddings */
    --mb-0-5: 0.5rem;
    --mb-1: 1rem;
    --mb-1-5: 1.5rem;
    --mb-2: 2rem;
    --mb-2-5: 2.5rem;
    --mb-3: 3rem;

    /* z-index */
    --z-tooltip: 10;
    --z-fixed: 100;
}

@media screen and (min-width: 968px) {
    :root {
        --h1-font-size: 3.5rem;
        --h2-font-size: 2.25rem;
        --h3-font-size: 1.5rem;
        --normal-font-size: 1.125rem;
    }
}

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

html {
    scroll-behavior: smooth;
}

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

h1, h2, h3, h4 {
    font-family: var(--title-font);
    color: var(--title-color);
    font-weight: var(--font-bold);
    line-height: 1.2;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

/* ================= REUSABLE CSS CLASES ================= */
.container {
    max-width: 1140px;
    margin-left: var(--mb-1-5);
    margin-right: var(--mb-1-5);
}

.grid {
    display: grid;
    gap: 1.5rem;
}

.section {
    padding: 6rem 0 2rem;
}

.section-title {
    text-align: center;
    margin-bottom: var(--mb-0-5);
}

.section-subtitle {
    text-align: center;
    color: var(--text-color-light);
    margin-bottom: var(--mb-3);
    font-size: var(--normal-font-size);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    font-weight: var(--font-semi);
    font-family: var(--title-font);
    transition: 0.3s;
    cursor: pointer;
    border: none;
    column-gap: 0.5rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 8px 24px hsla(var(--hue), 85%, 35%, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-color-alt);
    transform: translateY(-3px);
    box-shadow: 0 12px 28px hsla(var(--hue), 85%, 35%, 0.4);
}

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

.btn-outline:hover {
    background-color: var(--primary-color);
    color: #fff;
    transform: translateY(-3px);
}

/* ================= HEADER & NAV ================= */
.header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: var(--z-fixed);
    background-color: transparent;
    transition: 0.4s;
}

.scroll-header {
    background-color: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 20px hsla(var(--hue), 30%, 15%, 0.05);
}

.navbar {
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: baseline;
    font-size: 1.5rem;
    font-weight: var(--font-bold);
    color: var(--title-color);
    letter-spacing: -0.5px;
}

.logo-dot {
    color: var(--secondary-color);
    font-size: 2rem;
    line-height: 0;
}

.nav-toggle {
    font-size: 1.5rem;
    color: var(--title-color);
    cursor: pointer;
    display: none;
}

@media screen and (max-width: 767px) {
    .nav-toggle {
        display: block;
    }
    .nav-menu {
        position: fixed;
        top: -100%;
        left: 0;
        width: 100%;
        background-color: var(--body-color);
        padding: 4rem 0 3rem;
        box-shadow: 0 4px 12px hsla(var(--hue), 30%, 15%, 0.1);
        border-radius: 0 0 1.5rem 1.5rem;
        transition: 0.4s;
        z-index: var(--z-fixed);
    }
    .show-menu {
        top: var(--header-height);
    }
}

.nav-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    row-gap: 2rem;
}

.nav-link {
    font-weight: var(--font-medium);
    color: var(--text-color);
    transition: 0.3s;
    font-family: var(--title-font);
}

.nav-link:hover,
.active-link {
    color: var(--primary-color);
}

/* ================= HERO ================= */
.hero {
    position: relative;
    padding-top: 8rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: radial-gradient(circle at top right, rgba(255,255,255,1) 0%, rgba(245,248,252,1) 100%);
    overflow: hidden;
}

.hero-bg-shapes {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 8s ease-in-out infinite alternate;
}

.shape-1 {
    width: 600px; height: 600px;
    background-color: hsla(var(--hue), 85%, 85%, 0.4);
    top: -200px; right: -200px;
}

.shape-2 {
    width: 400px; height: 400px;
    background-color: hsla(28, 95%, 85%, 0.3);
    bottom: 0; left: -150px;
    animation-delay: 2s;
}

@keyframes float {
    0% { transform: translateY(0) translateX(0); }
    100% { transform: translateY(30px) translateX(-20px); }
}

.hero-container {
    position: relative;
    z-index: 1;
}

.hero-data {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: var(--h1-font-size);
    margin-bottom: var(--mb-1-5);
    letter-spacing: -1px;
}

.highlight {
    color: var(--primary-color);
    position: relative;
}

.highlight::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 30%;
    background-color: hsla(28, 95%, 53%, 0.2);
    bottom: 5px;
    left: 0;
    z-index: -1;
    transform: rotate(-2deg);
}

.hero-description {
    font-size: var(--normal-font-size);
    color: var(--text-color-light);
    margin-bottom: var(--mb-2-5);
    padding: 0 1rem;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ================= ABOUT / NOSOTROS ================= */
.about-data {
    background-color: var(--glass-bg);
    backdrop-filter: blur(10px);
    padding: 3rem;
    border-radius: 1.5rem;
    box-shadow: 0 10px 40px hsla(var(--hue), 20%, 80%, 0.15);
    border: 1px solid var(--glass-border);
}

.about-subtitle {
    margin-bottom: var(--mb-1);
    color: var(--secondary-color);
}

.about-description {
    margin-bottom: var(--mb-1-5);
}

.about-stats {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.stat-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: var(--mb-0-5);
}

.stat-title {
    font-size: var(--h3-font-size);
    margin-bottom: 0.25rem;
}

.stat-desc {
    font-size: var(--small-font-size);
    color: var(--text-color-light);
}

/* ================= SERVICIOS ================= */
.services-container {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.service-card {
    background-color: var(--container-color);
    padding: 2.5rem 2rem;
    border-radius: 1.5rem;
    box-shadow: 0 8px 30px hsla(var(--hue), 20%, 85%, 0.3);
    border: 1px solid var(--border-color);
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background-color: var(--primary-color);
    transition: 0.4s;
    opacity: 0;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 16px 40px hsla(var(--hue), 20%, 80%, 0.4);
}

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

/* Secondary Color line for middle card */
.service-card:nth-child(2):hover::before {
    background-color: var(--secondary-color);
}

.service-icon-wrapper {
    width: 70px;
    height: 70px;
    background-color: hsla(var(--hue), 85%, 95%, 1);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--mb-1-5);
    transform: rotate(-5deg);
    transition: 0.4s;
}

.service-card:hover .service-icon-wrapper {
    transform: rotate(0);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
}

/* Accent for secondary card */
.service-card:nth-child(2) .service-icon-wrapper {
    background-color: hsla(28, 95%, 95%, 1);
}
.service-card:nth-child(2) .service-icon {
    color: var(--secondary-color);
}

.service-title {
    font-size: var(--h3-font-size);
    margin-bottom: var(--mb-1);
}

.service-description {
    color: var(--text-color-light);
    margin-bottom: var(--mb-1-5);
    font-size: 0.95rem;
}

.service-list {
    display: flex;
    flex-direction: column;
    row-gap: 0.75rem;
}

.service-list li {
    display: flex;
    align-items: flex-start;
    column-gap: 0.5rem;
    font-size: var(--small-font-size);
    font-weight: var(--font-medium);
}

.service-list i {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-top: -2px;
}

/* ================= CONTACTO ================= */
.contact-container {
    gap: 3rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.contact-icon {
    font-size: 2rem;
    color: var(--primary-color);
    background-color: hsla(var(--hue), 85%, 95%, 1);
    padding: 1rem;
    border-radius: 1rem;
}

.contact-title {
    font-size: var(--h3-font-size);
    margin-bottom: 0.25rem;
}

.contact-text {
    color: var(--text-color-light);
}

.contact-form {
    background-color: var(--container-color);
    padding: 2.5rem;
    border-radius: 1.5rem;
    box-shadow: 0 10px 40px hsla(var(--hue), 20%, 85%, 0.3);
    border: 1px solid var(--border-color);
}

.form-group.grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 0;
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: var(--small-font-size);
    font-weight: var(--font-semi);
    color: var(--title-color);
}

.form-input {
    width: 100%;
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    background-color: var(--body-color);
    color: var(--text-color);
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    transition: 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: #fff;
    box-shadow: 0 0 0 4px hsla(var(--hue), 85%, 35%, 0.1);
}

.btn-block {
    width: 100%;
}

/* ================= FOOTER ================= */
.footer {
    background-color: var(--title-color);
    color: #fff;
    padding: 5rem 0 2rem;
}

.footer-container {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    border-bottom: 1px solid hsla(var(--hue), 0%, 100%, 0.1);
    padding-bottom: 3rem;
    margin-bottom: 2rem;
}

.footer-logo {
    display: inline-block;
    font-family: var(--title-font);
    font-size: 1.75rem;
    font-weight: var(--font-bold);
    color: #fff;
    margin-bottom: var(--mb-1);
}

.footer-logo span {
    color: var(--secondary-color);
}

.footer-description {
    color: hsla(var(--hue), 0%, 100%, 0.7);
    margin-bottom: var(--mb-1-5);
    max-width: 300px;
}

.footer-title {
    font-size: var(--h3-font-size);
    margin-bottom: var(--mb-1-5);
    color: #fff;
}

.footer-links {
    display: flex;
    flex-direction: column;
    row-gap: 0.75rem;
}

.footer-link {
    color: hsla(var(--hue), 0%, 100%, 0.7);
    transition: 0.3s;
}

.footer-link:hover {
    color: var(--secondary-color);
    transform: translateX(5px);
    display: inline-block;
}

.footer-social {
    display: flex;
    column-gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background-color: hsla(var(--hue), 0%, 100%, 0.05);
    color: #fff;
    font-size: 1.5rem;
    border-radius: 50%;
    transition: 0.3s;
}

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

.footer-copy {
    text-align: center;
    font-size: var(--small-font-size);
    color: hsla(var(--hue), 0%, 100%, 0.5);
}

/* ================= ANIMATIONS ================= */
/* Hidden initially for IO */
.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

/* ================= MEDIA QUERIES ================= */
/* For small devices */
@media screen and (max-width: 350px) {
    .container { margin-left: 1rem; margin-right: 1rem; }
    .hero-title { font-size: 2rem; }
    .about-data { padding: 1.5rem; }
}

/* For larger devices */
@media screen and (min-width: 768px) {
    .nav-list {
        flex-direction: row;
        column-gap: 3rem;
    }
    .hero-data {
        padding-top: 5rem;
    }
    .about-data {
        padding: 4rem;
    }
}

@media screen and (min-width: 992px) {
    .container {
        margin-left: auto;
        margin-right: auto;
    }
    .contact-container {
        grid-template-columns: 1fr 1.5fr;
        align-items: center;
    }
    .hero {
        padding-top: 0;
    }
}
