/* =================================================================
   CODENOSYS DIGITAL MARKETING SERVICE PAGE STYLES
   ================================================================= */

/* --- 1. Hero Section --- */
.dm-hero {
    position: relative;
    padding: 180px 0 100px;
    background: radial-gradient(circle at top, var(--color-bg-light), var(--color-bg) 70%);
    overflow: hidden;
}

.dm-hero__bg {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.holo-grid {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(138, 66, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(138, 66, 255, 0.08) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(circle at center, black 30%, transparent 80%);
    transform: perspective(600px) rotateX(60deg) translateY(-80px) scale(1.8);
    opacity: 0.5;
    animation: gridMove 25s linear infinite;
}

@keyframes gridMove {
    0% { background-position: 0 0; }
    100% { background-position: 0 50px; }
}

.holo-glow {
    position: absolute;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(138, 66, 255, 0.18) 0%, transparent 70%);
    filter: blur(80px);
}

.dm-hero__layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 80px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.dm-hero__content {
    max-width: 680px;
}

.dm-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(138, 66, 255, 0.1);
    border: 1px solid rgba(138, 66, 255, 0.2);
    border-radius: 100px;
    padding: 6px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-primary-light);
    margin-bottom: 24px;
}

.dm-hero__badge .live-dot {
    width: 6px;
    height: 6px;
    background: var(--color-accent);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--color-accent);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.dm-hero .title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    color: #fff;
    letter-spacing: -0.02em;
}

.dm-hero .subtitle {
    font-size: 1.15rem;
    color: var(--color-text-muted);
    margin-bottom: 40px;
    line-height: 1.65;
}

.dm-hero__actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* Button Classes */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(45deg, var(--color-primary), var(--color-secondary));
    color: #fff;
    padding: 16px 36px;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(138, 66, 255, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: none;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(138, 66, 255, 0.45);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f9f9f9;
    padding: 16px 36px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: none;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
}

/* --- Growth HUD Dashboard --- */
.growth-hud {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
}

.hud-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 12px;
}

.hud-status {
    font-family: monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--color-primary-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

.hud-status .dot {
    width: 6px;
    height: 6px;
    background: #0aff60;
    border-radius: 50%;
    box-shadow: 0 0 8px #0aff60;
    animation: pulse 1.5s infinite;
}

.hud-metric {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: #0aff60;
    font-weight: bold;
}

.hud-graph {
    height: 120px;
    margin: 20px 0;
    position: relative;
}

.graph-svg {
    width: 100%;
    height: 100%;
}

.graph-line {
    stroke-dasharray: var(--path-length, 325.07);
    stroke-dashoffset: calc(-1 * var(--path-length, 325.07));
    animation: drawLine 3.5s cubic-bezier(0.23, 1, 0.32, 1) infinite;
}

@keyframes drawLine {
    0% { stroke-dashoffset: calc(-1 * var(--path-length, 325.07)); }
    100% { stroke-dashoffset: 0; }
}

.glow-dot-wrap {
    offset-path: path("M10,100 Q60,95 100,50 T200,40 T290,15");
    animation: moveDot 3.5s cubic-bezier(0.23, 1, 0.32, 1) infinite;
    transform-box: fill-box;
    transform-origin: center;
}

@keyframes moveDot {
    0% { offset-distance: 0%; }
    100% { offset-distance: 100%; }
}

.glow-dot {
    transform-box: fill-box;
    transform-origin: center;
    animation: dotPulse 2s infinite alternate;
}

@keyframes dotPulse {
    0% { transform: scale(1); filter: drop-shadow(0 0 2px var(--color-accent)); }
    100% { transform: scale(1.3); filter: drop-shadow(0 0 10px var(--color-accent)); }
}

.hud-leads {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 110px;
}

.lead-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    opacity: 0.4;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.lead-item.active {
    opacity: 1;
    border-color: rgba(138, 66, 255, 0.2);
    background: rgba(138, 66, 255, 0.05);
}

.lead-item .time { color: rgba(255, 255, 255, 0.3); }
.lead-item .label { color: rgba(255, 255, 255, 0.7); margin-left: 10px; flex: 1; }
.lead-item .val { color: #0aff60; font-weight: bold; }

/* --- 2. The Friction (Problem) --- */
.dm-problem {
    padding: 120px 0;
    position: relative;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.dm-problem__grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 80px;
    align-items: center;
}

/* Funnel Visual Container */
.funnel-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.funnel-row {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 24px;
    align-items: center;
}

.funnel-tier {
    position: relative;
    padding: 15px 25px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 55px;
    transition: all 0.3s ease;
}

.funnel-tier .label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
}

.funnel-tier.tier-1 { width: 100%; background: rgba(138, 66, 255, 0.08); }
.funnel-tier.tier-2 { width: 85%; margin: 0 auto; background: rgba(138, 66, 255, 0.05); }
.funnel-tier.tier-3 { width: 70%; margin: 0 auto; background: rgba(138, 66, 255, 0.02); }
.funnel-tier.tier-4 { 
    width: 55%; 
    margin: 0 auto;
    background: rgba(10, 255, 96, 0.05); 
    border-color: rgba(10, 255, 96, 0.2); 
}

.funnel-tier.tier-4 .label.success {
    color: #0aff60;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.funnel-leak {
    display: flex;
    align-items: center;
}

.leak-tag {
    font-family: monospace;
    font-size: 0.78rem;
    color: #ff5f56;
    background: rgba(255, 95, 86, 0.1);
    border: 1px solid rgba(255, 95, 86, 0.2);
    padding: 6px 12px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.leak-tag.success {
    color: #0aff60;
    background: rgba(10, 255, 96, 0.15);
    border-color: rgba(10, 255, 96, 0.3);
}

/* Problem Copy */
.section-tag {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-primary-light);
    margin-bottom: 16px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 20px;
    color: #fff;
}

.section-desc {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-bottom: 40px;
}

.problem-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.problem-list li {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.problem-list li .icon-box {
    width: 48px;
    height: 48px;
    background: rgba(138, 66, 255, 0.05);
    border: 1px solid rgba(138, 66, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary-light);
    font-size: 1.4rem;
    flex-shrink: 0;
}

.problem-list li strong {
    display: block;
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 6px;
}

.problem-list li p {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}

/* --- 3. The Protocol (Conversion Protocols Grid) --- */
.dm-protocol {
    padding: 120px 0;
    background: #02040a;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.dm-protocol__grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 80px;
    align-items: center;
}

.protocol-points {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 40px;
}

.protocol-point {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.protocol-point .point-num {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--color-primary-light);
    opacity: 0.8;
}

.protocol-point h4 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 6px;
}

.protocol-point p {
    font-size: 0.98rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

/* Conversions API Visual Diagram */
.capi-architecture-container {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    padding: 30px;
    width: 100%;
}

.capi-map {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

.capi-node {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    width: 100%;
}

.capi-node .node-icon {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #fff;
    flex-shrink: 0;
}

.capi-node span {
    font-size: 0.85rem;
    color: #fff;
    line-height: 1.4;
    font-weight: 500;
}

.capi-node small {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    font-weight: 600;
}

.status-blocked { color: #ff5f56; }
.status-active { color: #0aff60; }

.capi-connector {
    width: 2px;
    height: 35px;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
}

.capi-connector::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -4px;
    width: 10px;
    height: 10px;
    border-right: 2px solid;
    border-bottom: 2px solid;
    transform: rotate(45deg);
}

.capi-connector.blocked {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.1), #ff5f56);
}
.capi-connector.blocked::after {
    border-color: #ff5f56;
}

.capi-connector.secure {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.1), #0aff60);
}
.capi-connector.secure::after {
    border-color: #0aff60;
}

/* --- 4. Bento Capabilities Grid --- */
.dm-suite {
    padding: 120px 0;
    background: radial-gradient(circle at bottom, rgba(138, 66, 255, 0.02) 0%, transparent 70%);
}

.dm-suite__header {
    text-align: center;
    margin-bottom: 60px;
}

.dm-bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.dm-bento-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 40px;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dm-bento-card:hover {
    border-color: var(--color-primary-light);
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.dm-bento-card.large {
    grid-column: span 2;
}

.dm-bento-card .bento-icon {
    width: 50px;
    height: 50px;
    background: rgba(138, 66, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--color-primary-light);
}

.dm-bento-card h3 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 600;
    color: #fff;
}

.dm-bento-card p {
    font-size: 0.98rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

/* --- 5. Stats Section --- */
.dm-stats {
    padding: 80px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.15);
}

.dm-stats__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    text-align: center;
}

.stat-card {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    color: #fff;
}

.stat-card .lab-counter {
    background: linear-gradient(45deg, var(--color-primary-light), var(--color-accent));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-card p {
    font-family: var(--font-primary);
    font-size: 1rem;
    color: var(--color-text-muted);
    margin-top: 12px;
    font-weight: 500;
}

/* --- 6. FAQ & CTA --- */
.dm-faq {
    padding: 120px 0;
}

.ui-faq__grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: flex-start;
}

.ui-section-header h2 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 40px;
}

.faq-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 24px 0;
}

.faq-trigger {
    width: 100%;
    background: none;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    font-size: 1.15rem;
    font-weight: 600;
    text-align: left;
    transition: color 0.3s;
}

.faq-trigger i {
    font-size: 1.4rem;
    color: var(--color-primary-light);
    transition: transform 0.4s ease;
}

.faq-item.active .faq-trigger i {
    transform: rotate(45deg);
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.faq-content p {
    padding-top: 16px;
    font-size: 0.98rem;
    line-height: 1.6;
    color: var(--color-text-muted);
}

/* CTA Card */
.dm-cta-box {
    background: linear-gradient(135deg, rgba(138, 66, 255, 0.03), rgba(46, 107, 255, 0.03));
    border: 1px solid rgba(138, 66, 255, 0.15);
    border-radius: 32px;
    padding: 50px 40px;
    text-align: center;
    box-shadow: 0 20px 45px rgba(138, 66, 255, 0.05);
}

.dm-cta-box h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
}

.dm-cta-box p {
    font-size: 0.98rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-bottom: 32px;
}

/* --- 7. Responsive Adaptations --- */
@media (max-width: 1024px) {
    .dm-hero__layout {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .dm-hero__visual {
        max-width: 500px;
        margin: 0 auto;
        width: 100%;
    }

    .dm-problem__grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .dm-protocol__grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .dm-protocol__visual {
        max-width: 400px;
        margin: 0 auto;
        width: 100%;
    }

    .ui-faq__grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }

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

    .dm-bento-card.large {
        grid-column: span 1;
    }
}

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

    .funnel-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .funnel-tier {
        width: 100% !important;
        margin: 0 auto !important;
    }

    .funnel-leak {
        justify-content: center;
        margin-bottom: 15px;
    }

    .dm-stats__grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}
