:root {
    /* Design System: "Human Engineering" Style / Deep Tech */

    /* Colors */
    --primary: #000A1E;
    --primary-container: #001B3D;
    --primary-light: #002B5E;

    --secondary: #006D36;
    /* Emerald Green for OT */
    --secondary-light: #83FBA5;

    --tertiary: #00FBFB;
    /* Cyan for IT / Data */
    --tertiary-dark: #009898;

    --surface: #F4F3F7;
    --surface-low: #E9E7EB;
    --surface-lowest: #FFFFFF;

    --inverse-surface: #1A1B1E;

    --text-main: #1A1B1E;
    --text-muted: #44474E;
    --text-inverse: #FFFFFF;
    --text-inverse-muted: #C4C6CF;

    /* Ghost Border & Glassmorphism */
    --ghost-border: rgba(196, 198, 207, 0.2);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-blur: blur(20px);

    /* Spacing & Typography */
    --font-sans: 'Inter', sans-serif;
    --radius: 8px;
    /* Sharp, technical feel */
    --radius-lg: 12px;

    --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html {
    scroll-behavior: smooth;
}

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

/* Typography Tools */
h1,
h2,
h3,
h4 {
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.text-gradient {
    background: linear-gradient(135deg, var(--tertiary-dark), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Layout Utilities */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 5%;
}

.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 60px;
}

.section-header.align-left {
    text-align: left;
    margin-left: 0;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--primary);
}

.section-desc {
    font-size: 1.125rem;
    color: var(--text-muted);
}

.badge {
    display: inline-block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    color: var(--primary);
    background-color: rgba(0, 33, 71, 0.1);
    padding: 4px 12px;
    border-radius: 999px;
    margin-bottom: 16px;
}


/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 0.95rem;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.05rem;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

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

.btn-primary:hover {
    background-color: var(--secondary);
    box-shadow: 0 8px 24px rgba(0, 109, 54, 0.3);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary);
    border: 1px solid rgba(0, 10, 30, 0.2);
}

.btn-secondary:hover {
    background-color: rgba(0, 10, 30, 0.05);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--ghost-border);
    transition: var(--transition);
    padding: 20px 0;
}

.navbar.scrolled {
    padding: 12px 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

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

.logo {
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.02em;
}

.logo-mark {
    width: 16px;
    height: 16px;
    background: var(--tertiary);
    border-radius: 2px;
    position: relative;
    box-shadow: 4px 4px 0 var(--primary);
}

.logo-bold {
    font-weight: 800;
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-links a:not(.btn) {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}

.nav-links a:not(.btn)::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--tertiary);
    transition: var(--transition);
}

.nav-links a:not(.btn):hover::after {
    width: 100%;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
}

.mobile-toggle span {
    width: 24px;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    position: relative;
    padding: 200px 5% 140px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
    background-color: var(--primary); /* Dark background for contrast */
}

#hero-globe-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.hero-bg-glow {
    position: absolute;
    top: -10%;
    right: -5%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(0, 251, 251, 0.08) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    text-align: left;
    margin-left: 0;
    margin-right: auto;
}

.hero-label {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--tertiary);
    margin-bottom: 24px;
}

.display-title {
    font-size: clamp(3rem, 5vw, 4.5rem);
    margin-bottom: 32px;
    color: var(--text-inverse);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-inverse-muted);
    margin-bottom: 48px;
    max-width: 700px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: flex-start;
}

.hero .btn-secondary {
    color: var(--text-inverse);
    border-color: rgba(255, 255, 255, 0.3);
}

.hero .btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Dual Columns (IT vs OT) */
.dual-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.service-card {
    background: var(--surface-lowest);
    border-radius: var(--radius-lg);
    padding: 48px;
    /* Tonal Depth instead of borders */
    box-shadow: 0 20px 40px rgba(0, 10, 30, 0.04);
    position: relative;
    overflow: visible;
    transition: var(--transition);
    border: 1px solid var(--ghost-border);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px rgba(0, 10, 30, 0.08);
}

.card-it::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--tertiary);
}

.card-ot::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--secondary);
}

.card-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
}

.cyan-glow {
    background: rgba(0, 251, 251, 0.1);
    color: var(--tertiary-dark);
}

.emerald-glow {
    background: rgba(0, 109, 54, 0.1);
    color: var(--secondary);
}

.card-title {
    font-size: 1.75rem;
    margin-bottom: 16px;
    color: var(--primary-container);
}

.card-intro {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--ghost-border);
}

.feature-list {
    list-style: none;
}

.feature-list li {
    margin-bottom: 16px;
    position: relative;
    padding-left: 24px;
    color: var(--text-main);
}

.feature-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--tertiary-dark);
    font-weight: bold;
}

.card-ot .feature-list li::before {
    color: var(--secondary);
}

/* Pyramid Interactive Styles */
.pyramid-container {
    display: flex;
    justify-content: center;
    margin-bottom: 32px;
    height: 650px;
    width: calc(100% + 64px);
    margin-left: -32px;
    position: relative;
}

#it-3d-pyramid canvas,
#ot-3d-pyramid canvas {
    border-radius: var(--radius);
    max-width: 100%;
    display: block;
    margin: 0 auto;
}

.pyramid-svg {
    height: 100%;
    width: 100%;
    filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.08));
    overflow: visible;
}

.pyramid-level {
    cursor: pointer;
    transition: var(--transition);
}

.pyramid-level polygon {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Hover creates a 3D separation effect (lifting layer upwards slightly) */
.pyramid-level:hover polygon,
.pyramid-level.active polygon {
    transform: translateY(-6px);
    filter: brightness(1.15);
}

.pyramid-level polyline {
    transition: all 0.4s ease;
    opacity: 0.5;
}

.pyramid-level:hover polyline,
.pyramid-level.active polyline {
    opacity: 1;
    stroke-width: 2px;
    stroke-dashoffset: 0;
}

.pyramid-text {
    font-family: var(--font-sans);
    font-size: 18px;
    font-weight: 800;
    fill: var(--text-muted);
    transition: all 0.3s ease;
}

.pyramid-level:hover .pyramid-text,
.pyramid-level.active .pyramid-text {
    fill: var(--primary);
    font-size: 19px;
}

/* Highlight list items when corresponding pyramid level is active */
.feature-list li {
    transition: var(--transition);
    border-radius: var(--radius);
    padding: 8px 12px 8px 30px;
    margin-left: -12px;
}

.feature-list li.active {
    background: rgba(0, 251, 251, 0.08);
}

.card-ot .feature-list li.active {
    background: rgba(0, 109, 54, 0.08);
}

/* Regulacion */
.regulacion {
    background-color: var(--primary-container);
    color: var(--text-inverse);
}

.regulacion .section-title {
    color: var(--text-inverse);
}

.regulacion .section-desc {
    color: var(--text-inverse-muted);
}

.regulacion .badge {
    color: var(--tertiary);
    background-color: rgba(0, 251, 251, 0.1);
}

.reg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-top: 48px;
}

.reg-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 32px;
    border-radius: var(--radius);
    transition: var(--transition);
}

.reg-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
}

.reg-item h4 {
    color: var(--tertiary);
    font-size: 1.2rem;
    margin-bottom: 16px;
}

.reg-item p {
    color: var(--text-inverse-muted);
    font-size: 0.95rem;
}

/* Infraestructura */
.infra-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.infra-card {
    background: var(--surface-low);
    padding: 40px;
    border-radius: var(--radius-lg);
}

.infra-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    color: var(--primary);
}

.infra-list {
    list-style: none;
}

.infra-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--ghost-border);
    color: var(--text-muted);
}

.infra-list li:last-child {
    border-bottom: none;
}

/* Footer */
.footer {
    background: var(--primary);
    color: var(--text-inverse);
    padding: 80px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 60px;
}

.footer-brand p {
    margin-top: 16px;
    color: var(--text-inverse-muted);
    max-width: 400px;
}

.footer-links h4,
.footer-contact h4 {
    color: var(--text-inverse);
    margin-bottom: 24px;
    font-size: 1.1rem;
}

.footer-links a,
.btn-link {
    display: block;
    color: var(--text-inverse-muted);
    text-decoration: none;
    margin-bottom: 12px;
    transition: var(--transition);
}

.footer-links a:hover,
.btn-link:hover {
    color: var(--tertiary);
}

.footer-bottom {
    text-align: center;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-inverse-muted);
    font-size: 0.9rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Media Queries */
@media (max-width: 992px) {

    .dual-columns,
    .infra-grid {
        grid-template-columns: 1fr;
    }

    .display-title {
        font-size: 2.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        left: 100%;
        width: 100%;
        height: 100vh;
        background: var(--surface-lowest);
        flex-direction: column;
        justify-content: center;
        transition: left 0.4s ease;
    }

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

    .mobile-toggle {
        display: flex;
        z-index: 1001;
    }

    .mobile-toggle.active span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    .mobile-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-toggle.active span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    .hero-actions {
        flex-direction: column;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}