/* BlackSpectron Modern Minimalist Design System */
/* Inspired by Cursor.com and OpenAI Codex */

:root {
    --bg-black: #0c0b0a; /* Warm dark grey/brown black identical to cursor.com */
    --bg-card: #12110f;
    --bg-card-hover: #171614;
    --border-color: #1c1b18;
    --border-hover: #2b2a26;
    --text-primary: #f0edea;
    --text-secondary: #9c9790;
    --text-muted: #5e5b56;
    
    --accent-color: #f0edea;
    --accent-green: #10b981;
    --accent-blue: #3b82f6;
    --accent-glow: rgba(240, 237, 234, 0.03);
    
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;
    
    --hero-overlay: linear-gradient(rgba(12, 11, 10, 0.85), rgba(12, 11, 10, 0.85));
    --logo-shadow: rgba(255, 255, 255, 0.25);
}

html[data-theme="light"] {
    --bg-black: #f8f7f4; /* Premium warm cream/beige background */
    --bg-card: #ffffff;
    --bg-card-hover: #fcfbfa;
    --border-color: #e5e2db;
    --border-hover: #d2cebf;
    --text-primary: #1c1a17; /* Dark charcoal */
    --text-secondary: #5e5b54;
    --text-muted: #8c887e;
    --accent-color: #1c1a17;
    --accent-glow: rgba(28, 26, 23, 0.03);
    
    --hero-overlay: linear-gradient(rgba(248, 247, 244, 0.85), rgba(248, 247, 244, 0.85));
    --logo-shadow: rgba(0, 0, 0, 0.15);
}

/* Global transitions for smooth theme switching */
body, 
section, 
nav, 
footer, 
.product-card, 
.screenshot-card-glow, 
.glass-navbar, 
.mono-tag, 
.btn-pill, 
h1, h2, h3, h4, p, span, a, button,
#theme-switcher button,
#lang-picker-btn {
    transition: background-color 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                color 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Scrolled Navbar Styling */
#global-nav {
    background-color: rgba(12, 11, 10, 0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
#global-nav.nav-scrolled {
    background-color: rgba(12, 11, 10, 0.80) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}
html[data-theme="light"] #global-nav {
    background-color: rgba(248, 247, 244, 0.70);
    border-bottom: 1px solid rgba(28, 26, 23, 0.07);
}
html[data-theme="light"] #global-nav.nav-scrolled {
    background-color: rgba(248, 247, 244, 0.90) !important;
    border-bottom: 1px solid rgba(28, 26, 23, 0.10) !important;
}

/* Global tailwind utility overrides in light mode for readability */
html[data-theme="light"] .text-white,
html[data-theme="light"] .text-\[\#f0edea\],
html[data-theme="light"] .text-neutral-200,
html[data-theme="light"] .text-neutral-300 {
    color: var(--text-primary) !important;
}

html[data-theme="light"] .text-neutral-400 {
    color: var(--text-secondary) !important;
}

html[data-theme="light"] .text-neutral-500,
html[data-theme="light"] .text-neutral-600 {
    color: var(--text-muted) !important;
}

html[data-theme="light"] .border-neutral-900,
html[data-theme="light"] .border-white\/5,
html[data-theme="light"] .border-white\/10,
html[data-theme="light"] .border-white\/20,
html[data-theme="light"] .border-white\/30 {
    border-color: var(--border-color) !important;
}

/* Background overrides in light theme */
html[data-theme="light"] body {
    background-color: var(--bg-black) !important;
    color: var(--text-primary) !important;
}

html[data-theme="light"] .bg-\[\#0c0b0a\],
html[data-theme="light"] .bg-\[\#0b0b0d\],
html[data-theme="light"] .bg-\[\#11100e\],
html[data-theme="light"] .bg-\[\#0d0c0a\],
html[data-theme="light"] .bg-black,
html[data-theme="light"] .bg-neutral-900,
html[data-theme="light"] .bg-neutral-950,
html[data-theme="light"] .bg-neutral-900\/50,
html[data-theme="light"] .bg-black\/10,
html[data-theme="light"] .bg-black\/20,
html[data-theme="light"] .bg-black\/80,
html[data-theme="light"] .bg-black\/95 {
    background-color: var(--bg-black) !important;
}

html[data-theme="light"] .bg-\[\#12110f\],
html[data-theme="light"] .bg-\[\#171614\],
html[data-theme="light"] .bg-white\/5,
html[data-theme="light"] .bg-white\/\[0\.01\],
html[data-theme="light"] .bg-white\/\[0\.02\] {
    background-color: var(--bg-card) !important;
}

html[data-theme="light"] .product-card:hover {
    background-color: var(--bg-card-hover) !important;
    border-color: var(--border-hover) !important;
}

/* Make screenshots and code editors pop out cleanly in light theme */
html[data-theme="light"] .screenshot-card-glow::before {
    background: rgba(248, 247, 244, 0.3) !important;
}


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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-black);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
    letter-spacing: -0.01em;
}

/* Plain background with no grid lines as requested */
body::before {
    display: none;
}
body::after {
    display: none;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-black);
}
::-webkit-scrollbar-thumb {
    background: var(--border-hover);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Typography Helpers */
h1, h2, h3, h4 {
    letter-spacing: -0.03em;
    font-weight: 700;
}

.mono-tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.01);
    display: inline-block;
}

/* Layout Utilities */
.thin-divider {
    height: 1px;
    background: var(--border-color);
    width: 100%;
}

/* Premium Buttons */
.btn-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 9999px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    text-decoration: none;
    font-family: var(--font-sans);
}

.btn-pill-primary {
    background: var(--accent-color);
    color: var(--bg-black);
    border: 1px solid var(--accent-color);
}

.btn-pill-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-pill-secondary {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-pill-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

/* Custom Mega Navbar & Footer (for non-tailwind compatibility) */
.glass-navbar {
    background: rgba(12, 11, 10, 0.8) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 9999px !important; /* Pill shaped navbar like Cursor */
}

.logo-text {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-primary);
}

.nav-link {
    transition: color 0.15s ease;
}
.nav-link:hover {
    color: var(--text-primary) !important;
}

/* Dynamic Scrolling Marquee for Trusted Builders */
.marquee-container {
    overflow: hidden;
    white-space: nowrap;
    width: 100%;
    position: relative;
    padding: 1.5rem 0;
}

.marquee-container::before,
.marquee-container::after {
    content: "";
    position: absolute;
    top: 0;
    width: 150px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.marquee-container::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-black) 0%, transparent 100%);
}

.marquee-container::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-black) 0%, transparent 100%);
}

.marquee-track {
    display: inline-block;
    animation: marquee 25s linear infinite;
}

.marquee-item {
    display: inline-block;
    margin: 0 3.5rem;
    font-family: var(--font-sans);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-secondary);
    letter-spacing: -0.03em;
    opacity: 0.45;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.marquee-item:hover {
    opacity: 0.95;
    color: var(--text-primary);
}

@keyframes marquee {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-50%, 0, 0); }
}

/* Interactive IDE Editor Mockup styling */
.editor-mockup {
    background: #0d0c0a;
    border: 1px solid var(--border-hover);
    border-radius: 10px;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.7);
    overflow: hidden;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    font-family: var(--font-mono);
    text-align: left;
    display: flex;
    flex-direction: column;
}

.editor-header {
    background: #11100e;
    border-bottom: 1px solid var(--border-color);
    padding: 0.85rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.editor-dots {
    display: flex;
    gap: 0.45rem;
}

.editor-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.editor-tabs {
    display: flex;
    gap: 1.5rem;
    margin-left: 2rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.editor-tab.active {
    color: var(--text-primary);
    position: relative;
}

.editor-tab.active::after {
    content: "";
    position: absolute;
    bottom: -13px;
    left: 0;
    width: 100%;
    height: 1.5px;
    background: var(--text-primary);
}

.editor-filename {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.editor-body {
    display: flex;
    height: 420px;
}

.editor-sidebar {
    width: 22%;
    background: #0a0908;
    border-right: 1px solid var(--border-color);
    padding: 1.25rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.sidebar-title {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.65rem;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.sidebar-file {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    cursor: pointer;
    transition: color 0.15s ease;
}
.sidebar-file:hover {
    color: var(--text-primary);
}
.sidebar-file.active {
    color: var(--text-primary);
    font-weight: 500;
}

.editor-content {
    width: 78%;
    padding: 1.5rem;
    font-size: 0.8rem;
    line-height: 1.65;
    overflow-y: auto;
    color: var(--text-secondary);
    background: #0d0c0a;
    position: relative;
}

.editor-image-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.editor-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

/* Syntax Highlighting */
.syntax-kw { color: #e5c07b; } 
.syntax-str { color: #98c379; } 
.syntax-fn { color: #61afef; } 
.syntax-var { color: #e06c75; } 
.syntax-comment { color: var(--text-muted); font-style: italic; }

/* Floating Agent Status Bubble inside mockup */
.agent-bubble {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 290px;
    background: rgba(18, 17, 15, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-hover);
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 10;
}

.agent-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.agent-status-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-green);
    box-shadow: 0 0 8px var(--accent-green);
    animation: pulse 1.5s infinite;
}

.agent-log {
    font-size: 0.7rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.agent-progress {
    height: 2px;
    background: var(--border-color);
    width: 100%;
    border-radius: 999px;
    overflow: hidden;
}

.agent-progress-fill {
    height: 100%;
    background: var(--accent-green);
    width: 75%;
    animation: progress-slide 4s infinite ease-in-out;
}

.editor-terminal {
    background: #090807;
    border-top: 1px solid var(--border-color);
    padding: 0.85rem 1.5rem;
    font-size: 0.75rem;
    color: var(--accent-green);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.terminal-prompt {
    color: var(--text-muted);
}

/* Animations */
@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

@keyframes progress-slide {
    0% { width: 10%; }
    50% { width: 85%; }
    100% { width: 10%; }
}

/* Premium Grid Elements */
.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2.5rem;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 280px;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.product-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.product-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.product-card-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.product-card-footer {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.product-card:hover .product-card-footer {
    color: var(--text-primary);
}

/* Sub-page Specific Styling */
.product-hero-mockup {
    width: 100%;
    max-width: 1040px;
    margin: 4rem auto 0;
    border: 1px solid var(--border-hover);
    border-radius: 12px;
    background: #11100e;
    padding: 1rem;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.8);
    overflow: hidden;
}

.screenshot-placeholder {
    width: 100%;
    height: 520px;
    border-radius: 8px;
    overflow: hidden;
    background: #0d0c0a;
}

.screenshot-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.feature-grid-item {
    padding: 2.5rem;
    border-left: 1px solid var(--border-color);
}

.feature-grid-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.feature-grid-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Premium Screenshot Row Styles */
.screenshot-row {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    align-items: center;
    padding: 6rem 0;
    border-bottom: 1px solid var(--border-color);
}

@media (min-width: 768px) {
    .screenshot-row {
        flex-direction: row;
        gap: 5rem;
    }
    .screenshot-row.reverse {
        flex-direction: row-reverse;
    }
    .screenshot-text-col {
        width: 45%;
    }
    .screenshot-image-col {
        width: 55%;
    }
}

.screenshot-text-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.screenshot-image-col {
    position: relative;
    width: 100%;
}

.screenshot-card-glow {
    position: relative;
    border-radius: 16px;
    padding: 1.5rem;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
    border: 1px solid var(--border-hover);
    overflow: hidden;
}

/* Glass panel overlay inside screenshot card to give it a depth */
.screenshot-card-glow::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(12, 11, 10, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1;
}

.screenshot-card-glow img {
    position: relative;
    z-index: 2;
    border-radius: 8px;
    border: 1px solid var(--border-hover);
    width: 100%;
    height: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    transition: transform 0.4s ease;
}

.screenshot-card-glow:hover img {
    transform: scale(1.02);
}

/* Elevated Typography classes for Cursor-like feel */
.text-huge {
    font-size: 3.5rem;
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -0.04em;
}

@media (min-width: 768px) {
    .text-huge {
        font-size: 5rem;
    }
}

.text-section-title {
    font-size: 2.25rem;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #ffffff;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .text-section-title {
        font-size: 3rem;
    }
}

.text-body-premium {
    font-size: 1.05rem;
    line-height: 1.65;
    font-weight: 400;
    color: var(--text-secondary);
}

.text-accent-desc {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

/* Theme Switcher Active State in Light Mode */
html[data-theme="light"] #theme-switcher button.bg-white\/10 {
    background-color: rgba(0, 0, 0, 0.08) !important;
}

/* Ensure editor and terminal mockups retain their coding aesthetic in light theme */
html[data-theme="light"] .editor-mockup,
html[data-theme="light"] .editor-mockup .bg-\[\#0c0b0a\],
html[data-theme="light"] .editor-mockup .bg-\[\#11100e\],
html[data-theme="light"] .editor-mockup .bg-\[\#0d0c0a\],
html[data-theme="light"] .editor-mockup .bg-black {
    background-color: #0d0c0a !important;
}
html[data-theme="light"] .editor-mockup .text-white,
html[data-theme="light"] .editor-mockup .text-neutral-200,
html[data-theme="light"] .editor-mockup .text-neutral-300 {
    color: #f0edea !important;
}
html[data-theme="light"] .editor-mockup .text-neutral-400 {
    color: #9c9790 !important;
}
html[data-theme="light"] .editor-mockup .text-neutral-500 {
    color: #5e5b56 !important;
}
html[data-theme="light"] .editor-mockup .border-white\/5,
html[data-theme="light"] .editor-mockup .border-white\/10 {
    border-color: #1c1b18 !important;
}

/* Mobile responsive padding override for screenshot glow wrappers */
@media (max-width: 767px) {
    .screenshot-card-glow {
        padding: 0.5rem;
        border-radius: 10px;
    }
}

/* Invert screenshots dynamically in light theme to match the light background */
html[data-theme="light"] .screenshot-card-glow img,
html[data-theme="light"] .product-hero-mockup img,
html[data-theme="light"] .screenshot-placeholder img {
    filter: invert(0.9) hue-rotate(180deg) brightness(1.05) contrast(1.05);
}

/* Google Translate seamless native styling overrides */
.skiptranslate,
#google_translate_element,
.goog-te-banner-frame,
.goog-te-balloon-frame,
#goog-gt-tt {
    display: none !important;
    visibility: hidden !important;
}
body {
    top: 0 !important;
}
.goog-text-highlight {
    background-color: transparent !important;
    box-shadow: none !important;
}

/* Logo 3D Hover Animation */
.logo-3d-container {
    perspective: 1000px;
}
.logo-3d-img {
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), filter 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    transform-style: preserve-3d;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    image-rendering: -webkit-optimize-contrast;
}

@keyframes logo-3d-spin-bounce {
    0% {
        transform: translate3d(0, 0, 0) rotateY(0deg) scale(1);
        filter: drop-shadow(0px 0px 0px rgba(255,255,255,0));
    }
    20% {
        transform: translate3d(0, 0, 0) rotateY(-45deg) rotateX(15deg) scale(1.1);
        filter: drop-shadow(8px -4px 6px var(--logo-shadow));
    }
    50% {
        transform: translate3d(0, 0, 0) rotateY(405deg) rotateX(-20deg) scale(1.25);
        filter: drop-shadow(-8px 6px 10px var(--logo-shadow));
    }
    75% {
        transform: translate3d(0, 0, 0) rotateY(350deg) rotateX(10deg) scale(1.05);
        filter: drop-shadow(3px -2px 5px var(--logo-shadow));
    }
    90% {
        transform: translate3d(0, 0, 0) rotateY(363deg) rotateX(-5deg) scale(1.02);
        filter: drop-shadow(-1px 1px 3px var(--logo-shadow));
    }
    100% {
        transform: translate3d(0, 0, 0) rotateY(360deg) rotateX(0deg) scale(1);
        filter: drop-shadow(0px 0px 0px rgba(255,255,255,0));
    }
}

.animate-logo-3d {
    animation: logo-3d-spin-bounce 1.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}
