/* =========================================================
   Layout · Header / Footer / Sections / Hero
   ========================================================= */

/* ----- HEADER ----- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(244, 239, 230, 0.82);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--rule-hair);
    transition: background var(--t-med) var(--ease-out), border-color var(--t-med) var(--ease-out);
}

.site-header.is-scrolled {
    background: rgba(244, 239, 230, 0.94);
    border-bottom-color: var(--rule-faint);
}

.site-header__inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 2rem;
    padding-block: 18px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    line-height: 1;
}

.brand__mark {
    width: 44px;
    height: 44px;
    flex: none;
    position: relative;
}

.brand__mark svg { display: block; width: 100%; height: 100%; }

.brand__name {
    font-family: var(--font-display);
    font-weight: 420;
    font-size: 1.25rem;
    letter-spacing: -0.01em;
    color: var(--ink);
    line-height: 1;
}

.brand__sub {
    display: block;
    font-family: var(--font-mono);
    font-size: 9.5px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--ink-mute);
    margin-top: 6px;
}

.nav {
    justify-self: center;
    display: flex;
    align-items: center;
    gap: clamp(1.2rem, 0.8rem + 1.4vw, 2.4rem);
}

.nav a {
    position: relative;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ink-soft);
    padding-block: 6px;
    transition: color var(--t-med) var(--ease-out);
}

.nav a::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 0;
    height: 1px;
    background: var(--ink);
    transition: width var(--t-med) var(--ease-out), left var(--t-med) var(--ease-out);
}

.nav a:hover,
.nav a.is-active {
    color: var(--ink);
}

.nav a:hover::after,
.nav a.is-active::after {
    width: 100%;
    left: 0;
}

.nav a.is-active::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -10px;
    width: 5px;
    height: 5px;
    background: var(--oxblood);
    border-radius: 50%;
}

.header-cta { justify-self: end; display: flex; align-items: center; gap: 0.8rem; }

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--rule-faint);
    border-radius: var(--radius-sm);
}

.menu-toggle__lines {
    width: 18px;
    height: 12px;
    position: relative;
}
.menu-toggle__lines::before,
.menu-toggle__lines::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 1.5px;
    background: var(--ink);
    transition: transform var(--t-med) var(--ease-out), top var(--t-med) var(--ease-out);
}
.menu-toggle__lines::before { top: 2px; }
.menu-toggle__lines::after  { top: 8px; }
.menu-toggle[aria-expanded="true"] .menu-toggle__lines::before {
    top: 5px;
    transform: rotate(45deg);
}
.menu-toggle[aria-expanded="true"] .menu-toggle__lines::after {
    top: 5px;
    transform: rotate(-45deg);
}

/* Mobile nav */
.mobile-nav {
    position: fixed;
    inset: 0;
    background: var(--paper);
    z-index: 49;
    padding: 100px var(--gutter) 60px;
    transform: translateY(-100%);
    transition: transform var(--t-slow) var(--ease-out);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.mobile-nav.is-open { transform: translateY(0); }
.mobile-nav a {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 380;
    color: var(--ink);
    border-bottom: 1px solid var(--rule-faint);
    padding-bottom: 14px;
}
.mobile-nav a.is-active { color: var(--oxblood); }

@media (max-width: 960px) {
    .nav { display: none; }
    .header-cta .btn { display: none; }
    .menu-toggle { display: inline-flex; }
}

/* ----- FOOTER ----- */
.site-footer {
    background: var(--ink);
    color: var(--paper);
    padding: clamp(60px, 8vw, 110px) 0 36px;
    margin-top: clamp(80px, 10vw, 140px);
    position: relative;
    overflow: hidden;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 5px;
    border-top: 1px solid var(--gold);
    border-bottom: 1px solid var(--gold);
}

.footer__lead {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: end;
    padding-bottom: 60px;
    border-bottom: 1px solid rgba(244, 239, 230, 0.16);
}

.footer__lead h2 {
    font-family: var(--font-display);
    font-weight: 360;
    font-size: clamp(2.2rem, 1.8rem + 2.4vw, 3.6rem);
    line-height: 1.02;
    letter-spacing: -0.02em;
}

.footer__lead h2 .it { color: var(--gold); }

.footer__lead-cta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
}

.footer__lead-cta p {
    color: rgba(244, 239, 230, 0.7);
    font-size: 0.96rem;
    max-width: 36ch;
}

.footer__grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 48px;
    padding-block: 56px;
}

.footer__col h6 {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: rgba(244, 239, 230, 0.5);
    margin-bottom: 20px;
    font-weight: 500;
}

.footer__col ul { display: flex; flex-direction: column; gap: 10px; }

.footer__col a {
    color: rgba(244, 239, 230, 0.86);
    transition: color var(--t-fast) var(--ease-out);
    font-size: 0.96rem;
}

.footer__col a:hover { color: var(--gold); }

.footer__brand {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer__brand .brand__name { color: var(--paper); font-size: 1.45rem; }
.footer__brand .brand__sub { color: rgba(244, 239, 230, 0.6); }
.footer__brand p { color: rgba(244, 239, 230, 0.72); max-width: 36ch; font-size: 0.95rem; }

.footer__base {
    border-top: 1px solid rgba(244, 239, 230, 0.16);
    padding-top: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(244, 239, 230, 0.5);
}

.footer__base a { color: rgba(244, 239, 230, 0.66); }
.footer__base a:hover { color: var(--gold); }

@media (max-width: 900px) {
    .footer__lead { grid-template-columns: 1fr; }
    .footer__grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}
@media (max-width: 540px) {
    .footer__grid { grid-template-columns: 1fr; }
}

/* ----- SECTIONS ----- */
section { position: relative; }

.section {
    padding-block: clamp(80px, 9vw, 140px);
}

.section--tight { padding-block: clamp(60px, 7vw, 100px); }

.section-head {
    display: block;
    gap: 32px;
    align-items: start;
    margin-bottom: clamp(40px, 5vw, 80px);
}

.section-head__index {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--ink-mute);
    padding-top: 14px;
    border-top: 1px solid var(--ink);
    color: var(--ink);
}

.section-head__main h2 {
    font-family: var(--font-display);
    font-weight: 360;
    font-size: var(--fs-h2);
    line-height: 1.0;
    letter-spacing: -0.022em;
    margin-bottom: 0.4em;
    text-wrap: balance;
}

.section-head__main p {
    font-size: var(--fs-lead);
    line-height: 1.45;
    max-width: 62ch;
    color: var(--ink-soft);
    font-weight: 300;
}

@media (max-width: 760px) {
    .section-head { grid-template-columns: 1fr; gap: 14px; }
}

/* ----- HERO (HOME) ----- */
.hero {
    position: relative;
    padding-block: clamp(60px, 7vw, 96px) clamp(40px, 6vw, 80px);
    overflow: hidden;
}

.hero__top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 22px;
    margin-bottom: clamp(40px, 5vw, 70px);
    border-bottom: 1px solid var(--rule-faint);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--ink-mute);
    flex-wrap: wrap;
    gap: 12px;
}

.hero__grid {
    display: grid;
    grid-template-columns: 1fr 0.6fr;
    gap: clamp(40px, 5vw, 80px);
    align-items: end;
}

.hero__title {
    font-family: var(--font-display);
    font-weight: 340;
    font-size: var(--fs-display);
    line-height: 0.92;
    letter-spacing: -0.03em;
    color: var(--ink);
    text-wrap: balance;
    font-variation-settings: "opsz" 144, "SOFT" 30;
}

.hero__title .it {
    font-family: var(--font-italic);
    color: var(--oxblood);
    font-weight: 400;
    padding-right: 0.04em;
}

.hero__title .underline-word {
    position: relative;
    display: inline-block;
    white-space: nowrap;
}
.hero__title .underline-word::after {
    content: '';
    position: absolute;
    left: -2%;
    right: -2%;
    bottom: 0.04em;
    height: 0.32em;
    background: var(--gold);
    z-index: -1;
    opacity: 0.5;
    transform: skewX(-6deg);
}

.hero__aside {
    align-self: end;
    padding-bottom: 6px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hero__aside-text {
    font-size: var(--fs-lead);
    font-weight: 300;
    line-height: 1.5;
    color: var(--ink-soft);
    max-width: 36ch;
}

.hero__aside-text .drop {
    font-family: var(--font-display);
    font-style: italic;
    color: var(--ink);
}

.hero__cta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.hero__meta {
    margin-top: clamp(60px, 7vw, 100px);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border-top: 1px solid var(--ink);
    border-bottom: 1px solid var(--rule-faint);
}

.hero__meta > div {
    padding: 22px 26px;
    border-right: 1px solid var(--rule-faint);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.hero__meta > div:last-child { border-right: 0; }

.hero__meta dt {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ink-mute);
}

.hero__meta dd {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 420;
    line-height: 1;
    letter-spacing: -0.015em;
}

@media (max-width: 900px) {
    .hero__grid { grid-template-columns: 1fr; }
    .hero__meta { grid-template-columns: 1fr 1fr; }
    .hero__meta > div { border-bottom: 1px solid var(--rule-faint); }
    .hero__meta > div:nth-child(2) { border-right: 0; }
}
@media (max-width: 540px) {
    .hero__meta { grid-template-columns: 1fr; }
    .hero__meta > div { border-right: 0; }
}

/* ----- HERO (SECONDARY pages: nosotros / servicios / articulos / contacto) ----- */
.hero-secondary {
    padding-block: clamp(50px, 6vw, 90px) clamp(30px, 4vw, 60px);
    border-bottom: 1px solid var(--rule-faint);
}

.hero-secondary__grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: clamp(30px, 4vw, 70px);
    align-items: end;
}

.hero-secondary__breadcrumb {
    display: flex;
    align-items: center;
    gap: 14px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ink-mute);
    margin-bottom: 36px;
}

.hero-secondary__breadcrumb .dash { color: var(--gold-deep); }

.hero-secondary h1 {
    font-family: var(--font-display);
    font-weight: 340;
    font-size: var(--fs-h1);
    line-height: 0.96;
    letter-spacing: -0.026em;
    color: var(--ink);
    text-wrap: balance;
    font-variation-settings: "opsz" 144, "SOFT" 30;
}

.hero-secondary h1 .it { color: var(--oxblood); }

.hero-secondary__lede {
    font-size: var(--fs-lead);
    line-height: 1.5;
    font-weight: 300;
    color: var(--ink-soft);
    border-left: 1px solid var(--rule);
    padding-left: 22px;
    max-width: 42ch;
}

@media (max-width: 860px) {
    .hero-secondary__grid { grid-template-columns: 1fr; }
    .hero-secondary__lede { border-left: 0; padding-left: 0; padding-top: 18px; border-top: 1px solid var(--rule); }
}
