/* --- CSS VARIABLES & THEMING --- */
:root {
    /* Light Mode Default */
    --bg-body: #f4f6f8;
    --bg-surface: #ffffff;
    --text-main: #1a202c;
    --text-muted: #5c6f8a;
    --primary: #007acc;
    /* Professional Blue */
    --accent: #00b4d8;
    --border: #e2e8f0;
    --node-color: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] {
    /* Dark Mode (Navy/Slate/Cyan) */
    --bg-body: #0a192f;
    /* Deep Navy */
    --bg-surface: #112240;
    /* Lighter Slate */
    --text-main: #ccd6f6;
    /* Off-white */
    --text-muted: #8892b0;
    --primary: #64ffda;
    /* Electric Cyan */
    --accent: #00b4d8;
    --border: #233554;
    --node-color: rgba(100, 255, 218, 0.07);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

html,
body {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
}

/* --- UTILITIES --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--primary);
}

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

.btn-primary:hover {
    background-color: rgba(100, 255, 218, 0.1);
    transform: translateY(-2px);
}

[data-theme="light"] .btn-primary {
    background-color: var(--primary);
    color: white;
    border: 1px solid var(--primary);
}

[data-theme="light"] .btn-primary:hover {
    background-color: #005f9e;
}

/* --- BACKGROUND PATTERN (NODES) --- */
.bg-nodes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background-image: radial-gradient(var(--node-color) 1.5px, transparent 1.5px);
    background-size: 30px 30px;
    mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
}

.bloom {
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    max-width: 100%;
    height: 600px;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    opacity: 0.12;
    filter: blur(80px);
    z-index: -1;
    pointer-events: none;
}

[data-theme="dark"] .bloom {
    opacity: 0.08;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
}

.ornament {
    position: absolute;
    color: var(--primary);
    opacity: 0.15;
    z-index: -1;
    font-size: 2.5rem;
    animation: float 8s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0);
    }

    50% {
        transform: translateY(-10px) rotate(5deg);
    }
}

.orn-1 {
    top: 15%;
    left: 10%;
    animation-delay: 0s;
}

.orn-2 {
    top: 20%;
    right: 15%;
    animation-delay: 2s;
}

.orn-3 {
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

/* --- NAVIGATION --- */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(var(--bg-body), 0.9);
    /* simplified backdrop */
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--primary);
    text-transform: uppercase;
    text-decoration: none;
}

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

.nav-item {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 400;
}

.controls {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-left: 20px;
}

.icon-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 5px 10px;
    border-radius: 0.75rem;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pill-selector {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 2rem;
    padding: 2px;
    gap: 2px;
    background-color: var(--bg-surface);
    height: 38px;
    box-sizing: border-box;
}

.pill-opt {
    height: 32px;
    min-width: 36px;
    padding: 0 6px;
    border-radius: 1.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.pill-opt.active {
    color: var(--primary);
    background-color: var(--bg-body);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.pill-divider {
    color: var(--border);
    font-weight: 300;
    font-size: 0.8rem;
    opacity: 0.5;
    margin: 0 2px;
}

.pill-opt a {
    color: inherit;
    text-decoration: none;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn {
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 2rem;
    box-sizing: border-box;
}

/* --- HERO SECTION --- */
.hero {
    position: relative;
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 70px;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.1;
}

.hero h1 span {
    color: var(--primary);
}

.hero p {
    font-size: 1.3rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 40px;
}

/* --- SERVICES GRID --- */
.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.section-title p {
    margin-top: 20px;
    color: var(--text-muted);
    font-size: 1.2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.section-title .bar {
    width: 60px;
    height: 4px;
    background-color: var(--primary);
    margin: 0 auto;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.card {
    background-color: var(--bg-surface);
    padding: 30px;
    border-radius: 8px;
    border: 1px solid var(--border);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

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

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

.card h3 {
    margin-bottom: 15px;
    font-size: 1.25rem;
}

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

.grid-four {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* --- WHY SEFIROT SECTION --- */
.why-card {
    text-align: center;
    padding: 20px;
}

.why-icon-box {
    width: 70px;
    height: 70px;
    background-color: rgba(100, 255, 218, 0.15);
    /* light tint */
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--primary);
    font-size: 1.8rem;
}

[data-theme="light"] .why-icon-box {
    background-color: rgba(0, 122, 204, 0.08);
}

.why-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.why-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* --- DIFFERENTIATOR --- */
/* --- LOGO MARQUEE --- */
.references {
    text-align: center;
    padding: 100px 0;
    background-color: var(--bg-body);
    overflow: hidden;
}

.marquee {
    margin-top: 50px;
    width: 100%;
    position: relative;
    padding: 20px 0;
    /* Edge blur using mask-image for a cleaner effect */
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-content {
    display: flex;
    width: max-content;
    animation: scroll 60s linear infinite;
    align-items: center;
}

.marquee-item {
    padding: 0 40px;
    /* Instead of gap, we use padding to make calc predictable */
    flex-shrink: 0;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.marquee-item img {
    height: 100%;
    max-width: 180px;
    object-fit: contain;
    filter: grayscale(1) opacity(0.6);
    transition: all 0.3s ease;
}

[data-theme="dark"] .marquee-item img {
    filter: grayscale(1) invert(1) brightness(1.5) opacity(0.7);
}

.marquee-item:hover img {
    filter: grayscale(0) opacity(1) !important;
}

@keyframes scroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

/* Gradient Mask for fading edges - redundant but keeps layout stable */
.marquee::before,
.marquee::after {
    display: none;
}


/* --- CONTACT / FOOTER --- */
footer {
    background-color: var(--bg-surface);
    padding: 60px 0 20px;
    border-top: 1px solid var(--border);
}

.footer-content {
    margin-bottom: 60px;
}

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

.footer-col h4 {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 25px;
    color: var(--text-main);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 30px;
    border-top: 1px solid var(--border);
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-link {
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: color 0.2s;
}

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

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    background-color: var(--bg-body);
    border: 1px solid var(--border);
    color: var(--text-main);
    border-radius: 0.75rem;
}

.copyright {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 40px;
}

.footer-brand {
    margin-bottom: 20px;
}

.contact-new {
    background-color: var(--bg-surface);
    padding: 100px 0;
    border-top: 1px solid var(--border);
}

.form-container-max {
    max-width: 800px;
    margin: 0 auto;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.input-group label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
    text-align: left;
}

.form-row-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px 20px;
    margin-bottom: 20px;
}

.form-row-grid .input-group {
    margin-bottom: 0;
}

.contact-new input,
.contact-new textarea {
    width: 100%;
    padding: 14px 18px;
    background-color: var(--bg-body);
    border: 1px solid var(--border);
    color: var(--text-main);
    border-radius: 0.75rem;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.contact-new input:focus,
.contact-new textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-flex {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

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

    .form-row-grid {
        grid-template-columns: 1fr;
    }

    .logo {
        font-size: 1.25rem;
    }

    .nav-links {
        display: none;
    }

    .nav-btn {
        display: none;
    }

    .controls {
        margin-left: 0;
        gap: 6px;
    }

    nav {
        gap: 8px;
    }

    .pill-selector {
        height: 32px;
        padding: 1px;
    }

    .pill-opt {
        height: 28px;
        min-width: 28px;
        padding: 0 4px;
        font-size: 0.7rem;
    }

    .pill-divider {
        margin: 0;
    }

    .container {
        padding: 0 15px;
    }

    /* Simplified for demo */
    .footer-content {
        text-align: left;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}