
/* ========================================
   LEX — ESTUDIO JURÍDICO
   Diseño editorial, elegante y moderno
======================================== */

:root {
    --cream: #f2eee6;
    --paper: #FBF9F4;
    --dark: #232B33;
    --accent: #33465A;
    --accent-deep: #29394A;
    --muted: #5C6975;
    --line: #DCD6C9;
    --display: "Instrument Serif", Georgia, serif;
    --sans: "Public Sans", Arial, sans-serif;
}

/* 1. BASE */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    font-family: var(--sans);
    background: var(--paper);
    color: var(--dark);
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
}

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

::selection {
    background: var(--accent);
    color: white;
}

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

/* 2. NAVEGACIÓN */

.navbar {
    width: 100%;
    min-height: 94px;
    padding: 20px 7%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 35px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    flex-direction: column;
    font-family: var(--display);
    font-size: 35px;
    line-height: 0.9;
    font-weight: 400;
    letter-spacing: -0.5px;
    flex-shrink: 0;
}

.logo > span {
    display: inline;
    color: var(--accent);
}

.logo small {
    font-family: var(--sans);
    font-size: 10px;
    letter-spacing: 2.1px;
    font-weight: 600;
    margin-top: 9px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: clamp(18px, 3vw, 42px);
}

.nav-links > a {
    font-size: 12px;
    color: #5f5a54;
    transition: color 0.25s ease;
}

.nav-links > a:hover {
    color: var(--accent);
}

.nav-links .nav-cta {
    padding: 15px 19px;
    background: var(--accent);
    color: white;
    transition:
        background 0.25s ease,
        transform 0.25s ease;
}

.nav-cta span {
    margin-left: 13px;
}

.nav-links .nav-cta:hover {
    background: var(--accent-deep);
    color: white;
    transform: translateY(-2px);
}

.menu-toggle {
    display: none;
}

/* 3. PORTADA */

.hero {
    min-height: 660px;
    display: grid;
    grid-template-columns: 1fr 0.92fr;
    background: var(--cream);
    padding: 0 0 0 7%;
    overflow: hidden;
}

.hero-content {
    padding: 100px 35px 65px 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    animation: fade-up 0.8s ease both;
}

.eyebrow,
.section-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 10px;
    letter-spacing: 1.8px;
    font-weight: 700;
    color: var(--muted);
}

.eyebrow > span {
    width: 22px;
    height: 1px;
    background: var(--accent);
}

.hero h1,
.intro h2,
.section-heading h2,
.method h2,
.contact h2 {
    font-family: var(--display);
    font-weight: 400;
    letter-spacing: -1.5px;
    line-height: 1.06;
}

.hero h1 {
    font-size: clamp(58px, 6.3vw, 91px);
    margin-top: 34px;
}

.hero h1 em,
.intro h2 em,
.section-heading h2 em,
.method h2 em,
.contact h2 em {
    font-weight: 400;
    color: var(--accent);
}

.hero-description {
    max-width: 385px;
    margin-top: 27px;
    font-size: 14px;
    line-height: 1.9;
    color: var(--muted);
}

.hero-actions {
    margin-top: 32px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 25px;
}

.button {
    min-height: 54px;
    padding: 0 22px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 28px;
    font-size: 11px;
    font-weight: 600;
    transition:
        background 0.25s ease,
        color 0.25s ease,
        transform 0.25s ease;
}

.button:hover {
    transform: translateY(-3px);
}

.button-dark {
    background: var(--accent);
    color: white;
}

.button-dark:hover {
    background: var(--accent-deep);
}

.text-link {
    font-size: 11px;
    font-weight: 600;
    border-bottom: 1px solid var(--line);
    padding-bottom: 8px;
    transition: color 0.25s ease;
}

.text-link span {
    margin-left: 12px;
}

.text-link:hover {
    color: var(--accent);
}

.hero-note {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-top: 67px;
}

.note-line {
    width: 30px;
    height: 1px;
    background: var(--accent);
}

.hero-note p {
    font-size: 10px;
    color: var(--muted);
}

.hero-visual {
    min-height: 660px;
    position: relative;
    overflow: hidden;
    background: #d5c9ba;
    animation: fade-in 1s ease both;
}

.hero-visual > img {
    object-position: center;
    transition: transform 1.2s ease;
}

.hero-visual:hover > img {
    transform: scale(1.035);
}

.hero-visual::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(28, 22, 20, 0.4),
        transparent 36%
    );
    pointer-events: none;
}

.hero-stamp {
    position: absolute;
    top: 35px;
    right: 35px;
    width: 90px;
    height: 90px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    z-index: 1;
    font-size: 10px;
    letter-spacing: 2px;
    line-height: 1.8;
}

.hero-stamp span:first-child {
    font-family: var(--display);
    font-size: 26px;
    letter-spacing: -1px;
}

.hero-caption {
    position: absolute;
    z-index: 1;
    bottom: 30px;
    left: 30px;
    right: 30px;
    display: flex;
    justify-content: space-between;
    gap: 15px;
    color: white;
    font-size: 10px;
    letter-spacing: 1.3px;
}

/* 4. PRESENTACIÓN */

.section-pad {
    padding: 105px 9%;
}

.intro {
    background: var(--paper);
}

.section-label {
    gap: 17px;
}

.section-label span:first-child {
    color: var(--accent);
}

.section-label span:last-child {
    letter-spacing: 1.7px;
}

.intro-content {
    display: grid;
    grid-template-columns: 1.1fr 0.7fr;
    gap: 10%;
    margin-top: 53px;
    align-items: start;
}

.intro h2 {
    font-size: clamp(38px, 4.4vw, 60px);
}

.intro-text p {
    font-size: 13px;
    line-height: 2;
    color: var(--muted);
    margin-bottom: 19px;
}

.intro-text .text-link {
    display: inline-block;
    margin-top: 10px;
}

/* 5. ESPECIALIDADES */

.areas {
    background: var(--cream);
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 35px;
    margin-bottom: 55px;
}

.section-heading h2 {
    margin-top: 27px;
    font-size: clamp(42px, 4.7vw, 64px);
}

.section-heading > p {
    max-width: 320px;
    padding-bottom: 5px;
    font-size: 12px;
    line-height: 1.9;
    color: var(--muted);
}

.areas-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
}

.area-card {
    min-height: 290px;
    padding: 25px 22px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    position: relative;
    transition:
        background 0.3s ease,
        transform 0.3s ease;
}

.area-card:hover {
    background: var(--paper);
    transform: translateY(-4px);
}

.area-number {
    font-size: 10px;
    color: var(--muted);
    letter-spacing: 1px;
}

.area-icon {
    width: 48px;
    height: 48px;
    margin-top: 30px;
    display: grid;
    place-items: center;
    border: 1px solid #cbbcb1;
    border-radius: 50%;
    color: var(--accent);
    font-family: var(--display);
    font-size: 24px;
}

.area-card h3 {
    margin-top: 22px;
    font-family: var(--display);
    font-size: 19px;
    font-weight: 400;
}

.area-card p {
    margin-top: 12px;
    font-size: 11px;
    line-height: 1.8;
    color: var(--muted);
    padding-right: 5px;
}

.area-card > a {
    position: absolute;
    right: 20px;
    top: 23px;
    color: var(--accent);
    font-size: 17px;
    transition: transform 0.25s ease;
}

.area-card > a:hover {
    transform: translate(3px, -3px);
}

.demo-disclaimer {
    margin-top: 18px;
    font-size: 10px;
    color: var(--muted);
    line-height: 1.7;
}

/* 6. FILOSOFÍA */

.method {
    display: grid;
    grid-template-columns: 0.9fr 1fr;
    gap: 10%;
    align-items: center;
    background: var(--paper);
}

.method-image {
    height: 570px;
    position: relative;
    background: #d5c9ba;
    overflow: hidden;
}

.method-image img {
    transition: transform 1s ease;
}

.method-image:hover img {
    transform: scale(1.04);
}

.image-index {
    position: absolute;
    left: 20px;
    bottom: 20px;
    padding: 12px 15px;
    background: var(--paper);
    color: var(--accent);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
}

.method-content {
    padding: 15px 0;
}

.method h2 {
    margin-top: 30px;
    margin-bottom: 42px;
    font-size: clamp(43px, 4.5vw, 62px);
}

.principle {
    display: flex;
    align-items: flex-start;
    gap: 22px;
    padding: 22px 0;
    border-top: 1px solid var(--line);
}

.principle > span {
    font-size: 10px;
    color: var(--accent);
    padding-top: 3px;
}

.principle h3 {
    font-family: var(--display);
    font-size: 17px;
    font-weight: 400;
}

.principle p {
    margin-top: 8px;
    font-size: 11px;
    line-height: 1.8;
    color: var(--muted);
}

/* 7. CONTACTO */

.contact {
    background: var(--accent);
    color: var(--paper);
}

.contact .section-label {
    color: #D8D4CB;
}

.contact .section-label span:first-child {
    color: #C3CBD2;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 0.55fr;
    align-items: end;
    gap: 12%;
    margin-top: 42px;
}

.contact h2 {
    font-size: clamp(58px, 7vw, 92px);
}

.contact h2 em {
    color: #C3CBD2;
}

.contact-side {
    padding-bottom: 8px;
}

.contact-side > p {
    font-size: 13px;
    line-height: 1.9;
    color: #D5D9DE;
    margin-bottom: 27px;
}

.button-light {
    background: var(--paper);
    color: var(--accent);
}

.button-light:hover {
    background: white;
}

.contact-side > small {
    display: block;
    margin-top: 17px;
    font-size: 10px;
    line-height: 1.7;
    color: #D8D4CB;
}

/* 8. PIE DE PÁGINA */

.footer {
    padding: 40px 7% 0;
    background: var(--dark);
    color: var(--paper);
}

.footer-logo {
    width: fit-content;
}

.footer-logo > span {
    color: #C3CBD2;
}

.footer > p {
    margin-top: 18px;
    color: #b8b0a8;
    font-size: 11px;
}

.back-top {
    display: block;
    width: fit-content;
    margin: 28px 0 35px auto;
    font-size: 10px;
    letter-spacing: 1.4px;
    color: #C3CBD2;
}

.footer-bottom {
    min-height: 55px;
    border-top: 1px solid #48443f;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    font-size: 10px;
    color: #aaa199;
    letter-spacing: 0.6px;
}

/* 9. ANIMACIONES */

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(22px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* 10. TABLETS */

@media (max-width: 1050px) {
    .navbar {
        padding-left: 5%;
        padding-right: 5%;
        gap: 20px;
    }

    .nav-links {
        gap: 20px;
    }

    .nav-links > a {
        font-size: 11px;
    }

    .hero {
        padding-left: 5%;
        grid-template-columns: 1fr 0.85fr;
    }

    .hero-content {
        padding-top: 75px;
        padding-bottom: 55px;
    }

    .hero h1 {
        font-size: clamp(54px, 6vw, 70px);
    }

    .section-pad {
        padding: 85px 6%;
    }

    .areas-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .area-card {
        min-height: 260px;
    }

    .method {
        gap: 7%;
    }

    .method-image {
        height: 500px;
    }
}

/* 11. CELULARES */

@media (max-width: 760px) {
    html {
        scroll-padding-top: 78px;
    }

    .navbar {
        min-height: 76px;
        padding: 15px 6%;
    }

    .logo {
        font-size: 31px;
    }

    .logo small {
        font-size: 10px;
    }

    .menu-toggle {
        width: 42px;
        height: 42px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 6px;
        border: 1px solid var(--line);
        background: transparent;
        cursor: pointer;
        position: relative;
        z-index: 102;
    }

    .menu-toggle span {
        width: 17px;
        height: 1px;
        background: var(--dark);
        transition:
            transform 0.25s ease,
            width 0.25s ease;
    }

    .menu-toggle.active span:first-child {
        transform: translateY(3.5px) rotate(45deg);
    }

    .menu-toggle.active span:last-child {
        transform: translateY(-3.5px) rotate(-45deg);
    }

    .nav-links {
        position: absolute;
        top: 75px;
        left: 0;
        right: 0;
        padding: 15px 6% 25px;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--paper);
        border-bottom: 1px solid var(--line);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition:
            opacity 0.25s ease,
            transform 0.25s ease,
            visibility 0.25s ease;
    }

    .nav-links.open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-links > a {
        padding: 15px 0;
        font-size: 13px;
        border-bottom: 1px solid var(--line);
    }

    .nav-links .nav-cta {
        margin-top: 15px;
        padding: 16px;
        text-align: center;
        border: none;
    }

    .hero {
        grid-template-columns: 1fr;
        padding: 0;
    }

    .hero-content {
        padding: 70px 6% 50px;
    }

    .hero h1 {
        font-size: clamp(59px, 12vw, 80px);
        margin-top: 28px;
    }

    .hero-description {
        font-size: 13px;
        max-width: 360px;
    }

    .hero-note {
        margin-top: 43px;
    }

    .hero-visual {
        min-height: 420px;
        height: 65vw;
        max-height: 540px;
    }

    .hero-stamp {
        width: 76px;
        height: 76px;
        top: 22px;
        right: 22px;
    }

    .hero-caption {
        left: 20px;
        right: 20px;
        bottom: 22px;
        font-size: 10px;
    }

    .section-pad {
        padding: 75px 6%;
    }

    .intro-content {
        grid-template-columns: 1fr;
        gap: 28px;
        margin-top: 37px;
    }

    .intro h2 {
        font-size: clamp(39px, 8vw, 54px);
    }

    .section-heading {
        flex-direction: column;
        align-items: flex-start;
        gap: 23px;
        margin-bottom: 38px;
    }

    .section-heading h2 {
        font-size: 48px;
    }

    .section-heading > p {
        max-width: 430px;
    }

    .areas-grid {
        grid-template-columns: 1fr 1fr;
    }

    .area-card {
        min-height: 275px;
        padding: 22px 17px;
    }

    .area-card h3 {
        font-size: 17px;
    }

    .area-card p {
        font-size: 10px;
    }

    .method {
        grid-template-columns: 1fr;
        gap: 45px;
    }

    .method-image {
        height: 390px;
    }

    .method h2 {
        font-size: 53px;
        margin-bottom: 32px;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 30px;
        margin-top: 35px;
    }

    .contact h2 {
        font-size: clamp(61px, 12vw, 83px);
    }

    .contact-side {
        max-width: 420px;
    }

    .footer {
        padding: 35px 6% 0;
    }
}

/* 12. CELULARES PEQUEÑOS */

@media (max-width: 390px) {
    .hero h1 {
        font-size: 55px;
    }

    .hero-actions {
        align-items: flex-start;
        flex-direction: column;
        gap: 22px;
    }

    .hero-visual {
        min-height: 340px;
    }

    .areas-grid {
        grid-template-columns: 1fr;
    }

    .area-card {
        min-height: 235px;
    }

    .method-image {
        height: 320px;
    }

    .method h2 {
        font-size: 45px;
    }

    .footer-bottom {
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        padding: 15px 0;
        gap: 8px;
    }
}

/* 13. ACCESIBILIDAD: REDUCIR MOVIMIENTO */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
