/* 
   Project: sphexa-spark.life
   Theme: Dark Neon (Deep Navy / Violet / Emerald)
   Font: Space Grotesk
*/

:root {
    /* Color Palette */
    --bg-color: #0B1026;
    /* Deep Navy */
    --surface-color: #151B33;
    /* Slightly lighter navy for cards */
    --text-color: #E2E8F0;
    /* Slate 200 */
    --text-muted: #94A3B8;
    /* Slate 400 */

    --primary-color: #7C3AED;
    /* Violet 600 */
    --primary-hover: #6D28D9;
    /* Violet 700 */
    --primary-glow: rgba(124, 58, 237, 0.4);

    --secondary-color: #10B981;
    /* Emerald 500 */
    --accent-color: #F43F5E;
    /* Rose 500 */

    /* UI Variables */
    --radius-sm: 0.5rem;
    /* 8px */
    --radius-md: 1rem;
    /* 16px */
    --radius-lg: 1.5rem;
    /* 24px */
    --radius-2xl: 2rem;
    /* 32px - Specific requirement */

    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 15px var(--primary-glow);

    --font-family: 'Space Grotesk', sans-serif;

    /* Layout */
    --header-height: 80px;
    --container-width: 1200px;
    --transition-speed: 0.3s;
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    background: none;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-speed);
}

ul {
    list-style: none;
}

/* Typography */
h1,
h2,
h3,
h4 {
    color: #fff;
    line-height: 1.2;
    margin-bottom: 1rem;
    font-weight: 700;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

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

.text-xs {
    font-size: 0.8rem;
}

/* Utilities */
.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1rem;
}

.hidden {
    display: none !important;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all var(--transition-speed);
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-outline {
    border: 2px solid var(--primary-color);
    color: var(--text-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;
}

.text-link {
    color: var(--secondary-color);
    font-weight: 500;
    border-bottom: 1px dashed var(--secondary-color);
}

.text-link:hover {
    color: #fff;
    border-bottom-style: solid;
}

/* Header & Nav */
.site-header {
    height: var(--header-height);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(11, 16, 38, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
}

.logo img {
    border-radius: 50%;
}

.nav-list {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-weight: 500;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: width var(--transition-speed);
}

.nav-link:hover::after {
    width: 100%;
}

/* Burger Menu */
.burger-menu {
    display: none;
    flex-direction: column;
    gap: 6px;
    padding: 5px;
    z-index: 101;
}

.burger-line {
    width: 25px;
    height: 2px;
    background-color: #fff;
    transition: all 0.3s;
}

.burger-menu[aria-expanded="true"] .burger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.burger-menu[aria-expanded="true"] .burger-line:nth-child(2) {
    opacity: 0;
}

.burger-menu[aria-expanded="true"] .burger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* Hero Section */
.hero-section {
    padding-top: calc(var(--header-height) + 4rem);
    padding-bottom: 4rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 50%;
    height: 60%;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    filter: blur(60px);
    z-index: -1;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.badge {
    display: inline-block;
    background-color: rgba(244, 63, 94, 0.1);
    color: var(--accent-color);
    padding: 0.5rem 1rem;
    border-radius: 99px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(244, 63, 94, 0.2);
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    max-width: 90%;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

.hero-visual img {
    border-radius: var(--radius-2xl);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* About Section */
.about-section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 4rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: var(--radius-2xl);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform var(--transition-speed);
}

.feature-card:hover {
    transform: translateY(-10px);
    background: rgba(21, 27, 51, 0.8);
    box-shadow: var(--shadow-glow);
}

.feature-icon {
    width: 3rem;
    height: 3rem;
    margin-bottom: 1.5rem;
}

.feature-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Services Masonry */
.services-section {
    padding: 5rem 0;
    position: relative;
}

.services-masonry {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    grid-auto-rows: minmax(200px, auto);
}

.service-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
    border-radius: var(--radius-2xl);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all var(--transition-speed);
}

.service-card:hover {
    border-color: var(--primary-color);
}

.service-card.large {
    grid-column: span 2;
}

.service-card.highlight {
    background: linear-gradient(135deg, var(--primary-color) 0%, #4c1d95 100%);
}

.service-card.wide {
    grid-column: span 3;
    align-items: center;
    text-align: center;
}

.service-content h3 {
    margin-bottom: 0.5rem;
}

/* Testimonials */
.testimonials-section {
    padding: 5rem 0;
}

.testimonials-slider {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: var(--radius-md);
    /* Intentionally different radius for variation as requested */
    border-top: 4px solid var(--secondary-color);
    position: relative;
}

.quote {
    font-style: italic;
    margin-bottom: 1.5rem;
}

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


.author img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background-color: var(--text-muted);
}


/* Contact Section */
.contact-section {
    padding: 5rem 0;
    background: radial-gradient(circle at center, rgba(124, 58, 237, 0.1) 0%, transparent 70%);
}

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

.info-item {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
}

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

.info-item a {
    font-size: 1.25rem;
    font-weight: 600;
}

.contact-form-wrapper {
    background: var(--surface-color);
    padding: 3rem;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-soft);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: #fff;
    font-family: inherit;
    transition: border-color 0.2s;
}

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

.error-message {
    color: var(--accent-color);
    font-size: 0.85rem;
    margin-top: 0.25rem;
    display: block;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.checkbox-group input {
    width: auto;
    margin-top: 4px;
}

/* Footer */
.site-footer {
    background: black;
    padding: 4rem 0 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-brand p {
    margin-top: 1rem;
    font-size: 0.9rem;
}

.footer-nav h4,
.footer-legal h4,
.footer-contacts h4 {
    color: #fff;
    margin-bottom: 1.5rem;
}

.footer-nav ul,
.footer-legal ul {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-nav ul li a,
.footer-legal ul li a {
    color: var(--text-muted);
    transition: all var(--transition-speed) ease;
    display: inline-block;
}

.footer-nav ul li a:hover,
.footer-legal ul li a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: var(--radius-md);
    max-width: 500px;
    width: 90%;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    color: var(--text-muted);
}

/* Cookie Popup */
.cookie-popup {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    max-width: 400px;
    background: #fff;
    color: #000;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 999;
    animation: slideUp 0.5s ease-out;
}

/* Loader */
.loader {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-left: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }

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

/* Responsive */
@media (max-width: 1024px) {
    .burger-menu {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background: var(--bg-color);
        padding: 2rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        transform: translateY(-150%);
        transition: transform 0.3s ease-in-out;
        height: calc(100vh - var(--header-height));
        overflow-y: auto;
    }

    .main-nav.active {
        transform: translateY(0);
    }

    .nav-list {
        flex-direction: column;
        align-items: center;
        gap: 2.5rem;
    }

    .nav-link {
        font-size: 1.5rem;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-actions {
        justify-content: center;
        flex-wrap: wrap;
    }

    .services-masonry {
        grid-template-columns: repeat(2, 1fr);
    }

    .service-card.large,
    .service-card.wide {
        grid-column: span 2;
    }

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

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

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

    .service-card.large,
    .service-card.wide {
        grid-column: span 1;
    }

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

    h1 {
        font-size: clamp(2rem, 5vw, 2.5rem);
    }

    .hero-subtitle {
        font-size: 1.1rem;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        text-align: center;
    }

    .footer-nav ul,
    .footer-legal ul {
        align-items: center;
    }

    .cookie-popup {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
        width: auto;
        max-width: none;
    }

    .section-header h2 {
        font-size: 1.75rem;
    }
}