/* =====================================================
   BLANCORE — Dark Tech Studio Theme
   ===================================================== */

/* --- Custom Properties ----------------------------- */
:root {
    --color-bg:            #0A0B0F;
    --color-surface:       #12131A;
    --color-surface-2:     #1A1B25;
    --color-border:        rgba(255, 255, 255, 0.06);
    --color-border-bright: rgba(255, 255, 255, 0.12);
    --color-text:          #F8FAFC;
    --color-text-secondary:#94A3B8;
    --color-muted:         #64748B;
    --color-primary:       #3B82F6;
    --color-primary-dark:  #2563EB;
    --color-primary-glow:  rgba(59, 130, 246, 0.25);
    --color-accent:        #818CF8;
    --color-green:         #22C55E;

    --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono:  'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;

    --space-xs:  0.5rem;
    --space-sm:  1rem;
    --space-md:  2rem;
    --space-lg:  4rem;
    --space-xl:  6rem;
    --space-2xl: 8rem;

    --radius:    12px;
    --radius-lg: 20px;
    --shadow-glow: 0 0 40px rgba(59, 130, 246, 0.15);

    --nav-height: 64px;
    --max-width:  1200px;
}

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

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

body {
    font-family: var(--font-sans);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img, svg {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

/* --- Typography ------------------------------------ */
h1, h2, h3, h4 {
    line-height: 1.15;
    font-weight: 700;
    color: var(--color-text);
}

h1 { font-size: clamp(2.5rem, 6vw, 4rem); letter-spacing: -1.5px; }
h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); letter-spacing: -0.75px; }
h3 { font-size: 1.2rem; }

p { color: var(--color-text-secondary); }

.gradient-text {
    background: linear-gradient(135deg, #3B82F6, #818CF8, #3B82F6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mono {
    font-family: var(--font-mono);
    font-size: 0.85em;
}

/* --- Utility --------------------------------------- */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.section-header p {
    margin-top: var(--space-xs);
    font-size: 1.05rem;
}

.section-label {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-primary);
    margin-bottom: var(--space-sm);
}

/* --- Subtle grid background pattern ---------------- */
.grid-bg {
    position: relative;
}

.grid-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

.grid-bg > * {
    position: relative;
    z-index: 1;
}

/* --- Buttons --------------------------------------- */
.btn {
    display: inline-block;
    padding: 13px 30px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.25s ease;
    border: 1px solid transparent;
    text-align: center;
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.5);
}

.btn-ghost {
    background: transparent;
    color: var(--color-text);
    border-color: var(--color-border-bright);
}

.btn-ghost:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-2px);
}

.btn-white {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-white:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
}

/* --- Navigation ------------------------------------ */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--nav-height);
    background: transparent;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

nav.scrolled {
    background: rgba(10, 11, 15, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #ffffff;
    transition: color 0.3s;
}

.nav-logo span {
    color: var(--color-primary);
}

.nav-links {
    display: flex;
    gap: var(--space-md);
    list-style: none;
    align-items: center;
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #ffffff;
}

.nav-links .btn {
    padding: 8px 20px;
    font-size: 0.85rem;
}

/* --- Hero Section ---------------------------------- */
#hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    text-align: center;
    background: var(--color-bg);
}

.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(5, 8, 20, 0.72);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 var(--space-md);
}

.hero-label {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #ffffff;
    background: var(--color-primary);
    border: 1px solid var(--color-primary);
    padding: 6px 16px;
    border-radius: 100px;
    margin-bottom: var(--space-sm);
}

.hero-content h1 {
    color: #ffffff !important;
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -2px;
    margin-bottom: var(--space-sm);
}

.hero-content .hero-sub {
    font-size: 1.15rem;
    color: #ffffff !important;
    max-width: 560px;
    margin: 0 auto var(--space-md);
    line-height: 1.7;
    font-weight: 400;
}

.hero-actions {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    justify-content: center;
}

.scroll-down {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: rgba(255, 255, 255, 0.4);
    transition: color 0.2s;
    animation: bounce 2s ease-in-out infinite 1.5s;
}

.scroll-down:hover {
    color: #fff;
    animation: none;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%       { transform: translateX(-50%) translateY(8px); }
}

/* --- Stats Bar ------------------------------------- */
#stats {
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-lg) var(--space-md);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
}

.stat-item h3 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
    margin-bottom: 6px;
}

.stat-item p {
    font-size: 0.875rem;
    color: var(--color-muted);
    font-weight: 500;
}

/* --- Services Section ------------------------------ */
#services {
    padding: var(--space-2xl) var(--space-md);
}

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

.service-card {
    display: block;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-md) calc(var(--space-md) - 4px);
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    opacity: 0;
    transition: opacity 0.3s;
}

.service-card:hover {
    border-color: var(--color-border-bright);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

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

.card-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(129, 140, 248, 0.12));
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-sm);
    color: var(--color-primary);
}

.service-card h3 {
    color: var(--color-text);
    margin-bottom: var(--space-xs);
}

.service-card p {
    font-size: 0.9rem;
    line-height: 1.65;
    color: var(--color-text-secondary);
}

.service-card .card-arrow {
    margin-top: var(--space-sm);
    color: var(--color-primary);
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0;
    transform: translateX(-8px);
    transition: all 0.3s;
}

.service-card:hover .card-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* --- Tech Stack ------------------------------------ */
#tech {
    padding: var(--space-2xl) var(--space-md);
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: var(--space-sm);
    max-width: 900px;
    margin: 0 auto;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: var(--space-sm) var(--space-xs);
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    transition: all 0.25s;
}

.tech-item:hover {
    border-color: var(--color-primary);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

.tech-icon {
    width: 36px;
    height: 36px;
    color: var(--color-primary);
}

.tech-icon svg {
    width: 100%;
    height: 100%;
}

.tech-item p {
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: var(--color-muted);
    font-weight: 500;
}

/* --- About Section --------------------------------- */
#about {
    padding: var(--space-2xl) var(--space-md);
}

.about-intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.about-intro h2 {
    margin-bottom: var(--space-sm);
}

.about-mission {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--color-text-secondary);
}

/* --- Clients / Scrolling Marquee ------------------- */
#clients {
    padding: var(--space-xl) var(--space-md) var(--space-lg);
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    overflow: hidden;
}

.marquee-wrapper {
    overflow: hidden;
    position: relative;
    width: 100%;
    mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.marquee-track {
    display: flex;
    gap: var(--space-xl);
    animation: marquee 30s linear infinite;
    width: max-content;
}

@keyframes marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

.client-logo {
    font-family: var(--font-sans);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    opacity: 0.35;
    transition: opacity 0.3s;
    white-space: nowrap;
    flex-shrink: 0;
}

.client-logo:hover {
    opacity: 0.7;
}

/* --- Impact Section -------------------------------- */
#impact {
    padding: var(--space-2xl) var(--space-md);
}

.impact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

.impact-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.impact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.impact-blue::before  { background: linear-gradient(90deg, #3B82F6, #60A5FA); }
.impact-purple::before { background: linear-gradient(90deg, #818CF8, #A78BFA); }
.impact-green::before  { background: linear-gradient(90deg, #22C55E, #4ADE80); }

.impact-card:hover {
    transform: translateY(-4px);
    border-color: var(--color-border-bright);
    box-shadow: var(--shadow-glow);
}

.impact-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-sm);
}

.impact-blue .impact-icon  { background: rgba(59, 130, 246, 0.12); color: #3B82F6; }
.impact-purple .impact-icon { background: rgba(129, 140, 248, 0.12); color: #818CF8; }
.impact-green .impact-icon  { background: rgba(34, 197, 94, 0.12); color: #22C55E; }

.impact-card h3 {
    font-size: 1.1rem;
    margin-bottom: var(--space-xs);
}

.impact-card > p {
    font-size: 0.9rem;
    line-height: 1.65;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-sm);
}

.impact-checks {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.impact-checks li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}

.impact-blue .impact-checks svg  { color: #3B82F6; }
.impact-purple .impact-checks svg { color: #818CF8; }
.impact-green .impact-checks svg  { color: #22C55E; }

/* --- FAQ Section ----------------------------------- */
#faq {
    padding: var(--space-2xl) var(--space-md);
}

.faq-grid {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.faq-item {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.3s;
}

.faq-item:hover {
    border-color: var(--color-border-bright);
}

.faq-question {
    width: 100%;
    padding: var(--space-md);
    background: none;
    border: none;
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-sm);
}

.faq-question:hover {
    color: var(--color-primary);
}

.faq-icon {
    color: var(--color-muted);
    transition: transform 0.3s;
    flex-shrink: 0;
}

.faq-item.open .faq-icon {
    transform: rotate(45deg);
    color: var(--color-primary);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-answer-inner {
    padding: 0 var(--space-md) var(--space-md);
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--color-text-secondary);
}

/* --- Contact Section ------------------------------- */
#contact {
    padding: var(--space-2xl) var(--space-md);
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-row label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text);
}

.form-row input,
.form-row select,
.form-row textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--color-border-bright);
    border-radius: var(--radius);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: var(--color-text);
    background: var(--color-surface-2);
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: none;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-glow);
}

.form-row input::placeholder,
.form-row textarea::placeholder {
    color: var(--color-muted);
}

.form-row textarea {
    resize: vertical;
    min-height: 130px;
}

.form-row select option {
    background: var(--color-surface-2);
    color: var(--color-text);
}

.contact-form .btn {
    align-self: flex-start;
    margin-top: var(--space-xs);
}

.form-message {
    max-width: 600px;
    margin: 0 auto var(--space-md);
    padding: 14px 18px;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 500;
}

.form-message.success {
    background: rgba(34, 197, 94, 0.12);
    color: var(--color-green);
    border: 1px solid rgba(34, 197, 94, 0.25);
}

.form-message.error {
    background: rgba(239, 68, 68, 0.12);
    color: #EF4444;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

/* --- Footer ---------------------------------------- */
footer {
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
    color: var(--color-muted);
    padding: var(--space-lg) var(--space-md);
    text-align: center;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

.footer-logo {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: var(--space-sm);
    letter-spacing: -0.5px;
}

.footer-logo span {
    color: var(--color-primary);
}

footer p {
    color: var(--color-muted);
    font-size: 0.85rem;
}

footer a {
    color: var(--color-text-secondary);
    transition: color 0.2s;
}

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

/* --- Responsive ------------------------------------ */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.75rem;
    }

    .nav-links .btn {
        display: none;
    }

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

    .tech-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .impact-grid {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }

    #services, #about, #contact, #tech, #faq, #impact {
        padding: var(--space-lg) var(--space-sm);
    }

    .section-header {
        margin-bottom: var(--space-md);
    }
}

@media (max-width: 480px) {
    h1 { font-size: 2.25rem; }
    h2 { font-size: 1.6rem; }

    .nav-links {
        gap: var(--space-sm);
    }

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

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-sm);
    }

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

    .contact-form .btn {
        align-self: stretch;
    }
}
