:root {
    --wine: #531d2b;
    --wine-dark: #35131d;
    --wine-soft: #7a3245;
    --cream: #f3ede3;
    --paper: #faf7f1;
    --ink: #25201d;
    --muted: #756b64;
    --green: #203a32;
    --gold: #b89a62;
    --line: rgba(37, 32, 29, .16);
    --serif: "Playfair Display", Georgia, serif;
    --sans: "DM Sans", Arial, sans-serif;
    --container: min(1180px, calc(100vw - 48px));
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); line-height: 1.65; -webkit-font-smoothing: antialiased; }
body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; }
.container { width: var(--container); margin-inline: auto; }
.section { padding: 120px 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 1000; padding: 12px 18px; background: var(--paper); color: var(--wine); transition: top .2s; }
.skip-link:focus { top: 16px; }

.eyebrow { margin: 0 0 22px; color: var(--wine-soft); font-size: .72rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }
.eyebrow.light { color: #d8c4ac; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.08; }
h2 { margin-bottom: 0; font-size: clamp(2.6rem, 5vw, 4.6rem); letter-spacing: -.035em; }
.lead { font-family: var(--serif); font-size: clamp(1.35rem, 2.4vw, 1.75rem); line-height: 1.45; }

.site-header { position: fixed; inset: 0 0 auto; z-index: 100; color: #fff; border-bottom: 1px solid rgba(255,255,255,.16); transition: color .3s, background .3s, box-shadow .3s; }
.site-header.scrolled { color: var(--ink); background: rgba(250,247,241,.94); box-shadow: 0 8px 32px rgba(45,30,24,.08); backdrop-filter: blur(14px); }
.header-inner { height: 88px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 14px; }
.brand-mark { width: 45px; aspect-ratio: 1; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-family: var(--serif); font-size: .98rem; letter-spacing: -.04em; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.2; }
.brand-copy strong { font-family: var(--serif); font-size: 1.12rem; font-weight: 500; }
.brand-copy small { margin-top: 4px; font-size: .61rem; letter-spacing: .11em; text-transform: uppercase; opacity: .76; }
.main-nav { display: flex; align-items: center; gap: 34px; font-size: .82rem; font-weight: 500; }
.main-nav > a { position: relative; }
.main-nav > a:not(.nav-cta)::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -7px; height: 1px; background: currentColor; transition: right .25s; }
.main-nav > a:hover::after, .main-nav > a:focus-visible::after { right: 0; }
.nav-cta { padding: 11px 18px; border: 1px solid currentColor; border-radius: 100px; }
.menu-button { display: none; border: 0; background: none; color: inherit; }

.hero { position: relative; min-height: 860px; height: 100svh; color: #fff; overflow: hidden; background: var(--wine-dark); }
.hero-photo, .hero-shade { position: absolute; inset: 0; }
.hero-photo { background: url('../images/malena-escritorio.jpg') center 42% / cover no-repeat; transform: scale(1.015); animation: hero-in 1.6s cubic-bezier(.2,.8,.2,1) both; }
.hero-shade { background: linear-gradient(90deg, rgba(26,17,17,.88) 0%, rgba(26,17,17,.62) 46%, rgba(26,17,17,.08) 74%), linear-gradient(0deg, rgba(22,14,14,.42), transparent 45%); }
.hero-inner { position: relative; z-index: 2; height: 100%; display: flex; align-items: center; padding-top: 70px; }
.hero-copy { width: min(760px, 66%); }
.hero h1 { margin-bottom: 28px; font-size: clamp(4rem, 7.7vw, 7rem); letter-spacing: -.055em; }
.hero h1 em { color: #d7bfa3; font-weight: 500; }
.hero-lead { max-width: 640px; margin-bottom: 38px; color: rgba(255,255,255,.82); font-size: clamp(1rem, 1.6vw, 1.22rem); }
.hero-actions, .contact-actions { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 18px; min-height: 54px; padding: 0 25px; border: 1px solid transparent; border-radius: 100px; font-size: .81rem; font-weight: 600; transition: transform .2s, background .2s, color .2s, border-color .2s; }
.button:hover, .button:focus-visible { transform: translateY(-2px); }
.button-primary { color: #fff; background: var(--wine); }
.hero .button-primary { color: var(--wine-dark); background: var(--cream); }
.button-outline { color: #fff; border-color: rgba(255,255,255,.42); }
.button-outline:hover { color: var(--wine-dark); background: var(--cream); border-color: var(--cream); }
.button-quiet { color: var(--wine); border-color: var(--line); }
.text-link { display: inline-flex; gap: 14px; align-items: center; padding-bottom: 5px; color: var(--wine); border-bottom: 1px solid currentColor; font-size: .82rem; font-weight: 600; }
.light-link { color: #fff; border-color: rgba(255,255,255,.5); }
.hero-note { position: absolute; z-index: 2; right: 35px; bottom: 120px; display: flex; align-items: center; gap: 12px; writing-mode: vertical-rl; font-size: .62rem; letter-spacing: .25em; text-transform: uppercase; opacity: .7; }
.hero-note i { width: 1px; height: 52px; background: currentColor; }

.intro-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 10vw; }
.intro-text { padding-top: 6px; }
.intro-text p:not(.lead) { color: var(--muted); }
.intro-text .text-link { margin-top: 16px; }
.principle-band { padding: 64px 0; color: #fff; background: var(--wine); }
.principle-inner { display: grid; grid-template-columns: auto 1fr auto; gap: 6vw; align-items: center; }
.principle-number, .principle-signature { font-size: .66rem; letter-spacing: .17em; text-transform: uppercase; opacity: .66; }
.principle-band blockquote { max-width: 800px; margin: 0; font-family: var(--serif); font-size: clamp(1.75rem, 3.2vw, 3rem); line-height: 1.25; }

.practice { background: var(--cream); }
.practice-top { display: grid; grid-template-columns: 1.25fr .45fr; gap: 12vw; align-items: end; margin-bottom: 75px; }
.section-aside { margin-bottom: 5px; color: var(--muted); font-size: .9rem; }
.practice-list { border-top: 1px solid var(--line); }
.practice-card { display: grid; grid-template-columns: 90px 1fr auto; gap: 30px; align-items: center; min-height: 190px; padding: 32px 10px; border-bottom: 1px solid var(--line); transition: padding .25s, background .25s; }
.practice-card:hover { padding-inline: 28px; background: rgba(255,255,255,.4); }
.card-index { align-self: start; padding-top: 8px; color: var(--wine-soft); font-size: .7rem; letter-spacing: .12em; }
.practice-card div { display: grid; grid-template-columns: .6fr 1fr; gap: 8vw; align-items: center; }
.practice-card h3 { margin: 0; font-size: clamp(1.8rem, 3vw, 2.8rem); }
.practice-card p { max-width: 520px; margin: 0; color: var(--muted); font-size: .92rem; }
.card-arrow { width: 42px; aspect-ratio: 1; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--wine); }

.document-story { padding-block: 0; color: #fff; background: var(--green); }
.document-grid { width: 100%; max-width: none; display: grid; grid-template-columns: 1.2fr .8fr; }
.document-image { position: relative; min-height: 720px; margin: 0; overflow: hidden; }
.document-image img { width: 100%; height: 100%; object-fit: cover; }
.document-image::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(14,33,28,.6), transparent 50%); }
.document-image figcaption { position: absolute; z-index: 1; left: 45px; bottom: 35px; font-family: var(--serif); font-size: 1.1rem; }
.document-copy { align-self: center; max-width: 560px; padding: 80px 7vw; }
.document-copy h2 { margin-bottom: 35px; font-size: clamp(2.5rem, 4.4vw, 4.2rem); }
.document-copy p { color: rgba(255,255,255,.72); }
.document-copy .button { margin-top: 20px; }

.roots-grid { display: grid; grid-template-columns: .82fr 1fr; gap: 11vw; align-items: center; }
.roots-photo { position: relative; }
.roots-photo::before { content: ""; position: absolute; inset: -18px 18px 18px -18px; border: 1px solid var(--gold); z-index: -1; }
.roots-photo img { width: 100%; height: 670px; object-fit: cover; object-position: center 44%; }
.roots-seal { position: absolute; right: -56px; bottom: 58px; width: 122px; aspect-ratio: 1; display: grid; place-content: center; justify-items: center; border-radius: 50%; color: var(--cream); background: var(--wine); box-shadow: 0 12px 30px rgba(57,24,31,.25); }
.roots-seal span { font-size: .55rem; letter-spacing: .16em; text-transform: uppercase; }
.roots-seal strong { font-family: var(--serif); font-size: 2rem; font-weight: 500; line-height: 1.2; }
.roots-copy h2 { margin-bottom: 32px; }
.roots-copy > p:not(.eyebrow) { color: var(--muted); }
.family-links { margin-top: 42px; border-top: 1px solid var(--line); }
.family-links a { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.family-links span { display: flex; flex-direction: column; }
.family-links small { margin-bottom: 5px; color: var(--wine-soft); font-size: .65rem; letter-spacing: .11em; text-transform: uppercase; }
.family-links strong { font-family: var(--serif); font-size: 1.5rem; font-weight: 500; }
.family-links b { width: 38px; aspect-ratio: 1; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--wine); font-weight: 400; transition: transform .2s, background .2s, color .2s; }
.family-links a:hover b { color: #fff; background: var(--wine); transform: rotate(45deg); }

.alma-section { padding: 88px 0; color: #fff; background: var(--wine-dark); }
.alma-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12vw; align-items: end; }
.alma-grid h2 { font-size: clamp(2.4rem, 4vw, 4rem); }
.alma-grid p:not(.eyebrow) { color: rgba(255,255,255,.7); }
.contact { text-align: center; }
.contact-inner { max-width: 900px; }
.contact h2 { margin-bottom: 28px; }
.contact p:not(.eyebrow) { max-width: 620px; margin: 0 auto 32px; color: var(--muted); }
.contact-actions { justify-content: center; }
.contact small { display: block; margin-top: 26px; color: var(--muted); }

.site-footer { padding: 70px 0 28px; color: #fff; background: #1e1a18; }
.footer-main { display: flex; align-items: center; justify-content: space-between; padding-bottom: 55px; }
.footer-links { display: flex; gap: 30px; color: rgba(255,255,255,.7); font-size: .78rem; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; padding-top: 24px; color: rgba(255,255,255,.45); border-top: 1px solid rgba(255,255,255,.12); font-size: .66rem; }
.floating-contact { position: fixed; z-index: 90; right: 22px; bottom: 22px; display: flex; align-items: center; gap: 9px; min-height: 48px; padding: 0 18px; color: #fff; background: var(--wine); border: 1px solid rgba(255,255,255,.2); border-radius: 100px; box-shadow: 0 8px 28px rgba(39,17,23,.28); font-size: .75rem; }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity .75s ease, transform .75s ease; }
.reveal.visible { opacity: 1; transform: none; }
@keyframes hero-in { from { opacity: .4; transform: scale(1.07); } to { opacity: 1; transform: scale(1.015); } }

@media (max-width: 900px) {
    :root { --container: min(100% - 34px, 720px); }
    .section { padding: 88px 0; }
    .header-inner { height: 76px; }
    .menu-button { display: grid; gap: 5px; width: 42px; height: 42px; place-content: center; cursor: pointer; }
    .menu-button span:not(.sr-only) { display: block; width: 22px; height: 1px; background: currentColor; transition: transform .25s, opacity .25s; }
    .menu-button[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
    .menu-button[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
    .menu-button[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
    .main-nav { position: fixed; inset: 76px 0 0; display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 50px 30px; color: var(--ink); background: var(--paper); transform: translateX(100%); transition: transform .3s; }
    .main-nav.open { transform: none; }
    .main-nav > a { padding: 20px 0; border-bottom: 1px solid var(--line); font-family: var(--serif); font-size: 1.7rem; }
    .main-nav .nav-cta { margin-top: 22px; padding: 14px 20px; border-color: var(--wine); border-radius: 100px; text-align: center; color: #fff; background: var(--wine); font-family: var(--sans); font-size: .85rem; }
    .site-header:not(.scrolled):has(.main-nav.open) { color: var(--ink); background: var(--paper); }
    .hero { min-height: 760px; }
    .hero-photo { background-position: 61% center; }
    .hero-shade { background: linear-gradient(90deg, rgba(25,16,16,.88), rgba(25,16,16,.26)), linear-gradient(0deg, rgba(25,16,16,.6), transparent 60%); }
    .hero-copy { width: 82%; }
    .hero h1 { font-size: clamp(3.6rem, 12vw, 5.6rem); }
    .hero-note { display: none; }
    .intro-grid, .practice-top, .roots-grid, .alma-grid { grid-template-columns: 1fr; gap: 50px; }
    .principle-inner { grid-template-columns: auto 1fr; }
    .principle-signature { grid-column: 2; }
    .practice-card div { grid-template-columns: 1fr; gap: 14px; }
    .document-grid { grid-template-columns: 1fr; }
    .document-image { min-height: 480px; }
    .document-copy { padding: 80px max(24px, calc((100vw - 720px) / 2)); }
    .roots-grid { max-width: 720px; }
    .roots-photo { width: min(82%, 500px); }
    .roots-photo img { height: 620px; }
}

@media (max-width: 600px) {
    :root { --container: calc(100% - 36px); }
    .section { padding: 74px 0; }
    .brand-copy small { display: none; }
    .hero { min-height: 730px; }
    .hero-inner { align-items: flex-end; padding: 120px 0 70px; }
    .hero-copy { width: 100%; }
    .hero h1 { font-size: clamp(3.15rem, 15vw, 4.6rem); }
    .hero-lead { font-size: .97rem; }
    .hero-actions { align-items: flex-start; flex-direction: column; gap: 22px; }
    h2 { font-size: clamp(2.35rem, 11vw, 3.5rem); }
    .principle-band { padding: 50px 0; }
    .principle-inner { grid-template-columns: 1fr; gap: 18px; }
    .principle-signature { grid-column: auto; }
    .practice-top { margin-bottom: 45px; }
    .practice-card { grid-template-columns: 36px 1fr; gap: 14px; min-height: 0; padding: 30px 0; }
    .practice-card:hover { padding-inline: 0; }
    .card-arrow { display: none; }
    .practice-card div { gap: 12px; }
    .practice-card h3 { font-size: 1.9rem; }
    .document-image { min-height: 350px; }
    .document-image figcaption { left: 22px; right: 22px; bottom: 22px; font-size: .95rem; }
    .document-copy { padding: 68px 18px; }
    .roots-photo { width: calc(100% - 25px); }
    .roots-photo img { height: 520px; }
    .roots-seal { right: -30px; width: 100px; }
    .family-links strong { font-size: 1.25rem; }
    .alma-grid { gap: 28px; }
    .contact-actions { flex-direction: column; }
    .contact-actions .button { width: 100%; }
    .footer-main, .footer-bottom { align-items: flex-start; flex-direction: column; }
    .footer-links { flex-wrap: wrap; gap: 18px 24px; }
    .floating-contact b { display: none; }
    .floating-contact { width: 48px; padding: 0; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .reveal { opacity: 1; transform: none; }
}
