/* SVG Base Styles for Phosphor Icons */
svg.ph,
svg.ph-fill,
svg.ph-light {
    display: inline-block;
    vertical-align: middle;
    line-height: 1;
}

:root {
    /* Premium Dark Theme Color Palette */
    --bg-main: #020617;
    --bg-secondary: #0f172a;
    --bg-tertiary: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;

    --primary: #00e5ff;
    /* Cyan */
    --primary-glow: rgba(0, 229, 255, 0.4);
    --secondary: #3b82f6;
    /* Blue */
    --accent: #8b5cf6;
    /* Purple */

    --border-color: rgba(255, 255, 255, 0.08);
    --card-bg: rgba(15, 23, 42, 0.6);
    --glass-bg: rgba(2, 6, 23, 0.7);

    --icon-blue: #60a5fa;
    --icon-purple: #a78bfa;
    --input-bg: rgba(255, 255, 255, 0.03);

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
    --bg-main: #f8fafc;
    --bg-secondary: #f1f5f9;
    --bg-tertiary: #e2e8f0;
    --text-main: #0f172a;
    --text-muted: #475569;

    --primary: #0284c7;
    /* Darker Cyan/Blue for light mode */
    --primary-glow: rgba(2, 132, 199, 0.2);
    --secondary: #2563eb;
    /* Blue */
    --accent: #7c3aed;
    /* Purple */

    --border-color: rgba(0, 0, 0, 0.1);
    --card-bg: rgba(255, 255, 255, 0.8);
    --glass-bg: rgba(255, 255, 255, 0.85);

    --icon-blue: #2563eb;
    --icon-purple: #7c3aed;
    --input-bg: rgba(0, 0, 0, 0.03);
}

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

/* Skip Navigation Link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 9999;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: #020617;
    font-weight: 700;
    border-radius: 0 0 8px 8px;
    text-decoration: none;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0;
}

/* Focus Visible Outlines for Keyboard Users */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible),
input:focus:not(:focus-visible),
textarea:focus:not(:focus-visible) {
    outline: none;
}

/* Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .fade-up {
        opacity: 1;
        transform: none;
    }
}

html {
    scroll-behavior: smooth;
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-main);
}

body {
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    line-height: 1.6;
}

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

.text-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 1rem;
}

.w-full {
    width: 100%;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.25rem 0;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 1rem 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    font-family: 'Roboto', sans-serif;
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: 0.05em;
}

.brand svg {
    color: var(--primary);
    font-size: 1.8rem;
}

.brand .brand-logo {
    height: 1.8rem;
    width: auto;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.nav-links li {
    display: flex;
    align-items: center;
}

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

.nav-links a:not(.btn):hover {
    color: var(--text-main);
}

/* Theme Toggle Button */
.theme-toggle {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition);
}

.theme-toggle:hover {
    background: rgba(148, 163, 184, 0.1);
    transform: rotate(15deg);
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.1rem;
    font-size: 0.95rem;
    font-weight: 500;
}

.lang-link {
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.5rem 0.25rem;
    border-radius: 4px;
    transition: var(--transition);
}

.lang-link:hover {
    color: var(--text-main);
}

.lang-link:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.lang-link--current {
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: default;
}

.lang-sep {
    color: var(--text-muted);
    opacity: 0.6;
    user-select: none;
}

.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 1001;
    transition: var(--transition);
    padding: 0.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.8rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-family: inherit;
    font-size: 1rem;
}

.btn-sm {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 229, 255, 0.2);
}

.btn-primary:hover {
    box-shadow: 0 6px 25px rgba(0, 229, 255, 0.4);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    position: relative;
    padding: 12rem 0 8rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    max-width: 100vw;
    background-image: url('it-palm.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.1;
    z-index: -1;
    pointer-events: none;
}

[data-theme="light"] .hero::after {
    opacity: 0.04;
}

.hero-bg-glow {
    position: absolute;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, rgba(0, 229, 255, 0.05) 40%, transparent 70%);
    filter: blur(60px);
    z-index: -1;
    pointer-events: none;
}

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

.badge {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    background: rgba(0, 229, 255, 0.1);
    border: 1px solid rgba(0, 229, 255, 0.2);
    border-radius: 100px;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 2rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.hero h1 {
    font-size: 4.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

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

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

/* Sections */
.section {
    padding: 8rem 0;
    position: relative;
}

.section-darker {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.section-header {
    margin-bottom: 4rem;
    max-width: 800px;
}

.section-header.text-center {
    margin: 0 auto 4rem;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

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

.section-desc.centered {
    margin: 0 auto;
    text-align: center;
}

/* Objectives Grid (Proven Reliability) */
.objectives-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary), var(--primary));
    opacity: 0;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(0, 229, 255, 0.2);
}

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

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.bg-blue {
    background: rgba(59, 130, 246, 0.15);
    color: var(--icon-blue);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.bg-cyan {
    background: rgba(0, 229, 255, 0.15);
    color: var(--primary);
    border: 1px solid rgba(0, 229, 255, 0.3);
}

.bg-purple {
    background: rgba(139, 92, 246, 0.15);
    color: var(--icon-purple);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

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

/* Services Layout */
/* We have 4 services, we'll put them in a 2x2 grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.service-card {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    transition: var(--transition);
}

.service-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.service-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.service-header svg {
    font-size: 2rem;
    color: var(--text-main);
}

.service-header.cyan svg {
    color: var(--primary);
}

.service-header.purple svg {
    color: var(--accent);
}

.service-header.blue svg {
    color: var(--secondary);
}

.service-header h3 {
    font-size: 1.4rem;
}

.service-sub {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1rem;
}

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

.service-list li {
    position: relative;
    padding-left: 2rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.service-list svg {
    position: absolute;
    left: 0;
    top: 0.15rem;
    color: var(--primary);
    font-size: 1.25rem;
}

.service-list strong {
    color: var(--text-main);
}

/* Partners Section */
.partners-section {
    position: relative;
}

.partners-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.partner-badge {
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    padding: 1.5rem 2.5rem;
    border-radius: 12px;
    transition: var(--transition);
    width: 100%;
}

@media (max-width: 768px) {
    .partners-row {
        grid-template-columns: 1fr;
    }
}

.partner-badge:hover {
    background: rgba(148, 163, 184, 0.1);
    border-color: var(--border-color);
    transform: translateY(-3px);
}

.partner-badge svg {
    font-size: 3rem;
}

.partner-info {
    display: flex;
    flex-direction: column;
}

.partner-info strong {
    font-size: 1.1rem;
}

.partner-info span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Contact Section */
.contact-section {
    position: relative;
}

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

.contact-details {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

.contact-item svg {
    width: 50px;
    height: 50px;
    background: var(--input-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
}

.contact-item span {
    display: block;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.contact-item strong {
    font-size: 1.1rem;
}

.contact-form {
    background: var(--bg-main);
    padding: 3rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.8rem 1rem;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    background: rgba(0, 229, 255, 0.02);
}

.form-group input:focus-visible,
.form-group textarea:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.cf-turnstile {
    margin-bottom: 1.5rem;
}

#form-message {
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1.5rem;
    text-align: center;
    font-weight: 500;
}

#form-message.success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

#form-message.error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Footer */
.footer {
    padding: 1rem 0;
    border-top: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}


.footer p {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Animations & Utilities */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.15s;
}

.delay-2 {
    transition-delay: 0.3s;
}

.delay-3 {
    transition-delay: 0.45s;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 3.5rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .contact-box {
        grid-template-columns: 1fr;
    }

    .contact-form {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        height: 100vh;
        background: var(--glass-bg);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        flex-direction: column;
        justify-content: start;
        align-items: center;
        padding: 4rem 2rem;
        transform: translateX(100%);
        visibility: hidden;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s;
        z-index: 1000;
        gap: 1rem;
    }

    .nav-links.active {
        transform: translateX(0);
        visibility: visible;
    }

    .nav-links a:not(.btn) {
        font-size: 1.5rem;
    }

    .lang-link--current {
        font-size: 1.5rem;
        margin: 1rem 0;
    }

    .lang-switcher {
        margin: 1rem 0 0 0;
        font-size: 1.1rem;
    }

    .theme-toggle {
        margin: 1rem 0;
        font-size: 1.5rem;
    }

    .btn.nav-link {
        width: 100%;
        padding: 1rem;
        font-size: 1.1rem;
        margin-top: 1rem;
    }

    body.menu-open {
        overflow: hidden;
    }

    .hero h1 {
        font-size: 2.4rem;
    }

    .hero {
        padding-top: 8rem;
        padding-bottom: 4rem;
    }

    .section {
        padding: 4rem 0;
    }

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

    .section-title {
        font-size: 1.8rem;
    }

    .card {
        padding: 1.5rem;
    }

    .service-card {
        padding: 1.5rem;
    }

    .partner-badge svg {
        font-size: 2.5rem;
    }
}

/* CRITICAL SVG FIXES */

.service-header svg.ph {
    font-size: 2rem !important;
    width: 2rem !important;
    height: 2rem !important;
}

.service-header.cyan svg.ph {
    color: var(--primary) !important;
}

.service-header.purple svg.ph {
    color: var(--accent) !important;
}

.service-header.blue svg.ph {
    color: var(--secondary) !important;
}

.service-list svg {
    position: absolute !important;
    left: 0 !important;
    top: 0.15rem !important;
    color: var(--primary) !important;
    font-size: 1.25rem !important;
    width: 1.25rem !important;
    height: 1.25rem !important;
}

.card-icon svg {
    font-size: 1.8rem !important;
    width: 1.8rem !important;
    height: 1.8rem !important;
    color: inherit !important;
}

.contact-item svg {
    font-size: 1.5rem !important;
    width: 1.5rem !important;
    height: 1.5rem !important;
}

.theme-toggle svg {
    font-size: 1.25rem !important;
    width: 1.25rem !important;
    height: 1.25rem !important;
    color: var(--text-main) !important;
}

.bg-cyan svg {
    color: var(--primary) !important;
    fill: var(--primary) !important;
}

.bg-blue svg {
    color: var(--icon-blue) !important;
    fill: var(--icon-blue) !important;
}

.bg-purple svg {
    color: var(--icon-purple) !important;
    fill: var(--icon-purple) !important;
}