/* =========================================================
   VARIABLES
========================================================= */

:root {
    --navy: #163a57;
    --navy2: #09263e;

    --gold: #b48d5e;
    --gold2: #d0af82;

    --ink: #224761;

    --paper: #fff;
    --soft: #f6f7f8;

    --max: 1180px;
}


/* =========================================================
   RESET / BASE
========================================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);

    font-family: Montserrat, Arial, sans-serif;
    line-height: 1.58;
}

img {
    display: block;
    max-width: 100%;
}

button,
input,
textarea,
select {
    font: inherit;
}


/* =========================================================
   CONTENEDOR
========================================================= */

.wrap {
    width: min(
        var(--max),
        calc(100% - 48px)
    );

    margin-inline: auto;
}


/* =========================================================
   HERO
========================================================= */

.hero {
    min-height: 500px;

    display: grid;
    align-items: center;

    position: relative;
    isolation: isolate;

    background:
        #f5f5f3
        url("images/Banner principal.jpg")
        center / cover
        no-repeat;
}


/* Overlay */

.hero::after {
    content: "";

    position: absolute;
    inset: 0;

    z-index: -1;

    background:
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.96),
            rgba(255, 255, 255, 0.58) 48%,
            rgba(255, 255, 255, 0.05)
        );
}


/* Título */

.hero h1 {
    margin: 0;

    font-family:
        "Cormorant Garamond",
        Georgia,
        serif;

    font-size: clamp(
        3rem,
        6vw,
        5.7rem
    );

    font-weight: 500;
    line-height: 1;
}

.hero h1 strong {
    font-weight: 600;
}


/* Nombre */

.hero p {
    display: inline-block;

    margin: 28px 0 0;
    padding: 5px 20px 8px;

    color: #fff;
    background: var(--gold);

    font-size: clamp(
        1.3rem,
        2.5vw,
        2.15rem
    );

    font-weight: 300;
}


/* =========================================================
   ABOUT — QUIÉN ES LEXON
========================================================= */

.about {
    min-height: 440px;

    display: grid;
    align-items: center;

    background:
        #fff
        url("images/Quien es Lexon Abogados.jpg")
        center / cover
        no-repeat;
}

.about-inner {
    display: grid;

    grid-template-columns:
        1.25fr
        0.75fr;
}

.about h2 {
    margin: 0 0 24px;

    font-size: clamp(
        1.65rem,
        3vw,
        2.45rem
    );

    font-weight: 400;
}

.about p {
    font-size: clamp(
        1rem,
        1.65vw,
        1.2rem
    );
}


/* =========================================================
   ESPECIALIDADES
========================================================= */

.specialties {
    padding: 64px 0 72px;

    text-align: center;
}

.specialties > h2,
.team > div > h2 {
    margin: 0 0 42px;

    font-size: clamp(
        1.65rem,
        3vw,
        2.35rem
    );

    font-weight: 400;
}


/* Grid */

.specialty-grid {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 26px;
}


/* Card */

.specialty {
    padding: 32px 26px;

    border-radius: 20px;

    background: var(--soft);

    opacity: 0.2;

    transform: scale(0.96);

    transition:
        opacity 0.65s ease,
        transform 0.65s ease,
        background 0.65s ease,
        box-shadow 0.65s ease;

    outline: none;

    cursor: pointer;
}


/* Card activo */

.specialty.is-active,
.specialty:hover,
.specialty:focus-visible {
    opacity: 1;

    transform: scale(1);

    background: #fff;

    box-shadow:
        0 16px 42px
        rgba(15, 50, 75, 0.14);
}


/* Focus */

.specialty:focus-visible {
    box-shadow:
        0 0 0 3px var(--gold),
        0 16px 42px
        rgba(15, 50, 75, 0.14);
}


/* Icono */

.specialty img {
    width: 88px;
    height: 88px;

    margin: 0 auto 18px;

    object-fit: contain;
}


/* Título */

.specialty h3 {
    margin: 0 0 12px;
}


/* Texto */

.specialty p {
    margin: 0;

    font-size: 0.9rem;
}


/* =========================================================
   CONTROLES ESPECIALIDADES
========================================================= */

.specialty-controls {
    display: flex;

    align-items: center;
    justify-content: center;

    gap: 18px;

    margin-top: 32px;
}


/* Botones */

.specialty-controls button {
    width: 42px;
    height: 42px;

    border: 1px solid var(--navy);
    border-radius: 50%;

    color: var(--navy);
    background: #fff;

    cursor: pointer;

    transition:
        color 0.25s ease,
        background 0.25s ease;
}

.specialty-controls button:hover {
    color: #fff;
    background: var(--navy);
}


/* Dots */

[data-specialty-dots] {
    display: flex;

    align-items: center;

    gap: 8px;
}

[data-specialty-dots] span {
    width: 8px;
    height: 8px;

    border-radius: 10px;

    background: #ccd4da;

    transition:
        width 0.25s ease,
        background 0.25s ease;
}

[data-specialty-dots] span.active {
    width: 26px;

    background: var(--gold);
}


/* =========================================================
   MISIÓN / VISIÓN
========================================================= */

.purpose {
    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 55px;

    align-items: start;

    padding: 15px 0 85px;
}


/* Card */

.purpose-card {
    min-height: 300px;

    display: flex;
    flex-direction: column;
    align-items: center;

    padding: 42px 38px;

    border-radius: 22px;

    color: #fff;

    background:
        linear-gradient(
            135deg,
            var(--gold2),
            var(--gold)
        );

    text-align: center;

    opacity: 1;

    transform: scale(0.97);

    cursor: pointer;

    transition:
        min-height 0.55s ease,
        background 0.55s ease,
        transform 0.35s ease,
        box-shadow 0.35s ease;

    outline: none;
}


/* Card activo */

.purpose-card:hover,
.purpose-card:focus-visible {
    transform: translateY(-4px);

    box-shadow:
        0 14px 0 -6px var(--navy),
        0 24px 38px rgba(24, 58, 86, 0.18);
}

.purpose-card.is-active {
    min-height: 520px;

    background:
        linear-gradient(
            145deg,
            var(--navy),
            var(--navy2)
        );

    transform: scale(1);

    box-shadow:
        0 14px 0 -6px var(--navy),
        0 24px 38px
        rgba(24, 58, 86, 0.18);
}


/* Icono */

.purpose-card img {
    width: 115px;
    height: 115px;

    margin: 0 auto;

    object-fit: contain;

    filter:
        brightness(0)
        invert(1);
}


/* Título */

.purpose-card h2 {
    margin: 14px 0 8px;

    text-transform: uppercase;

    font-weight: 400;
}


/* Texto */

.purpose-card p {
    max-height: 0;

    margin: 0;

    overflow: hidden;

    opacity: 0;

    text-align: left;
    line-height: 1.7;

    transition:
        max-height 0.7s ease,
        opacity 0.45s ease,
        margin-top 0.45s ease;
}

.purpose-card.is-active p {
    max-height: 900px;

    margin-top: 12px;

    opacity: 1;
}


/* =========================================================
   EQUIPO
========================================================= */

.team {
    padding: 70px 0 80px;

    background: var(--soft);
}

.team > div > h2 {
    text-align: center;
}


/* =========================================================
   PERFIL
========================================================= */

.profile {
    display: grid;

    grid-template-columns:
        1.25fr
        0.75fr;

    gap: 65px;

    align-items: center;

    padding: 45px 0 75px;
}


/* Separador entre perfiles */

.profile + .profile {
    border-top: 1px solid #d9dfe3;
}


/* imagesn */

.profile > img {
    width: 100%;
    max-height: 715px;

    border-radius:
        0 36px
        0 36px;

    object-fit: cover;
}


/* =========================================================
   ENCABEZADO DEL PERFIL
========================================================= */

.profile header {
    margin-bottom: 26px;
    padding: 18px 28px;

    color: #fff;

    background:
        linear-gradient(
            90deg,
            var(--navy),
            var(--navy2)
        );

    border-radius:
        0 30px
        0 0;
}

.profile header span {
    font-size: 1rem;
}


/* Nombre */

.profile h3 {
    margin: 4px 0 0;

    font-size: clamp(
        1.5rem,
        2.7vw,
        2.25rem
    );

    line-height: 1.2;

    text-transform: uppercase;
}


/* Texto */

.profile p {
    font-size: 1rem;
}


/* =========================================================
   ÁREA DE EXPERIENCIA
========================================================= */

.profile aside {
    margin-top: 30px;
    padding: 20px 28px;

    color: #fff;

    background: var(--navy);

    border-radius:
        0 0
        28px 0;
}


/* =========================================================
   ESTUDIOS
========================================================= */

.profile h4 {
    margin: 25px 0 8px;

    text-transform: uppercase;
}

.profile ul {
    padding-left: 22px;
}

.profile li {
    margin: 9px 0;
}

.profile li::marker {
    color: var(--gold);
}


/* =========================================================
   PERFIL INVERSO
========================================================= */

.profile-reverse .profile-copy {
    order: 2;
}

.profile-reverse > img {
    order: 1;

    border-radius:
        36px 0
        36px 0;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 850px) {

    .about-inner {
        grid-template-columns:
            1.5fr
            0.5fr;
    }


    .profile {
        gap: 35px;
    }


    .profile header {
        padding: 16px 20px;
    }


    .purpose {
        gap: 25px;
    }

}


/* =========================================================
   MÓVIL
========================================================= */

@media (max-width: 640px) {

    /* Contenedor */

    .wrap {
        width: min(
            calc(100% - 30px),
            var(--max)
        );
    }


    /* ------------------------------------------
       HERO
    ------------------------------------------ */

    .hero {
        min-height: 410px;

        background-position:
            65% center;
    }


    /* ------------------------------------------
       ABOUT
    ------------------------------------------ */

    .about {
        padding: 50px 0;

        background-position:
            62% center;
    }


    .about-inner {
        grid-template-columns: 1fr;
    }


    .about-inner > div {
        padding: 26px;

        background:
            rgba(255, 255, 255, 0.88);
    }


    /* ------------------------------------------
       ESPECIALIDADES
    ------------------------------------------ */

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


    /*
       En móvil solamente se muestra
       la especialidad activa.
    */

    .specialty {
        display: none;
    }

    .specialty.is-active {
        display: block;

        opacity: 1;
    }


    /* ------------------------------------------
       MISIÓN / VISIÓN
    ------------------------------------------ */

    .purpose {
        grid-template-columns: 1fr;

        gap: 18px;
    }


    .purpose-card {
        min-height: auto;

        padding: 32px 24px;
    }


    /* ------------------------------------------
       EQUIPO
    ------------------------------------------ */

    .profile,
    .profile-reverse {
        grid-template-columns: 1fr;

        gap: 28px;
    }


    .profile > img,
    .profile-reverse > img {
        order: 1;

        width: 82%;

        margin: auto;
    }


    .profile-copy,
    .profile-reverse .profile-copy {
        order: 2;
    }


    .team {
        padding-top: 50px;
    }

}


/* =========================================================
   REDUCIR MOVIMIENTO
========================================================= */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }


    .specialty,
    .purpose-card,
    [data-specialty-dots] span {
        transition: none;
    }

}
