:root {
    --bg-dark: #050505;
    --bg-accent: #1a0b2e;
    --text-color: #e0e0e0;
    --accent-color: #8a2be2;
    --font-main: 'Space Grotesk', sans-serif;
}

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

body {
    background-color: var(--bg-dark);
    background: radial-gradient(circle at center, var(--bg-accent) 0%, var(--bg-dark) 80%);
    color: var(--text-color);
    font-family: var(--font-main);
    overflow-x: hidden; /* Prevent horizontal scroll */
    width: 100%;
    min-height: 100vh;
}

body.is-loading {
    overflow: hidden;
    height: 100vh;
}

/* --- OVERLAYS --- */
.noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 998;
    opacity: 0.05;
    background: url('https://grainy-gradients.vercel.app/noise.svg');
}

.vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
    background: radial-gradient(circle at center, transparent 0%, rgba(0,0,0,0.4) 100%);
    opacity: 0.8;
}

/* --- 3D CANVAS --- */
#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0; /* Behind content */
}

/* --- LOADING SECTION --- */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent; /* Let 3D show through */
}

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

#loader-text {
    font-size: 1.5rem;
    letter-spacing: 0.5em;
    font-weight: 300;
    color: #fff;
    text-transform: uppercase;
}

/* --- HERO SECTION --- */
#hero {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 10%;
    z-index: 10;
    opacity: 0; /* Hidden initially */
    visibility: hidden;
}

.hero-content {
    max-width: 600px;
}

.hero-title {
    font-size: clamp(3rem, 5vw, 6rem);
    line-height: 1.1;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #fff, #aaa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    color: #aaa;
    margin-bottom: 3rem;
    line-height: 1.6;
    max-width: 450px;
}

.cta-group {
    display: flex;
    gap: 1.5rem;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border: 1px solid rgba(255,255,255,0.2);
    background: transparent;
    color: #fff;
    font-family: var(--font-main);
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    text-decoration: none;
}

.cta-btn.primary {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.4);
}

.cta-btn:hover {
    background: #fff;
    color: #000;
}

/* --- STORYTELLING SECTION --- */
#who-we-are {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    /* background: rgba(0,0,0,0.2); Debugging */
}

.story-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.story-scene {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    width: 100%;
    padding: 0 10%;
    transform: translateY(20px);
}

.story-scene .section-inner {
    width: 100%;
    max-width: 1100px;
}

/* --- DIGITAL SYSTEM SECTION (REWORKED) --- */
#digital-system {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.system-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.system-text {
    position: absolute;
    bottom: 10%; /* Minimalist placement at bottom */
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    text-align: center;
    opacity: 0;
    padding: 0 20px;
}

.system-text h2 {
    font-size: clamp(1.5rem, 2.5vw, 3rem); /* Smaller, more elegant */
    font-weight: 500;
    letter-spacing: 0.05em;
    background: linear-gradient(to bottom, #fff, #888);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 50;
    padding: 18px 6%;
}

body.is-loading .site-header {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 14px 18px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(0,0,0,0.25);
    backdrop-filter: blur(10px);
    border-radius: 16px;
}

.brand {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.nav-links a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    padding: 8px 10px;
    border-radius: 10px;
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-links a:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.nav-cta {
    color: #000;
    background: #fff;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.85rem;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.3);
}

section {
    scroll-margin-top: 110px;
}

.content-section {
    position: relative;
    z-index: 10;
    padding: 110px 10% 110px;
}

.section-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.section-kicker {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.65);
    margin-bottom: 12px;
}

.section-title {
    font-size: clamp(1.8rem, 3vw, 3rem);
    margin-bottom: 16px;
    font-weight: 700;
}

.section-desc {
    color: rgba(255,255,255,0.7);
    line-height: 1.7;
    max-width: 60ch;
    margin-bottom: 28px;
}

.logo-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.logo-pill {
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
    border-radius: 14px;
    padding: 14px 16px;
    text-align: center;
    color: rgba(255,255,255,0.85);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-top: 24px;
}

.card {
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(0,0,0,0.22);
    border-radius: 16px;
    padding: 22px;
}

.card h3 {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.card p {
    color: rgba(255,255,255,0.7);
    line-height: 1.6;
}

.feature-grid,
.step-grid,
.portfolio-grid,
.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-top: 24px;
}

.feature,
.step,
.portfolio-item,
.quote-card {
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.03);
    border-radius: 16px;
    padding: 22px;
}

.feature h3,
.step h3,
.portfolio-item h3 {
    margin-bottom: 10px;
    font-size: 1.05rem;
}

.feature p,
.step p,
.portfolio-item p {
    color: rgba(255,255,255,0.7);
    line-height: 1.6;
}

.step-number {
    display: inline-block;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: rgba(255,255,255,0.7);
    margin-bottom: 10px;
}

.pricing-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.price-note {
    margin: 10px 0 18px;
    color: rgba(255,255,255,0.7);
    line-height: 1.6;
}

.mini-list {
    list-style: none;
    display: grid;
    gap: 10px;
    margin: 0 0 18px;
    padding: 0;
    color: rgba(255,255,255,0.75);
}

.card-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.16);
    text-decoration: none;
    color: rgba(255,255,255,0.9);
    background: rgba(255,255,255,0.06);
}

.quote-card blockquote {
    color: rgba(255,255,255,0.85);
    line-height: 1.7;
    margin-bottom: 14px;
}

.quote-card figcaption {
    color: rgba(255,255,255,0.6);
    font-size: 0.95rem;
}

.faq-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
    max-width: 900px;
}

.faq-item {
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(0,0,0,0.22);
    border-radius: 16px;
    padding: 14px 16px;
}

.faq-item summary {
    cursor: pointer;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
    outline: none;
}

.faq-answer {
    margin-top: 12px;
    color: rgba(255,255,255,0.7);
    line-height: 1.7;
}

.cta-section {
    padding: 120px 10%;
}

.cta-title {
    font-size: clamp(2rem, 3.4vw, 3.2rem);
    margin-bottom: 10px;
    font-weight: 700;
}

.cta-subtitle {
    color: rgba(255,255,255,0.7);
    margin-bottom: 26px;
    line-height: 1.7;
    max-width: 60ch;
}

.cta-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.contact-form {
    margin-top: 18px;
    max-width: 900px;
}

.field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.field {
    display: grid;
    gap: 10px;
}

.field-label {
    color: rgba(255,255,255,0.7);
    letter-spacing: 0.04em;
}

.field input {
    width: 100%;
    padding: 14px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(0,0,0,0.25);
    color: #fff;
    font-family: var(--font-main);
    outline: none;
}

.field input:focus {
    border-color: rgba(138,43,226,0.55);
    box-shadow: 0 0 0 4px rgba(138,43,226,0.12);
}

.form-hint {
    margin-top: 12px;
    color: rgba(255,255,255,0.6);
    line-height: 1.6;
}

@media (max-width: 980px) {
    .card-grid,
    .feature-grid,
    .step-grid,
    .portfolio-grid,
    .testimonial-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .logo-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 640px) {
    .site-header {
        padding: 14px 4%;
    }

    .navbar {
        flex-wrap: wrap;
        gap: 12px;
    }

    .nav-links {
        gap: 8px;
    }

    .content-section {
        padding: 96px 6% 96px;
    }

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