/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@200;300;400;500;600&family=Outfit:wght@200;300;400;500;600;700&display=swap');

/* CSS Variables */
:root {
    --bg-color: #d8cfbf;
    --bg-warm: #cfc3b0;
    --text-primary: #1a1a1a;
    --text-secondary: #5a5a5a;
    --text-muted: #888888;
    --accent: #2c2c2c;
    --border-color: rgba(26, 26, 26, 0.08);
    --border-color-light: rgba(26, 26, 26, 0.04);
    --font-title: 'Outfit', sans-serif;
    --font-sans: 'Inter', sans-serif;
    --transition-slow: 1.8s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-medium: 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;
}

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

html {
    scroll-behavior: initial; /* Lenis handles smooth scroll */
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    text-align: justify;
    background:
        linear-gradient(180deg, rgba(234, 226, 211, 0.9) 0%, rgba(203, 193, 176, 0.84) 100%),
        var(--bg-color);
}

body * {
    text-align: justify;
}

/* Mesh Background Gradient (Subtle & Near Transparent) */
.mesh-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
    background:
        radial-gradient(circle at 15% 10%, rgba(246, 239, 226, 0.7), transparent 38%),
        linear-gradient(180deg, #ddd3c1 0%, #c9bda9 100%);
}

.mesh-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.11;
    mix-blend-mode: multiply;
}

/* Colors for mesh elements */
.mesh-circle-1 {
    top: -10%;
    left: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, #cfc3b1 0%, rgba(231, 224, 211, 0) 70%);
    animation: float-1 30s infinite ease-in-out alternate;
}

.mesh-circle-2 {
    bottom: -15%;
    right: -10%;
    width: 70vw;
    height: 70vw;
    background: radial-gradient(circle, #c6bba9 0%, rgba(231, 224, 211, 0) 70%);
    animation: float-2 40s infinite ease-in-out alternate;
}

.mesh-circle-3 {
    top: 30%;
    right: 15%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, #dacdbc 0%, rgba(231, 224, 211, 0) 70%);
    animation: float-3 35s infinite ease-in-out alternate;
}

.mesh-circle-4 {
    bottom: 20%;
    left: 20%;
    width: 55vw;
    height: 55vw;
    background: radial-gradient(circle, #beb2a0 0%, rgba(231, 224, 211, 0) 70%);
    animation: float-1 45s infinite ease-in-out alternate-reverse;
}

/* Float Animations */
@keyframes float-1 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(8%, 12%) scale(1.1); }
}

@keyframes float-2 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-10%, -8%) scale(0.9); }
}

@keyframes float-3 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-5%, 15%) scale(1.15); }
}

/* Header & Navigation */
header {
    position: fixed;
    top: clamp(0.75rem, 1.8vw, 1.25rem);
    left: 50%;
    width: min(calc(100% - clamp(1.5rem, 4vw, 4rem)), 1360px);
    padding: 0.78rem clamp(1rem, 2.4vw, 2rem);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    color: rgba(255, 252, 244, 0.94);
    background-color: rgba(38, 34, 28, 0.34);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 18px 50px rgba(65, 53, 38, 0.08);
    backdrop-filter: blur(18px) saturate(1.12);
    transform: translateX(-50%);
    text-shadow: 0 1px 14px rgba(0, 0, 0, 0.32);
    transition: background-color 0.55s ease, color 0.55s ease, border-color 0.55s ease, box-shadow 0.55s ease, text-shadow 0.55s ease;
}

/* Subtle backup navigation if difference is hard to read */
header.scrolled {
    background-color: rgba(216, 207, 191, 0.76);
    backdrop-filter: blur(18px) saturate(1.1);
    color: var(--text-primary);
    border-color: rgba(26, 26, 26, 0.12);
}

header .logo {
    font-family: var(--font-title);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-decoration: none;
    text-transform: uppercase;
    color: inherit;
    transition: opacity var(--transition-fast);
}

header .logo:hover {
    opacity: 0.7;
}

header nav ul {
    display: flex;
    list-style: none;
    gap: var(--spacing-md);
}

header nav a {
    text-decoration: none;
    color: inherit;
    font-size: 0.67rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 400;
    transition: opacity var(--transition-fast);
}

header nav a:hover, header nav li.active a {
    opacity: 0.58;
}

:focus-visible {
    outline: 2px solid rgb(126, 103, 76);
    outline-offset: 4px;
}

.skip-link {
    position: fixed;
    z-index: 1000;
    top: .75rem;
    left: .75rem;
    padding: .75rem 1rem;
    color: #f8f3e9;
    background: #282621;
    transform: translateY(calc(-100% - 1rem));
    transition: transform .2s ease;
}

.skip-link:focus { transform: none; }

.img-box[role="button"]:focus-visible {
    outline-offset: 6px;
}

.index-navigation-transition {
    position: fixed;
    inset: 0;
    z-index: 900;
    pointer-events: none;
    opacity: 0;
    background-color: rgba(216, 207, 191, 0.76);
    transition: opacity 0.26s ease;
}

.index-navigation-transition.active {
    opacity: 1;
}

.menu-toggle {
    display: none;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 1.2rem;
    height: 1px;
    margin: 0.3rem auto;
    background: currentColor;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

/* Layout Utilities */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

section {
    position: relative;
    padding: var(--spacing-xl) 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Editorial Grid */
.editorial-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--spacing-md);
    align-items: center;
}

/* Cover Section - Asymmetric Hero */
#cover {
    min-height: 100vh;
    min-height: 100svh;
    height: 100vh;
    height: 100svh;
    padding: 0;
    display: block;
    overflow: hidden;
    position: relative;
    background:
        linear-gradient(180deg, rgba(216, 207, 191, 0.08) 0%, rgba(216, 207, 191, 0.52) 100%),
        var(--bg-color);
    --parallax-hero-title-y: 0px;
    --parallax-hero-copy-y: 0px;
}

#cover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 0;
    border: 0;
    background: none;
    pointer-events: none;
    z-index: 2;
}

.hero-layout {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    min-height: 100%;
    height: 100%;
    box-sizing: border-box;
    padding: clamp(6rem, 9vw, 7.5rem) var(--spacing-lg) clamp(3rem, 5vw, 5rem);
    gap: clamp(2rem, 5vw, 5rem);
    position: relative;
    z-index: 3;
    align-items: stretch;
}

.hero-meta {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    justify-content: space-between;
    gap: var(--spacing-md);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.28em;
    color: rgba(255, 252, 244, 0.78);
    align-self: start;
    padding-bottom: clamp(2rem, 5vw, 4rem);
    opacity: 1;
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.45);
    transition: opacity 0.18s linear;
}

.hero-title-wrap {
    grid-column: 1;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-bottom: 0;
    transform: translate3d(0, var(--parallax-hero-title-y), 0);
    position: relative;
    z-index: 2;
    transition: transform 0.18s linear;
    max-width: min(88rem, 100%);
}

.hero-kicker {
    margin-bottom: clamp(1rem, 2vw, 1.5rem);
    color: rgba(255, 252, 244, 0.72);
    font-size: 0.68rem;
    letter-spacing: 0.26em;
    text-transform: uppercase;
}

.hero-title-wrap h1 {
    font-family: var(--font-title);
    font-size: clamp(4.2rem, 10.8vw, 12rem);
    font-weight: 240;
    letter-spacing: 0;
    text-transform: uppercase;
    line-height: 0.9;
    color: rgba(255, 252, 244, 0.92);
    display: block;
    text-shadow: 0 14px 44px rgba(0, 0, 0, 0.58);
}

.hero-image-panel {
    position: absolute;
    inset: 0;
    min-height: 100%;
    overflow: hidden;
    align-self: stretch;
    display: flex;
    align-items: flex-end;
    isolation: isolate;
    width: 100%;
    margin: 0;
    z-index: 0;
}

.hero-image-panel > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.84) saturate(0.92);
    transform: none;
    transition: none;
}

.hero-image-panel.revealed > img {
    transform: none;
}

.hero-image-panel::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        linear-gradient(180deg, rgba(26, 26, 26, 0.24) 0%, rgba(26, 26, 26, 0.1) 42%, rgba(26, 26, 26, 0.56) 100%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.44) 0%, rgba(0, 0, 0, 0.18) 26%, rgba(0, 0, 0, 0.02) 58%, rgba(0, 0, 0, 0.18) 100%);
}

.hero-image-copy {
    position: relative;
    z-index: 2;
    max-width: 34rem;
    margin-left: auto;
    padding: clamp(1.5rem, 4vw, 3rem) var(--spacing-lg);
    color: rgba(255, 255, 255, 0.86);
    transform: translate3d(0, var(--parallax-hero-copy-y), 0);
    transition: none;
}

.hero-image-copy span {
    display: block;
    margin-bottom: var(--spacing-sm);
    font-size: 0.64rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.62);
}

.hero-image-copy p {
    font-family: var(--font-title);
    font-size: clamp(1.7rem, 3.2vw, 3.35rem);
    font-weight: 270;
    line-height: 1.05;
}

.hero-corner-logo {
    position: absolute;
    bottom: clamp(1.2rem, 3vw, 2.5rem);
    left: clamp(1.2rem, 3vw, 2.5rem);
    z-index: 2;
    display: block;
    width: clamp(10.5rem, 18vw, 18rem);
    opacity: 0.86;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.hero-corner-logo:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.hero-corner-logo img {
    display: block;
    width: 100%;
    height: auto;
}

.hero-divider-v {
    grid-column: 2;
    grid-row: 1 / 4;
    width: 1px;
    background-color: var(--border-color);
    margin: 0 var(--spacing-lg);
    align-self: stretch;
}

.hero-side-info {
    grid-column: 3;
    grid-row: 1 / 4;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    padding-left: 0;
    width: 5rem;
}

.hero-vertical-text {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    font-size: 0.62rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: rgba(26, 26, 26, 0.62);
    font-weight: 300;
    align-self: center;
}

.hero-year-block {
    font-family: var(--font-title);
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(26, 26, 26, 0.7);
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-self: flex-end;
}


.scroll-indicator {
    position: absolute;
    bottom: clamp(1.5rem, 4vw, 3rem);
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: rgba(26, 26, 26, 0.78);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
}

.scroll-indicator span {
    padding: 0.45rem 0.7rem;
    background-color: rgba(232, 224, 209, 0.68);
    backdrop-filter: blur(6px);
}

.scroll-line {
    width: 2px;
    height: 68px;
    background-color: rgba(26, 26, 26, 0.16);
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(26, 26, 26, 0.86);
    animation: scroll-down-anim 2s infinite ease-in-out;
}

@keyframes scroll-down-anim {
    0% { transform: translateY(-100%); }
    80%, 100% { transform: translateY(100%); }
}

/* Presentacion Section */
#presentacion {
    border-bottom: 1px solid var(--border-color-light);
}

#presentacion.intro-compact {
    min-height: auto;
    padding: clamp(4rem, 8vw, 7rem) 0 0;
    justify-content: flex-start;
    overflow: hidden;
}

.section-label {
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: var(--spacing-md);
    display: block;
}

.editorial-intro {
    grid-column: 1 / 13;
}

.manifesto-title {
    font-family: var(--font-title);
    font-size: clamp(1.85rem, 3.4vw, 3rem);
    font-weight: 300;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
    max-width: 760px;
}

.manifesto-body {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
    max-width: 980px;
}

.manifesto-text {
    font-size: clamp(0.95rem, 1.2vw, 1.05rem);
    line-height: 1.65;
    font-weight: 300;
    color: var(--text-secondary);
    text-align: left;
}

.manifesto-text p {
    margin-bottom: var(--spacing-md);
}

.intro-image-band {
    position: relative;
    width: 100vw;
    left: 50%;
    height: clamp(18rem, 38vw, 34rem);
    margin-top: clamp(2rem, 5vw, 4rem);
    margin-left: -50vw;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
}

.intro-image-band img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.86) saturate(0.92);
    transform: scale(1.045);
    transition: transform var(--transition-slow), filter var(--transition-medium);
}

.intro-image-band.revealed img {
    transform: scale(1);
}

.intro-image-band::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(216, 207, 191, 0.7) 0%, rgba(216, 207, 191, 0.12) 36%, rgba(26, 26, 26, 0.24) 100%),
        linear-gradient(90deg, var(--bg-color) 0%, transparent 14%, transparent 86%, var(--bg-color) 100%);
}

.intro-image-band span {
    position: relative;
    z-index: 1;
    padding: var(--spacing-lg);
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.65rem;
    letter-spacing: 0.34em;
    text-transform: uppercase;
}

/* Indice Section */
#indice {
    min-height: auto;
    margin-top: -1px;
    padding: clamp(3.5rem, 6vw, 5rem) 0 clamp(4rem, 7vw, 6rem);
    justify-content: flex-start;
    background:
        linear-gradient(180deg, rgba(198, 191, 180, 0.94), rgba(176, 169, 158, 0.98)),
        #c6bfb4;
    color: rgba(26, 26, 26, 0.92);
}

.index-heading {
    display: block;
    max-width: 1320px;
    margin-left: 0;
    margin-bottom: clamp(0.9rem, 1.8vw, 1.35rem);
}

.index-subline {
    display: grid;
    grid-template-columns: minmax(9rem, 0.26fr) minmax(0, 1fr);
    gap: var(--spacing-lg);
    align-items: baseline;
    max-width: 1040px;
    margin-top: 0;
}

#indice .section-label {
    color: rgba(26, 26, 26, 0.72);
    margin-bottom: 0;
    padding-top: 0;
}

#indice .manifesto-title {
    display: none;
}

.index-intro {
    max-width: 880px;
    color: rgba(26, 26, 26, 0.48);
    font-size: clamp(1rem, 1.62vw, 1.58rem);
    line-height: 1.22;
    font-weight: 300;
    padding-bottom: 0;
}

.index-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    border-top: 1px solid rgba(26, 26, 26, 0.16);
    border-left: 1px solid rgba(26, 26, 26, 0.12);
}

.index-item {
    --index-image: none;
    position: relative;
    display: flex;
    min-height: clamp(12rem, 18vw, 16rem);
    padding: clamp(0.62rem, 1.15vw, 0.9rem);
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
    text-decoration: none;
    color: rgba(26, 26, 26, 0.92);
    border: 0;
    border-right: 1px solid rgba(26, 26, 26, 0.12);
    border-bottom: 1px solid rgba(26, 26, 26, 0.12);
    overflow: hidden;
    isolation: isolate;
    background-color: rgba(190, 183, 171, 0.34);
    transition: background-color var(--transition-medium), border-color var(--transition-fast);
}

.index-item::before {
    content: '';
    position: absolute;
    top: clamp(0.62rem, 1.15vw, 0.9rem);
    left: clamp(0.62rem, 1.15vw, 0.9rem);
    right: clamp(0.62rem, 1.15vw, 0.9rem);
    height: 62%;
    z-index: -1;
    background-image: var(--index-image);
    background-size: cover;
    background-position: center;
    opacity: 0.9;
    filter: saturate(0.88) contrast(0.96) brightness(0.88);
    transform: scale(1);
    transition: transform var(--transition-slow), filter var(--transition-medium), opacity var(--transition-medium);
}

.index-item::after {
    content: '';
    position: absolute;
    right: clamp(0.62rem, 1.15vw, 0.9rem);
    bottom: clamp(0.58rem, 1vw, 0.8rem);
    width: clamp(1.35rem, 2.2vw, 1.8rem);
    height: clamp(1.35rem, 2.2vw, 1.8rem);
    background-color: rgba(26, 26, 26, 0.88);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M8 1a.5.5 0 0 1 .5.5v11.793l3.146-3.147a.5.5 0 0 1 .708.708l-4 4a.5.5 0 0 1-.708 0l-4-4a.5.5 0 0 1 .708-.708L7.5 13.293V1.5A.5.5 0 0 1 8 1'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M8 1a.5.5 0 0 1 .5.5v11.793l3.146-3.147a.5.5 0 0 1 .708.708l-4 4a.5.5 0 0 1-.708 0l-4-4a.5.5 0 0 1 .708-.708L7.5 13.293V1.5A.5.5 0 0 1 8 1'/%3E%3C/svg%3E") center / contain no-repeat;
    transform-origin: center;
    transition: transform var(--transition-fast), opacity var(--transition-fast);
}

/* Keep the SEO heading visually identical to the original compact kicker. */
.hero-title-wrap h1.hero-kicker {
    display: block;
    margin: 0 0 clamp(1rem, 2vw, 1.5rem);
    color: rgba(255, 252, 244, 0.72);
    font-family: var(--font-sans);
    font-size: 0.68rem;
    font-weight: 400;
    letter-spacing: 0.26em;
    line-height: 1.45;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.45);
    text-transform: uppercase;
}

.index-item:hover {
    background-color: rgba(214, 207, 196, 0.5);
    border-color: rgba(26, 26, 26, 0.26);
}

.index-item:hover::before {
    opacity: 1;
    filter: saturate(1.02) contrast(1.04) brightness(0.98);
    transform: scale(1.025);
}

.index-item:hover::after {
    transform: translateX(0.35rem) rotate(42deg);
    animation: index-arrow-turn 0.48s cubic-bezier(0.22, 0.8, 0.3, 1) both;
}

@keyframes index-arrow-turn {
    0% {
        transform: translateX(0) rotate(0deg);
    }
    58% {
        transform: translateX(0.42rem) rotate(52deg);
    }
    100% {
        transform: translateX(0.35rem) rotate(42deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .index-item:hover::after {
        animation: none;
        transform: translateX(0.35rem) rotate(42deg);
    }
}

.index-num {
    font-family: var(--font-title);
    font-size: 0.72rem;
    color: rgba(26, 26, 26, 0.48);
    margin-right: 0;
    position: relative;
    z-index: 1;
    letter-spacing: 0.18em;
}

.index-title {
    font-family: var(--font-title);
    font-size: clamp(1.05rem, 1.68vw, 1.5rem);
    font-weight: 330;
    letter-spacing: 0;
    text-transform: uppercase;
    position: relative;
    z-index: 1;
    line-height: 1;
}

.index-item-label {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: baseline;
    gap: 0.48rem;
    margin-top: auto;
    padding-right: 2.6rem;
}

.index-dots {
    display: none;
}

.index-year {
    font-family: var(--font-sans);
    margin: 0;
    font-size: 0.72rem;
    color: rgba(26, 26, 26, 0.48);
    font-weight: 300;
    letter-spacing: 0.1em;
    position: relative;
    z-index: 1;
}

.index-item[href="#tfo"] { --index-image: url("images/thumbs/p04-01.webp"); }
.index-item[href="#tps"] { --index-image: url("images/thumbs/p09-01.webp"); }
.index-item[href="#lt2"] { --index-image: url("images/thumbs/p12-01.webp"); }
.index-item[href="#tve"] { --index-image: url("images/thumbs/p16-01.webp"); }
.index-item[href="#pd11"] { --index-image: url("images/thumbs/p18-01.webp"); }
.index-item[href="#pd10"] { --index-image: url("images/thumbs/p19-01.webp"); }
.index-item[href="#sta434"] { --index-image: url("images/thumbs/p21-01.webp"); }
.index-item[href="#sta435"] { --index-image: url("images/thumbs/p24-01.webp"); }
.index-item[href="#par"] { --index-image: url("images/thumbs/p25-01.webp"); }
.index-item[href="#lv1"] { --index-image: url("images/thumbs/p28-01.webp"); }
.index-item[href="#qmg"] { --index-image: url("images/thumbs/p29-01.webp"); }

/* Projects Layouts */
.project-section {
    --project-accent-rgb: 126, 103, 76;
    padding: clamp(4.5rem, 8vw, 7rem) 0 clamp(8rem, 12vw, 12rem);
    border-bottom: 1px solid var(--border-color-light);
    display: block;
    justify-content: initial;
    min-height: auto;
    overflow: visible;
}

@media (min-width: 769px) {
    #proyectos > .project-section {
        min-height: 100svh;
        scroll-margin-top: 7rem;
    }
}

.project-header {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.project-title {
    font-family: var(--font-title);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.1;
    margin-bottom: var(--spacing-sm);
}

.project-meta-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-lg);
    padding: var(--spacing-sm) 0 var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-secondary);
}

.project-meta-item strong {
    color: var(--text-primary);
    font-weight: 500;
    margin-right: 0.5rem;
}

/* Project Narrative */
.project-narrative-container {
    grid-column: 1 / 5;
    align-self: start;
    position: sticky;
    top: clamp(5.5rem, 10vh, 7rem);
    padding: 0 var(--spacing-md) var(--spacing-md) 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow: visible;
    transform: translate3d(0, var(--parallax-copy-y, 0px), 0);
    will-change: transform, opacity;
}

.project-sale-link {
    display: inline-block;
    width: fit-content;
    margin-top: 1.15rem;
    padding-bottom: 0.35rem;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(26, 26, 26, 0.55);
    font-size: 0.68rem;
    letter-spacing: 0.16em;
    text-decoration: none;
    text-transform: uppercase;
    transition: opacity var(--transition-fast), border-color var(--transition-fast);
}

.project-sale-link:hover {
    opacity: 0.58;
    border-color: transparent;
}

.project-description-flow {
    height: auto;
    overflow: visible;
}

.project-sticky-heading {
    position: relative;
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid rgba(26, 26, 26, 0.14);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.project-sticky-heading::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 1px;
    background: rgb(var(--project-accent-rgb));
    transform: scaleX(1);
    transform-origin: left center;
    transition: none;
}

.project-sticky-kicker {
    display: block;
    margin-bottom: var(--spacing-sm);
    color: rgb(var(--project-accent-rgb));
    font-size: 0.68rem;
    font-weight: 400;
    letter-spacing: 0.28em;
    text-transform: uppercase;
}

.project-sticky-title {
    margin: 0;
    color: var(--text-primary);
    font-family: var(--font-title);
    font-size: clamp(2.25rem, 5vw, 4.85rem);
    font-weight: 260;
    letter-spacing: 0.02em;
    line-height: 0.94;
    text-transform: uppercase;
}

.project-sticky-meta {
    display: block;
    margin-top: var(--spacing-md);
    color: var(--text-secondary);
    font-size: 0.68rem;
    letter-spacing: 0.18em;
    line-height: 1.8;
    text-transform: uppercase;
}

.project-description {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    font-weight: 300;
    text-align: justify;
    margin-top: var(--spacing-md);
}

.project-gallery-container {
    grid-column: 5 / 13;
    padding-top: 8vh;
}

/* Grid configurations for architectural images */
.gallery-layout-dense {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
}

.gallery-layout-single {
    width: 100%;
}

.gallery-layout-mixed {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--spacing-md);
}

.gallery-layout-mixed .img-box {
    grid-column: span 6;
}

.gallery-layout-mixed .img-box:nth-child(4n + 1),
.gallery-layout-mixed .img-box:nth-child(4n) {
    grid-column: 1 / 13;
}

.gallery-layout-mixed .img-box:nth-child(4n + 2) {
    grid-column: 1 / 7;
}
.gallery-layout-mixed .img-box:nth-child(4n + 3) {
    grid-column: 7 / 13;
}

.gallery-collapsible:not(.is-expanded) .gallery-extra {
    display: none;
}

.gallery-reveal-button {
    display: block;
    width: fit-content;
    margin: var(--spacing-md) 0 0 auto;
    padding: 0.4rem 0;
    border: 0;
    border-bottom: 1px solid rgba(26, 26, 26, 0.52);
    background: none;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.66rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    cursor: pointer;
    transition: color var(--transition-fast), border-color var(--transition-fast);
}

.gallery-reveal-button:hover {
    color: rgb(var(--project-accent-rgb));
    border-color: rgb(var(--project-accent-rgb));
}

/* Image container and Zoom on Reveal */
.img-box {
    position: relative;
    --cinema-depth-scale: 0.94;
    --cinema-tilt: 0deg;
    width: 100%;
    overflow: hidden;
    background-color: #eae7e0;
    cursor: pointer;
    margin-bottom: 0;
    transform: perspective(1100px) translate3d(0, var(--cinema-shift, 0px), 0) rotateX(var(--cinema-tilt)) scale(var(--cinema-depth-scale));
    transform-origin: center center;
    transition: transform 0.2s linear;
    will-change: transform;
}

.img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(calc(1.055 + var(--cinema-scale, 0)));
    transition: transform var(--transition-slow), filter var(--transition-medium);
    filter: brightness(0.95);
}

/* Lightweight rendering path for older phones and small touch screens. */
.performance-lite .paper-texture {
    display: none;
}

.performance-lite header,
.performance-lite header nav {
    backdrop-filter: none;
}

.performance-lite .img-box {
    --cinema-depth-scale: 1;
    --cinema-tilt: 0deg;
    --cinema-shift: 0px;
    transform: none;
    transition: none;
    will-change: auto;
}

.performance-lite .reveal-img img,
.performance-lite .reveal-img.revealed img {
    filter: brightness(0.95);
    transition: transform 0.45s ease;
}

.performance-lite .reveal-img,
.performance-lite .reveal-img.revealed {
    transition: none;
}

.performance-lite .reveal-img::after {
    display: none;
}

/* Layout variations */
.img-portrait {
    aspect-ratio: 3 / 4;
}

.img-landscape {
    aspect-ratio: 16 / 10;
}

.img-square {
    aspect-ratio: 1 / 1;
}

.img-full {
    aspect-ratio: 16 / 9;
}

.img-wide-card {
    aspect-ratio: 16 / 7;
}

.img-box.has-natural-image-aspect {
    aspect-ratio: var(--natural-image-aspect);
}

/* Hover Zoom */
.img-box:hover img {
    transform: scale(1.025);
    filter: brightness(1);
}

.project-section.is-cinematic .project-sticky-heading {
    opacity: 1;
    transform: translate3d(0, var(--parallax-heading-y, 0px), 0);
    transition: none;
    will-change: transform;
}

/* Project details / caption overlay */
.img-caption {
    position: absolute;
    bottom: var(--spacing-sm);
    left: var(--spacing-sm);
    background-color: rgba(250, 249, 246, 0.85);
    padding: 4px 8px;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.img-caption::before {
    content: '';
    position: absolute;
    top: 50%;
    right: calc(100% + 0.45rem);
    width: 2.2rem;
    height: 1px;
    background-color: rgb(var(--project-accent-rgb));
    transform: scaleX(0);
    transform-origin: right center;
    transition: transform 0.3s ease 0.06s;
}

.img-box:hover .img-caption {
    opacity: 1;
    transform: translateY(0);
}

.img-box:hover .img-caption::before {
    transform: scaleX(1);
}

/* Previous entrance effects are neutralized; movement now comes from the unified parallax system. */
.reveal {
    opacity: 1;
    transform: none;
    transition: none;
}

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

/* Text remains visible and is moved only by its parent parallax context. */
.reveal-text {
    opacity: 1;
    transform: none;
    clip-path: none;
    transition: none;
}

.reveal-text.revealed {
    opacity: 1;
    transform: none;
    clip-path: none;
}

/* Project image reveals are disabled; photography is intentionally still. */
.reveal-img {
    position: relative;
    overflow: hidden;
}

.reveal-img::after {
    display: none;
}

.reveal-img.revealed::after {
    display: none;
}

.reveal-img img {
    transform: none;
    filter: none;
    transition: none;
}

.reveal-img.revealed img {
    filter: none;
}

.reveal-img.revealed:hover img {
    filter: none;
}

/* Global, one-time opacity reveal as content enters the viewport. */
.viewport-reveal {
    opacity: 0.3;
    transition: opacity 0.82s cubic-bezier(0.22, 1, 0.36, 1) var(--viewport-reveal-delay, 0ms);
}

.project-gallery-container .img-box.viewport-reveal {
    opacity: 0.18;
}

.viewport-reveal.is-visible,
.project-gallery-container .img-box.viewport-reveal.is-visible {
    opacity: 1;
}

.index-item.viewport-reveal {
    transition: opacity 0.82s cubic-bezier(0.22, 1, 0.36, 1) var(--viewport-reveal-delay, 0ms), background-color var(--transition-medium), border-color var(--transition-fast);
}

.gallery-reveal-button.viewport-reveal {
    transition: opacity 0.82s cubic-bezier(0.22, 1, 0.36, 1) var(--viewport-reveal-delay, 0ms), color var(--transition-fast), border-color var(--transition-fast);
}

.performance-lite .viewport-reveal {
    opacity: 1;
    transition: none;
}

/* Project photography remains still: no reveal, zoom, parallax, or hover treatment. */
.project-gallery-container .img-box {
    transform: none;
    transition: none;
    will-change: auto;
}

/* Mobile and reduced-motion devices use a normal document-flow footer. */
.performance-lite #contacto {
    min-height: auto;
    overflow: hidden;
}

.performance-lite #contacto.footer-active .contact-frame,
.performance-lite .contact-frame {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    min-height: min(760px, calc(100svh - 2rem));
    overflow: hidden;
    will-change: auto;
}

.performance-lite #contacto .contact-grid,
.performance-lite #contacto .section-label,
.performance-lite #contacto .footer-credits {
    opacity: 1;
    transform: none;
    will-change: auto;
}

.project-gallery-container .reveal-img::after {
    content: '';
    position: absolute;
    inset: 0;
    display: block;
    z-index: 2;
    pointer-events: none;
    background: radial-gradient(ellipse at 50% 45%, rgba(216, 207, 191, 0.08) 0%, rgba(198, 189, 174, 0.42) 52%, rgba(156, 146, 130, 0.78) 100%);
    opacity: 1;
    transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.project-gallery-container .reveal-img.photo-visible::after {
    opacity: 0;
}

.performance-lite .project-gallery-container .reveal-img::after {
    display: none;
}

.project-gallery-container .img-box img,
.project-gallery-container .reveal-img img,
.project-gallery-container .reveal-img.revealed img {
    transform: none;
    filter: none;
    transition: none;
}

.project-gallery-container .img-box.layered-reveal.viewport-reveal {
    opacity: 0.48;
}

.project-gallery-container .img-box.layered-reveal.viewport-reveal.is-visible {
    opacity: 1;
}

.project-gallery-container .img-box.layered-reveal img {
    transform: scale(1.035);
    filter: brightness(0.78) saturate(0.78) contrast(0.94);
    transition: transform 1.05s cubic-bezier(0.22, 1, 0.36, 1) var(--viewport-reveal-delay, 0ms), filter 0.88s ease var(--viewport-reveal-delay, 0ms);
}

.project-gallery-container .img-box.layered-reveal.is-visible img {
    transform: scale(1);
    filter: brightness(1) saturate(1) contrast(1);
}

.performance-lite .project-gallery-container .img-box.layered-reveal img,
.performance-lite .project-gallery-container .img-box.layered-reveal.is-visible img {
    transform: none;
    filter: none;
    transition: none;
}

@media (prefers-reduced-motion: reduce) {
    .reveal,
    .reveal.revealed {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .reveal-img,
    .reveal-img.revealed {
        transition: none;
    }

    .reveal-img img,
    .reveal-img.revealed img {
        filter: brightness(0.95);
        transition: none;
    }

    .reveal-img::after {
        display: none;
    }

    .img-caption,
    .img-caption::before {
        transition: none;
    }
}

/* Staggered delays for child elements */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }

/* Contact Section */
#contacto {
    --footer-frame-height: clamp(5.5rem, 12vw, 8rem);
    position: relative;
    display: block;
    justify-content: initial;
    min-height: 100vh;
    min-height: 100svh;
    box-sizing: border-box;
    overflow: visible;
    background-color: var(--bg-color);
    color: #fff;
    padding: clamp(1rem, 2.6vw, 2rem) clamp(1rem, 3.4vw, 4rem);
    border-bottom: none;
}

#proyectos > .project-section:last-child {
    min-height: auto;
    padding-bottom: clamp(1rem, 2vw, 2rem);
}

/* QMG is the final project after the runtime ordering; do not reserve a viewport after it. */
#qmg.project-section {
    min-height: 0 !important;
    padding-bottom: 0 !important;
}

#qmg .project-gallery-container {
    margin-bottom: 0;
    padding-bottom: 0;
}

.contact-frame {
    position: relative;
    top: auto;
    bottom: auto;
    width: 100%;
    height: min(var(--footer-frame-height), calc(100svh - 1.5rem));
    overflow: hidden;
    border-radius: 0.6rem;
    background-color: #171513;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
    z-index: 4;
    will-change: height;
}

#contacto.footer-active .contact-frame {
    position: fixed;
    right: clamp(1rem, 3.4vw, 4rem);
    bottom: 0.75rem;
    left: clamp(1rem, 3.4vw, 4rem);
    width: auto;
}

.contact-backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.contact-backdrop::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(18, 18, 17, 0.82) 0%, rgba(18, 18, 17, 0.56) 45%, rgba(18, 18, 17, 0.28) 100%),
        linear-gradient(0deg, rgba(18, 18, 17, 0.78) 0%, rgba(18, 18, 17, 0.06) 62%);
}

.contact-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: saturate(0.78) brightness(0.82);
    transform: none;
}

#contacto .container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: none;
    height: 100%;
    box-sizing: border-box;
    padding: clamp(1.4rem, 3.2vw, 3rem);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

#contacto .section-label {
    color: rgba(255, 255, 255, 0.58);
}

#contacto .contact-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--spacing-lg);
    margin-top: auto;
    opacity: var(--footer-content-opacity, 1);
    transform: translate3d(0, calc(var(--parallax-content-y, 0px) + var(--footer-content-y, 0px)), 0);
    will-change: transform;
}

#contacto .section-label {
    opacity: var(--footer-content-opacity, 1);
    transform: translate3d(0, calc(var(--parallax-content-y, 0px) + var(--footer-content-y, 0px)), 0);
    will-change: transform;
}

.contact-info {
    grid-column: 1 / 7;
}

.contact-title {
    font-family: var(--font-title);
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 300;
    line-height: 1.2;
    margin-bottom: 0.45rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.contact-intro {
    max-width: 28rem;
    margin: 0 0 var(--spacing-lg);
    color: rgba(255, 255, 255, 0.74);
    font-size: clamp(0.95rem, 1.35vw, 1.2rem);
    font-weight: 300;
    line-height: 1.4;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.contact-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.contact-item span {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: rgba(255, 255, 255, 0.58);
}

.contact-item a {
    font-size: 1.2rem;
    font-family: var(--font-title);
    color: #fff;
    text-decoration: none;
    letter-spacing: 0.05em;
    transition: opacity var(--transition-fast);
    width: fit-content;
}

.contact-item a:hover {
    opacity: 0.7;
}

.contact-item a {
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.28);
}

.contact-phone-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.contact-item a.whatsapp-contact {
    display: inline;
    min-height: 0;
    padding: 0;
    border: 0;
    background: none;
    color: rgba(255, 255, 255, 0.94);
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.03em;
    text-transform: none;
    text-shadow: none;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.22em;
    transition: opacity var(--transition-fast);
}

.contact-item a.whatsapp-contact:hover {
    opacity: 0.68;
}

.contact-logo-box {
    grid-column: 8 / 13;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
}

.contact-logo {
    width: min(20rem, 100%);
    height: auto;
    filter: none;
    opacity: 0.9;
}

.footer-credits {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.48);
    text-transform: uppercase;
    opacity: var(--footer-content-opacity, 1);
    transform: translate3d(0, var(--footer-content-y, 0px), 0);
    will-change: transform;
}

/* Visor de imagen uniforme con la experiencia de la p&aacute;gina de Ventas. */
.sale-image-viewer {
    position: fixed;
    inset: 0;
    z-index: 1200;
    padding: clamp(.5rem, 2vw, 1.5rem);
    display: grid;
    place-items: center;
    overflow: hidden;
    background: rgba(18, 17, 15, .9);
    backdrop-filter: blur(12px);
}

.sale-image-viewer[hidden] { display: none; }
.sale-image-viewer-frame { position: relative; width: 100%; height: 100%; display: grid; place-items: center; overflow: hidden; }
.sale-image-viewer figure { width: 100%; height: 100%; min-width: 0; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; place-items: stretch; gap: .75rem; margin: 0; padding: clamp(3.2rem, 6vw, 4.5rem) clamp(2.6rem, 6vw, 5.5rem) .5rem; overflow: hidden; }
.sale-image-viewer-img { display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: contain; object-position: center; filter: drop-shadow(0 24px 40px rgba(0, 0, 0, .28)); }
.sale-image-viewer-caption { min-height: 1rem; color: rgba(248, 243, 233, .7); font-size: .62rem; letter-spacing: .15em; text-align: center; text-transform: uppercase; }
.sale-image-viewer-close,
.sale-image-viewer-nav { position: absolute; z-index: 2; display: grid; place-items: center; color: #f8f3e9; border: 1px solid rgba(255, 255, 255, .28); background: rgba(20, 19, 17, .28); cursor: pointer; }
.sale-image-viewer-close { top: .5rem; right: .5rem; width: 2.7rem; height: 2.7rem; padding: 0; font: 300 1.9rem/1 Inter, sans-serif; }
.sale-image-viewer-nav { top: 50%; width: 2.8rem; height: 4.5rem; padding: 0; font: 300 2.2rem/1 Inter, sans-serif; transform: translateY(-50%); }
.sale-image-viewer-prev { left: .5rem; }
.sale-image-viewer-next { right: .5rem; }
.sale-image-viewer-close:focus-visible,
.sale-image-viewer-nav:focus-visible { outline: 2px solid #f8f3e9; outline-offset: 3px; }

html.lightbox-open,
body.lightbox-open { overflow: hidden; overscroll-behavior: none; }

/* Responsive Styles */
@media (max-width: 1024px) {
    :root {
        --spacing-lg: 3rem;
        --spacing-xl: 6rem;
    }
    
    header {
        padding: var(--spacing-md) var(--spacing-lg);
    }
    
    .project-narrative-container {
        grid-column: 1 / 13;
        position: relative;
        top: 0;
        min-height: auto;
        margin-bottom: var(--spacing-lg);
        padding-right: 0;
    }

    .project-description-flow {
        height: auto;
        overflow: visible;
    }
    
    .project-gallery-container {
        grid-column: 1 / 13;
    }
    
    .index-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .index-item {
        min-height: 14rem;
    }

}

@media (max-width: 768px) {
    :root {
        --spacing-md: 1.5rem;
        --spacing-lg: 2rem;
        --spacing-xl: 4rem;
    }
    
    header {
        padding: 0.55rem 0.9rem;
    }
    
    header nav {
        position: absolute;
        top: calc(100% + 0.6rem);
        right: 0;
        left: 0;
        display: block;
        padding: 0.4rem 0;
        visibility: hidden;
        opacity: 0;
        background-color: rgba(38, 34, 28, 0.8);
        border: 1px solid rgba(255, 255, 255, 0.18);
        backdrop-filter: blur(18px) saturate(1.12);
        transform: translateY(-0.4rem);
        transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
    }

    header nav ul {
        flex-direction: column;
        gap: 0;
    }

    header nav a {
        display: block;
        padding: 0.9rem var(--spacing-lg);
        font-size: 0.7rem;
    }

    .menu-toggle {
        display: block;
    }

    header.menu-open nav {
        visibility: visible;
        opacity: 1;
        color: rgba(255, 252, 244, 0.94);
        transform: translateY(0);
    }

    header.menu-open .menu-toggle span:first-child {
        transform: translateY(0.22rem) rotate(45deg);
    }

    header.menu-open .menu-toggle span:last-child {
        transform: translateY(-0.22rem) rotate(-45deg);
    }
    
    .manifesto-body {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .contact-info {
        grid-column: 1 / 13;
    }
    
    .contact-logo-box {
        grid-column: 1 / 13;
        align-items: flex-start;
        gap: var(--spacing-lg);
    }
    
    .footer-credits {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm);
    }
    
    .gallery-layout-dense {
        grid-template-columns: 1fr;
    }

    .index-item {
        min-height: 13rem;
    }

    .index-title {
        font-size: clamp(1.4rem, 8vw, 2.3rem);
    }

    .index-heading {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
        margin-left: 0;
    }

    .index-subline {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }

    #indice .section-label {
        padding-top: 0;
    }

    #indice .manifesto-title {
        padding-top: 0;
    }

    .index-intro {
        padding-bottom: 0;
    }

    .index-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
}

@media (max-width: 599px) {
    .index-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   DESIGN UPGRADES: Paper Texture, Project Numbers, Full-bleed,
   Progress Indicator
   ============================================================ */

/* Paper Grain Texture Overlay */
.paper-texture {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.028;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 250px 250px;
}

/* Giant Project Background Numbers */
.project-num-bg {
    position: absolute;
    top: -0.05em;
    right: -0.04em;
    font-family: var(--font-title);
    font-size: clamp(10rem, 22vw, 22rem);
    font-weight: 700;
    color: transparent;
    -webkit-text-stroke: 1px rgba(var(--project-accent-rgb), 0.2);
    line-height: 1;
    user-select: none;
    pointer-events: none;
    z-index: 0;
    letter-spacing: -0.04em;
    opacity: var(--parallax-number-opacity, 0.55);
    transform: translate3d(0, var(--parallax-number-y, 0px), 0);
    transition: none;
    will-change: transform;
}

.project-section {
    overflow: visible;
    background:
        linear-gradient(90deg, rgba(var(--project-accent-rgb), 0.16) 0%, rgba(216, 207, 191, 0.42) 38%, rgba(216, 207, 191, 0.16) 100%);
}

#proyectos > .project-section:nth-of-type(even) {
    background:
        linear-gradient(90deg, rgba(var(--project-accent-rgb), 0.24) 0%, rgba(183, 175, 163, 0.62) 40%, rgba(196, 188, 176, 0.38) 100%);
}

.project-section .container {
    position: relative;
    z-index: 1;
}

#indice .index-heading,
#indice .index-grid {
    transform: translate3d(0, var(--parallax-content-y, 0px), 0);
    will-change: transform, opacity;
}

/* Full-Bleed Divider */
.full-bleed-divider {
    position: relative;
    width: 100vw;
    left: 50%;
    transform: translateX(-50%);
    height: 80vh;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
}

.full-bleed-divider img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.07);
    transition: transform var(--transition-slow);
    filter: brightness(0.88);
}

.full-bleed-divider.revealed img {
    transform: scale(1);
}

.full-bleed-divider-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(26, 26, 26, 0.45) 0%, transparent 50%);
    z-index: 1;
}

.full-bleed-label {
    position: relative;
    z-index: 2;
    padding: var(--spacing-lg) var(--spacing-lg);
    color: rgba(255,255,255,0.7);
    font-size: 0.65rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
}

/* Floating Project Progress Indicator */
.project-indicator {
    position: fixed;
    left: var(--spacing-md);
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 50;
    opacity: 0;
    transition: opacity 0.8s ease;
    pointer-events: none;
}

.project-indicator.visible {
    opacity: 1;
}

.indicator-track {
    width: 1px;
    height: 60px;
    background-color: var(--border-color);
    position: relative;
    overflow: hidden;
}

.indicator-track-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--text-primary);
    transition: height 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.indicator-num {
    font-family: var(--font-title);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: 0.1em;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
}

.indicator-label {
    font-size: 0.6rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--text-muted);
    writing-mode: vertical-rl;
    transform: rotate(180deg);
}

/* Responsive adjustments for new elements */
@media (max-width: 1024px) {
    .hero-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        min-height: 100vh;
        min-height: 100svh;
        padding: clamp(3rem, 8vw, 5rem) var(--spacing-lg);
        gap: var(--spacing-lg);
    }
    .hero-title-wrap {
        grid-column: 1;
        grid-row: 2;
    }
    .hero-meta {
        grid-column: 1;
        grid-row: 1;
        padding-bottom: 0;
    }
    .hero-title-wrap h1 {
        font-size: clamp(3.6rem, 13vw, 10rem);
    }
    .hero-image-panel {
        min-height: 100%;
    }
    .project-indicator {
        display: none;
    }
    .project-num-bg {
        opacity: 0.5;
    }
}

@media (max-width: 768px) {#cover::before {
        inset: var(--spacing-md);
    }
    .hero-layout {
        padding: 6.25rem var(--spacing-lg) 4.5rem;
        gap: var(--spacing-md);
    }
    .hero-title-wrap {
        justify-content: center;
        padding-bottom: 1rem;
    }
    .hero-title-wrap h1 {
        font-size: clamp(3.1rem, 15vw, 6.5rem);
        line-height: 0.94;
    }
    .hero-meta {
        font-size: 0.58rem;
        letter-spacing: 0.2em;
        flex-direction: column;
    }
    .hero-image-panel {
        min-height: 100%;
    }
    .hero-image-copy p {
        font-size: clamp(1.55rem, 8vw, 2.6rem);
    }

    .hero-image-copy {
        padding-bottom: 6rem;
    }

    .hero-corner-logo {
        bottom: 1rem;
        left: 1rem;
        width: clamp(6.5rem, 24vw, 8.5rem);
    }
    .full-bleed-divider {
        height: 60vh;
    }
}
