:root {
    --font-heading: 'Rajdhani', sans-serif;
    /* Rajdhani for a technical, squared, security-focused look */
    --font-base: 'Barlow', sans-serif;
    /* Barlow for a clean, industrial, modern body text */

    /* SENSUS Palette */
    --color-bg: #F8F9FA;
    --color-white: #FFFFFF;
    --color-primary: #3BAD4C;
    /* Green - Tech/Security */
    --color-primary-dark: #2a8a3a;
    --color-secondary: #17312C;
    /* Dark Green/Black */
    --color-black: #000000;
    --color-gray: #E3E4E7;
    --color-text-main: #17312C;
    --color-text-light: #6b7280;

    --border-radius: 24px;
    /* Curved lines on squares */
}

/* Base Reset & Typography */
html {
    background-color: var(--color-secondary);
    scroll-behavior: smooth;
    view-transition-name: root;
}

@view-transition {
    navigation: auto;
}

body {
    font-family: var(--font-base);
    background-color: var(--color-bg);
    color: var(--color-text-main);
    overflow-x: hidden;
    width: 100%;
    margin: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-base);
    /* Switching to Inter for all for a cleaner 'Startup' look, or keeping Oswald? Textos says "Analiza... diseño tecnologico". Inter is often used in tech startups. */
    font-weight: 700;
    letter-spacing: -0.02em;
    /* Tight tracking for modern feel */
}

/* Hero Title Utility - Responsive fluid text */
.hero-title {
    font-size: clamp(3.5rem, 5vw, 4.5rem);
    line-height: 1.15;
    font-weight: 700;
    max-width: 60rem;
    /* Increased width for more breathability */
    margin-left: auto;
    margin-right: auto;
    text-wrap: balance;
    /* Prevents orphaned words and balances lines */
}

.hero-title-small {
    font-size: clamp(3rem, 5vw, 4rem);
}

/* NO SHADOWS RULE - CRITICAL */
*,
*::before,
*::after {
    box-shadow: none !important;
}

/* Startup Utilities */
.startup-card {
    background-color: var(--color-white);
    border: 1px solid var(--color-gray);
    border-radius: var(--border-radius);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.startup-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-4px);
}

.startup-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: 9999px;
    /* Fixed: Full rounded pill shape */
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.875rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.startup-btn-lg {
    padding: 16px 40px;
    font-size: 1rem;
}

.startup-btn-sm {
    padding: 8px 24px;
    font-size: 0.875rem;
}

.startup-btn-primary {
    background-color: var(--color-primary);
    color: var(--color-white);
    border: 1px solid transparent;
    /* Ensure border exists for hover switching */
}

/* Default Hover (Fallback) */
.startup-btn-primary:hover {
    background-color: var(--color-primary-dark);
}

/* Context: Light Background -> Dark Outline Hover */
.startup-btn-primary.on-light:hover {
    background-color: transparent;
    border-color: var(--color-secondary);
    color: var(--color-secondary);
    transform: translateY(-2px);
}

/* Context: Dark Background -> White Outline Hover */
.startup-btn-primary.on-dark:hover {
    background-color: transparent;
    border-color: var(--color-white);
    color: var(--color-white);
    transform: translateY(-2px);
}

.startup-btn-outline {
    background-color: transparent;
    border-color: var(--color-secondary);
    /* Dark border for professionalism */
    color: var(--color-secondary);
    /* Dark text */
}

.startup-btn-outline:hover {
    background-color: var(--color-secondary);
    /* Dark fill on hover */
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
}

/* Professional Link Style */
.link-pro {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--color-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.link-pro span {
    transition: transform 0.3s ease;
    display: inline-block;
}

.link-pro:hover {
    color: var(--color-primary);
    transform: translateY(-2px);
}

.link-pro:hover span {
    transform: translateX(6px);
}

/* Text Selection */
::selection {
    background-color: var(--color-primary);
    color: white;
}

/* Utility Animations */
/* Scroll Reveal Base */
.scroll-reveal {
    opacity: 0;
    will-change: opacity, transform;
}

/* Animation Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Animation Utilities */
.animate-fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.animate-fade-in-right {
    animation: fadeInRight 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.animate-zoom-in {
    animation: zoomIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

/* Background Gradients/Mesh for Tech feel */
.bg-tech-mesh {
    background-color: var(--color-bg);
    background-image: radial-gradient(at 40% 20%, hsla(128, 100%, 74%, 0.1) 0px, transparent 50%),
        radial-gradient(at 80% 0%, hsla(189, 100%, 56%, 0.1) 0px, transparent 50%),
        radial-gradient(at 0% 50%, hsla(340, 100%, 76%, 0) 0px, transparent 50%);
}

/* Custom Scrollbar for internal containers */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: var(--color-gray);
    border-radius: 20px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background-color: var(--color-primary);
}

/* Footer Design - Gradient + Tech Lines */
.footer-texture {
    background-color: #17312C;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        radial-gradient(circle at 100% 0%, #305850 0%, transparent 50%),
        linear-gradient(135deg, #1A3C35 0%, #050F0D 100%);
    background-size: 100% 4px, 100% 100%, 100% 100%;
    position: relative;
    box-shadow: 0 -10px 40px rgba(23, 49, 44, 0.25);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Hero Overlay Texture */
.hero-texture {
    background-color: rgba(26, 60, 53, 0.8);
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        radial-gradient(circle at 100% 0%, rgba(48, 88, 80, 0.8) 0%, transparent 50%),
        linear-gradient(135deg, rgba(26, 60, 53, 0.7) 0%, rgba(5, 15, 13, 0.9) 100%);
    background-size: 100% 4px, 100% 100%, 100% 100%;
}

/* Light Hero Texture */
.hero-texture-light {
    position: relative;
    background-image:
        linear-gradient(rgba(23, 49, 44, 0.03) 1px, transparent 1px),
        radial-gradient(circle at 50% 0%, rgba(59, 173, 76, 0.05) 0%, transparent 70%);
    background-size: 100% 4px, 100% 100%;
}

/* Gallery Styles */
.gallery-scroll {
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    padding-bottom: 1.5rem;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.gallery-item {
    flex: 0 0 300px;
    height: 200px;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
    border: 1px solid var(--color-gray);
    position: relative;
    /* For watermark positioning */
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover {
    transform: scale(1.02);
    border-color: var(--color-primary);
}

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

/* Lightbox Styles */
#lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

#lightbox img {
    /* Styles will apply to both, but we need specificity for the main image vs icon */
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox-content {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-content>img:first-child {
    display: block;
    /* Reset scale on main image container, scale effect moves to wrapper or image */
    transform: scale(0.9);
}

#lightbox.active .lightbox-content>img:first-child {
    transform: scale(1);
}

/* Specific style for watermark inside lightbox to override generic img styles if needed */
.lightbox-content>img:last-child {
    max-width: none;
    max-height: none;
    box-shadow: none;
    border-radius: 0;
    pointer-events: none;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 3rem;
    line-height: 1;
    cursor: pointer;
    background: none;
    border: none;
    padding: 10px;
    z-index: 1001;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.lightbox-close:hover {
    opacity: 1;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.3s, transform 0.3s;
    backdrop-filter: blur(5px);
    font-size: 1.5rem;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}