/* ==========================================================================
   Pichardo Law — Shared Site Styles
   --------------------------------------------------------------------------
   Lives once. Applies to every page.
   Page-specific styles still live in each page's `extraStyles` block.
   ========================================================================== */

/* CSS Variables */
:root {
    --primary: #4a4f3a;
    --secondary: #2f2f2c;
    --accent: #edebe4;
    --white: #ffffff;
    --cream: #f8f7f4;
    --border: rgba(74, 79, 58, 0.15);
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Libre Baskerville', Georgia, serif;
    color: var(--secondary);
    background-color: var(--white);
    line-height: 1.8;
    font-size: 1.125rem;
    overflow-x: hidden;
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.015em;
}

h1 {
    font-size: clamp(2.25rem, 4.5vw, 3.5rem);
    letter-spacing: -0.025em;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: -0.02em;
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    letter-spacing: 0;
}

h1 em, h2 em, h3 em {
    font-style: italic;
    font-weight: inherit;
}

p {
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Scroll-reveal animation utilities */
.animate-ready {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Layout primitives */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 1.25rem;
    display: block;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.1rem 3rem;
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    transition: all 0.4s ease;
    cursor: pointer;
    text-align: center;
}

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

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

.btn-outline {
    background-color: transparent;
    color: var(--secondary);
    border: 1px solid var(--secondary);
}

.btn-outline:hover {
    background-color: var(--secondary);
    color: var(--cream);
}

/* Navigation */
.nav-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: var(--white);
    border-bottom: 1px solid var(--border);
    transition: all 0.4s ease;
}

.nav-wrapper.scrolled {
    background-color: #ffffff;
    box-shadow: 0 2px 40px rgba(0, 0, 0, 0.08);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 3rem;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--secondary);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    list-style: none;
}

.nav-links a {
    font-size: 0.9rem;
    color: var(--secondary);
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1.5px;
    background-color: var(--secondary);
    transition: width 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.nav-links a:hover::after {
    width: 100%;
}

.lang-toggle {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.9rem !important;
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 0.75rem !important;
    font-weight: 400;
    color: var(--secondary) !important;
    background-color: var(--cream);
    border: 1px solid var(--secondary);
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
    letter-spacing: 0.03em;
    margin-left: 0.5rem;
}

.lang-toggle:hover {
    background-color: var(--secondary);
    color: var(--cream) !important;
}

.lang-toggle::after {
    display: none !important;
}

/* Mobile menu hamburger */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    padding: 10px;
    position: relative;
    z-index: 1002;
}

.mobile-toggle span {
    width: 25px;
    height: 2px;
    background-color: var(--secondary);
    transition: all 0.3s ease;
}

.mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--secondary) 0%, #1a1a18 100%);
    color: var(--white);
    padding: 3rem 0 1.5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 2rem;
}

.footer-brand .logo {
    color: var(--white);
    margin-bottom: 1.5rem;
    display: inline-block;
}

.footer-brand p {
    opacity: 0.7;
    font-size: 1rem;
    margin-bottom: 1.25rem;
}

.footer-social {
    display: flex;
    gap: 1.5rem;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    opacity: 1;
}

.footer-social svg {
    width: 20px;
    height: 20px;
    fill: var(--white);
}

.footer-column h4 {
    color: var(--white);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a, .footer-links li {
    opacity: 0.7;
    font-size: 0.9rem;
    transition: opacity 0.3s ease;
}

.footer-links a:hover {
    opacity: 1;
}

.footer-disclaimer {
    padding: 1.25rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1.25rem;
}

.footer-disclaimer p {
    font-size: 0.85rem;
    opacity: 0.65;
    margin: 0 auto;
    text-align: center;
    max-width: 760px;
    line-height: 1.6;
}

.footer-disclaimer .footer-address {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    opacity: 0.55;
    letter-spacing: 0.01em;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p {
    opacity: 0.6;
    font-size: 0.9rem;
    margin-bottom: 0;
}

.footer-legal {
    display: flex;
    gap: 2rem;
}

.footer-legal a {
    opacity: 0.6;
    font-size: 0.9rem;
}

.footer-legal a:hover {
    opacity: 1;
}

/* Responsive — nav + footer + buttons */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    html, body {
        overflow-x: hidden;
    }

    .lang-toggle {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }

    nav {
        padding: 1rem 1.5rem;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: #ffffff !important;
        background-color: #ffffff !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        z-index: 99999;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    .nav-links.active {
        display: flex;
        background: #ffffff !important;
        background-color: #ffffff !important;
    }

    .mobile-toggle {
        display: flex;
        z-index: 100000;
    }

    .btn {
        width: 100%;
        padding: 1rem 2rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .footer-legal {
        justify-content: center;
    }
}
