:root {
    --ink: #2a241e;
    --muted: #6d645c;
    --paper: #f6f1ea;
    --gold: #7a5430;
    --line: rgba(42, 36, 30, 0.16);
    --header: 168px;
    --serif: "Cormorant Garamond", "Times New Roman", serif;
    --sans: "Outfit", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

[id] { scroll-margin-top: var(--header); }

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: var(--serif);
    font-size: 21px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        url("../images/emblema-llave.png"),
        url("../images/emblema-llave.png");
    background-repeat: no-repeat;
    background-size: 148px auto;
    background-position:
        left 16px top 26%,
        right 16px bottom 8%;
    opacity: 0.72;
}

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

a { color: inherit; text-decoration: none; }

button, .btn { font-family: var(--sans); }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 20;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    height: var(--header);
    padding: 8px 28px;
    color: var(--ink);
    background: #fff;
    box-shadow: 0 1px 0 var(--line);
}

.nav-toggle {
    justify-self: start;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.nav-toggle-lines,
.nav-toggle-lines::before,
.nav-toggle-lines::after {
    display: block;
    width: 22px;
    height: 1px;
    background: currentColor;
    position: relative;
}

.nav-toggle-lines { margin: 0 auto; }

.nav-toggle-lines::before,
.nav-toggle-lines::after {
    content: "";
    position: absolute;
    left: 0;
}

.nav-toggle-lines::before { top: -7px; }
.nav-toggle-lines::after { top: 7px; }

.brand {
    display: flex;
    justify-content: center;
}

.brand img {
    height: 148px;
    width: auto;
    max-width: min(58vw, 320px);
    object-fit: contain;
    background: transparent;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid transparent;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    cursor: pointer;
}

.btn-gold {
    justify-self: end;
    max-width: 132px;
    min-height: 36px;
    padding: 6px 10px;
    font-size: 9px;
    letter-spacing: 0.12em;
    line-height: 1.3;
    text-align: center;
    background: var(--gold);
    color: #fff;
}

.btn-gold:hover { background: #5e4126; }

.btn-light {
    border-color: rgba(255, 255, 255, 0.8);
    color: #fff;
    background: transparent;
}

.btn-light:hover { background: rgba(255, 255, 255, 0.14); }

.btn-outline {
    border-color: var(--ink);
    background: transparent;
    color: var(--ink);
}

.btn-outline:hover {
    background: var(--ink);
    color: var(--paper);
}

.menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 30;
    background: rgba(42, 36, 30, 0.28);
    opacity: 0;
    transition: opacity 0.45s ease;
}

body.menu-open .menu-backdrop { opacity: 1; }

.menu {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 40;
    display: flex;
    flex-direction: column;
    width: min(500px, 88vw);
    height: 100%;
    padding: 72px 40px 48px;
    background: #f6f1ea;
    color: var(--ink);
    overflow: auto;
    justify-content: flex-start;
    box-shadow: 12px 0 40px rgba(42, 36, 30, 0.12);
    transform: translate3d(-100%, 0, 0);
    transition: transform 0.45s ease;
}

body.menu-open .menu { transform: translate3d(0, 0, 0); }

.menu[hidden] { display: none; }

.menu-close {
    position: absolute;
    top: 28px;
    right: 28px;
    border: 0;
    background: transparent;
    font-family: var(--sans);
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    cursor: pointer;
}

.menu-mark {
    margin: 0 0 28px;
    font-family: var(--sans);
    font-size: 12px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--muted);
}

.menu ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

.menu > ol > li > a {
    display: flex;
    gap: 18px;
    align-items: baseline;
    padding: 14px 0;
    border-top: 1px solid var(--line);
    font-size: clamp(22px, 2.4vw, 30px);
    line-height: 1.15;
    font-weight: 500;
}

.menu > ol > li:last-child > a { border-bottom: 1px solid var(--line); }

.menu .submenu {
    list-style: none;
    margin: 0 0 8px 46px;
    padding: 0 0 10px;
    border-bottom: 1px solid var(--line);
}

.menu .submenu a {
    display: block;
    padding: 7px 0;
    font-family: var(--sans);
    font-size: 15px;
    letter-spacing: 0.04em;
    line-height: 1.3;
}

.menu a span {
    font-family: var(--sans);
    font-size: 12px;
    letter-spacing: 0.16em;
    color: var(--gold);
}

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

.hero {
    position: relative;
    height: 100vh;
    min-height: 640px;
    color: #fff;
}

.hero img { object-position: center 42%; }

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(20, 14, 10, 0.55) 0%, rgba(20, 14, 10, 0.05) 42%, rgba(20, 14, 10, 0.12) 100%);
}

.hero-copy {
    position: absolute;
    z-index: 1;
    left: 0;
    right: 0;
    bottom: 48px;
    padding: 0 24px;
    text-align: center;
}

.hero-kicker {
    margin: 0 0 8px;
    font-family: var(--sans);
    font-size: 12px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.hero-copy h1 {
    margin: 0 auto 22px;
    max-width: 16ch;
    font-weight: 500;
    font-size: clamp(36px, 5vw, 64px);
    line-height: 1.05;
    font-style: italic;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.key {
    width: 72px;
    height: 24px;
    color: var(--gold);
}

.lede,
.chapter-text,
.subscribe,
.contact {
    max-width: 720px;
    margin: 0 auto;
    padding: 88px 28px;
    text-align: center;
}

.lede p,
.chapter-text p {
    margin: 18px 0 0;
}

.member {
    display: inline-block;
    margin-top: 36px;
}

.member img {
    width: 148px;
    height: auto;
    margin: 0 auto;
    object-fit: contain;
}

.chapter-text { padding-bottom: 36px; }

.index,
.eyebrow {
    margin: 0;
    font-family: var(--sans);
    font-size: 12px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gold);
}

.chapter-text h2,
.subscribe h2,
.contact h2 {
    margin: 12px 0 0;
    font-weight: 500;
    font-size: clamp(36px, 5vw, 56px);
    line-height: 1.05;
}

.chapter-name {
    margin-top: 8px;
    font-style: italic;
    font-size: 28px;
    color: var(--muted);
}

.places {
    list-style: none;
    margin: 28px auto 0;
    padding: 0;
    max-width: 360px;
    text-align: left;
}

.places li {
    display: flex;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    font-size: 24px;
}

.places span {
    font-family: var(--sans);
    font-size: 12px;
    letter-spacing: 0.14em;
    color: var(--gold);
}

.historia-home {
    max-width: 1040px;
    margin: 12px auto 0;
    padding: 64px 32px 28px;
}

.historia-home header { text-align: center; }

.historia-home h2 {
    margin: 12px 0 0;
    font-weight: 500;
    font-size: clamp(36px, 5vw, 56px);
    line-height: 1.05;
}

.historia-dek,
.historia-lead,
.historia-cierre,
.historia-nota {
    margin: 0 auto;
}

.historia-dek {
    max-width: 560px;
    margin-top: 16px;
    color: var(--muted);
    font-size: 18px;
}

.historia-lead {
    max-width: 760px;
    margin-top: 36px;
    text-align: center;
    font-size: clamp(26px, 3vw, 34px);
    font-style: italic;
    line-height: 1.35;
}

.historia-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px 64px;
    margin-top: 48px;
    text-align: left;
    font-size: 18px;
    line-height: 1.6;
}

.historia-kicker {
    margin: 0 0 14px;
    font-family: var(--sans);
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold);
}

.historia-grid p,
.historia-cierre p { margin: 0 0 16px; }

.historia-cierre {
    max-width: 720px;
    margin-top: 8px;
    text-align: center;
    font-size: 18px;
    line-height: 1.6;
}

.historia-anos {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    list-style: none;
    margin: 36px 0 0;
    padding: 0;
    text-align: center;
}

.historia-anos li {
    margin: 0;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    font-size: 16px;
}

.historia-anos span {
    display: block;
    margin-bottom: 6px;
    font-family: var(--sans);
    font-size: 12px;
    letter-spacing: 0.16em;
    color: var(--gold);
}

.historia-nota {
    max-width: 720px;
    margin-top: 28px;
    text-align: center;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.6;
}

.historia-home .ver {
    display: table;
    margin: 28px auto 0;
}

.recorrido { padding: 0 0 28px; }

.recorrido-frame { position: relative; }

.recorrido-track {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 28px;
    padding: 4px 28px 8px;
    scrollbar-width: none;
}

.recorrido-track::-webkit-scrollbar { display: none; }

.recorrido-card {
    flex: 0 0 calc((100% - 54px) / 4);
    scroll-snap-align: start;
    text-align: center;
}

.recorrido-photo {
    display: block;
    aspect-ratio: 4 / 5;
    border-radius: 18px;
    overflow: hidden;
}

.recorrido-photo img {
    filter: sepia(0.16) saturate(0.95) hue-rotate(-8deg) contrast(1.04) brightness(1.03);
}

.recorrido-name {
    display: block;
    margin-top: 14px;
    font-size: clamp(20px, 2vw, 26px);
}

.recorrido-nav {
    position: absolute;
    top: 38%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: rgba(42, 36, 30, 0.42);
    color: #fff;
    cursor: pointer;
}

.recorrido-nav svg { width: 22px; height: 22px; }

.recorrido-nav[disabled] { opacity: 0; pointer-events: none; }

.recorrido-prev { left: 8px; }

.recorrido-next { right: 8px; }

.recorrido-centro { padding-bottom: 48px; }

.recorrido-centro-track {
    display: flex;
    justify-content: center;
    gap: 18px;
    padding: 8px 28px 8px;
}

.recorrido-centro .recorrido-card {
    flex-basis: calc((100% - 54px) / 4);
}

.plate {
    display: block;
    margin: 0;
    height: min(78vh, 820px);
}

.plate img { object-position: center; }

.subscribe h2 { font-size: clamp(36px, 4vw, 52px); }

.subscribe-lead {
    margin: 16px 0 0;
    color: var(--muted);
}

.subscribe form {
    display: grid;
    gap: 18px;
    margin-top: 28px;
}

.subscribe label {
    display: grid;
    gap: 4px;
    font-family: var(--sans);
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
}

.subscribe input {
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: transparent;
    font-family: var(--serif);
    font-size: 22px;
    padding: 8px 0;
    color: var(--ink);
    text-align: center;
}

.subscribe input::placeholder {
    color: #b7b1a8;
    font-style: italic;
}

.subscribe .hp {
    position: absolute;
    left: -9999px;
    height: 0;
    opacity: 0;
}

.form-ok,
.form-error {
    margin: 18px 0 0;
    font-size: 20px;
}

.form-ok { color: #3f6b4a; }
.form-error { color: #9a4e32; }

.contact { padding-top: 20px; padding-bottom: 96px; }

.contact-list {
    list-style: none;
    margin: 28px 0 0;
    padding: 0;
}

.contact-list a {
    display: inline-block;
    padding: 8px 0;
    font-size: 22px;
}

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

.site-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    margin-top: 12px;
    padding: 64px 28px 40px;
    text-align: center;
    color: var(--gold);
    background-color: #f3eee6;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(122, 84, 48, 0.05) 0 18px, transparent 19px),
        radial-gradient(circle at 80% 70%, rgba(122, 84, 48, 0.045) 0 22px, transparent 23px),
        radial-gradient(circle at 60% 20%, rgba(122, 84, 48, 0.04) 0 14px, transparent 15px);
    background-size: 280px 220px;
}

.footer-brand img {
    width: 132px;
    height: auto;
    margin: 0 auto;
    object-fit: contain;
}

.footer-social a {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--gold);
    border-radius: 50%;
}

.footer-social svg { width: 18px; height: 18px; }

.footer-address,
.footer-nav p,
.footer-copy {
    margin: 0;
    font-family: var(--sans);
    font-size: 13px;
    letter-spacing: 0.08em;
    line-height: 1.8;
}

.footer-address { max-width: 640px; }

.footer-nav { max-width: 820px; }

.footer-nav p + p { margin-top: 6px; }

.footer-nav span {
    margin: 0 8px;
    color: var(--gold);
}

.footer-member img {
    width: 92px;
    height: auto;
    margin: 8px auto 0;
    object-fit: contain;
}

.footer-copy {
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.site-footer a:hover { color: var(--ink); }

.whatsapp-float {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 25;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    box-shadow: 0 8px 22px rgba(37, 211, 102, 0.35);
}

.whatsapp-float svg { width: 32px; height: 32px; }

.ver {
    display: inline-block;
    margin-top: 22px;
    font-family: var(--sans);
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold);
    border-bottom: 1px solid var(--gold);
    padding-bottom: 4px;
}

.chapter-text h2 a:hover,
.ver:hover { color: #5e4126; }

.space-hero {
    margin: var(--header) 0 0;
    height: min(72vh, 760px);
}

.space > .space-copy:first-child { margin-top: var(--header); }

.space-copy {
    max-width: 720px;
    margin: 0 auto;
    padding: 72px 28px 48px;
    text-align: center;
}

.space-copy h1 {
    margin: 12px 0 0;
    font-weight: 500;
    font-size: clamp(42px, 6vw, 68px);
    line-height: 1.05;
}

.space-copy p { margin: 18px 0 0; }

.space-actions { margin-top: 28px; }

.colaboradores {
    max-width: 880px;
    margin: 0 auto;
    padding: 8px 28px 64px;
    text-align: center;
}

.colaboradores h2,
.destaque h2 {
    margin: 0;
    font-weight: 500;
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.1;
}

.colaboradores ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 36px 56px;
    list-style: none;
    margin: 40px 0 0;
    padding: 0;
}

.colaboradores img {
    width: auto;
    height: 64px;
    max-width: 210px;
    object-fit: contain;
}

.destaque-foto {
    margin: 0 auto 32px;
    max-width: 280px;
}

.destaque-foto img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.destaque {
    max-width: 760px;
    margin: 0 auto 80px;
    padding: 48px 28px;
    text-align: center;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.destaque h2 {
    margin-top: 10px;
    font-style: italic;
    font-size: clamp(48px, 7vw, 76px);
}

.destaque-linea {
    margin: 14px 0 0;
    font-family: var(--sans);
    font-size: 13px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold);
}

.destaque p:last-child {
    margin: 22px 0 0;
}

.space-apartado {
    max-width: 720px;
    margin: 0 auto;
    padding: 28px 28px 56px;
    text-align: center;
}

.space-apartado h2 {
    margin: 0;
    font-weight: 500;
    font-size: clamp(36px, 5vw, 56px);
}

.space-ficha {
    margin-top: 36px;
    text-align: left;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px 40px;
}

.space-ficha h2 {
    margin: 0 0 8px;
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--gold);
}

.space-ficha ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.space-ficha li {
    padding: 7px 0;
    border-top: 1px solid var(--line);
    font-size: 18px;
}

.space-siblings {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px 28px;
    padding: 48px 28px 72px;
    font-family: var(--sans);
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.space-siblings .is-current { color: var(--gold); }

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

.space-cards {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 18px 12px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.space-cards a {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.space-cards span {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 48px 16px 18px;
    background: linear-gradient(transparent, rgba(42, 36, 30, 0.62));
    color: #fff;
    font-size: clamp(28px, 3vw, 42px);
    text-align: center;
}

.gallery {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 18px 12px;
    display: grid;
    gap: 12px;
}

.gallery-fila,
.gallery-par {
    display: grid;
    gap: 12px;
}

.gallery-fila { grid-template-columns: repeat(3, 1fr); }
.gallery-par { grid-template-columns: 1fr 1fr; }

.gallery-ig {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    max-width: 720px;
    margin: 0 auto;
}

.gallery-ig figure { aspect-ratio: 1 / 1; }

.gallery figure { margin: 0; overflow: hidden; }

.gallery-fila figure,
.gallery-par figure { aspect-ratio: 3 / 4; }

.gallery-ancha img { height: auto; }

.gallery-fila img,
.gallery-par img { object-fit: cover; }

body.menu-open { overflow: hidden; }

@media (max-width: 980px) {
    .recorrido-card { flex-basis: calc((100% - 18px) / 2); }

    .recorrido-centro .recorrido-card { flex-basis: calc((100% - 36px) / 3); }
}

@media (max-width: 860px) {
    :root { --header: 132px; }

    .brand img {
        height: 112px;
        max-width: 54vw;
    }

    .btn-gold {
        max-width: 112px;
        min-height: 32px;
        padding: 4px 8px;
        font-size: 8px;
        letter-spacing: 0.08em;
    }

    .historia-grid,
    .historia-anos { grid-template-columns: 1fr 1fr; }

    .historia-home { padding-left: 20px; padding-right: 20px; }

    .hero {
        height: auto;
        min-height: 0;
        margin-top: var(--header);
        color: var(--ink);
    }

    .hero img {
        height: auto;
        object-position: center;
    }

    .hero::after { content: none; }

    .hero-copy {
        position: static;
        padding: 32px 24px 0;
    }

    .hero .btn-light {
        border-color: var(--ink);
        color: var(--ink);
    }

    .hero .btn-light:hover { background: rgba(42, 36, 30, 0.06); }

    body::before { display: none; }

    .site-footer { padding: 48px 16px 32px; }

    .footer-nav span { margin: 0 4px; }
}

@media (max-width: 560px) {
    .historia-grid,
    .historia-anos { grid-template-columns: 1fr; }

    :root { --header: 210px; }

    .site-header {
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
        height: var(--header);
        padding: 8px 14px 12px;
    }

    .nav-toggle { grid-column: 1; grid-row: 1; }

    .btn-gold {
        grid-column: 2;
        grid-row: 1;
        max-width: 108px;
        min-height: 30px;
        padding: 4px 7px;
        font-size: 8px;
    }

    .brand {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .brand img {
        height: 140px;
        max-width: 78vw;
    }

    .hero-actions { flex-direction: column; align-items: center; }

    .colaboradores ul { gap: 28px 36px; }

    .colaboradores img { height: 48px; }

    .gallery-fila,
    .gallery-par,
    .space-cards,
    .space-ficha { grid-template-columns: 1fr; }

    .recorrido-card { flex-basis: 78%; }

    .recorrido-centro-track { flex-wrap: wrap; }

    .recorrido-centro .recorrido-card { flex-basis: min(280px, 78%); }

    .gallery-fila figure,
    .gallery-par figure { aspect-ratio: 4 / 3; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}
