/* ═══════════════════════════════════════════
   DataDeep — Platform Page Styles
   Inspired by n8n.io bento-grid design
   ═══════════════════════════════════════════ */

/* ─── PAGE HERO ─── */
.page-hero {
    padding: 180px 0 140px;
    background: var(--dd-gradient-hero);
    position: relative;
    overflow: hidden;
    text-align: center;
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(187, 49, 199, 0.06) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 20%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 20%, transparent 100%);
}

.page-hero-content { position: relative; z-index: 2; }

.page-hero h1 {
    color: var(--dd-white);
    max-width: 820px;
    margin: 0 auto 20px;
    font-size: var(--font-size-hero);
    line-height: var(--line-height-tight);
    letter-spacing: var(--letter-spacing-tight);
}

.page-hero .hero-sub {
    color: rgba(255,255,255,0.6);
    max-width: 600px;
    margin: 0 auto 32px;
    font-size: var(--font-size-md);
    line-height: var(--line-height-relaxed);
}

.page-hero .btn { position: relative; z-index: 2; }

/* ─── HERO SHOWCASE IMAGE ─── */
.hero-showcase {
    background: var(--dd-navy);
    padding: 80px 0;
    position: relative;
    overflow: visible;
}

.hero-img-wrapper {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
}

/* Glow effect behind the image */
.hero-img-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 70%;
    background: radial-gradient(
        ellipse at center,
        rgba(187, 49, 199, 0.18) 0%,
        rgba(123, 47, 217, 0.1) 35%,
        transparent 70%
    );
    filter: blur(60px);
    pointer-events: none;
    z-index: 0;
    animation: glowPulse 4s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    50%      { opacity: 0.7; transform: translate(-50%, -50%) scale(1.05); }
}

/* Image frame — entrance + breathing animation */
.hero-img-frame {
    position: relative;
    z-index: 1;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 25px 60px rgba(10, 10, 40, 0.5),
        0 0 80px rgba(187, 49, 199, 0.08);
    animation: heroReveal 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both,
               heroFloat 6s ease-in-out 1.4s infinite;
    transition: box-shadow 0.4s var(--ease-smooth);
}

@keyframes heroReveal {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

.hero-img-frame:hover {
    box-shadow:
        0 30px 80px rgba(10, 10, 40, 0.55),
        0 0 100px rgba(187, 49, 199, 0.12);
}

.hero-img-frame img {
    display: block;
    width: 100%;
    height: auto;
    /* Sharp rendering — no 3D transforms that cause sub-pixel blur */
    backface-visibility: hidden;
    -webkit-font-smoothing: subpixel-antialiased;
}


/* ─── MODULES — BENTO GRID ─── */
.modules-section {
    background: var(--dd-navy);
    position: relative;
    overflow: hidden;
}

.modules-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(187, 49, 199, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 80% 50% at 50% 30%, black 10%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 80% 50% at 50% 30%, black 10%, transparent 100%);
    pointer-events: none;
}

.modules-section .section-header {
    position: relative;
    z-index: 2;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* ─── BENTO CARD BASE ─── */
.bento-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--duration-normal) var(--ease-smooth);
    display: flex;
    flex-direction: column;
}

.bento-card:hover {
    border-color: rgba(187, 49, 199, 0.2);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-4px);
    box-shadow: 0 8px 40px rgba(187, 49, 199, 0.08);
}

/* ─── BENTO CARD SIZES (DESKTOP) ─── */
.bento-7  { grid-column: span 7; }
.bento-5  { grid-column: span 5; }
.bento-6  { grid-column: span 6; }
.bento-4  { grid-column: span 4; }
.bento-12 { grid-column: span 12; }
.bento-8  { grid-column: span 8; }

/* ─── CARD VISUAL ─── */
.bento-card-visual {
    width: 100%;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    position: relative;
}

.bento-card-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top left;
    transition: transform 0.5s var(--ease-smooth);
    display: block;
}

.bento-card:hover .bento-card-visual img {
    transform: scale(1.03);
}

/* Vertical cards: image on top */
.bento-card .bento-card-visual {
    aspect-ratio: 16 / 10;
}

/* ─── CARD CONTENT ─── */
.bento-card-content {
    padding: 28px 28px 32px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.bento-card-content .module-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--dd-purple-light);
    margin-bottom: 12px;
}

.bento-card-content h4 {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--dd-white);
    margin-bottom: 10px;
    line-height: 1.3;
}

.bento-card-content p {
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, 0.55);
    line-height: var(--line-height-relaxed);
    margin: 0;
}

/* ─── WIDE / FEATURED CARDS (horizontal layout) ─── */
.bento-card.bento-wide {
    flex-direction: row;
}

.bento-card.bento-wide .bento-card-visual {
    width: 55%;
    min-width: 55%;
    aspect-ratio: auto;
    border-bottom: none;
    border-right: 1px solid rgba(255, 255, 255, 0.04);
    min-height: 280px;
}

.bento-card.bento-wide .bento-card-content {
    width: 45%;
    padding: 36px 32px;
}

.bento-card.bento-wide .bento-card-content h4 {
    font-size: var(--font-size-xl);
}

/* ─── FULL-WIDTH FEATURED CARD ─── */
.bento-card.bento-featured {
    flex-direction: row;
    background: linear-gradient(135deg, rgba(187, 49, 199, 0.06) 0%, rgba(123, 47, 217, 0.04) 100%);
    border-color: rgba(187, 49, 199, 0.12);
}

.bento-card.bento-featured .bento-card-visual {
    width: 60%;
    min-width: 60%;
    aspect-ratio: auto;
    border-bottom: none;
    border-right: 1px solid rgba(255, 255, 255, 0.04);
    min-height: 320px;
}

.bento-card.bento-featured .bento-card-content {
    width: 40%;
    padding: 48px 40px;
}

.bento-card.bento-featured .bento-card-content h4 {
    font-size: var(--font-size-2xl);
}

.bento-card.bento-featured .bento-card-content p {
    font-size: var(--font-size-base);
}

.bento-card.bento-featured:hover {
    border-color: rgba(187, 49, 199, 0.25);
    box-shadow: 0 12px 48px rgba(187, 49, 199, 0.12);
}

/* ─── SECTION DIVIDER (between dark sections) ─── */
.modules-section .section-divider-inner {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(187, 49, 199, 0.15), transparent);
    margin-bottom: var(--space-16);
}


/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */

@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .bento-7,
    .bento-5,
    .bento-6,
    .bento-4,
    .bento-8,
    .bento-12 {
        grid-column: span 1;
    }

    /* Full-width featured stays full */
    .bento-card.bento-featured {
        grid-column: span 2;
    }

    /* Wide cards go vertical on tablet */
    .bento-card.bento-wide {
        flex-direction: column;
    }

    .bento-card.bento-wide .bento-card-visual {
        width: 100%;
        min-width: 100%;
        aspect-ratio: 16 / 10;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.04);
        min-height: auto;
    }

    .bento-card.bento-wide .bento-card-content {
        width: 100%;
        padding: 28px 28px 32px;
    }

    .bento-card.bento-wide .bento-card-content h4 {
        font-size: var(--font-size-lg);
    }

    /* Featured stays horizontal but smaller */
    .bento-card.bento-featured .bento-card-visual {
        width: 50%;
        min-width: 50%;
        min-height: 260px;
    }

    .bento-card.bento-featured .bento-card-content {
        width: 50%;
        padding: 32px;
    }

    .bento-card.bento-featured .bento-card-content h4 {
        font-size: var(--font-size-xl);
    }
}

@media (max-width: 768px) {
    .page-hero {
        padding: 140px 0 80px;
    }

    .page-hero h1 {
        font-size: clamp(1.75rem, 5vw, 2.5rem);
    }

    .hero-showcase {
        padding: 0 0 var(--space-6);
    }

    .hero-img-frame {
        border-radius: var(--radius);
    }

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

    .bento-7,
    .bento-5,
    .bento-6,
    .bento-4,
    .bento-8,
    .bento-12 {
        grid-column: span 1;
    }

    .bento-card.bento-featured {
        grid-column: span 1;
        flex-direction: column;
    }

    .bento-card.bento-featured .bento-card-visual {
        width: 100%;
        min-width: 100%;
        aspect-ratio: 16 / 10;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.04);
        min-height: auto;
    }

    .bento-card.bento-featured .bento-card-content {
        width: 100%;
        padding: 28px 24px 32px;
    }

    .bento-card.bento-featured .bento-card-content h4 {
        font-size: var(--font-size-xl);
    }
}

@media (max-width: 480px) {
    .page-hero {
        padding: 120px 0 60px;
    }

    .bento-card-content {
        padding: 20px 20px 24px;
    }

    .bento-card.bento-featured .bento-card-content {
        padding: 24px 20px 28px;
    }
}
