/* 
   Naveda Istillarte y Asociados - Design System
   Aesthetic: "Morning Study"
*/

:root {
    /* OKLCH Colors */
    --base-neutral: oklch(98% 0.01 90);      /* Warm Cream */
    --surface: oklch(95% 0.015 90);           /* Subtle Surface */
    --primary-text: oklch(20% 0.02 260);     /* Deep Ink Blue */
    --accent: oklch(60% 0.15 45);            /* Bronze/Copper */
    --accent-hover: oklch(50% 0.12 45);
    --white: oklch(100% 0 0);
    
    /* Spacing */
    --container-max: 1200px;
    --section-padding: 100px 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--base-neutral);
    color: var(--primary-text);
    font-family: 'Outfit', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography Utilities */
.italic { font-style: italic; }
.accent { color: var(--accent); }

/* Header & Nav */
#main-header {
    padding: 20px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: rgba(251, 248, 240, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-img {
    height: 50px;
    width: auto;
    border-radius: 50%;
}

.logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--primary-text);
    font-weight: 400;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent);
}

/* Hero Section */
#hero {
    padding-top: 180px;
    padding-bottom: 100px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: center;
}

.subheading {
    display: block;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--accent);
}

h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 25px;
}

#hero p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
    max-width: 500px;
}

.cta-group {
    display: flex;
    gap: 20px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 16px 32px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn.primary {
    background-color: var(--accent);
    color: var(--white);
}

.btn.primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

.btn.secondary {
    border: 1px solid var(--primary-text);
    color: var(--primary-text);
}

.btn.secondary:hover {
    background-color: var(--primary-text);
    color: var(--white);
}

/* Hero Visual - Dual Overlays */
.image-wrapper {
    position: relative;
    padding-bottom: 60px; /* Space for overlays */
}

#hero-img {
    width: 100%;
    height: 550px;
    object-fit: cover;
    border-radius: 2px;
    filter: brightness(0.85);
}

.lawyer-overlays {
    position: absolute;
    bottom: -60px;
    left: -40px;
    display: flex;
    gap: 20px;
    z-index: 10;
}

.lawyer-overlay {
    width: 220px;
    height: 280px;
    border: 8px solid var(--base-neutral);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    overflow: hidden;
    transition: transform 0.4s ease;
}

.lawyer-overlay.anilde {
    transform: translateY(30px);
}

.lawyer-overlay:hover {
    transform: translateY(-10px) scale(1.02);
    z-index: 20;
}

.lawyer-overlay.anilde:hover {
    transform: translateY(20px) scale(1.02);
}

.pedro-img, .anilde-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.decorative-box {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    border: 1px solid var(--accent);
    z-index: -1;
}

/* Expertise Section */
#experticia {
    padding: var(--section-padding);
    background-color: var(--surface);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.expertise-card {
    background: var(--base-neutral);
    padding: 40px;
    transition: transform 0.3s ease;
    border-bottom: 2px solid transparent;
}

.expertise-card:hover {
    transform: translateY(-5px);
    border-bottom-color: var(--accent);
}

.expertise-card .icon {
    font-size: 2rem;
    margin-bottom: 20px;
}

.expertise-card h3 {
    margin-bottom: 15px;
    font-size: 1.4rem;
}

/* Abogados Section */
#abogados {
    padding: var(--section-padding);
}

.lawyers-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.lawyer-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0,0,0,0.03);
}

.lawyer-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

.lawyer-image {
    width: 100%;
    height: 450px;
    overflow: hidden;
}

.lawyer-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform 0.6s ease;
}

.lawyer-card:hover .lawyer-image img {
    transform: scale(1.05);
}

.lawyer-info {
    padding: 40px;
}

.lawyer-info h3 {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.lawyer-info .role {
    display: block;
    color: var(--accent);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 2px;
    font-weight: 600;
    margin-bottom: 20px;
}

.lawyer-info p {
    font-size: 1rem;
    opacity: 0.8;
}

/* Academia Section */
#academia {
    padding: var(--section-padding);
}

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

.academic-image {
    position: relative;
}

.portrait-img {
    width: 100%;
    border-radius: 2px;
    transition: transform 0.5s ease;
}

.portrait-img:hover {
    transform: scale(1.02);
}

.academic-info {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.academic-content {
    max-width: 600px;
}

.academic-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.text-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    margin-top: 20px;
}

.academic-stats {
    display: flex;
    gap: 60px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-item .number {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    color: var(--accent);
}

.stat-item .label {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    font-weight: 600;
    opacity: 0.7;
}

/* Análisis Section - Invitation Style */
#analisis {
    padding: var(--section-padding);
    background: var(--surface);
}

.invitation-card {
    max-width: 800px;
    margin: 0 auto;
    background: var(--base-neutral);
    padding: 80px;
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: 0 40px 100px rgba(0,0,0,0.05);
    text-align: center;
    position: relative;
}

.invitation-card::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    border: 1px solid var(--accent);
    pointer-events: none;
    opacity: 0.3;
}

.invitation-header .eyebrow {
    display: block;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 20px;
}

.invitation-header h2 {
    font-size: 2.8rem;
    line-height: 1.2;
    margin-bottom: 30px;
}

.invitation-body p {
    font-size: 1.15rem;
    line-height: 1.8;
    margin-bottom: 50px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.invitation-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 60px;
}

.invite-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: var(--surface);
    text-decoration: none;
    color: var(--primary-text);
    text-align: left;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.invite-link:hover {
    background: var(--base-neutral);
    border-color: var(--accent);
    transform: translateY(-3px);
}

.link-icon {
    font-size: 1.5rem;
}

.link-text strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 2px;
}

.link-text span {
    font-size: 0.8rem;
    opacity: 0.6;
}

.invitation-footer .slogan {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.2rem;
    color: var(--accent);
}

/* Contact Section */
#contacto {
    padding: var(--section-padding);
    background-color: var(--primary-text);
    color: var(--base-neutral);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 100px;
}

.contact-info h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

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

.info-items .item strong {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
    margin-bottom: 5px;
}

.info-items .item a {
    color: inherit;
    text-decoration: none;
}

.contact-form-wrapper {
    background: var(--base-neutral);
    padding: 40px;
    color: var(--primary-text);
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.input-group input, .input-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(0,0,0,0.1);
    background: var(--surface);
    font-family: inherit;
}

.btn.block {
    width: 100%;
}

/* Footer */
footer {
    padding: 40px 0;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.social-group {
    display: flex;
    align-items: center;
    gap: 20px;
}

.social-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    opacity: 0.6;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--surface);
    color: var(--primary-text);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0,0,0,0.05);
}

.social-links a:hover {
    background: var(--accent);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: var(--accent);
}

/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    transition: transform 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

/* Animations & Reveals */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered Reveals */
.expertise-card {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.expertise-card.active {
    opacity: 1;
    transform: translateY(0);
}

.expertise-card:nth-child(1) { transition-delay: 0.1s; }
.expertise-card:nth-child(2) { transition-delay: 0.2s; }
.expertise-card:nth-child(3) { transition-delay: 0.3s; }
.expertise-card:nth-child(4) { transition-delay: 0.4s; }

/* Hero Entrance */
.hero-content > * {
    opacity: 0;
    transform: translateY(20px);
    animation: heroReveal 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.hero-content .subheading { animation-delay: 0.2s; }
.hero-content h1 { animation-delay: 0.4s; }
.hero-content p { animation-delay: 0.6s; }
.hero-content .cta-group { animation-delay: 0.8s; }

.hero-visual {
    opacity: 0;
    transform: scale(0.95);
    animation: visualReveal 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards 0.5s;
}

@keyframes heroReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes visualReveal {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive fixes */
@media (max-width: 968px) {
    .hero-grid, .contact-grid, .academic-flex, .lawyers-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .invitation-card {
        padding: 40px 20px;
    }

    .invitation-links {
        grid-template-columns: 1fr;
    }

    .invitation-header h2 {
        font-size: 2rem;
    }
    
    .academic-flex {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }
    
    h1 {
        font-size: 2.8rem;
    }
    
    .hero-visual {
        order: -1;
    }
    
    .nav-links {
        display: none; 
    }

    .lawyer-overlays {
        position: relative;
        left: 0;
        bottom: 0;
        margin-top: -30px;
        justify-content: center;
        gap: 15px;
    }

    .lawyer-overlay {
        width: 140px;
        height: 180px;
        border-width: 4px;
    }

    .lawyer-overlay.anilde {
        transform: translateY(15px);
    }
}
