/* ============================================================
   ESCRIBANÍA ANAUATI — Estilos principales
   Paleta: negro profundo · oro · crema · blanco
   Tipografía: Cormorant Garamond (titulares) · Crimson Pro (cuerpo)
   ============================================================ */

:root {
    --gold:        #C9A84C;
    --gold-light:  #E8CB7A;
    --gold-dark:   #9A6E2A;
    --black:       #0A0A0A;
    --black-mid:   #141414;
    --black-soft:  #1C1C1C;
    --black-card:  #161616;
    --white:       #FFFFFF;
    --cream:       #F5EDD6;
    --text-main:   rgba(245, 237, 214, 0.92);
    --text-muted:  rgba(245, 237, 214, 0.6);
    --border:      rgba(201, 168, 76, 0.18);
    --border-hover:rgba(201, 168, 76, 0.45);
    --shadow-gold: 0 8px 32px rgba(201, 168, 76, 0.12);
    --shadow-dark: 0 20px 60px rgba(0, 0, 0, 0.6);
    --radius:      4px;
    --transition:  0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Crimson Pro', Georgia, serif;
    background-color: var(--black);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.7;
}

/* Grain texture overlay */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
    background-size: 200px 200px;
}

img { display: block; }
a  { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }


/* ============================================================
   BARRA SUPERIOR
   ============================================================ */
.top-bar {
    background-color: var(--black-mid);
    border-bottom: 1px solid var(--border);
    padding: 0.55rem 2rem;
    position: sticky;
    top: 0;
    z-index: 200;
}

.top-bar-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.top-bar-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: 'Crimson Pro', serif;
    font-size: 0.88rem;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    transition: color 0.3s;
}

.top-bar-item:hover { color: var(--gold-light); }

.top-bar-sep {
    color: var(--gold-dark);
    font-size: 0.7rem;
}


/* ============================================================
   HEADER
   ============================================================ */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 4rem;
    position: sticky;
    top: 36px;
    z-index: 150;
    background: rgba(10, 10, 10, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    transition: padding var(--transition), box-shadow var(--transition);
}

.header.scrolled {
    top: 0;
    padding: 0.9rem 4rem;
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.7);
    border-bottom-color: rgba(201, 168, 76, 0.3);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.logo-img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    border: 1.5px solid var(--gold-dark);
    transition: border-color var(--transition);
}

.logo:hover .logo-img { border-color: var(--gold); }

.logo-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.logo-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--white);
    line-height: 1;
}

.logo-sub {
    font-family: 'Crimson Pro', serif;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold);
}

.navigation ul {
    display: flex;
    gap: 2.8rem;
    align-items: center;
}

.navigation a {
    font-family: 'Crimson Pro', serif;
    font-size: 1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    position: relative;
    padding-bottom: 2px;
    transition: color 0.3s;
}

.navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--gold);
    transition: width var(--transition);
}

.navigation a:hover {
    color: var(--cream);
}

.navigation a:hover::after,
.navigation a.active::after {
    width: 100%;
}

.navigation a.active {
    color: var(--cream);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 1.5px;
    background: var(--gold);
    transition: var(--transition);
}


/* ============================================================
   TIPOGRAFÍA — Helpers
   ============================================================ */
.eyebrow {
    font-family: 'Crimson Pro', serif;
    font-size: 0.82rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1rem;
    display: block;
}

.eyebrow.centered { text-align: center; }

.main-heading {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(3rem, 5.5vw, 5rem);
    font-weight: 300;
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: var(--white);
    margin-bottom: 1.6rem;
}

.main-heading em {
    font-style: italic;
    font-weight: 400;
    color: var(--gold-light);
}

.section-heading {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2.4rem, 4vw, 3.8rem);
    font-weight: 300;
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--white);
    margin-bottom: 1.4rem;
}

.section-heading.centered { text-align: center; }

.section-heading em {
    font-style: italic;
    font-weight: 400;
    color: var(--gold-light);
}

.heading-rule {
    width: 48px;
    height: 1px;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-dark));
    margin-bottom: 2rem;
}

.heading-rule.centered {
    margin-left: auto;
    margin-right: auto;
}

.sub-slogan {
    font-size: 1.2rem;
    line-height: 1.75;
    color: var(--text-muted);
    margin-bottom: 2.8rem;
    font-weight: 300;
    max-width: 46ch;
}

.text-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 1.4rem;
    font-weight: 300;
}

.text-content p:last-child { margin-bottom: 0; }


/* ============================================================
   BOTÓN CTA
   ============================================================ */
.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 2.6rem;
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold-light);
    font-family: 'Crimson Pro', serif;
    font-size: 0.95rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    border-radius: var(--radius);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition);
    z-index: 0;
}

.cta-button:hover {
    color: var(--black);
    border-color: var(--gold);
    box-shadow: var(--shadow-gold);
}

.cta-button:hover::before {
    transform: scaleX(1);
}

.cta-button > * { position: relative; z-index: 1; }
.cta-button span { position: relative; z-index: 1; }

.cta-button--sm {
    padding: 0.65rem 1.8rem;
    font-size: 0.85rem;
    margin-top: 1.5rem;
}


/* ============================================================
   LAYOUT PRINCIPAL
   ============================================================ */
.main-content {
    max-width: 1440px;
    margin: 0 auto;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
    min-height: 80vh;
    padding: 6rem 5rem;
}

.content-wrapper.reverse .image-section { order: 2; }
.content-wrapper.reverse .text-section  { order: 1; }

.section-header {
    margin-bottom: 4rem;
}

.text-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.text-section .text-content {
    margin-bottom: 2.6rem;
}


/* ============================================================
   IMAGEN + ORNAMENTOS
   ============================================================ */
.image-section {
    position: relative;
}

.image-frame {
    position: relative;
    border-radius: 2px;
    overflow: hidden;
}

.professional-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    filter: brightness(0.88) contrast(1.05);
}

.image-frame:hover .professional-image {
    transform: scale(1.03);
}

.gold-corner {
    position: absolute;
    width: 36px;
    height: 36px;
    z-index: 2;
}

.gold-corner--tl {
    top: -8px; left: -8px;
    border-top: 1.5px solid var(--gold);
    border-left: 1.5px solid var(--gold);
}

.gold-corner--br {
    bottom: -8px; right: -8px;
    border-bottom: 1.5px solid var(--gold);
    border-right: 1.5px solid var(--gold);
}


/* ============================================================
   SERVICIOS
   ============================================================ */
.services-section {
    padding: 6rem 5rem;
    border-top: 1px solid var(--border);
}

.services-container {
    max-width: 1200px;
    margin: 0 auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5px;
    background: var(--border);
    border: 1.5px solid var(--border);
}

.service-card {
    background: var(--black-card);
    padding: 2.8rem 2.2rem;
    display: flex;
    flex-direction: column;
    transition: background var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 2px; height: 0;
    background: var(--gold);
    transition: height var(--transition);
}

.service-card:hover {
    background: var(--black-soft);
}

.service-card:hover::before {
    height: 100%;
}

.service-card--accent {
    background: linear-gradient(135deg, var(--black-soft) 0%, rgba(201, 168, 76, 0.06) 100%);
}

.service-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    color: var(--gold);
    margin-bottom: 1.8rem;
    transition: all var(--transition);
}

.service-card:hover .service-icon {
    border-color: var(--gold);
    background: rgba(201, 168, 76, 0.08);
}

.service-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.45rem;
    font-weight: 500;
    color: var(--white);
    margin-bottom: 0.9rem;
    letter-spacing: 0.02em;
}

.service-description {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-muted);
    font-weight: 300;
    flex: 1;
}


/* ============================================================
   ¿POR QUÉ NOSOTROS?
   ============================================================ */
.why-us-section {
    padding: 6rem 5rem;
    border-top: 1px solid var(--border);
    background: var(--black-mid);
}

.why-us-container {
    max-width: 1200px;
    margin: 0 auto;
}

.why-us-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

.why-us-card {
    padding: 2.8rem 2rem;
    border: 1px solid var(--border);
    transition: border-color var(--transition), transform var(--transition);
    position: relative;
}

.why-us-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(201, 168, 76, 0.04) 0%, transparent 60%);
    opacity: 0;
    transition: opacity var(--transition);
}

.why-us-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
}

.why-us-card:hover::after {
    opacity: 1;
}

.why-us-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    color: var(--gold);
    margin-bottom: 1.8rem;
    transition: all var(--transition);
}

.why-us-card:hover .why-us-icon {
    border-color: var(--gold);
    color: var(--gold-light);
}

.why-us-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--white);
    margin-bottom: 0.9rem;
}

.why-us-description {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-muted);
    font-weight: 300;
}


/* ============================================================
   SECCIÓN DE CONTACTO
   ============================================================ */
.contact-section {
    padding: 6rem 5rem;
    border-top: 1px solid var(--border);
}

.contact-container {
    max-width: 1100px;
    margin: 0 auto;
}

.contact-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5px;
    background: var(--border);
    border: 1.5px solid var(--border);
    margin-bottom: 3rem;
}

.contact-card {
    background: var(--black-card);
    padding: 2.4rem 1.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    transition: background var(--transition);
}

.contact-card:hover {
    background: var(--black-soft);
}

.contact-card-icon {
    color: var(--gold);
    margin-bottom: 0.4rem;
}

.contact-card h4 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 500;
}

.contact-card p,
.contact-card a {
    font-size: 1rem;
    color: var(--text-main);
    font-weight: 300;
    line-height: 1.6;
}

.contact-card a:hover {
    color: var(--gold-light);
}

.contact-cta {
    text-align: center;
}


/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    background: var(--black-mid);
    padding: 5rem 5rem 0;
    border-top: 1px solid var(--border);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 6rem;
    padding-bottom: 4rem;
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-logo-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid var(--gold-dark);
}

.footer-logo-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--white);
    letter-spacing: 0.04em;
    line-height: 1.1;
}

.footer-registro {
    display: block;
    font-family: 'Crimson Pro', serif;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold);
    margin-top: 0.15rem;
}

.footer-description {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text-muted);
    font-weight: 300;
    max-width: 38ch;
}

.social-icons {
    display: flex;
    gap: 0.8rem;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    color: var(--text-muted);
    transition: all var(--transition);
}

.social-icon:hover {
    border-color: var(--gold);
    color: var(--gold-light);
    background: rgba(201, 168, 76, 0.08);
}

.footer-right {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.footer-section-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--white);
    letter-spacing: 0.04em;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
}

.contact-icon {
    color: var(--gold);
    flex-shrink: 0;
    margin-top: 2px;
}

.contact-text {
    font-size: 0.97rem;
    color: var(--text-muted);
    font-weight: 300;
    line-height: 1.6;
    transition: color 0.3s;
}

a.contact-text:hover { color: var(--gold-light); }

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.4rem 0;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-bottom p {
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    font-family: 'Crimson Pro', serif;
}


/* ============================================================
   WHATSAPP FLOTANTE
   ============================================================ */
.whatsapp-float {
    position: fixed;
    bottom: 2.5rem;
    right: 2.5rem;
    z-index: 500;
    width: 58px;
    height: 58px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: all var(--transition);
}

.whatsapp-float:hover {
    background: #20bd5a;
    transform: scale(1.08);
    box-shadow: 0 8px 32px rgba(37, 211, 102, 0.5);
}

.whatsapp-tooltip {
    position: absolute;
    right: calc(100% + 0.8rem);
    white-space: nowrap;
    background: var(--black-soft);
    color: var(--cream);
    font-family: 'Crimson Pro', serif;
    font-size: 0.88rem;
    padding: 0.4rem 0.9rem;
    border-radius: 2px;
    border: 1px solid var(--border);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.whatsapp-float:hover .whatsapp-tooltip {
    opacity: 1;
}


/* ============================================================
   ANIMACIONES DE ENTRADA
   ============================================================ */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    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);
}

.reveal--right {
    transform: translateX(28px) translateY(0);
}

.reveal.visible {
    opacity: 1;
    transform: none;
}


/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1200px) {
    .header { padding: 1.2rem 2.5rem; }
    .header.scrolled { padding: 0.9rem 2.5rem; }

    .content-wrapper {
        gap: 4rem;
        padding: 5rem 3rem;
    }

    .services-section,
    .why-us-section,
    .contact-section { padding: 5rem 3rem; }

    .footer { padding: 4rem 3rem 0; }
    .footer-container { gap: 4rem; }

    .contact-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .why-us-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .image-badge {
        right: 1rem;
    }
}

@media (max-width: 768px) {
    .top-bar { display: none; }

    .header {
        top: 0;
        padding: 1rem 1.5rem;
    }

    .header.scrolled {
        top: 0;
        padding: 0.9rem 1.5rem;
    }

    .navigation {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(10, 10, 10, 0.98);
        border-bottom: 1px solid var(--border);
        padding: 1.5rem;
    }

    .navigation.open {
        display: block;
    }

    .navigation ul {
        flex-direction: column;
        gap: 1.2rem;
        align-items: center;
    }

    .nav-toggle { display: flex; }

    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 3rem;
        padding: 4rem 1.5rem;
        min-height: auto;
    }

    .content-wrapper.reverse .image-section,
    .content-wrapper.reverse .text-section { order: unset; }

    .main-heading {
        font-size: clamp(2.4rem, 8vw, 3.4rem);
    }

    .section-heading {
        font-size: clamp(2rem, 7vw, 2.8rem);
    }

    .services-section,
    .why-us-section,
    .contact-section { padding: 4rem 1.5rem; }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5px;
    }

    .why-us-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .contact-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer { padding: 3rem 1.5rem 0; }
    .footer-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .image-badge {
        right: 0.5rem;
        bottom: 1rem;
    }
}

@media (max-width: 520px) {
    .contact-cards {
        grid-template-columns: 1fr;
    }

    .whatsapp-float {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 52px;
        height: 52px;
    }

    .logo-name { font-size: 1.15rem; }
    .logo-sub  { display: none; }
}
