/* 
   TANGENTE ENTERPRISE DESIGN SYSTEM
   Theme: "Dark Intelligence"
   Author: Antigravity
*/

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600&display=swap');

:root {
    /* Light Theme (Default) */
    --bg-deep: #f4f6f8;
    --bg-surface: #ffffff;
    --bg-surface-elevated: #ffffff;

    --accent-primary: #00DB62;
    /* Electric Tangente Green */
    --accent-secondary: #2962FF;
    /* Tech Blue */

    --text-primary: #1a1a1a;
    --text-secondary: #555555;
    --text-tertiary: #777777;

    --border-subtle: rgba(0, 0, 0, 0.08);
    --border-glow: rgba(0, 219, 98, 0.4);

    /* Gradients */
    --gradient-aurora: linear-gradient(135deg, rgba(0, 219, 98, 0.1) 0%, rgba(41, 98, 255, 0.05) 100%);
    --gradient-text: linear-gradient(90deg, #111111 0%, #00a84b 100%);

    /* Spacing & Layout */
    --container-xl: 1400px;
    --container-lg: 1200px;
    --header-height: 80px;
    --section-spacing: 160px;

    /* Effects */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-bg-scrolled: rgba(255, 255, 255, 0.98);
    --glass-blur: blur(20px);
    --shadow-glow: 0 10px 40px rgba(0, 0, 0, 0.05);

    /* Typography */
    --font-display: 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Inter', sans-serif;
}

[data-theme="dark"] {
    /* Dark Theme (Original) */
    --bg-deep: #030303;
    --bg-surface: #0a0a0a;
    --bg-surface-elevated: #111111;

    --text-primary: #FFFFFF;
    --text-secondary: #888888;
    --text-tertiary: #444444;

    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(0, 219, 98, 0.3);

    --gradient-aurora: linear-gradient(135deg, rgba(0, 219, 98, 0.15) 0%, rgba(41, 98, 255, 0.1) 100%);
    --gradient-text: linear-gradient(90deg, #FFFFFF 0%, #00DB62 100%);

    --glass-bg: rgba(10, 10, 10, 0.7);
    --glass-bg-scrolled: rgba(3, 3, 3, 0.95);
    --shadow-glow: 0 0 50px rgba(0, 219, 98, 0.1);
}

/* Reset */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: var(--bg-deep);
}

body {
    background-color: var(--bg-deep);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- Typography --- */
h1,
h2,
h3,
h4,
h5 {
    font-family: var(--font-display);
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.hero-title {
    font-size: clamp(3rem, 5vw, 5rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: clamp(2rem, 3vw, 3rem);
    margin-bottom: 1rem;
}

.uptitle {
    display: inline-block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent-primary);
    margin-bottom: 1rem;
    font-weight: 600;
    border: 1px solid rgba(0, 219, 98, 0.2);
    padding: 0.4rem 1rem;
    border-radius: 100px;
    background: rgba(0, 219, 98, 0.05);
}

.lead {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 650px;
    margin-bottom: 2rem;
    font-weight: 400;
}

p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

/* --- Layout --- */
.container {
    width: 100%;
    max-width: var(--container-lg);
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: var(--section-spacing) 0;
    position: relative;
}

/* --- Components --- */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 2rem;
    border-radius: 6px;
    font-weight: 500;
    font-family: var(--font-display);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    font-size: 1rem;
    cursor: pointer;
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-deep);
    border: 1px solid var(--text-primary);
}

.btn-primary:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    box-shadow: 0 0 30px rgba(0, 219, 98, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
}

.btn-outline:hover {
    border-color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

/* Fix for Automation Levels Toggle Contrast */
.package-btn.active {
    background: var(--accent-primary) !important;
    color: #000000 !important;
    border-color: var(--accent-primary) !important;
    box-shadow: 0 0 15px rgba(0, 219, 98, 0.3);
}

/* Cards */
.feature-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    padding: 2.5rem;
    border-radius: 16px;
    transition: all 0.4s ease;
    height: 100%;
}

.feature-card:hover {
    border-color: var(--border-glow);
    background: var(--bg-surface-elevated);
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
}

/* Icons */
.icon-box {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 2rem;
    font-size: 1.25rem;
    color: var(--text-primary);
    transition: 0.3s;
}

.feature-card:hover .icon-box {
    background: var(--accent-primary);
    color: var(--bg-deep);
}


/* --- Sections --- */

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    height: var(--header-height);
    transition: background 0.3s, box-shadow 0.3s;
}

header.scrolled {
    background: var(--glass-bg-scrolled);
    box-shadow: var(--shadow-glow);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo img {
    height: 32px;
}

.nav-links {
    display: flex;
    gap: 3rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: 0.3s;
    font-family: var(--font-display);
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a.nav-highlight {
    color: var(--accent-primary) !important;
    border: 1px solid var(--accent-primary);
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    background: rgba(0, 219, 98, 0.05);
    transition: all 0.3s ease;
}

/* ── Nav Dropdown ──────────────────────────────────── */
.nav-dropdown {
    position: relative;
}
.nav-dropdown > a {
    cursor: pointer;
}
.nav-dropdown > a::after {
    content: ' ▾';
    font-size: 0.7em;
    opacity: 0.5;
}
.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding-top: 12px;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
    transform: translateX(-50%) translateY(8px);
}
.nav-dropdown-menu-inner {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    padding: 1rem 0;
    min-width: 260px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.15);
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
    display: block;
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}
.nav-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.55rem 1.4rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    font-weight: 500;
}
.nav-dropdown-menu a:hover {
    background: rgba(0, 219, 98, 0.08);
    color: var(--text-primary);
}
.nav-dropdown-menu a i {
    width: 18px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--accent-primary);
    flex-shrink: 0;
}
.nav-dropdown-divider {
    height: 1px;
    background: var(--border-subtle);
    margin: 0.5rem 1.2rem;
}

/* Hide hamburger on desktop */
.hamburger {
    display: none;
}



/* Hero */
.hero {
    min-height: 100vh;
    /* Full viewport height */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: var(--header-height);
    background: radial-gradient(circle at 50% 50%, rgba(0, 219, 98, 0.08) 0%, transparent 60%);
    overflow: hidden;
}

.hero-bg-grid {
    position: absolute;
    width: 200%;
    height: 200%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.4;
    transform: perspective(500px) rotateX(60deg) translateY(-100px) translateZ(-200px);
    animation: gridMove 20s linear infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes gridMove {
    0% {
        transform: perspective(500px) rotateX(60deg) translateY(0) translateZ(-200px);
    }

    100% {
        transform: perspective(500px) rotateX(60deg) translateY(60px) translateZ(-200px);
    }
}

/* Spotlight Products (Zig Zag) */
.spotlight-grid {
    display: flex;
    flex-direction: column;
    gap: 150px;
}

.spotlight-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.spotlight-item.alt {
    direction: rtl;
    /* Flip visual order */
}

.spotlight-item.alt .spotlight-text {
    direction: ltr;
    /* Reset text direction */
}

.spotlight-img-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    background: #111;
}

.spotlight-img-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(3, 3, 3, 0.2) 100%);
}

.spotlight-img {
    width: 100%;
    display: block;
    opacity: 0.9;
    transition: 0.5s;
}

.spotlight-img-wrapper:hover .spotlight-img {
    opacity: 1;
    transform: scale(1.03);
}

.feature-list {
    margin-top: 2rem;
    list-style: none;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.feature-list i {
    color: var(--accent-primary);
}

/* Bento Grid (Ecosystem) */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, minmax(250px, auto));
    gap: 1.5rem;
}

.bento-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: 0.4s;
}

.bento-card:hover {
    border-color: var(--border-glow);
    background: var(--bg-surface-elevated);
}

.bento-card.large {
    grid-column: span 2;
}

.bento-card h3 {
    margin-top: auto;
    /* Push to bottom */
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.bento-icon {
    font-size: 2.5rem;
    color: var(--accent-primary);
    margin-bottom: 2rem;
    opacity: 0.8;
}

/* Philosophy */
.philosophy {
    background: linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-surface) 100%);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--border-subtle);
    /* Border trick */
    border: 1px solid var(--border-subtle);
}

.value-item {
    background: var(--bg-deep);
    padding: 3rem 1rem;
    text-align: center;
    transition: 0.3s;
}

.value-item:hover {
    background: var(--bg-surface);
}

.value-item i {
    font-size: 1.5rem;
    color: var(--accent-secondary);
    margin-bottom: 1rem;
}

/* Footer */
footer {
    padding: 5rem 0;
    border-top: 1px solid var(--border-subtle);
}

.footer-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4rem;
}

.social-links a {
    color: var(--text-secondary);
    margin-left: 1rem;
    font-size: 1.2rem;
    transition: 0.3s;
}

.social-links a:hover {
    color: var(--text-primary);
}

/* Mobile */
@media (max-width: 900px) {

    .spotlight-item,
    .spotlight-item.alt {
        grid-template-columns: 1fr;
        gap: 2rem;
        direction: ltr;
        /* Reset direction for mobile */
    }

    .bento-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .bento-card.large {
        grid-column: span 1;
    }

    .values-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-top {
        flex-direction: column;
        gap: 2rem;
    }

    /* Hide desktop navigation */
    .nav-wrapper {
        display: none;
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        width: 100%;
        background: var(--bg-surface);
        padding: 2rem;
        flex-direction: column;
        border-bottom: 1px solid var(--border-subtle);
        z-index: 999;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }

    .nav-wrapper.active {
        display: flex;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
        margin-bottom: 1.5rem;
    }

    .nav-links a.nav-highlight {
        margin-left: 0;
        margin-top: 0;
        display: inline-block;
        width: fit-content;
        align-self: center;
    }

    .nav-dropdown-menu {
        position: static;
        transform: none;
        box-shadow: none;
        border: none;
        border-radius: 0;
        padding: 0.5rem 0 0.5rem 1rem;
        min-width: auto;
        background: transparent;
        display: none;
        opacity: 1;
        pointer-events: auto;
    }
    .nav-dropdown.open .nav-dropdown-menu {
        display: block;
        transform: none;
    }
    .nav-dropdown:hover .nav-dropdown-menu {
        display: none;
    }
    .nav-dropdown.open .nav-dropdown-menu {
        display: block;
    }
    .nav-dropdown-menu a {
        padding: 0.4rem 0.8rem;
        font-size: 0.82rem;
    }

    /* Show hamburger button on mobile */
    .hamburger {
        display: block;
        color: var(--text-primary);
        background: none;
        border: none;
        font-size: 1.5rem;
        cursor: pointer;
        padding: 0.5rem;
        transition: color 0.3s;
    }

    .hamburger:hover {
        color: var(--accent-primary);
    }
}

/* FAILSAFE: Force automation button contrast */
button.package-btn.active.btn-primary,
.package-btn.active {
    color: #000000 !important;
    background-color: #00DB62 !important;
}