/* ═══════════════════════════════════════════════════════════
   #founder — Founder Bio & Methodology Section (Dark Theme)
   Spacious layout featuring portrait, camera-viewfinder focus, and methodology grids
   ═══════════════════════════════════════════════════════════ */

#founder {
    background-color: var(--wp--preset--color--footer-background);
    color: #ffffff;
    position: relative;
    overflow: hidden;

    /* Ambient background glow */
    &::before {
        content: '';
        position: absolute;
        width: 800px;
        height: 800px;
        bottom: -200px;
        right: -100px;
        border-radius: 50%;
        background: radial-gradient(circle, color-mix(in srgb, var(--wp--preset--color--primary) 8%, transparent) 0%, transparent 70%);
        z-index: 0;
        pointer-events: none;
    }

    &::after {
        content: '';
        position: absolute;
        width: 600px;
        height: 600px;
        top: -100px;
        left: -100px;
        border-radius: 50%;
        background: radial-gradient(circle, color-mix(in srgb, var(--wp--preset--color--focus) 6%, transparent) 0%, transparent 70%);
        z-index: 0;
        pointer-events: none;
    }
}

/* ── Founder Grid Layout ────────────────────────────── */
.founder-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;

    @media (width >=1024px) {
        grid-template-columns: 1fr 1.2fr;
        gap: 5rem;
    }
}

/* ── Left Side: Portrait & Frame ────────────────────── */
.founder-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;

    & .visual-frame {
        position: relative;
        width: 100%;
        max-width: 420px;
        background: color-mix(in srgb, #ffffff 5%, transparent);
        padding: 0.5rem;
        border: 1px solid color-mix(in srgb, #ffffff 10%, transparent);
        box-shadow:
            0 20px 40px -15px rgba(0, 0, 0, 0.5),
            0 0 30px rgba(var(--wp--preset--color--focus), 0.05);
        transition: all 0.4s ease;

        &:hover {
            transform: translateY(-5px);
            border-color: color-mix(in srgb, var(--wp--preset--color--focus) 30%, transparent);
            box-shadow:
                0 30px 60px -20px rgba(0, 0, 0, 0.6),
                0 0 40px color-mix(in srgb, var(--wp--preset--color--focus) 10%, transparent);

            /* Animate corner reticles inward */
            & .corner-reticle.top-left {
                top: 6px;
                left: 6px;
            }

            & .corner-reticle.top-right {
                top: 6px;
                right: 6px;
            }

            & .corner-reticle.bottom-left {
                bottom: 6px;
                left: 6px;
            }

            & .corner-reticle.bottom-right {
                bottom: 6px;
                right: 6px;
            }
        }
    }

    & .founder-photo {
        width: 100%;
        height: auto;
        display: block;
        object-fit: cover;
    }

    /* Target Reticles (Camera Viewfinder effect) */
    & .corner-reticle {
        position: absolute;
        width: 18px;
        height: 18px;
        border: 2.5px solid var(--wp--preset--color--focus);
        z-index: 2;
        pointer-events: none;
        transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);

        &.top-left {
            top: -6px;
            left: -6px;
            border-right: none;
            border-bottom: none;
        }

        &.top-right {
            top: -6px;
            right: -6px;
            border-left: none;
            border-bottom: none;
        }

        &.bottom-left {
            bottom: -6px;
            left: -6px;
            border-right: none;
            border-top: none;
        }

        &.bottom-right {
            bottom: -6px;
            right: -6px;
            border-left: none;
            border-top: none;
        }
    }
}

/* ── Right Side: Text Bio & Methodology ──────────────── */
.founder-info {

    & .pretext {
        background: color-mix(in srgb, #cf2e2e 20%, transparent);
        color: var(--wp--preset--color--base);
        border-color: color-mix(in srgb, #cf2e2e 50%, transparent);
    }

    & .founder-name {
        font-size: clamp(2.4rem, 5vw, 3.4rem);
        font-weight: 800;
        color: #ffffff;
        margin-bottom: 1rem;
        letter-spacing: -0.02em;
    }

    & .founder-role {
        font-size: 1.1rem;
        font-weight: 600;
        color: color-mix(in srgb, #ffffff, transparent 35%);
        margin-top: -1.25rem;
    }
}

/* Testimonial Quote */
.founder-quote {
    position: relative;
    background: color-mix(in srgb, #ffffff 4%, transparent);
    border-radius: 1rem;
    padding: 1.75rem 2rem 1.75rem 3rem;
    margin: 3rem 0;

    & .quote-icon {
        position: absolute;
        top: 1.5rem;
        left: 1rem;
        width: 1.5rem;
        height: 1.5rem;
        color: color-mix(in srgb, var(--wp--preset--color--focus) 20%, transparent);
    }

    & p {
        font-size: 1.15rem;
        line-height: 1.6;
        font-style: italic;
        color: color-mix(in srgb, #ffffff, transparent 15%);
        margin: 0;
    }
}

/* Methodology Grid */
.founder-methodology {
    width: 100%;

    & h3 {
        font-size: 0.85rem;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: color-mix(in srgb, #ffffff, transparent 50%);
        margin-top: 0;
        margin-bottom: 1.25rem;
    }
}

.methodology-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 3rem;
}

.methodology-item {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;

    & .item-icon {
        width: 38px;
        height: 38px;
        border-radius: .3rem;
        background: color-mix(in srgb, var(--wp--preset--color--focus) 12%, transparent);
        border: 1px solid color-mix(in srgb, var(--wp--preset--color--focus) 25%, transparent);
        color: var(--wp--preset--color--focus);
        display: grid;
        place-items: center;
        flex-shrink: 0;

        & svg {
            width: 18px;
            height: 18px;
        }
    }

    & .item-text {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;

        & strong {
            font-size: 1.05rem;
            font-weight: 700;
            color: #ffffff;
        }

        & span {
            font-size: 0.95rem;
            line-height: 1.5;
            color: color-mix(in srgb, #ffffff, transparent 40%);
        }
    }
}

/* Big counter stats badge */
.founder-counter {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
    background: linear-gradient(135deg, color-mix(in srgb, #ffffff 4%, transparent), color-mix(in srgb, #ffffff 1%, transparent));
    border: 1px solid color-mix(in srgb, #ffffff 6%, transparent);
    padding: 1.5rem 2rem;
    border-radius: 1rem;
    width: 100%;
    margin-top: 0.5rem;
    position: relative;

    /* Resplandor interno dinámico */
    &::before {
        content: "";
        position: absolute;
        inset: 0;
        background: radial-gradient(600px circle at var(--mouse-x, -999px) var(--mouse-y, -999px), rgba(0, 162, 255, 0.12), transparent 50%);
        opacity: 0;
        transition: opacity 0.4s ease;
        pointer-events: none;
        z-index: -1;
        border-radius: inherit;
        corner-shape: inherit;
    }

    /* Borde dinámico que sigue al ratón */
    &::after {
        content: "";
        position: absolute;
        inset: -1px;
        background: radial-gradient(350px circle at var(--mouse-x, -999px) var(--mouse-y, -999px), rgba(0, 162, 255, 0.8), transparent 50%);
        opacity: 0;
        transition: opacity 0.4s ease;
        pointer-events: none;
        z-index: 1;
        border-radius: inherit;
        corner-shape: inherit;
        -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
        mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
        -webkit-mask-composite: xor;
        mask-composite: exclude;
        padding: 1px;
    }

    &:hover::before,
    &:hover::after {
        opacity: 1;
    }

    @media (width>=768px) {
        flex-direction: row;
        width: fit-content;
    }

    & .counter-number {
        font-size: clamp(3rem, 5vw, 4.5rem);
        font-weight: 900;
        color: var(--wp--preset--color--focus);
        line-height: 1;
        letter-spacing: -0.02em;
        text-shadow: 0 0 20px color-mix(in srgb, var(--wp--preset--color--focus) 20%, transparent);
        transition: transform 0.3s ease;
    }

    & .counter-label {
        font-size: 0.95rem;
        line-height: 1.4;
        color: color-mix(in srgb, #ffffff, transparent 30%);
        max-width: 250px;
    }
}

/* Chromium Smooth Rounded Corners Support */
.is-chromium {
    & .item-icon {
        border-radius: .8rem;
        corner-shape: squircle;
    }

    & #founder .founder-counter {
        border-radius: 2rem;
        corner-shape: squircle;
    }

    & #founder .founder-quote {
        border-radius: 2rem;
        corner-shape: squircle;
    }
}