/* =========================================
   1. GLOBAL VARIABLES & RESET
========================================= */
:root {
    --brutal-black: #1e293b;
    --brutal-white: #ffffff;
    --brutal-blue: #2563eb;
    --brutal-blue-hover: #1d4ed8;
    --brutal-amber: #f59e0b;
    --brutal-border: 3px solid #1e293b;
    --brutal-shadow: 6px 6px 0px #1e293b;
    --bg-light: #f0f2f5;
    --text-muted: #64748b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html, body {
    background-color: var(--bg-light);
    color: var(--brutal-black);
    overflow-x: hidden; 
}

/* =========================================
   2. TYPOGRAPHY & BUTTONS
========================================= */
.brutal-btn {
    padding: 12px 24px;
    border: var(--brutal-border);
    background: var(--brutal-white);
    box-shadow: 4px 4px 0px var(--brutal-black);
    font-weight: 800;
    cursor: pointer;
    transition: all 0.1s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--brutal-black);
}

.brutal-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px var(--brutal-black);
}

.brutal-btn.primary { background: var(--brutal-blue); color: white; }
.brutal-btn.accent { background: var(--brutal-amber); color: var(--brutal-black); }

/* =========================================
   3. NAVIGATION HEADER
========================================= */
.brutal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    background: var(--brutal-white);
    border-bottom: 4px solid var(--brutal-black);
    z-index: 1000;
}

.logo h2 { color: var(--brutal-blue); font-weight: 900; }

.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links a { text-decoration: none; color: var(--text-muted); font-weight: 700; transition: 0.2s; }
.nav-links a:hover { color: var(--brutal-blue); }

#mode-badge {
    background: var(--brutal-amber);
    padding: 5px 15px;
    border: 2px solid var(--brutal-black);
    font-weight: 900;
    box-shadow: 3px 3px 0px var(--brutal-black);
}

/* =========================================
   4. MARKETING HERO CAROUSEL
========================================= */
.hero-carousel-wrapper {
    position: relative;
    width: 100vw;
    height: calc(100vh - 75px); 
    min-height: 650px;
    overflow: hidden;
    background: var(--brutal-black);
}

.carousel-track {
    display: flex;
    width: 400vw; 
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.77, 0, 0.175, 1);
}

.edge-slide {
    width: 100vw;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5%;
    gap: 40px;
    box-sizing: border-box;
}

.slide-content {
    flex: 1;
    max-width: 800px; 
    padding-top: 50px; 
    padding-bottom: 90px; 
    z-index: 10;
}

.edge-slide:not(:has(.slide-graphic)) .slide-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
}

.seo-badge {
    display: inline-block;
    background: var(--brutal-amber);
    color: var(--brutal-black);
    font-weight: 900;
    padding: 5px 15px;
    border: 2px solid var(--brutal-black);
    box-shadow: 3px 3px 0px var(--brutal-black);
    margin-bottom: 25px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mega-title {
    font-size: clamp(2.5rem, 4.5vw, 4.2rem); 
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 20px;
    text-shadow: 4px 4px 0px rgba(0,0,0,0.2);
}

.slide-subtitle {
    font-size: clamp(1.1rem, 1.5vw, 1.3rem);
    font-weight: 600;
    margin-bottom: 40px;
    line-height: 1.6;
}

.massive-btn { font-size: 1.2rem; padding: 15px 40px; }

.slide-graphic { flex: 1; display: flex; justify-content: flex-end; }

.brutal-code-block {
    background: #1e1e1e;
    color: #4ec9b0;
    padding: 30px;
    border: 4px solid var(--brutal-black);
    box-shadow: 10px 10px 0px rgba(0,0,0,0.4);
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 1.1rem;
    transform: rotate(-3deg);
}

.carousel-controls {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%); 
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 50;
    background: var(--brutal-black);
    padding: 10px 25px;
    border-radius: 50px;
    border: 3px solid white;
    box-shadow: 4px 4px 0px rgba(0,0,0,0.5);
}

.control-btn { padding: 5px 15px; font-size: 1.2rem; color: var(--brutal-black); }
.carousel-dots { display: flex; gap: 10px; }
.dot {
    width: 14px;
    height: 14px;
    border: 2px solid white;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
}
.dot.active { background: white; transform: scale(1.3); }

/* =========================================
   5. MARKETING FEATURE GRID & FAQ
========================================= */
.page-section {
    padding: 80px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.section-header { text-align: center; margin-bottom: 50px; }
.section-header h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    text-transform: uppercase;
    text-shadow: 4px 4px 0px var(--brutal-amber);
    margin-bottom: 15px;
}
.section-header p { font-size: 1.2rem; color: var(--text-muted); font-weight: 600; max-width: 600px; margin: 0 auto;}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 30px;
}

.feature-box {
    padding: 30px;
    transition: transform 0.2s;
}
.feature-box:hover { transform: translateY(-5px); box-shadow: 8px 8px 0px var(--brutal-black); }
.feature-icon { font-size: 3rem; margin-bottom: 20px; }
.feature-box h3 { font-size: 1.5rem; color: var(--brutal-blue); margin-bottom: 15px; font-weight: 800; }
.feature-box p { font-size: 1.05rem; line-height: 1.6; font-weight: 500; }

.faq-container { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 15px; }
.brutal-accordion {
    background: var(--bg-light);
    border: var(--brutal-border);
    box-shadow: 4px 4px 0px var(--brutal-black);
    padding: 20px;
    transition: all 0.3s;
}
.brutal-accordion[open] { background: white; box-shadow: 6px 6px 0px var(--brutal-blue); }
.brutal-accordion summary {
    font-size: 1.2rem;
    font-weight: 800;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
}
.brutal-accordion summary::-webkit-details-marker { display: none; }
.brutal-accordion summary::after { content: '+'; font-size: 1.5rem; color: var(--brutal-blue); }
.brutal-accordion[open] summary::after { content: '−'; }
.accordion-content {
    margin-top: 15px; padding-top: 15px;
    border-top: 2px dashed var(--text-muted);
    font-size: 1.1rem; line-height: 1.6; color: var(--text-muted); font-weight: 500;
}

/* =========================================
   6. IDE & DASHBOARD LAYOUTS
========================================= */
.ide-container, .dashboard-grid {
    padding: 20px;
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
    display: grid;
    gap: 25px;
    height: calc(100vh - 100px);
}

.ide-grid { display: grid; grid-template-columns: 1fr 400px; gap: 25px; height: 100%; }
.dashboard-grid { grid-template-columns: 250px 1fr; }

.brutal-card {
    background: var(--brutal-white);
    border: var(--brutal-border);
    box-shadow: var(--brutal-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.brutal-toolbar { display: flex; justify-content: space-between; margin-bottom: 15px; gap: 15px; }
.brutal-input { padding: 12px; border: var(--brutal-border); box-shadow: 4px 4px 0px var(--brutal-black); font-weight: 700; width: 300px; }

.card-header {
    background: var(--brutal-black); color: white;
    padding: 10px 15px; font-weight: 700;
    display: flex; justify-content: space-between; align-items: center;
}

#monaco-editor-container { flex: 1; width: 100%; min-height: 400px; }
.side-panel { display: flex; flex-direction: column; gap: 20px; height: 100%; }
#std-input, #terminal-output {
    flex: 1; background: #1e1e1e; color: #d4d4d4; padding: 15px;
    font-family: 'Fira Code', 'Courier New', monospace; border: none; resize: none;
}

/* =========================================
   7. SIDEBAR DRAWER (Syntax Guide)
========================================= */
.sidebar-drawer {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100%;
    background: white;
    border-left: 4px solid var(--brutal-black);
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    z-index: 2000;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 30px;
    display: flex;
    flex-direction: column;
}
.sidebar-drawer.open { right: 0; }

/* =========================================
   8. BRUTALIST LOGIN
========================================= */
.login-container { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.form {
    padding: 40px; background: var(--brutal-white); display: flex; flex-direction: column;
    gap: 20px; border: var(--brutal-border); box-shadow: var(--brutal-shadow); width: 400px; max-width: 90%;
}
.form > p { font-weight: 800; font-size: 24px; display: flex; flex-direction: column; margin-bottom: 10px;}
.form > p > span { color: var(--text-muted); font-size: 16px; }
.oauthButton {
    display: flex; justify-content: center; align-items: center; gap: 10px; width: 100%; height: 50px;
    border: var(--brutal-border); background-color: var(--brutal-white); box-shadow: 4px 4px 0px var(--brutal-black);
    font-size: 16px; font-weight: 700; cursor: pointer; transition: 0.2s; position: relative; z-index: 1;
}
.oauthButton::before {
    content: ""; position: absolute; top: 0; left: 0; height: 100%; width: 0;
    background-color: var(--brutal-black); z-index: -1; transition: 0.3s;
}
.oauthButton:hover { color: white; }
.oauthButton:hover::before { width: 100%; }
.oauthButton:hover svg { fill: white; }
.separator { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; }
.separator > div { flex: 1; height: 3px; background-color: var(--text-muted); }
.text-link { background: transparent; border: none; color: #94a3b8; cursor: pointer; text-decoration: underline; font-size: 12px; }
.text-link:hover { color: white; }

/* =========================================
   9. MOBILE RESPONSIVENESS (CONSOLIDATED)
========================================= */
@media (max-width: 1024px) {
    .hide-mobile { display: none !important; }
    .slide-graphic { display: none; }
    .edge-slide { justify-content: center; text-align: center; }
    .slide-content { display: flex; flex-direction: column; align-items: center; padding-top: 40px; padding-bottom: 120px; }
    .ide-grid, .dashboard-grid { grid-template-columns: 1fr; height: auto; }
    .brutal-toolbar { flex-direction: column; align-items: flex-start; }
    .sidebar-drawer { width: 100%; right: -100%; }
    .split-section, .split-section.reverse {
        flex-direction: column;
        text-align: center;
    }
    .brutal-list { align-items: center; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    /* Stack the header elements */
    .brutal-header {
        flex-direction: column;
        padding: 15px;
        text-align: center;
    }
    
    .nav-links {
        margin-top: 15px;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    /* Stack the data type badges vertically */
    .data-type-card {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }
    
    .data-type-badge {
        width: 100%;
    }
    
    /* Stack the 'Next Guide' navigation buttons */
    .next-guide-nav {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .next-guide-nav div {
        text-align: center !important;
        width: 100%;
    }
}

@media (max-width: 600px) {
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-col p { margin: 0 auto; }
}

/* =========================================
   10. SPLIT SECTIONS & MAC WINDOWS
========================================= */
.split-section {
    display: flex;
    align-items: center;
    gap: 50px;
    padding: 80px 5%;
}

.split-section.reverse {
    flex-direction: row-reverse;
}

.split-text {
    flex: 1;
}

.split-text h2 {
    font-size: clamp(2rem, 3.5vw, 3rem);
    font-weight: 900;
    margin-bottom: 20px;
    text-shadow: 3px 3px 0px var(--brutal-amber);
}

.split-text p {
    font-size: 1.15rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 25px;
    font-weight: 500;
}

.brutal-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.brutal-list li {
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.split-visual {
    flex: 1;
    display: flex;
    justify-content: center;
}

.brutal-window {
    width: 100%;
    max-width: 500px;
    background: var(--brutal-white);
    border: var(--brutal-border);
    box-shadow: 8px 8px 0px var(--brutal-black);
    border-radius: 8px;
    overflow: hidden;
    transform: rotate(-2deg);
    transition: transform 0.3s;
}

.brutal-window:hover {
    transform: rotate(0deg);
}

.window-header {
    background: #e2e8f0;
    padding: 10px 15px;
    border-bottom: var(--brutal-border);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.window-header span {
    display: block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--brutal-black);
}
.window-header span:nth-child(1) { background: #ef4444; }
.window-header span:nth-child(2) { background: #f59e0b; }
.window-header span:nth-child(3) { background: #10b981; }

.window-body {
    background: #1e1e1e;
    padding: 20px;
    color: #e2e8f0;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 1.1rem;
    line-height: 1.5;
    overflow-x: auto;
}

/* =========================================
   11. STATS BANNER
========================================= */
.stats-banner {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    background: var(--brutal-amber);
    border-top: 4px solid var(--brutal-black);
    border-bottom: 4px solid var(--brutal-black);
    padding: 40px 5%;
    gap: 30px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: clamp(3rem, 5vw, 4.5rem);
    font-weight: 900;
    color: var(--brutal-black);
    text-shadow: 3px 3px 0px white;
    margin-bottom: 5px;
}

.stat-item p {
    font-size: 1.2rem;
    font-weight: 800;
    text-transform: uppercase;
}

/* =========================================
   12. SEO FOOTER
========================================= */
.seo-footer {
    background: var(--brutal-black);
    color: white;
    padding: 60px 5% 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
    border-bottom: 2px solid #334155;
    padding-bottom: 40px;
}

.footer-col h4 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 20px;
    font-weight: 800;
}

.footer-col p {
    color: #94a3b8;
    line-height: 1.6;
    max-width: 300px;
}

.footer-col a {
    display: block;
    color: #94a3b8;
    text-decoration: none;
    margin-bottom: 12px;
    font-weight: 600;
    transition: 0.2s;
}

.footer-col a:hover {
    color: var(--brutal-amber);
    transform: translateX(5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    color: #64748b;
    font-weight: 600;
}

/* =========================================
   13. CONTENT BLOCKS, TABLES & CODE
========================================= */
.table-responsive-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    margin-bottom: 40px;
    border: var(--brutal-border);
    box-shadow: var(--brutal-shadow);
    background: white;
}

.comparison-table {
    width: 100%;
    min-width: 600px; /* Forces scroll on small screens instead of squishing text */
    border-collapse: collapse;
    margin-bottom: 0;
}

/* Ensure code blocks don't break the screen width */
pre {
    overflow-x: auto;
    white-space: pre;
    max-width: 100%;
}

/* Fix for the massive SVG icons */
.icon { 
    width: 24px !important; 
    height: 24px !important; 
    min-width: 24px;
    transition: fill 0.2s; 
    flex-shrink: 0; 
}

/* --- BRUTALIST TOUR CALLOUT (Pointer bubble) --- */
.tour-callout {
    position: fixed;
    z-index: 10000;
    background: var(--brutal-amber, #fbbf24);
    color: var(--brutal-black);
    padding: 20px;
    border: 4px solid var(--brutal-black);
    box-shadow: 8px 8px 0px var(--brutal-black);
    max-width: 350px;
    text-align: center;
    transform: translate(-50%, 0); 
    opacity: 0; 
    transition: opacity 0.3s ease; 
    pointer-events: auto; 
}

.tour-callout h3 {
    margin-top: 0;
    font-size: 1.5rem;
    text-transform: uppercase;
    font-weight: 900;
}

.tour-callout p {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.tour-callout-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.tour-callout:after {
    content: "";
    position: absolute;
    width: 0;
    height: 0;
    border: 20px solid transparent;
}

.tour-callout.above:after {
    bottom: -40px; 
    left: 50%;
    transform: translateX(-50%);
    border-top-color: var(--brutal-amber); 
    border-top-width: 20px; 
    border-bottom: 0;
}

.tour-callout.above:before {
    content: "";
    position: absolute;
    width: 0;
    height: 0;
    border: 24px solid transparent; 
    bottom: -48px;
    left: 50%;
    transform: translateX(-50%);
    border-top-color: var(--brutal-black);
    border-top-width: 24px;
    border-bottom: 0;
    z-index: -1; 
}

.tour-callout.below:after {
    top: -40px; 
    left: 50%;
    transform: translateX(-50%);
    border-bottom-color: var(--brutal-amber);
    border-bottom-width: 20px;
    border-top: 0;
}

.tour-callout.below:before {
    content: "";
    position: absolute;
    width: 0;
    height: 0;
    border: 24px solid transparent; 
    top: -48px;
    left: 50%;
    transform: translateX(-50%);
    border-bottom-color: var(--brutal-black);
    border-bottom-width: 24px;
    border-top: 0;
    z-index: -1; 
}

.tour-callout.visible {
    opacity: 1;
}

.prominent-tour-highlight {
    position: relative !important;
    z-index: 9999 !important;
    border: 8px solid white !important; 
    box-shadow: 0 0 20px 10px rgba(255, 255, 255, 0.4) !important; 
    transform: scale(1.05) !important; 
    background: inherit; 
    transition: transform 0.3s ease, border 0.3s ease, box-shadow 0.3s ease; 
}