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

:root {
    /* Backgrounds & Surfaces */
    --bg-main: rgba(255, 255, 255, 0.95);
    --bg-alt: #f8fafc;
    --bg-card: #f1f5f9;

    /* Text & Typography */
    --text-title: #0f172a;
    --text-body: #475569;
    --text-subtle: #cbd5e1;

    /* Primary Colors (Vibrant Blue) */
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;

    /* Accents (Energetic Violet) */
    --accent: #7c3aed;
    --footer-bg: oklch(20.8% 0.042 265.755);

    /* Gradients */
    --gradient: linear-gradient(135deg, var(--primary), var(--accent));
    --text-gradient: linear-gradient(95deg, var(--primary-light), var(--primary));

    /* Structural */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    /* Fonts */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-title);
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

img,
svg {
    max-width: 100%;
    display: block;
}

/* Base Styles & Utilities */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    position: relative;
    z-index: 100;
    padding: 5rem 0;
}

.text-gradient {
    background: var(--text-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    gap: 0.5rem;
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--text-subtle);
    color: #ffffff;
}

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

/* Animations */
.animate {
    opacity: 0;
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in {
    transform: scale(0.95);
}

.slide-up {
    transform: translateY(30px);
}

.in-view {
    opacity: 1;
    transform: none;
}

/* Header */
.header {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 200;
    border-bottom: 1px solid var(--bg-card);
    transition: all 0.3s ease;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4.5rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.logo span {
    color: var(--text-title);
}

.nav {
    display: none;
}

@media (min-width: 768px) {
    .nav {
        display: flex;
        gap: 2rem;
    }
}

.nav-link {
    font-weight: 500;
    color: oklch(20.8% 0.042 265.755);
}

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

/* Hero Section */
.hero {
    position: relative;
    padding-top: 8rem;
    padding-bottom: 6rem;
    background-color: transparent;
    text-align: center;
    overflow: hidden;
}

/* Strip-style Animated Mesh Background */
.mesh-bg {
    position: fixed;
    top: -20%;
    left: -10%;
    width: 120%;
    height: 140%;
    z-index: 0;
    /* Gradient base background */
    background: #020024;
    background: linear-gradient(90deg, rgba(2, 0, 36, 1) 0%, rgba(23, 69, 115, 1) 35%, rgba(0, 0, 0, 1) 100%);
    /* Rotation / Inclinación Stripe */
    transform: skewY(-10deg);
    transform-origin: top left;
    overflow: hidden;
    pointer-events: none;
}

.mesh-blob {
    position: absolute;
    /* border-radius: 50%; */
    /* filter: blur(100px); */
    mix-blend-mode: overlay;
    animation-duration: 18s;
    animation-iteration-count: infinite;
    animation-timing-function: ease-in-out;
    z-index: 0;
}

.blob-1 {
    top: -10%;
    left: 10%;
    width: 60%;
    height: 60%;
    background-color: oklch(12.9% 0.042 264.695);
    animation-name: blob-anim-1;
}

.blob-2 {
    bottom: -10%;
    right: 10%;
    width: 50%;
    height: 50%;
    background-color: oklch(91.7% 0.08 205.041);
    animation-name: blob-anim-2;
    animation-delay: 2s;
}

.blob-3 {
    top: 30%;
    right: -10%;
    width: 60%;
    height: 50%;
    background-color: oklch(48.8% 0.243 264.376);
    mix-blend-mode: color-dodge;
    animation-name: blob-anim-3;
    animation-delay: 5s;
}

.blob-4 {
    bottom: 20%;
    left: -10%;
    width: 60%;
    height: 70%;
    background-color: oklch(12.9% 0.042 264.695);
    /* Lila suave */
    opacity: 0.45;
    mix-blend-mode: screen;
    animation-name: blob-anim-4;
    animation-delay: 8s;
}

.mesh-noise {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* SVG Noise background */
    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.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.06;
    mix-blend-mode: overlay;
    z-index: 1;
}

/* Animations for liquid movement */
@keyframes blob-anim-1 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(10%, 15%) scale(1.1);
    }

    66% {
        transform: translate(-15%, 5%) scale(0.9);
    }
}

@keyframes blob-anim-2 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(-15%, -10%) scale(1.15);
    }

    66% {
        transform: translate(15%, 15%) scale(0.85);
    }
}

@keyframes blob-anim-3 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(-20%, 20%) scale(1.05);
    }

    66% {
        transform: translate(5%, -15%) scale(1.1);
    }
}

@keyframes blob-anim-4 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(15%, -10%) scale(0.95);
    }

    66% {
        transform: translate(-10%, -20%) scale(1.05);
    }
}

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

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    color: #f2f2f2;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid #f2f2f2;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: #f2f2f2;
}

@media (min-width: 768px) {
    .hero h1 {
        font-size: 3.5rem;
    }
}

.hero p {
    font-size: 1.125rem;
    margin-bottom: 2.5rem;
    color: var(--text-subtle);
    max-width: 600px;
    margin-inline: auto;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
}

@media (min-width: 480px) {
    .hero-actions {
        flex-direction: row;
    }
}

.hero-visual {
    margin-top: 4rem;
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: var(--bg-card);
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 1px solid var(--text-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-visual svg.placeholder {
    width: 250px;
    height: 250px;
    color: var(--text-subtle);
    opacity: 0.5;
}

/* Hero Carousel */
#hero-carousel {
    position: relative;
    overflow: hidden;
}

.carousel-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.carousel-slide.active {
    opacity: 1;
    z-index: 10;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    /* Prevent cropping on different screen sizes */
}

.carousel-bullets {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    gap: 8px;
    z-index: 20;
}

@media (min-width: 768px) {
    .carousel-bullets {
        display: flex;
    }
}

.carousel-bullets .bullet {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--text-subtle);
    cursor: pointer;
    transition: background-color 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.carousel-bullets .bullet.active {
    background-color: var(--primary);
}

/* Description Section */
.description {
    background-color: oklch(20.8% 0.042 265.755);
    text-align: center;
}

.description-content {
    max-width: 700px;
    margin: 0 auto;
}

.description h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #f2f2f2;
}

.description p {
    font-size: 1.125rem;
}

/* Modules Section */
.modules {
    background-color: #FFFFFF;
    border-radius: var(--radius-lg);
    margin: 20px;

}

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

.section-header h2 {
    font-size: 2.5rem;
}

.modules-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .modules-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .modules-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.module-card {
    background-color: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.module-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
    background-color: var(--bg-main);
}

.module-icon {
    width: 3rem;
    height: 3rem;
    background-color: var(--primary-light);
    color: var(--primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.module-icon svg {
    width: 1.5rem;
    height: 1.5rem;
}

.module-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

/* Flow Section (Vertical Carousel) */
.flow {
    background-color: transparent;
    overflow: hidden;
}

.flow-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 4rem;
    height: 400px;
    /* Fixed height for the carousel window */
    position: relative;
    max-width: 720px;
    margin: 0 auto;

}

@media (min-width: 768px) {
    .flow-layout {
        grid-template-columns: 1fr 1fr;
        align-items: center;
        gap: 1rem;
    }
}

.flow .section-header h2 {
    color: #F2F2F2;
}

.flow-timeline-slider,
.flow-features-slider {
    position: relative;
    height: 100%;
    overflow: hidden;
    /* gradient masks to fade top and bottom */
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
    mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
}

.flow-features-slider {
    display: flex;
    align-items: center;
    -webkit-mask-image: none;
    mask-image: none;
}

.flow-track {
    display: flex;
    flex-direction: column;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding: 100px 5px;
    /* Padding to center items when they reach the ends */
}

#features-track {
    padding: 0;
    transition: transform 0.5s ease;
}

.flow-slide {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 0;
    opacity: 0.3;
    transform: scale(0.9);
    transition: all 0.5s ease;
    height: 100px;
    /* Fixed height per slide for precise calculation */
    cursor: pointer;
    position: relative;
}

#features-track .flow-slide {
    height: auto;
    /* Larger height for feature text */
    opacity: 0;
    transform: translateY(20px);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}

.flow-slide.active {
    opacity: 1;
    transform: scale(1);
}

#features-track .flow-slide.active {
    opacity: 1;
    transform: translateY(0);
    position: relative;
    z-index: 10;
}

/* Timeline specific styles */
.flow-timeline-slider::before {
    content: '';
    position: absolute;
    top: 0;
    left: 2rem;
    bottom: 0;
    width: 2px;
    background: var(--text-subtle);
    z-index: 0;
    margin-left: -1px;
}

.timeline-icon {
    width: 4rem;
    height: 4rem;
    background-color: var(--bg-main);
    border: 2px solid var(--text-subtle);
    color: var(--text-subtle);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.timeline-number {
    position: absolute;
    top: -5px;
    left: 0;
    width: 20px;
    height: 20px;
    background-color: #e2e8f0;
    color: var(--primary);
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    border: 2px solid var(--bg-main);
}

.flow-slide.active .timeline-icon {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.timeline-icon svg {
    width: 1.75rem;
    height: 1.75rem;
}

.timeline-content h4 {
    font-size: 1.25rem;
    color: var(--text-title);
    transition: color 0.3s ease;
}

.flow-slide.active .timeline-content h4 {
    color: #f2f2f2;
    font-weight: 700;
}

/* Features specific styles */
#features-track .flow-slide {
    flex-direction: row;
    align-items: flex-start;
    padding: 2rem;
    background: var(--bg-main);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    /*border-left: 4px solid var(--primary);*/
    justify-content: center;
}

#features-track .flow-slide svg {
    color: var(--primary);
    width: 4rem;
    height: 4rem;
    flex-shrink: 0;
}

#features-track .flow-slide span {
    font-size: 0.9rem;
    color: var(--text-body);
    line-height: 1.6;
}

/* ISO Compliance */
.iso {
    background-color: transparent;
}

.iso-card {
    display: flex;
    flex-direction: column;
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 3rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--text-subtle);
}

@media(min-width: 1024px) {
    .iso-card {
        flex-direction: row;
        align-items: center;
        gap: 4rem;
    }
}

.iso-header {
    flex: 1;
    margin-bottom: 2rem;
}

@media(min-width: 1024px) {
    .iso-header {
        margin-bottom: 0;
    }
}

.iso-header svg {
    width: 4rem;
    height: 4rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.iso-header h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.iso-list {
    flex: 1;
    background: var(--bg-main);
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.iso-list ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.iso-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

.iso-list li svg {
    color: var(--primary);
}


/* Contact Section */
.contact {
    background-color: oklch(20.8% 0.042 265.755);
    margin: 20px;
    border-radius: var(--radius-lg);
}

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

@media (min-width: 1024px) {
    .contact-layout {
        grid-template-columns: 1fr 1fr;
        align-items: center;
    }
}

.contact-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: #F2F2F2;
}

.contact-form-card {
    background-color: var(--bg-main);
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-title);
    font-size: 0.875rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--text-subtle);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-title);
    transition: all 0.2s;
    background-color: var(--bg-main);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.btn-block {
    width: 100%;
}

/* Footer */
.footer {
    position: relative;
    z-index: 100;
    background-color: transparent;
    color: white;
    padding: 4rem 0 2rem;
}

.footer-top {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .footer-top {
        flex-direction: row;
    }
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a,
.social-links a {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.footer-links a:hover,
.social-links a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--bg-main);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    position: relative;
    margin: 1rem;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-subtle);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.modal-close:hover {
    color: var(--text-title);
    background-color: var(--bg-alt);
}

.modal-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-title);
}

.logo-img {
    width: 100%;
    max-width: 200px;
    border-radius: 16px;
    padding: 10px;
}