:root {
    --bg: #e2e6ef;
    --text: #1a1a24;
    --text-muted: rgba(0, 0, 0, 0.55);
    --glass-bg: rgba(255, 255, 255, 0.35);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-border-hover: rgba(255, 255, 255, 0.8);

    --font: 'Outfit', sans-serif;
    --container-padding: 5%;
}

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

body,
html {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font);
    overflow-x: hidden;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

/* Background Effects */
.aurora-bg {
    position: fixed;
    inset: 0;
    z-index: -2;
    overflow: hidden;
    background: var(--bg);
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.65;
    animation: float 25s infinite ease-in-out alternate;
}

.orb-1 {
    width: 50vw;
    height: 50vw;
    background: #0066ff;
    top: -10%;
    left: -10%;
}

.orb-2 {
    width: 60vw;
    height: 60vw;
    background: #6b00ff;
    bottom: -20%;
    right: -10%;
    animation-delay: -5s;
}

.orb-3 {
    width: 40vw;
    height: 40vw;
    background: #00d4ff;
    top: 30%;
    left: 40%;
    animation-delay: -10s;
    opacity: 0.5;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(5%, 10%) scale(1.1);
    }

    100% {
        transform: translate(-5%, -5%) scale(0.9);
    }
}

.noise-overlay {
    position: fixed;
    inset: 0;
    z-index: -1;
    opacity: 0.03;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Navigation */
.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem var(--container-padding);
    max-width: 1600px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--text-muted);
    font-weight: 300;
}

.magnetic-btn {
    padding: 1rem 2rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: background 0.3s, border-color 0.3s;
    cursor: pointer;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

.magnetic-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--glass-border-hover);
}

.nav .magnetic-btn {
    background: #1a1a24;
    color: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.nav .magnetic-btn:hover {
    background: #2a2a35;
    border-color: rgba(0, 0, 0, 0.2);
}

.magnetic-btn .btn-text {
    pointer-events: none;
}

/* Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto auto auto;
    gap: 1.5rem;
    max-width: 1400px;
    margin: 2rem auto 6rem;
    padding: 0 var(--container-padding);
}

.bento-item {
    background: var(--glass-bg);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    padding: 3.5rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.5s;
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.08);
}

.bento-item:hover {
    border-color: var(--glass-border-hover);
    transform: translateY(-4px);
}

/* Hero Card */
.hero-card {
    grid-column: span 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-card h1 {
    font-size: clamp(2.5rem, 7vw, 5rem);
    font-weight: 300;
    line-height: 1.1;
    letter-spacing: -2px;
    margin-bottom: 1.5rem;
}

.hero-card h1 span {
    font-weight: 700;
}

.gradient-text {
    background: linear-gradient(135deg, #1a1a24 0%, rgba(26, 26, 36, 0.6) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-card p {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    color: var(--text-muted);
    font-weight: 300;
    max-width: 600px;
    line-height: 1.5;
}

.hero-card .hero-sectors {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 1rem;
    opacity: 0.6;
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* Text Card */
.text-card {
    grid-column: span 1;
    display: flex;
    flex-direction: column;
}

.icon-wrapper {
    font-size: 2.5rem;
    margin-bottom: auto;
    padding-bottom: 2rem;
}

.text-card h3 {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.text-card p {
    color: var(--text-muted);
    line-height: 1.6;
    font-weight: 300;
}

/* Image Card */
.image-card {
    grid-column: span 2;
    padding: 0;
    min-height: 450px;
}

.image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.image-card:hover img {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 3rem;
}

.tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.08);
    color: var(--text);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    width: fit-content;
}

.image-overlay .tag {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.image-overlay h2 {
    font-size: 2rem;
    font-weight: 400;
    color: #ffffff;
}

/* Contact Card */
.contact-card {
    grid-column: span 2;
}

.contact-card h3 {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 2.5rem;
}

.input-line {
    margin-bottom: 2rem;
}

.input-line input,
.input-line textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--text);
    font-family: var(--font);
    font-size: 1.2rem;
    font-weight: 300;
    padding: 0.5rem 0;
    transition: border-color 0.3s;
    resize: none;
}

.input-line input:focus,
.input-line textarea:focus {
    outline: none;
    border-bottom-color: rgba(0, 0, 0, 0.6);
}

.input-line input::placeholder,
.input-line textarea::placeholder {
    color: rgba(0, 0, 0, 0.3);
}

.submit-btn {
    width: 100%;
    margin-top: 1rem;
    font-size: 1.1rem;
    border-radius: 16px;
    padding: 1.2rem;
}

/* Footer Card */
.footer-card {
    grid-column: span 4;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 3.5rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

/* Base Link Styles (Applies to footer and inline links) */
a:not(.magnetic-btn) {
    color: rgba(0, 0, 0, 0.45);
    text-decoration: none;
    font-weight: 300;
    transition: color 0.3s ease;
}

a:not(.magnetic-btn):hover {
    color: var(--text);
}

.footer-card p {
    color: var(--text-muted);
    font-weight: 300;
}

/* Process Card */
.process-card {
    grid-column: span 4;
}

.process-steps {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    gap: 2rem;
    padding: 3rem 0;
}

.process-steps::before {
    content: '';
    position: absolute;
    top: 3rem;
    margin-top: 30px;
    left: 12.5%;
    right: 12.5%;
    height: 60px;
    transform: translateY(-30px);
    background-image: url("data:image/svg+xml,%3Csvg preserveAspectRatio='none' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M0,0 C16.66,0 16.66,100 33.33,100 C50,100 50,0 66.66,0 C83.33,0 83.33,100 100,100' fill='none' stroke='rgba(0,0,0,0.15)' stroke-width='2' stroke-dasharray='8 8' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
    background-size: 100% 100%;
    z-index: 1;
}

.step:nth-child(odd) {
    transform: translateY(-30px);
}

.step:nth-child(even) {
    transform: translateY(30px);
}

.step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 2;
}

.step-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--bg);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.step h4 {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.step p {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 300;
    line-height: 1.5;
}

/* Services Carousel Section */
.services-section {
    grid-column: span 4;
    padding: 4rem 0;
    overflow: hidden;
    position: relative;
}

.services-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    padding: 0 1rem;
}

.services-header h3 {
    font-size: 2rem;
    font-weight: 400;
}

.carousel-nav {
    display: flex;
    gap: 1rem;
}

.nav-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: var(--glass-border);
    border-color: var(--glass-border-hover);
    transform: scale(1.05);
}

.nav-btn:active {
    transform: scale(0.95);
}

.carousel-container {
    cursor: grab;
    overflow: hidden;
    padding: 1rem 0;
}

.carousel-container:active {
    cursor: grabbing;
}

.carousel-track {
    display: flex;
    gap: 1.5rem;
    padding: 0 1rem;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}

.service-card {
    min-width: min(350px, 85vw);
    background: var(--glass-bg);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    transition: transform 0.3s ease, border-color 0.3s ease;
    user-select: none;
}

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

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    display: block;
}

.service-card h4 {
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--text-muted);
    font-weight: 300;
    line-height: 1.6;
}

/* Fade mask for carousel edges */
.services-section::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100px;
    background: linear-gradient(to right, transparent, var(--bg));
    pointer-events: none;
    z-index: 2;
}



/* Animations */
.fade-in {
    opacity: 0;
    filter: blur(15px);
    transform: translateY(30px);
    animation: fadeInBlur 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: var(--delay);
}

@keyframes fadeInBlur {
    to {
        opacity: 1;
        filter: blur(0);
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 1100px) {
    .bento-grid {
        grid-template-columns: 1fr 1fr;
    }

    .hero-card,
    .text-card,
    .services-section,
    .process-card,
    .contact-card,
    .footer-card {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    :root {
        --container-padding: 1.5rem;
    }

    .bento-grid {
        grid-template-columns: 1fr;
        padding: 0 var(--container-padding);
        gap: 1.5rem;
    }

    .bento-item {
        padding: 2rem;
        border-radius: 24px;
    }

    .hero-card,
    .text-card,
    .image-card,
    .services-section,
    .process-card,
    .contact-card,
    .footer-card {
        grid-column: span 1;
    }

    .hero-card h1 {
        font-size: clamp(2rem, 10vw, 2.8rem);
        line-height: 1.1;
    }

    .nav {
        flex-direction: column;
        gap: 1.5rem;
        padding: 2rem var(--container-padding);
        align-items: center;
        text-align: center;
    }

    .nav .logo {
        margin-bottom: 0;
        font-size: 1.25rem;
    }

    .nav>div:last-child {
        width: 100%;
        display: flex;
        justify-content: center;
        gap: 0.75rem;
    }

    .nav .magnetic-btn:not(#theme-toggle) {
        flex: 1;
        width: auto;
        text-align: center;
        white-space: nowrap;
        padding: 0.8rem 1.5rem;
    }

    #theme-toggle {
        flex-shrink: 0;
    }

    .services-header h3 {
        font-size: 1.6rem;
    }

    .service-card {
        min-width: 85vw;
        padding: 2rem;
    }

    .services-section::after {
        display: none;
    }

    .process-card {
        padding: 2rem 1.5rem;
    }

    .process-steps {
        flex-direction: column;
        gap: 2.5rem;
        padding: 0;
    }

    .step:nth-child(odd),
    .step:nth-child(even) {
        transform: translateY(0);
    }

    .process-steps::before {
        top: 0;
        bottom: 0;
        left: 30px;
        right: auto;
        width: 0;
        height: 100%;
        background: transparent;
        border-left: 2px dashed rgba(0, 0, 0, 0.15);
        background-image: none;
        animation: none;
    }

    [data-theme="dark"] .process-steps::before {
        border-left-color: rgba(255, 255, 255, 0.2);
    }

    .step {
        flex-direction: row;
        text-align: left;
        gap: 1.5rem;
        align-items: flex-start;
    }

    .step-icon {
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .footer-card {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-card h1 {
        font-size: 2.2rem;
    }

    .bento-item {
        padding: 1.5rem;
    }

    .image-overlay {
        padding: 2rem;
    }

    .image-overlay h2 {
        font-size: 1.5rem;
    }

    .modal-content {
        padding: 1.5rem;
        gap: 1rem;
    }

    .modal-content h2 {
        font-size: 1.5rem;
    }
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    max-width: 600px;
    width: 90%;
    transform: translateY(30px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-height: 90vh;
    padding: 2.5rem;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 32px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.1);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-content h2 {
    font-size: 2rem;
    font-weight: 300;
}

.legal-text {
    overflow-y: auto;
    padding-right: 1rem;
}

.legal-text p {
    margin-bottom: 1rem;
    color: var(--text-muted);
    font-weight: 300;
    line-height: 1.6;
}

.legal-text strong {
    color: var(--text);
    font-weight: 500;
}

.features-list {
    color: var(--text-muted);
    font-weight: 300;
    line-height: 1.6;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
    list-style-type: disc;
}

.features-list li {
    margin-bottom: 0.5rem;
}

/* Custom Scrollbar */
.legal-text::-webkit-scrollbar {
    width: 6px;
}

.legal-text::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

.legal-text::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

/* =========================================
   DARK THEME OVERRIDES
   ========================================= */
[data-theme="dark"] {
    --bg: #0a0a0f;
    --text: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.65);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-border-hover: rgba(255, 255, 255, 0.25);
}

[data-theme="dark"] .nav .magnetic-btn {
    background: rgba(0, 0, 0, 0.4);
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .nav .magnetic-btn:hover {
    background: rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .bento-item {
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .gradient-text {
    background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.4) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="dark"] .tag {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

[data-theme="dark"] .input-line input,
[data-theme="dark"] .input-line textarea {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .input-line input:focus,
[data-theme="dark"] .input-line textarea:focus {
    border-bottom-color: rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] .input-line input::placeholder,
[data-theme="dark"] .input-line textarea::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] a:not(.magnetic-btn) {
    color: rgba(255, 255, 255, 0.45);
}

[data-theme="dark"] a:not(.magnetic-btn):hover {
    color: var(--text);
}

[data-theme="dark"] .process-steps::before {
    background-image: url("data:image/svg+xml,%3Csvg preserveAspectRatio='none' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M0,0 C16.66,0 16.66,100 33.33,100 C50,100 50,0 66.66,0 C83.33,0 83.33,100 100,100' fill='none' stroke='rgba(255,255,255,0.4)' stroke-width='2' stroke-dasharray='8 8' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
}

[data-theme="dark"] .step-icon {
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    color: rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] .modal-content {
    background: rgba(20, 20, 25, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .legal-text::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

[data-theme="dark"] .legal-text::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    [data-theme="dark"] .process-steps::before {
        border-left-color: rgba(255, 255, 255, 0.4);
        background-image: none;
    }
}