:root {
    --bg-color: #030303;
    --text-color: #f5f5f5;
    --muted-color: #a1a1aa;
    --primary-color: #7c3aed;
    --primary-glow: rgba(124, 58, 237, 0.5);
    --secondary-color: #10b981;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(0, 0, 0, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

:root.light-mode {
    --bg-color: #f8fafc;
    --text-color: #0f172a;
    --muted-color: #475569;
    --primary-color: #6d28d9;
    --primary-glow: rgba(109, 40, 217, 0.3);
    --secondary-color: #059669;
    --card-bg: rgba(0, 0, 0, 0.03);
    --card-border: rgba(0, 0, 0, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(0, 0, 0, 0.1);
}

.light-mode .btn-outline {
    border-color: rgba(0, 0, 0, 0.2);
    color: var(--text-color);
}
.light-mode .btn-outline:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.3);
}
.light-mode .glass-card,
.light-mode .app-showcase .glass-effect,
.light-mode .bento-item,
.light-mode .thumb,
.light-mode .mini-carousel,
.light-mode .sentiment-box,
.light-mode nav.scrolled .nav-inner {
    background: rgba(0, 0, 0, 0.03) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}
.light-mode .feature-list strong,
.light-mode .thumb.active span {
    color: var(--text-color) !important;
}
.light-mode .thumb img {
    border: 1px solid rgba(0,0,0,0.1);
}
.light-mode .dashboard-mockup {
    box-shadow: 0 40px 100px rgba(0,0,0,0.15);
    background: #fff;
}
.light-mode .floating-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
    font-family: inherit;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.light-mode .form-control {
    background: rgba(0, 0, 0, 0.03);
}

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

html, body {
    width: 100%;
    overflow-x: hidden;
    position: relative;
    scroll-behavior: smooth;
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Utilities */
.text-gradient {
    background: linear-gradient(180deg, #fff 0%, rgba(255, 255, 255, 0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 0 20px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px var(--primary-glow);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--card-border);
    color: white;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
}

/* Navbar */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: var(--transition);
}

nav.scrolled {
    padding: 1rem 0;
}

nav .nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1.5rem;
    border-radius: 9999px;
}

nav.scrolled .nav-inner {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 800;
    font-family: var(--font-heading);
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary-color), #4338ca);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.logo-icon::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spin {
    animation: spin 1s linear infinite;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--muted-color);
}

.nav-links a:hover {
    color: white;
}

/* Hero */
.hero {
    padding: 8rem 0 4rem;
    position: relative;
    text-align: center;
}

.hero-bg-glow {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.glow-1 {
    position: absolute;
    top: -100px;
    left: 20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.2) 0%, transparent 70%);
    filter: blur(60px);
}

.badge {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1.2rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 2rem;
    text-align: center;
    line-height: 1.2;
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.25rem;
    color: var(--muted-color);
    max-width: 600px;
    margin: 0 auto 3rem;
}

.hero-btns {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 6rem;
}

.hero-visual {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
    perspective: 1000px;
}

.dashboard-mockup {
    width: 100%;
    height: auto;
    border-radius: 2rem;
    border: 1px solid var(--card-border);
    box-shadow: 0 40px 100px rgba(0,0,0,0.5);
    background: #0a0a0a;
}

.floating-card {
    position: absolute;
    padding: 1.5rem;
    border-radius: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* Sections */
section {
    padding: 4rem 0;
}

.section-tag {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 1rem;
    display: block;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 1.5rem;
}

.section-desc {
    color: var(--muted-color);
    font-size: 1.1rem;
    max-width: 600px;
    margin-bottom: 4rem;
}

/* Ecosystem Grid */
.eco-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.eco-card {
    padding: 3rem 2rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 2rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.eco-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-5px);
}

.eco-card i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    display: block;
}

.eco-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.eco-card p {
    color: var(--muted-color);
}

/* Footer */
footer {
    padding: 6rem 0 3rem;
    border-top: 1px solid var(--card-border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(4, 1fr);
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-col h4 {
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.footer-col ul li {
    margin-bottom: 0.75rem;
}

.footer-col ul li a {
    color: var(--muted-color);
    font-size: 0.9rem;
}

.footer-col ul li a:hover {
    color: white;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 3rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    color: var(--muted-color);
    font-size: 0.85rem;
}

/* Showcase Section */
.showcase-section {
    background: radial-gradient(circle at bottom left, rgba(124, 58, 237, 0.05), transparent 40%);
}

.badge.purple {
    background: rgba(139, 92, 246, 0.1);
    color: #a78bfa;
    border-color: rgba(139, 92, 246, 0.2);
}

.showcase-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-top: 3rem;
}

.showcase-main .glass-container {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.showcase-img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    display: none;
    animation: fadeIn 0.5s ease-out;
}

.showcase-img.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

.showcase-thumbs {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.thumb {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.thumb img {
    width: 60px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.thumb span {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.thumb:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(139, 92, 246, 0.3);
}

.thumb.active {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.5);
}

.thumb.active img {
    opacity: 1;
}

.thumb.active span {
    color: #fff;
    font-weight: 500;
}

@media (max-width: 968px) {
    .showcase-grid { grid-template-columns: 1fr; }
    .showcase-thumbs { flex-direction: row; overflow-x: auto; padding-bottom: 1rem; }
    .thumb { flex-shrink: 0; min-width: 150px; }
}

/* App Section Layout */
.app-section {
    padding: 4rem 0;
}

.app-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}

.app-grid.reverse {
    direction: rtl;
}

.app-grid.reverse > div {
    direction: ltr;
}

.lead {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.check-list {
    list-style: none;
    margin-top: 2rem;
}

.check-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
    color: var(--muted-color);
}

.check-list li i {
    color: var(--primary-color);
}

.mini-carousel-standalone {
    margin-top: 3rem;
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.3);
}

.mini-carousel-standalone .carousel-track img {
    height: 180px;
}

.left-align {
    text-align: left;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    align-items: center;
}

.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 3rem;
    border-radius: 2rem;
    text-align: center;
}

/* Features Row */
.features-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.feature-item {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.04);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
}

/* Sentiment Box */
.sentiment-box {
    margin-top: 4rem;
    padding: 3rem;
    background: linear-gradient(to right, rgba(59, 130, 246, 0.05), rgba(139, 92, 246, 0.05));
    border-radius: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.sentiment-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.sentiment-tags span {
    padding: 0.5rem 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    font-size: 0.8rem;
    color: var(--muted-color);
}

/* Mini Carousel in Cards */
.mini-carousel {
    margin-top: 1.5rem;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.2);
    position: relative;
}

.carousel-track {
    display: flex;
    gap: 10px;
    padding: 10px;
    animation: scrollTrack 20s linear infinite;
}

.carousel-track:hover {
    animation-play-state: paused;
}

.carousel-track img {
    height: 100px;
    width: auto;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.carousel-track img:hover {
    transform: scale(1.05);
}

@keyframes scrollTrack {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Animations */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

.hero-visual.reveal-on-scroll {
    transform: scale(0.95) translateY(50px);
}

.hero-visual.revealed {
    transform: scale(1) translateY(0);
}

/* Custom styles for the sections */
/* --- NEW PREMIUM HUB STYLES --- */

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--muted-color);
    max-width: 700px;
    margin: 1.5rem auto 3rem;
    line-height: 1.6;
}

.glow-2 {
    position: absolute;
    top: 50px;
    right: 20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.2) 0%, transparent 70%);
    filter: blur(60px);
}

.center {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem auto;
}

/* Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.bento-item {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: transform 0.3s ease;
}

.bento-item:hover {
    transform: translateY(-5px);
    border-color: rgba(59, 130, 246, 0.3);
}

.bento-item.span-2 {
    grid-column: span 2;
}

.bento-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tags-container .tag {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 99px;
    font-size: 0.8rem;
    color: var(--muted-color);
    margin-right: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* App Showcase Gallery */
.split-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
    align-items: center;
}

.feature-list {
    margin-top: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.icon-box {
    width: 40px;
    height: 40px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--primary-color);
}

.feature-list strong {
    display: block;
    color: white;
    margin-bottom: 0.2rem;
}

.feature-list span {
    color: var(--muted-color);
    font-size: 0.95rem;
}

.app-showcase {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.main-screen {
    width: 100%;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    background: #0a0a0a;
    transition: opacity 0.2s ease;
}

.glass-effect {
    padding: 10px;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
}

.gallery-thumbs {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.thumb-btn {
    background: transparent;
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 0;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.3s ease;
    width: 100px;
    flex-shrink: 0;
}

.thumb-btn img {
    width: 100%;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.thumb-btn.active, .thumb-btn:hover {
    opacity: 1;
    border-color: var(--primary-color);
}

/* Animations */
.reveal-slide-up {
    animation: slideUpFade 1s ease forwards;
    opacity: 0;
    transform: translateY(30px);
}

.reveal-fade {
    animation: fadeIn 1s ease forwards;
    opacity: 0;
}

@keyframes slideUpFade {
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 968px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }
    .bento-item.span-2 {
        grid-column: span 1;
    }
    .split-layout {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .feature-list li {
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 991px) {
    * {
        max-width: 100vw;
        overflow-wrap: break-word;
        word-wrap: break-word;
    }
    
    .container {
        width: 100% !important;
        padding-left: 1.25rem !important;
        padding-right: 1.25rem !important;
    }

    h1 { font-size: 2.2rem !important; }
    h2 { font-size: 1.8rem !important; }
    .hero-subtitle { font-size: 1rem !important; }
    .hero { padding: 5rem 0 2rem; }

    .logo img { height: 32px !important; }
    nav .nav-inner { padding: 0.4rem 0.8rem; }

    .split-layout {
        display: block !important;
        text-align: center;
        width: 100% !important;
    }

    .content-side, .visual-side {
        width: 100% !important;
        display: block !important;
        margin-bottom: 2.5rem;
    }

    .feature-list li {
        justify-content: center;
        text-align: center;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        margin-bottom: 1.5rem;
    }

    .main-screen {
        width: 100% !important;
        height: auto !important;
    }

    .nav-links { display: none; }
    .nav-links.active {
        display: flex !important;
        position: absolute;
        top: 100%;
        left: 1rem;
        right: 1rem;
        width: calc(100% - 2rem);
        background: var(--glass-bg);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        border: 1px solid var(--glass-border);
        border-radius: 20px;
        text-align: center;
        box-shadow: 0 10px 30px rgba(0,0,0,0.2);
        margin-top: 1rem;
        z-index: 1001;
    }

    .mobile-menu-toggle { display: flex !important; }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        margin: 2rem auto 0;
        gap: 1rem;
    }
    .hero-actions .btn { width: 100%; }

    .section {
        padding: 4rem 0;
        width: 100%;
        overflow: hidden;
    }

    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
}

.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
}

/* =====================================================
   API FIRST BLOCK — CEDEARS Section (Full-width horizontal)
   ===================================================== */
.api-first-block {
    margin-top: 2.5rem;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.06) 0%, rgba(16, 185, 129, 0.04) 100%);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 1.5rem;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.api-first-block::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

/* Inner: 2-column horizontal layout */
.api-first-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: start;
}

.api-left-col {
    display: flex;
    flex-direction: column;
}

.api-right-col {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.api-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.88rem;
    padding: 0.7rem 1.4rem;
    align-self: flex-start;
}

.api-first-header {
    margin-bottom: 1.5rem;
}

.api-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(124, 58, 237, 0.15);
    border: 1px solid rgba(124, 58, 237, 0.35);
    color: #a78bfa;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.3rem 0.8rem;
    border-radius: 9999px;
    margin-bottom: 0.8rem;
}

.api-first-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
}

.api-first-desc {
    font-size: 0.9rem;
    color: var(--muted-color);
    line-height: 1.6;
}

/* Endpoint grid */
.api-endpoints-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    margin-bottom: 1.4rem;
}

.api-endpoint-card {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0.75rem;
    padding: 0.7rem 0.9rem;
    transition: var(--transition);
}

.api-endpoint-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(124, 58, 237, 0.25);
    transform: translateY(-1px);
}

.api-method {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    flex-shrink: 0;
    margin-top: 2px;
}

.api-method.post {
    background: rgba(124, 58, 237, 0.2);
    color: #c4b5fd;
    border: 1px solid rgba(124, 58, 237, 0.3);
}

.api-method.get {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.api-endpoint-info code {
    display: block;
    font-size: 0.78rem;
    font-family: 'Courier New', monospace;
    color: var(--text-color);
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.api-endpoint-info p {
    font-size: 0.73rem;
    color: var(--muted-color);
    line-height: 1.4;
}

/* Code preview terminal */
.api-code-preview {
    background: #0d0d14;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.85rem;
    overflow: hidden;
    margin-bottom: 1.4rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.light-mode .api-code-preview {
    background: #1a1a2e;
}

.api-code-header {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.6rem 1rem;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.api-code-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.api-code-dot.red    { background: #ff5f57; }
.api-code-dot.yellow { background: #febc2e; }
.api-code-dot.green  { background: #28c840; }

.api-code-lang {
    margin-left: auto;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--muted-color);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.api-code-body {
    padding: 1rem 1.2rem;
    font-size: 0.78rem;
    font-family: 'Courier New', monospace;
    line-height: 1.7;
    color: #a0aec0;
    white-space: pre;
    overflow-x: auto;
}

.json-key  { color: #c4b5fd; }
.json-str  { color: #6ee7b7; }
.json-num  { color: #fbbf24; }

/* CTA row */
.api-cta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.api-trust-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.api-trust-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted-color);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.3rem 0.75rem;
    border-radius: 9999px;
}

/* Responsive */
@media (max-width: 900px) {
    .api-first-inner {
        grid-template-columns: 1fr;
    }
    .api-right-col {
        order: -1; /* terminal above on mobile */
    }
    .api-cta-btn {
        width: 100%;
    }
}
@media (max-width: 768px) {
    .api-endpoints-grid {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   ENGINE BLOCK — Motor de Alertas (CEDEARS Section)
   ===================================================== */
.engine-block {
    background: linear-gradient(135deg, rgba(16,185,129,0.05) 0%, rgba(59,130,246,0.04) 60%, rgba(124,58,237,0.04) 100%);
    border: 1px solid rgba(16,185,129,0.18);
    border-radius: 1.5rem;
    padding: 2.25rem 2rem;
    position: relative;
    overflow: hidden;
}

.engine-block::before {
    content: '';
    position: absolute;
    top: -80px;
    left: -80px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(16,185,129,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.engine-block-header {
    margin-bottom: 1.75rem;
    max-width: 680px;
}

/* Animated badge */
.engine-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(16,185,129,0.12);
    border: 1px solid rgba(16,185,129,0.3);
    color: #34d399;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.3rem 0.85rem;
    border-radius: 9999px;
    margin-bottom: 0.9rem;
}

.engine-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    display: inline-block;
    animation: enginePulse 1.8s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes enginePulse {
    0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(16,185,129,0.5); }
    50%       { opacity: 0.85; transform: scale(1.25); box-shadow: 0 0 0 5px rgba(16,185,129,0); }
}

.engine-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.55rem;
    font-family: var(--font-heading);
    line-height: 1.3;
}

.engine-desc {
    font-size: 0.9rem;
    color: var(--muted-color);
    line-height: 1.65;
}

/* Indicators grid — 4 columns */
.engine-indicators-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.7rem;
    margin-bottom: 1.75rem;
}

.engine-indicator-card {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 0.85rem;
    padding: 0.9rem 1rem;
    transition: var(--transition);
}

.engine-indicator-card:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.12);
    transform: translateY(-2px);
}

.engine-ind-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.engine-indicator-card strong {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.2rem;
}

.engine-indicator-card span {
    font-size: 0.75rem;
    color: var(--muted-color);
    line-height: 1.4;
}

/* Stats footer row */
.engine-footer-row {
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 1rem;
    overflow: hidden;
}

.engine-stat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem 0.5rem;
    text-align: center;
    gap: 0.25rem;
}

.engine-stat-value {
    font-size: 1.35rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--text-color);
    line-height: 1;
}

.engine-stat-label {
    font-size: 0.7rem;
    color: var(--muted-color);
    font-weight: 500;
    line-height: 1.3;
}

.engine-stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255,255,255,0.07);
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 1024px) {
    .engine-indicators-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 640px) {
    .engine-indicators-grid {
        grid-template-columns: 1fr;
    }
    .engine-footer-row {
        flex-wrap: wrap;
    }
    .engine-stat-divider {
        display: none;
    }
    .engine-stat {
        flex: 0 0 50%;
        border-bottom: 1px solid rgba(255,255,255,0.06);
    }
}

/* Crypto pills row */
.engine-crypto-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.engine-crypto-label {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--muted-color);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-right: 0.25rem;
}

.engine-crypto-pill {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.25rem 0.7rem;
    border-radius: 9999px;
    border: 1px solid;
    letter-spacing: 0.03em;
}

.engine-crypto-pill.btc  { background: rgba(247,147,26,0.1);  border-color: rgba(247,147,26,0.3);  color: #f7931a; }
.engine-crypto-pill.eth  { background: rgba(98,126,234,0.1);  border-color: rgba(98,126,234,0.3);  color: #627eea; }
.engine-crypto-pill.sol  { background: rgba(153,69,255,0.1);  border-color: rgba(153,69,255,0.3);  color: #9945ff; }
.engine-crypto-pill.xrp  { background: rgba(0,170,228,0.1);   border-color: rgba(0,170,228,0.3);   color: #00aae4; }
.engine-crypto-pill.ada  { background: rgba(0,51,173,0.12);   border-color: rgba(0,100,255,0.25);  color: #6b9fff; }
.engine-crypto-pill.other{ background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.1); color: var(--muted-color); }

