/* ==========================================================
   JOSÉ DUVERGER ALIAGA — PORTAFOLIO
   Sistema visual editorial / galería contemporánea
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@400;500;600&display=swap');

:root {
    color-scheme: light;
    --paper: #f4f1eb;
    --paper-deep: #eae4da;
    --white: #fffdf9;
    --ink: #1c1c1a;
    --ink-soft: #42403c;
    --muted: #777168;
    --line: rgba(28, 28, 26, .15);
    --line-strong: rgba(28, 28, 26, .3);
    --bronze: #806040;
    --bronze-light: #b18a5b;
    --header-height: 82px;
    --page-gutter: clamp(22px, 6.2vw, 100px);
    --content-width: 1440px;
    --ease: cubic-bezier(.22, 1, .36, 1);
    --shadow-soft: 0 18px 60px rgba(28, 24, 18, .08);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + 24px); }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: clip;
}
body.menu-open { overflow: hidden; }
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
::selection { background: var(--bronze); color: var(--white); }

.skip-link {
    position: fixed; z-index: 2000; top: 12px; left: 12px;
    padding: 12px 18px; transform: translateY(-160%);
    background: var(--ink); color: white; border-radius: 2px;
}
.skip-link:focus { transform: translateY(0); }
.scroll-progress {
    position: fixed; z-index: 1500; inset: 0 auto auto 0;
    width: 100%; height: 2px; pointer-events: none;
}
.scroll-progress span { display: block; width: 0; height: 100%; background: var(--bronze-light); transform-origin: left; }

/* Navegación */
.site-header {
    position: sticky; z-index: 2000; top: 0;
    background: rgba(244, 241, 235, .92);
    border-bottom: 1px solid transparent;
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    transition: box-shadow .35s ease, border-color .35s ease, background .35s ease;
}
.site-header.is-scrolled { border-color: var(--line); box-shadow: 0 8px 28px rgba(25, 23, 20, .04); background: rgba(244, 241, 235, .96); }
.navbar {
    min-height: var(--header-height); max-width: var(--content-width); margin: auto;
    padding: 0 var(--page-gutter); display: flex; align-items: center; justify-content: space-between; gap: 28px;
}
.logo { display: inline-flex; align-items: center; gap: 12px; flex-shrink: 0; letter-spacing: .09em; font-size: .78rem; font-weight: 700; }
.logo-symbol {
    display: grid; place-items: center; width: 38px; height: 38px;
    border: 1px solid var(--bronze); color: var(--bronze); border-radius: 50%;
    font-family: 'Playfair Display', Georgia, serif; font-size: .78rem; letter-spacing: -.05em;
    transition: background .3s ease, color .3s ease, transform .3s ease;
}
.logo:hover .logo-symbol { background: var(--bronze); color: var(--white); transform: rotate(-8deg); }
.logo-text { white-space: nowrap; }
.nav-links { display: flex; align-items: center; gap: clamp(16px, 2.2vw, 34px); margin: 0; padding: 0; list-style: none; }
.nav-links a { position: relative; display: inline-block; padding: 10px 0; color: var(--ink-soft); font-size: .74rem; letter-spacing: .04em; transition: color .25s ease; }
.nav-links a::after { content: ''; position: absolute; right: 0; bottom: 4px; left: 0; height: 1px; background: var(--bronze); transform: scaleX(0); transform-origin: right; transition: transform .3s var(--ease); }
.nav-links a:hover, .nav-links a.is-active { color: var(--bronze); }
.nav-links a:hover::after, .nav-links a.is-active::after { transform: scaleX(1); transform-origin: left; }
.menu-toggle { display: none; border: 0; background: transparent; padding: 10px 2px 10px 10px; cursor: pointer; }
.menu-toggle span { display: block; width: 25px; height: 1px; margin: 5px 0; background: var(--ink); transition: transform .3s ease, opacity .2s ease; }
.menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-6px) rotate(-45deg); }

main { display: block; }
section { scroll-margin-top: calc(var(--header-height) + 18px); }
.hero, .works, .artist, .career, .restoration, .contact { width: 100%; }

/* Portada */
.hero {
    min-height: min(780px, calc(100svh - var(--header-height)));
    display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    align-items: stretch; gap: clamp(34px, 6vw, 100px);
    max-width: var(--content-width); margin: auto; padding: clamp(64px, 8vw, 124px) var(--page-gutter) clamp(76px, 9vw, 140px);
}
.hero-content { align-self: center; padding: 18px 0 30px; position: relative; z-index: 1; }
.hero-subtitle, .section-subtitle, .project-label, .contact-label {
    margin: 0 0 18px; color: var(--bronze); font-size: .68rem; line-height: 1.3;
    letter-spacing: .22em; font-weight: 700; text-transform: uppercase;
}
.hero-subtitle::before { content: ''; display: inline-block; width: 32px; height: 1px; margin: 0 12px 4px 0; background: currentColor; }
.hero h1 { margin: 0; font-family: 'Playfair Display', Georgia, serif; font-size: clamp(4rem, 8.6vw, 8.8rem); font-weight: 400; letter-spacing: -.075em; line-height: .88; }
.hero-description { margin: 28px 0 34px; color: var(--muted); font-size: clamp(1rem, 1.4vw, 1.2rem); letter-spacing: .015em; }
.hero-button { display: inline-flex; align-items: center; gap: 24px; padding: 14px 0; border-bottom: 1px solid var(--bronze); font-size: .8rem; font-weight: 600; transition: gap .3s var(--ease), color .3s ease; }
.hero-button:hover { gap: 34px; color: var(--bronze); }
.button-arrow { color: var(--bronze); font-size: 1.2rem; line-height: 1; }
.hero-image {
    position: relative;
    width: 100%;
    min-width: 0;
    height: clamp(360px, 43vw, 590px);
    min-height: 0;
    overflow: hidden;
    background: var(--paper-deep);
}

.hero-image::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, .18);
}

.hero-image img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    max-width: 100%;
    object-fit: contain;
    object-position: center;
    filter: saturate(.82);
    transition: transform 1.1s var(--ease), filter .6s ease;
}

.hero-image:hover img {
    transform: scale(1.025);
    filter: saturate(.96);
}
/* Encabezados editoriales */
.section-header {
    display: grid; grid-template-columns: 54px minmax(220px, .9fr) minmax(240px, .8fr);
    align-items: start; gap: clamp(20px, 3.4vw, 56px);
    max-width: var(--content-width); margin: 0 auto clamp(48px, 6vw, 86px); padding: 0 var(--page-gutter);
}
.section-number { margin: 6px 0 0; color: var(--bronze); font-size: .72rem; letter-spacing: .15em; }
.section-header h2 { margin: 0; font-family: 'Playfair Display', Georgia, serif; font-size: clamp(2.7rem, 5.4vw, 5.2rem); line-height: 1.02; letter-spacing: -.055em; font-weight: 400; }
.section-subtitle { margin-bottom: 15px; }
.section-description { max-width: 390px; justify-self: end; margin: 26px 0 0; color: var(--muted); font-size: .92rem; line-height: 1.8; }

/* Galería */
.works { padding: clamp(72px, 10vw, 145px) 0 clamp(90px, 11vw, 160px); background: var(--white); }
.works .section-header { margin-bottom: clamp(40px, 6vw, 80px); }
.works-gallery {
    display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: clamp(36px, 5.5vw, 82px) clamp(20px, 3.2vw, 48px);
    max-width: var(--content-width); margin: auto; padding: 0 var(--page-gutter);
}
.work-card { min-width: 0; grid-column: span 6; display: flex; flex-direction: column; align-self: start; }
.work-card.work-full { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(280px, .88fr); align-items: center; gap: clamp(28px, 6vw, 88px); }
.work-card.work-full:nth-of-type(even) .work-img { order: 2; }
.work-card.work-full:nth-of-type(even) .work-info { order: 1; }
.work-card.work-secondary, .work-card.work-special, .work-card.work-half { grid-column: span 6; }
.work-img { position: relative; overflow: hidden; background: var(--paper-deep); }
.work-img img { width: 100%; height: clamp(280px, 38vw, 560px); object-fit: contain; padding: clamp(8px, 1.5vw, 22px); cursor: zoom-in; transition: transform .9s var(--ease), filter .5s ease; }
.work-full .work-img img { height: clamp(350px, 45vw, 640px); }
.work-card:nth-child(3n + 2) .work-img img { height: clamp(300px, 34vw, 490px); }
.work-img:hover img { transform: scale(1.035); }
.work-info { padding: 24px 0 0; }
.work-full .work-info { padding: 10px 0; }
.work-info h3, .restoration-card h3, .restoration-featured-content h3, .timeline-content h3, .contact-message h3 {
    margin: 0 0 12px; font-family: 'Playfair Display', Georgia, serif; font-size: clamp(1.65rem, 2.4vw, 2.7rem); font-weight: 400; letter-spacing: -.035em; line-height: 1.14;
}
.work-details { margin: 0 0 24px; color: var(--bronze); font-size: .7rem; font-weight: 600; letter-spacing: .06em; line-height: 1.7; text-transform: uppercase; }
.work-story { margin: 0 0 16px; color: var(--ink-soft); font-size: .91rem; line-height: 1.9; }
.work-story:last-child { margin-bottom: 0; }

/* Artista */
.artist { padding: clamp(86px, 10vw, 150px) 0; }
.artist .section-header { margin-bottom: clamp(42px, 6vw, 80px); }
.artist-content { display: grid; grid-template-columns: minmax(280px, .9fr) minmax(0, 1.1fr); align-items: center; gap: clamp(38px, 8vw, 120px); max-width: var(--content-width); margin: auto; padding: 0 var(--page-gutter); }
.artist-image { position: relative; background: var(--paper-deep); overflow: hidden; }
.artist-image::before { content: ''; position: absolute; z-index: 1; inset: 14px; border: 1px solid rgba(244,241,235,.45); pointer-events: none; }
.artist-image img { width: 100%; min-height: 460px; max-height: 720px; object-fit: cover; filter: saturate(.78); }
.artist-info { max-width: 650px; }
.artist-info p { margin: 0 0 20px; color: var(--ink-soft); font-size: .95rem; line-height: 1.95; }
.artist-info .artist-intro { color: var(--ink); font-family: 'Playfair Display', Georgia, serif; font-size: clamp(1.4rem, 2vw, 2rem); line-height: 1.5; }

/* Trayectoria */
.career { padding: clamp(84px, 10vw, 150px) 0; background: #eae4da; }
.career-intro { max-width: 760px; margin: 0 auto clamp(48px, 7vw, 92px); padding: 0 var(--page-gutter); }
.career-intro p { margin: 0; font-family: 'Playfair Display', Georgia, serif; font-size: clamp(1.45rem, 2.4vw, 2.2rem); line-height: 1.55; }
.career-timeline { position: relative; max-width: 1040px; margin: 0 auto; padding: 0 var(--page-gutter); }
.career-timeline::before { content: ''; position: absolute; top: 10px; bottom: 10px; left: calc(var(--page-gutter) + 48px); width: 1px; background: var(--line-strong); }
.timeline-item { position: relative; display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: clamp(24px, 5vw, 68px); padding: 0 0 48px 0; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-year { position: relative; z-index: 1; padding-top: 4px; color: var(--bronze); background: #eae4da; font-size: .73rem; font-weight: 700; letter-spacing: .08em; }
.timeline-year::after { content: ''; position: absolute; top: 10px; right: -12px; width: 7px; height: 7px; border: 1px solid var(--bronze); background: #eae4da; border-radius: 50%; }
.timeline-content { padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.timeline-item:last-child .timeline-content { border-bottom: 0; }
.timeline-content h3 { font-size: clamp(1.45rem, 2vw, 2rem); }
.timeline-content p { max-width: 680px; margin: 0; color: var(--ink-soft); font-size: .91rem; line-height: 1.9; }
.career-highlights { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; max-width: var(--content-width); margin: clamp(60px, 8vw, 110px) auto 0; padding: 0 var(--page-gutter); }
.highlight { padding-top: 22px; border-top: 1px solid var(--line-strong); }
.highlight-number { display: block; margin-bottom: 8px; font-family: 'Playfair Display', Georgia, serif; font-size: clamp(2.1rem, 4vw, 3.8rem); line-height: 1; }
.highlight p { margin: 0; color: var(--muted); font-size: .78rem; }

/* Restauración */
.restoration { padding: clamp(86px, 10vw, 150px) 0; background: var(--white); }
.restoration-featured { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .85fr); align-items: center; gap: clamp(30px, 6vw, 90px); max-width: var(--content-width); margin: auto; padding: 0 var(--page-gutter); }
.restoration-featured-image { min-height: 360px; background: var(--paper-deep); overflow: hidden; }
.restoration-featured-image img { width: 100%; min-height: 360px; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.restoration-featured-image:hover img { transform: scale(1.025); }
.restoration-featured-content h3 { font-size: clamp(2rem, 3.5vw, 3.8rem); }
.restoration-featured-content > p:not(.project-label):not(.work-credits) { color: var(--ink-soft); font-size: .91rem; line-height: 1.9; }
.work-credits { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: .78rem; line-height: 1.8; }
.restoration-projects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 44px); max-width: var(--content-width); margin: clamp(54px, 7vw, 96px) auto 0; padding: 0 var(--page-gutter); }
.restoration-card { padding: 28px 0 0; border-top: 1px solid var(--line-strong); }
.project-number { margin: 0 0 34px; color: var(--bronze); font-size: .7rem; letter-spacing: .14em; }
.restoration-card h3 { font-size: clamp(1.35rem, 1.8vw, 1.9rem); }
.restoration-card p:last-child { color: var(--muted); font-size: .87rem; line-height: 1.85; }

/* Contacto */
.contact { padding: clamp(86px, 10vw, 150px) 0 clamp(90px, 11vw, 160px); }
.contact-content { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, .7fr); gap: clamp(40px, 8vw, 130px); max-width: var(--content-width); margin: auto; padding: 0 var(--page-gutter); }
.contact-message h3 { max-width: 650px; font-size: clamp(2.3rem, 4.5vw, 5rem); }
.contact-message p { max-width: 550px; color: var(--muted); font-size: .96rem; line-height: 1.9; }
.contact-details { border-top: 1px solid var(--line-strong); }
.contact-item { padding: 22px 0; border-bottom: 1px solid var(--line); }
.contact-label { margin-bottom: 9px; font-size: .62rem; }
.contact-item > a { overflow-wrap: anywhere; font-size: .94rem; transition: color .25s ease; }
.contact-item > a:hover { color: var(--bronze); }
.contact-link { display: flex; align-items: flex-start; gap: 12px; }
.contact-address { margin: 0; color: var(--ink-soft); font-size: .94rem; line-height: 1.7; }
.inline-icon { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 3px; fill: none; stroke: var(--bronze); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* Footer */
.footer { padding: 50px var(--page-gutter) 26px; background: var(--ink); color: var(--paper); }
.footer-top, .footer-bottom { max-width: calc(var(--content-width) - 2 * var(--page-gutter)); margin: auto; }
.footer-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 44px; padding-bottom: 48px; }
.footer-name { margin: 0 0 5px; font-size: .83rem; font-weight: 700; letter-spacing: .12em; }
.footer-description { margin: 0; color: #b8b0a5; font-size: .79rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 12px 24px; max-width: 600px; }
.footer-nav a { color: #d3ccc2; font-size: .75rem; transition: color .25s ease; }
.footer-nav a:hover { color: var(--bronze-light); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.16); }
.footer-bottom p { margin: 0; color: #aaa399; font-size: .67rem; line-height: 1.7; }
.site-credit span { color: var(--paper); }

/* Controles flotantes / lightbox */
.back-to-top { position: fixed; z-index: 900; right: 24px; bottom: 24px; display: grid; place-items: center; width: 46px; height: 46px; padding: 0; border: 1px solid var(--line-strong); border-radius: 50%; background: rgba(244,241,235,.94); cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .25s ease, visibility .25s ease, transform .25s ease, background .25s ease; }
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--ink); color: var(--white); }
.back-to-top svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.lightbox { position: fixed; z-index: 1800; inset: 0; display: grid; grid-template-columns: 56px minmax(0, 1fr) 56px; align-items: center; gap: 12px; padding: clamp(12px, 3vw, 36px); background: rgba(17, 17, 16, .96); opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s ease; }
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox-figure { display: grid; place-items: center; min-width: 0; height: 100%; margin: 0; }
.lightbox-figure img { max-width: 100%; max-height: calc(100svh - 100px); object-fit: contain; }
.lightbox-figure figcaption { margin-top: 10px; color: #d6d0c7; font-size: .76rem; text-align: center; }
.lightbox button { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid rgba(255,255,255,.3); border-radius: 50%; background: transparent; color: white; cursor: pointer; transition: background .2s ease; }
.lightbox button:hover { background: rgba(255,255,255,.12); }
.lightbox button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.lightbox-close { position: absolute; top: 18px; right: 22px; }
.lightbox-prev { justify-self: start; }
.lightbox-next { justify-self: end; }

/* Animaciones activadas solo cuando JavaScript está disponible */
.js-enabled .reveal,
.js-enabled .reveal-left,
.js-enabled .reveal-right,
.js-enabled .reveal-image,
.js-enabled .reveal-info {
    opacity: 0; transition: opacity .75s ease, transform .85s var(--ease), clip-path .9s var(--ease);
}
.js-enabled .reveal { transform: translateY(24px); }
.js-enabled .reveal-left { transform: translateX(-28px); }
.js-enabled .reveal-right { transform: translateX(28px); }
.js-enabled .reveal-image { clip-path: inset(0 0 8% 0); transform: translateY(12px); }
.js-enabled .reveal-info { transform: translateY(18px); }
.js-enabled .reveal.is-visible,
.js-enabled .reveal-left.is-visible,
.js-enabled .reveal-right.is-visible,
.js-enabled .reveal-image.is-visible,
.js-enabled .reveal-info.is-visible { opacity: 1; transform: translate(0, 0); clip-path: inset(0); }
.delay-1 { transition-delay: .1s !important; }
.delay-2 { transition-delay: .2s !important; }
.delay-3 { transition-delay: .3s !important; }
.delay-4 { transition-delay: .4s !important; }

:focus-visible { outline: 2px solid var(--bronze); outline-offset: 4px; }

/* Responsive */
@media (min-width: 1500px) {
    .hero { min-height: 790px; }
}
@media (max-width: 1050px) {
    :root { --header-height: 74px; }
    .nav-links { gap: 16px; }
    .nav-links a { font-size: .7rem; }
    .hero { gap: 34px; }
    .section-header { grid-template-columns: 36px minmax(200px, .9fr) minmax(200px, .8fr); }
    .work-card.work-full { gap: 34px; }
    .work-card.work-full .work-img img { height: 440px; }
}
@media (max-width: 800px) {
    :root { --header-height: 70px; --page-gutter: 26px; }
    .navbar { position: relative; gap: 12px; }
    .menu-toggle { display: block; position: relative; z-index: 1002; }
    .nav-links {
        /* Anclado a la cabecera para evitar el desplazamiento causado por backdrop-filter. */
        position: absolute;
        z-index: 2001;
        top: 100%;
        right: auto;
        bottom: auto;
        left: calc(-1 * var(--page-gutter));
        width: 100vw;
        height: calc(100vh - var(--header-height));
        height: calc(100dvh - var(--header-height));
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0;
        margin: 0;
        padding: 26px var(--page-gutter) 40px;
        background: var(--paper);
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-8px);
        transition: opacity .25s ease, visibility .25s ease, transform .25s ease;
    }
    .nav-links.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }
    .nav-links li { border-bottom: 1px solid var(--line); }
    .nav-links a { display: block; padding: 17px 0; font-family: 'Playfair Display', Georgia, serif; font-size: 1.55rem; }
    .nav-links a::after { display: none; }
    .hero { min-height: auto; grid-template-columns: 1fr; gap: 38px; padding-top: 66px; padding-bottom: 84px; }
    .hero-content { padding: 0; }
    .hero h1 { font-size: clamp(4rem, 16vw, 7rem); }
    .hero-image {
        height: clamp(280px, 68vw, 440px);
        min-height: 0;
    }

    .hero-image img {
        height: 100%;
        min-height: 0;
    }
    .section-header { grid-template-columns: 36px minmax(0, 1fr); gap: 18px 20px; }
    .section-description { grid-column: 2; justify-self: start; max-width: 560px; margin: 0; }
    .works-gallery { gap: 46px 20px; }
    .work-card.work-full { grid-template-columns: 1fr; gap: 8px; }
    .work-card.work-full:nth-of-type(even) .work-img, .work-card.work-full:nth-of-type(even) .work-info { order: initial; }
    .work-card.work-full .work-img img { height: clamp(320px, 76vw, 560px); }
    .work-card.work-secondary, .work-card.work-special, .work-card.work-half { grid-column: span 6; }
    .work-card.work-full { grid-column: 1 / -1; }
    .artist-content { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 30px; }
    .artist-image img { min-height: 420px; }
    .career-timeline::before { left: calc(var(--page-gutter) + 40px); }
    .timeline-item { grid-template-columns: 95px minmax(0, 1fr); gap: 24px; }
    .career-highlights { grid-template-columns: repeat(2, 1fr); row-gap: 30px; }
    .restoration-featured { grid-template-columns: 1fr; }
    .restoration-featured-image, .restoration-featured-image img { min-height: 320px; max-height: 520px; }
    .restoration-projects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .contact-content { gap: 42px; }
    .footer-top { flex-direction: column; }
    .footer-bottom { flex-direction: column; gap: 8px; }
}
@media (max-width: 560px) {
    :root { --page-gutter: 20px; --header-height: 66px; }
    body { font-size: 15px; }
    .logo { gap: 9px; font-size: .7rem; }
    .logo-symbol { width: 34px; height: 34px; }
    .hero { padding-top: 56px; padding-bottom: 68px; gap: 30px; }
    .hero h1 { font-size: clamp(3.6rem, 17vw, 5.8rem); }
    .hero-description { margin: 22px 0 25px; }
    .hero-image {
        height: clamp(240px, 72vw, 340px);
        min-height: 0;
    }

    .hero-image img {
        height: 100%;
        min-height: 0;
    }
    .section-header { grid-template-columns: 25px minmax(0, 1fr); gap: 14px; margin-bottom: 38px; }
    .section-header h2 { font-size: clamp(2.5rem, 12vw, 3.8rem); }
    .section-description { grid-column: 2; font-size: .86rem; }
    .works-gallery { grid-template-columns: 1fr; gap: 48px; }
    .work-card, .work-card.work-secondary, .work-card.work-special, .work-card.work-half, .work-card.work-full { grid-column: 1 / -1; }
    .work-card.work-img img, .work-img img, .work-card:nth-child(3n + 2) .work-img img { height: clamp(300px, 95vw, 480px); }
    .work-card.work-full .work-img img { height: clamp(310px, 105vw, 500px); }
    .work-info, .work-full .work-info { padding-top: 20px; }
    .work-info h3 { font-size: 1.9rem; }
    .work-story { font-size: .88rem; }
    .artist-content { grid-template-columns: 1fr; gap: 30px; }
    .artist-image img { min-height: 380px; max-height: 560px; }
    .artist-info .artist-intro { font-size: 1.45rem; }
    .career-intro { margin-bottom: 50px; }
    .career-intro p { font-size: 1.4rem; }
    .career-timeline::before { left: calc(var(--page-gutter) + 30px); }
    .timeline-item { grid-template-columns: 72px minmax(0, 1fr); gap: 18px; padding-bottom: 34px; }
    .timeline-year { font-size: .62rem; overflow-wrap: anywhere; }
    .timeline-year::after { right: -8px; }
    .timeline-content h3 { font-size: 1.35rem; }
    .timeline-content p { font-size: .85rem; }
    .career-highlights { gap: 26px 18px; }
    .highlight-number { font-size: 2.5rem; }
    .highlight p { font-size: .72rem; }
    .restoration-projects { grid-template-columns: 1fr; gap: 28px; }
    .project-number { margin-bottom: 20px; }
    .contact-content { grid-template-columns: 1fr; gap: 35px; }
    .contact-message h3 { font-size: clamp(2.2rem, 11vw, 3.5rem); }
    .footer { padding-top: 38px; }
    .footer-nav { gap: 10px 18px; }
    .back-to-top { right: 15px; bottom: 15px; width: 42px; height: 42px; }
    .lightbox { grid-template-columns: 34px minmax(0,1fr) 34px; gap: 6px; padding: 12px; }
    .lightbox button { width: 34px; height: 34px; }
    .lightbox-close { top: 12px; right: 12px; }
    .lightbox-figure img { max-height: calc(100svh - 100px); }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .js-enabled .reveal, .js-enabled .reveal-left, .js-enabled .reveal-right, .js-enabled .reveal-image, .js-enabled .reveal-info { opacity: 1; transform: none; clip-path: none; }
}

/* Catálogo dinámico y estados de disponibilidad */


/* =========================================
   PANEL DE FILTROS — DISEÑO RESPONSIVE
   ========================================= */

   .works-toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 22px 24px;

    width: 100%;
    max-width: var(--content-width);
    margin: 0 auto 36px;
    padding: clamp(20px, 3vw, 30px);

    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 6px;
    box-shadow: 0 8px 28px rgba(28, 28, 28, 0.045);

    box-sizing: border-box;
}

/* Etiquetas de los filtros */
.works-search-label,
.works-filter-label {
    display: block;
    margin: 0 0 10px;
    color: var(--ink-soft);
    font-size: 0.72rem;
    line-height: 1.4;
    letter-spacing: 0.09em;
    font-weight: 700;
    text-transform: uppercase;
}

/* Campos de búsqueda y estado */
.works-search,
.works-status-filter {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 52px;
    margin: 0;
    padding: 12px 15px;

    border: 1px solid var(--line-strong);
    border-radius: 3px;
    background: var(--white);
    color: var(--ink);

    font: inherit;
    font-size: 0.95rem;
    line-height: 1.4;

    box-sizing: border-box;

    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        background-color 0.25s ease;
}

/* Texto de ayuda dentro del buscador */
.works-search::placeholder {
    color: var(--muted);
    opacity: 0.85;
}

/* Estado de foco */
.works-search:focus,
.works-status-filter:focus {
    outline: none;
    border-color: var(--bronze);
    box-shadow: 0 0 0 3px rgba(128, 96, 64, 0.12);
}

/* Contador de resultados */
.works-results {
    grid-column: 1 / -1;
    min-width: 0;
    margin: 0;
    padding-top: 16px;

    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.5;
}

/* =========================================
   CATÁLOGO DE OBRAS
   ========================================= */

.works-gallery-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: clamp(18px, 2.2vw, 34px);
}

.works-gallery-grid > .work-card {
    grid-column: span 6;
    min-width: 0;
}

.works-gallery-grid > .work-card.work-full {
    grid-column: span 12;
}

.works-gallery-grid > .work-card.work-half {
    grid-column: span 6;
}

.works-gallery-grid > .work-card[hidden] {
    display: none !important;
}

/* Título de cada obra y estado */
.work-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.work-title-row h3 {
    min-width: 0;
}

.work-status {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    padding: 5px 9px;
    border-radius: 30px;
    font-size: 0.64rem;
    line-height: 1.3;
    letter-spacing: 0.04em;
    font-weight: 700;
    background: #eee9e0;
    color: #5c5144;
}

.status-available {
    background: #e2eee5;
    color: #285f3e;
}

.status-reserved {
    background: #f6edd7;
    color: #795a18;
}

.status-sold {
    background: #eee5df;
    color: #81513c;
}

.status-hidden {
    background: #e9e9e9;
    color: #555;
}

.status-consult {
    background: #eee9e0;
    color: #5c5144;
}

.status-project {
    background: #e4e9ef;
    color: #3c536c;
}

.works-empty {
    padding: 24px 0;
    color: var(--muted);
}

/* =========================================
   TABLETAS
   ========================================= */

@media (max-width: 900px) {
    .works-toolbar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
        padding: 22px;
    }

    .works-search,
    .works-status-filter {
        min-height: 50px;
        font-size: 0.9rem;
    }

    .works-gallery-grid {
        gap: 24px;
    }
}

/* =========================================
   TELÉFONOS
   ========================================= */

@media (max-width: 600px) {
    .works-toolbar {
        grid-template-columns: minmax(0, 1fr);
        align-items: stretch;
        gap: 18px;

        width: 100%;
        margin: 0 auto 28px;
        padding: 20px 16px;

        border-radius: 5px;
    }

    .works-search-label,
    .works-filter-label {
        margin: 0 0 8px;
        font-size: 0.69rem;
    }

    .works-search,
    .works-status-filter {
        width: 100%;
        min-width: 0;
        min-height: 48px;
        padding: 11px 12px;
        font-size: 0.88rem;
    }

    .works-results {
        grid-column: 1;
        padding-top: 14px;
        font-size: 0.78rem;
    }

    .works-gallery-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }

    .works-gallery-grid > .work-card,
    .works-gallery-grid > .work-card.work-full,
    .works-gallery-grid > .work-card.work-half {
        grid-column: 1 / -1;
    }

    .work-title-row {
        flex-wrap: wrap;
    }
}

/* =========================================
   ACCESIBILIDAD
   ========================================= */

@media (prefers-reduced-motion: reduce) {
    .works-search,
    .works-status-filter {
        transition: none;
    }
}

@media(max-width:760px){.works-toolbar{grid-template-columns:1fr 1fr}.works-search-label,.works-filter-label{align-self:end}.works-search,.works-status-filter{min-width:0}.works-gallery-grid{grid-template-columns:1fr;gap:24px}.works-gallery-grid>.work-card,.works-gallery-grid>.work-card.work-full,.works-gallery-grid>.work-card.work-half{grid-column:1/-1}.work-title-row{flex-wrap:wrap}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}

.status-consult{background:#eee9e0;color:#5c5144}.status-project{background:#e4e9ef;color:#3c536c}

/* Agrupar cada etiqueta con su campo */
.works-toolbar > .works-filter-group {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    min-width: 0;
}

.works-toolbar > .works-filter-group > label {
    margin: 0;
}

.works-toolbar > .works-filter-group > input,
.works-toolbar > .works-filter-group > select {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.works-toolbar > .works-results {
    grid-column: 1 / -1;
    min-width: 0;
    margin: 0;
}

/* Alineación de etiquetas en móviles */

/* Alinear los títulos a la izquierda en móviles */
@media screen and (max-width: 600px) {
    .works-toolbar .works-filter-group > label.works-search-label,
    .works-toolbar .works-filter-group > label.works-filter-label {
        display: block;
        width: 100%;
        text-align: left;
        align-self: stretch;
        margin: 0 0 8px;
        box-sizing: border-box;
    }
}
