/*
Theme Name: Jhoel 1.0
Theme URI: 
Description: Tema hijo de GeneratePress para el onepager de Jhoel Arellano.
Author: 
Author URI: 
Template: generatepress
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: jhoel1-0
*/

/* =========================================================
   VARIABLES Y RESET
   ========================================================= */
:root {
    --bg-color: #FDFBF7;
    --text-main: #2C2C2C;
    --accent: #E76F51;
    --accent-light: #F4A261;
    --accent-dark: #5A3A2E;
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Inter', sans-serif;
    --mouse-x: 0;
    --mouse-y: 0;
    --book-half: 160px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
    font-family: var(--font-sans);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: clip;
}

/* PRELOADER */
#preloader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--bg-color);
    display: flex; justify-content: center; align-items: center;
    z-index: 9999;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
}
#preloader.hidden { opacity: 0; visibility: hidden; }
.loader-isotipo {
    width: 130px; height: 130px; display: block;
    animation: spinTwice 2s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}
@keyframes spinTwice {
    0%   { transform: rotate(0deg); }
    42%  { transform: rotate(360deg); }
    50%  { transform: rotate(360deg); }
    92%  { transform: rotate(720deg); }
    100% { transform: rotate(720deg); }
}

/* HEADER */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(253, 251, 247, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    transform: translateY(0);
    transition: box-shadow 0.4s ease, padding 0.4s ease;
    border-bottom: 1px solid rgba(90, 58, 46, 0.06);
}
header.visible {
    box-shadow: 0 4px 25px rgba(90, 58, 46, 0.08);
    padding: 0.7rem 5%;
}
/* Logo del header */
.logo {
    display: flex;
    align-items: center;
}
.logo-full {
    height: 60px;
    width: auto;
    display: block;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.logo:hover .logo-full {
    transform: scale(1.04);
}

/* Logo del footer */
.footer-logo {
    display: flex;
    align-items: center;
}
.footer-logo-full {
    height: 75px;
    width: auto;
    display: block;
}

/* Logo del menú móvil */
.mobile-logo-full {
    height: 44px;
    width: auto;
    display: block;
}

/* Ajuste responsive del logo */
@media (max-width: 900px) {
    .logo-full { height: 48px; }
    .footer-logo-full { height: 60px; }
    .mobile-logo-full { height: 40px; }
}
@media (max-width: 600px) {
    .logo-full { height: 42px; }
    .footer-logo-full { height: 55px; }
    .mobile-logo-full { height: 36px; }
}
nav ul { display: flex; list-style: none; gap: 2.2rem; align-items: center; }
nav ul li a {
    font-size: 0.8rem; font-weight: 500;
    text-transform: uppercase; letter-spacing: 1.5px;
    color: var(--text-main); text-decoration: none;
    transition: color 0.3s ease; position: relative; padding: 0.3rem 0;
}
nav ul li a::after {
    content: ''; position: absolute; bottom: 0; left: 0;
    width: 0; height: 1.5px; background: var(--accent);
    transition: width 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
nav ul li a:hover { color: var(--accent); }
nav ul li a:hover::after { width: 100%; }

body.jhoel-onepager header,
#main-header {
    width: 100%;
    max-width: 100vw;
    left: 0;
    right: 0;
    padding: 1.2rem 5% !important;
}

/* HERO */
#hero {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 140px 5% 60px;
    position: relative; overflow: hidden;
}
.hero-bg {
    position: absolute; inset: 0; z-index: 0; overflow: hidden;
    background: linear-gradient(120deg, #F8E0C8 0%, #F2D0A8 25%, #EBB888 50%, #E8A878 75%, #E5A070 100%);
}
.hero-bg::before {
    content: ''; position: absolute;
    top: -100%; left: -100%; width: 300%; height: 300%;
    background: radial-gradient(circle at center,
        rgba(255, 252, 248, 1) 0%, rgba(254, 248, 238, 0.98) 15%,
        rgba(253, 242, 228, 0.9) 30%, rgba(252, 234, 216, 0.75) 45%,
        rgba(250, 226, 205, 0.5) 60%, rgba(248, 218, 195, 0.25) 75%,
        rgba(245, 212, 188, 0) 90%);
    transform: translate(calc(var(--mouse-x) * 22%), calc(var(--mouse-y) * 22%));
    transition: transform 3s cubic-bezier(0.19, 1, 0.22, 1);
    will-change: transform; pointer-events: none;
    animation: etherealDrift 20s ease-in-out infinite;
}
@keyframes etherealDrift {
    0%, 100% { transform: translate(calc(var(--mouse-x) * 22% + 0%), calc(var(--mouse-y) * 22% + 0%)); }
    50% { transform: translate(calc(var(--mouse-x) * 22% - 4%), calc(var(--mouse-y) * 22% + 4%)); }
}
.hero-content {
    position: relative; z-index: 2;
    max-width: 1130px; width: 100%; margin: 0 auto;
    display: grid; grid-template-columns: 380px 1fr;
    align-items: center; gap: 5rem;
}
.hero-image-wrapper { position: relative; width: 380px; height: 538px; }
.hero-image-mask {
    position: absolute; inset: 0; overflow: hidden;
    border-radius: 18px; box-shadow: 0 25px 60px rgba(90, 58, 46, 0.18);
    z-index: 1;
}
.hero-image-mask img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.hero-image-wrapper:hover .hero-image-mask img { transform: scale(1.08); }
.border-svg {
    position: absolute; inset: 0; width: 100%; height: 100%;
    z-index: 3; pointer-events: none; display: block;
}
.border-svg rect {
    fill: none; stroke: var(--accent); stroke-width: 12;
    stroke-linecap: round; stroke-linejoin: round;
    stroke-dasharray: 5100; stroke-dashoffset: 5100;
    transition: stroke-dashoffset 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.hero-image-wrapper:hover .border-svg rect { stroke-dashoffset: 0; }
.hero-text { display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
.hero-eyebrow {
    font-size: 0.8rem; text-transform: uppercase; letter-spacing: 4px;
    color: #C4704A; font-weight: 600; margin-bottom: 1.2rem; display: block;
}
.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 5vw, 4.5rem); line-height: 1.05;
    color: #4A2E22; font-weight: 700; margin-bottom: 1.5rem;
    position: relative; display: inline-block; cursor: pointer; white-space: nowrap;
}
.hero-title em { font-style: italic; color: var(--accent); font-weight: 400; }
.hero-title::after {
    content: ''; position: absolute; bottom: -8px; left: 0;
    width: 0; height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    border-radius: 2px;
    transition: width 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.hero-title:hover::after { width: 100%; }
.hero-subtitle {
    font-size: 1.05rem; color: #5A3E30; font-weight: 300;
    max-width: 480px; line-height: 1.7; opacity: 0.85;
}

/* SECCIÓN BITÁCORA */
.book-section {
    position: relative;
    margin-top: calc(var(--book-half) * -1);
    padding: 3rem 5% 2rem;
    z-index: 2;
    transition: padding-bottom 1.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.book-section.active {
    padding-bottom: calc(5rem + var(--book-half));
}
.book-section::before {
    content: '';
    position: absolute;
    top: var(--book-half);
    left: 0; right: 0; bottom: 0;
    background: var(--accent-dark);
    z-index: 0;
}
.book-container {
    position: relative;
    z-index: 2;
    max-width: 1100px;
    margin: 0 auto;
}
.book-layout {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 0;
    transition: gap 1.1s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 1.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.book-section.active .book-layout {
    gap: 4rem;
    transform: translateY(var(--book-half));
}

/* --- PORTADA DEL LIBRO CON IMAGEN REAL --- */
.book-cover {
    position: relative;
    width: 240px;
    border-radius: 4px 12px 12px 4px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5),
                0 8px 16px rgba(0, 0, 0, 0.3);
    transform: rotateY(-8deg);
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
    background: transparent;
    line-height: 0;
    will-change: transform;
}

.book-cover img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: inherit;
    vertical-align: middle;
}

.book-cover-wrapper:hover .book-cover {
    transform: rotateY(0deg) scale(1.02);
}

.book-cover::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 18px;
    background: linear-gradient(90deg,
        rgba(0, 0, 0, 0.4) 0%,
        rgba(0, 0, 0, 0.1) 60%,
        transparent 100%);
    border-radius: 4px 0 0 4px;
    z-index: 2;
    pointer-events: none;
}

.book-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.2) 0%,
        transparent 50%);
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
    z-index: 1;
    border-radius: inherit;
}
.book-cover-wrapper:hover .book-cover::after {
    opacity: 1;
}
.book-text-wrapper {
    max-width: 0;
    max-height: 320px;
    overflow: hidden;
    transition: max-width 1.1s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                max-height 1.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.book-section.active .book-text-wrapper {
    max-width: 620px;
    max-height: 1200px;
}
.book-text {
    width: 620px;
    opacity: 0;
    transition: opacity 0.5s ease 0.3s;
}
.book-section.active .book-text { opacity: 1; }
.book-text h2 {
    color: #FFFFFF;
    font-family: var(--font-serif);
    font-size: 2.4rem; font-weight: 700;
    line-height: 1.15; margin-bottom: 2rem;
}
.book-text p {
    color: rgba(253, 251, 247, 0.88);
    font-size: 0.95rem; line-height: 1.75;
    margin-bottom: 1.2rem; text-align: left;
}
.book-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 1.5rem;
    padding: 0.9rem 2.2rem;
    background: var(--accent);
    color: #FFFFFF;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 50px;
    border: 2px solid var(--accent);
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
}
.book-cta:hover {
    background: transparent;
    color: #FFFFFF;
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(231, 111, 81, 0.4);
}
.book-cta span {
    display: inline-block;
    transition: transform 0.4s ease;
}
.book-cta:hover span { transform: translateX(6px); }
.book-meta {
    text-align: center;
    margin-top: 2rem;
    position: relative;
    z-index: 3;
    transition: transform 1.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.book-section.active .book-meta {
    transform: translateY(var(--book-half));
}
.book-meta h2 {
    color: #FFFFFF;
    font-family: var(--font-serif);
    font-size: 2rem; font-weight: 700;
    margin-bottom: 1.8rem;
    transition: opacity 0.5s ease, max-height 0.6s ease, margin 0.6s ease;
    max-height: 200px;
    overflow: hidden;
}
.book-section.active .book-meta h2 {
    opacity: 0;
    max-height: 0;
    margin-bottom: 1rem;
}
.book-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 1rem 2.4rem;
    background: transparent;
    border: 2px solid var(--accent);
    color: #FFFFFF;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
}
.book-btn:hover {
    background: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(231, 111, 81, 0.4);
}
.book-btn .btn-arrow {
    display: inline-block;
    font-size: 1.1rem;
    line-height: 1;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.book-section.active .book-btn .btn-arrow {
    transform: rotate(180deg);
}

/* Reveal */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1.2s ease-out, transform 1.2s ease-out;
}
.reveal.active { opacity: 1; transform: translateY(0); }

/* SECCIÓN TRAYECTORIA */
.trayectoria-section {
    position: relative;
    background: var(--bg-color);
    padding: 6rem 5%;
}
.tray-container {
    max-width: 1130px;
    margin: 0 auto;
    width: 100%;
}
.gallery-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.2rem;
    margin: 3rem 0;
}
.gallery-item {
    display: flex;
    flex-direction: column;
    cursor: pointer;
}
.gallery-image {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(90, 58, 46, 0.08);
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, box-shadow;
}
.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 1.1s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}
.gallery-item:hover .gallery-image {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(90, 58, 46, 0.18);
}
.gallery-item:hover .gallery-image img {
    transform: scale(1.08);
}
.gallery-caption {
    margin-top: 0.8rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--accent-dark);
    line-height: 1.35;
    text-align: center;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    letter-spacing: 0.3px;
}
.gallery-item:hover .gallery-caption {
    opacity: 1;
    transform: translateY(0);
}
.tray-text-block {
    max-width: 850px;
    margin: 4rem auto;
    text-align: left;
}
.tray-text-block h2 {
    font-family: var(--font-serif);
    color: var(--accent-dark);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
}
.tray-text-block p {
    font-size: 1.05rem;
    line-height: 1.85;
    color: #4A3B32;
    margin-bottom: 1.4rem;
    text-align: justify;
}

/* BLOQUE TRES CANTOS */
.tres-cantos-block {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3.5rem;
    align-items: center;
    background: #F9F3EA;
    padding: 3rem;
    border-radius: 20px;
    margin: 4rem 0;
    border-left: 6px solid var(--accent);
}
.tres-cantos-logo {
    display: flex;
    justify-content: center;
    align-items: center;
}
.tres-cantos-img {
    width: 100%;
    max-width: 220px;
    height: auto;
    display: block;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.tres-cantos-img:hover {
    transform: scale(1.05) rotate(-2deg);
}
.tres-cantos-text h3 {
    font-family: var(--font-serif);
    color: var(--accent-dark);
    font-size: 1.9rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}
.tres-cantos-text p {
    font-size: 1rem;
    line-height: 1.8;
    color: #4A3B32;
    margin-bottom: 1.2rem;
    text-align: justify;
}
.tres-cantos-archive {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(90, 58, 46, 0.15);
    font-style: italic;
}
.tres-cantos-archive strong {
    color: var(--accent);
    font-style: normal;
}

/* BLOQUE ACIREMA */
.acirema-block {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 3.5rem;
    align-items: center;
    background: #F2F6F4;
    padding: 3rem;
    border-radius: 20px;
    margin: 4rem 0;
    border-right: 6px solid var(--accent);
}
.acirema-text h3 {
    font-family: var(--font-serif);
    color: var(--accent-dark);
    font-size: 1.9rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}
.acirema-text p {
    font-size: 1rem;
    line-height: 1.8;
    color: #4A3B32;
    margin-bottom: 1.2rem;
    text-align: justify;
}
.acirema-logo {
    display: flex;
    justify-content: center;
    align-items: center;
}
.acirema-img {
    width: 100%;
    max-width: 220px;
    height: auto;
    display: block;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.acirema-img:hover {
    transform: scale(1.05) rotate(2deg);
}
.acirema-final-text {
    max-width: 850px;
    margin: 3rem auto 5rem;
}
.acirema-final-text p {
    font-size: 1.05rem;
    line-height: 1.85;
    color: #4A3B32;
    margin-bottom: 1.4rem;
    text-align: justify;
}

/* LIGHTBOX */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(20, 12, 8, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 5%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.lightbox.active {
    opacity: 1;
    visibility: visible;
}
.lightbox-content {
    max-width: 800px;
    width: 100%;
    text-align: center;
    transform: scale(0.92);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.lightbox.active .lightbox-content {
    transform: scale(1);
}
.lightbox-content img {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 12px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
    display: block;
    margin: 0 auto;
}
.lightbox-caption {
    color: #FFFFFF;
    font-family: var(--font-serif);
    font-size: 1.2rem;
    margin-top: 1.5rem;
    line-height: 1.5;
    font-style: italic;
}
.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2.5rem;
    background: transparent;
    border: none;
    color: #FFFFFF;
    font-size: 3rem;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                color 0.3s ease;
    font-weight: 200;
}
.lightbox-close:hover {
    transform: rotate(90deg);
    color: var(--accent-light);
}

/* AGRADECIMIENTOS */
.agradecimientos-section {
    position: relative;
    background: #F5EDE0;
    padding: 6rem 5%;
    overflow: hidden;
}
.agradecimientos-section::before {
    content: '';
    position: absolute;
    inset: -25%;
    background:
        radial-gradient(circle at 20% 30%, rgba(231, 111, 81, 0.45) 0%, rgba(231, 111, 81, 0.15) 30%, transparent 55%),
        radial-gradient(circle at 80% 70%, rgba(244, 162, 97, 0.40) 0%, rgba(244, 162, 97, 0.12) 30%, transparent 55%),
        radial-gradient(circle at 50% 50%, rgba(90, 58, 46, 0.20) 0%, rgba(90, 58, 46, 0.05) 30%, transparent 55%);
    filter: blur(20px);
    animation: agradecimientosDrift 25s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}
@keyframes agradecimientosDrift {
    0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); }
    33%      { transform: translate(3%, -2%) scale(1.08) rotate(2deg); }
    66%      { transform: translate(-2%, 3%) scale(1.05) rotate(-2deg); }
}
.agradecimientos-container {
    position: relative;
    z-index: 1;
    max-width: 1130px;
    margin: 0 auto;
}
.agradecimientos-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
}
.agradecimientos-header h2 {
    font-family: var(--font-serif);
    color: var(--accent-dark);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 2rem;
}
.agradecimientos-header p {
    font-size: 1.05rem;
    line-height: 1.85;
    color: #4A3B32;
    margin-bottom: 1.2rem;
    text-align: center;
}
.agradecimientos-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}
.agradecimiento-card {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    background: #FFFFFF;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(90, 58, 46, 0.08);
    border-left: 4px solid transparent;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.6s ease;
}
.agradecimiento-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(90, 58, 46, 0.12);
    border-left-color: var(--accent);
}
.agradecimiento-wide {
    grid-column: span 2;
}
.state-svg {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #F9F3EA;
    border-radius: 50%;
    padding: 12px;
    transition: background 0.5s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.state-svg svg {
    width: 100%;
    height: 100%;
    display: block;
}
.state-shape {
    fill: transparent;
    stroke: var(--accent);
    stroke-width: 2.5;
    stroke-linejoin: round;
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
    transition: stroke-dashoffset 1.6s cubic-bezier(0.16, 1, 0.3, 1),
                fill 0.6s ease;
}
.agradecimiento-card.active .state-shape,
.agradecimiento-card:hover .state-shape {
    stroke-dashoffset: 0;
}
.agradecimiento-card:hover .state-svg {
    background: var(--accent);
    transform: rotate(-8deg) scale(1.05);
}
.agradecimiento-card:hover .state-shape {
    stroke: #FFFFFF;
    fill: rgba(255, 255, 255, 0.15);
}
.agradecimiento-content h3 {
    font-family: var(--font-serif);
    color: var(--accent-dark);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
}
.agradecimiento-content p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #4A3B32;
    margin-bottom: 0.9rem;
    text-align: left;
}
.agradecimiento-content p:last-child {
    margin-bottom: 0;
}
.agradecimiento-content strong {
    color: var(--accent);
    font-weight: 600;
}
.agradecimiento-final {
    text-align: center;
    max-width: 800px;
    margin: 5rem auto 0;
    padding-top: 3rem;
    border-top: 1px solid rgba(90, 58, 46, 0.15);
}
.agradecimiento-final h3 {
    font-family: var(--font-serif);
    color: var(--accent-dark);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}
.agradecimiento-final p {
    font-size: 1.05rem;
    line-height: 1.85;
    color: #4A3B32;
    margin-bottom: 1.2rem;
    text-align: center;
}
.agradecimiento-cierre {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.3rem !important;
    color: var(--accent-dark) !important;
    margin-top: 2rem !important;
}
.agradecimiento-cierre strong {
    color: var(--accent);
    font-style: normal;
}

/* CONTACTO */
.contacto-section {
    background: linear-gradient(180deg, #F9F3EA 0%, #FDFBF7 100%);
    padding: 6rem 5%;
}
.contacto-container {
    max-width: 750px;
    margin: 0 auto;
}
.contacto-header {
    text-align: center;
    margin-bottom: 3rem;
}
.contacto-eyebrow {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--accent);
    font-weight: 600;
    display: block;
    margin-bottom: 1rem;
}
.contacto-header h2 {
    font-family: var(--font-serif);
    color: var(--accent-dark);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
}
.contacto-header p {
    font-size: 1.05rem;
    color: #5A3E30;
    text-align: center;
    opacity: 0.85;
}
.contacto-form {
    background: #FFFFFF;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(90, 58, 46, 0.08);
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
.form-group {
    margin-bottom: 1.5rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-dark);
    letter-spacing: 0.3px;
}
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem 1.2rem;
    border: 2px solid #EFE6DA;
    border-radius: 10px;
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--text-main);
    background: #FDFBF7;
    transition: border-color 0.4s ease, background 0.4s ease, box-shadow 0.4s ease;
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: #FFFFFF;
    box-shadow: 0 0 0 4px rgba(231, 111, 81, 0.1);
}
.form-group textarea {
    resize: vertical;
    min-height: 130px;
}
.contacto-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 1rem 2.4rem;
    background: var(--accent);
    border: 2px solid var(--accent);
    color: #FFFFFF;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.contacto-btn:hover {
    background: transparent;
    color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(231, 111, 81, 0.3);
}
.contacto-btn .btn-arrow {
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.contacto-btn:hover .btn-arrow {
    transform: translateX(6px);
}

/* FOOTER */
.site-footer {
    background: var(--accent-dark);
    color: #FFFFFF;
    padding: 4rem 5% 2rem;
}
.footer-main {
    max-width: 1130px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    gap: 2rem;
}
.logo-dot {
    color: var(--accent);
    font-weight: 400;
}
.footer-menu ul {
    display: flex;
    list-style: none;
    gap: 2.2rem;
}
.footer-menu a {
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
    padding: 0.3rem 0;
}
.footer-menu a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 1.5px;
    background: var(--accent-light);
    transition: width 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.footer-menu a:hover { color: #FFFFFF; }
.footer-menu a:hover::after { width: 100%; }
.footer-legal {
    max-width: 1130px;
    margin: 2rem auto 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}
.footer-legal-links {
    display: flex;
    gap: 1.8rem;
    flex-wrap: wrap;
}
.legal-trigger {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-family: var(--font-sans);
    font-size: 0.78rem;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 0;
}
.legal-trigger:hover { color: var(--accent-light); }
.footer-copy {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
    text-align: right;
}

/* MODAL LEGAL */
.legal-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 5%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
.legal-modal.active { opacity: 1; visibility: visible; }
.legal-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(20, 12, 8, 0.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.legal-modal-content {
    position: relative;
    background: var(--bg-color);
    max-width: 700px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    border-radius: 16px;
    padding: 3rem;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
    transform: scale(0.95);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.legal-modal.active .legal-modal-content { transform: scale(1); }
.legal-modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: transparent;
    border: none;
    font-size: 2.2rem;
    line-height: 1;
    color: var(--accent-dark);
    cursor: pointer;
    transition: transform 0.4s ease, color 0.3s ease;
    font-weight: 200;
}
.legal-modal-close:hover {
    transform: rotate(90deg);
    color: var(--accent);
}
.legal-modal-content h2 {
    font-family: var(--font-serif);
    color: var(--accent-dark);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    padding-right: 2rem;
}
.legal-modal-body {
    font-size: 0.95rem;
    line-height: 1.8;
    color: #4A3B32;
}
.legal-modal-body p { margin-bottom: 1rem; }

/* MENÚ MÓVIL */
.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    width: 40px;
    height: 40px;
    min-width: 40px;
    flex: 0 0 40px;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 1100;
    color: var(--accent-dark);
    transition: color 0.3s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.menu-toggle:hover {
    color: var(--accent);
}
.menu-toggle svg {
    width: 100%;
    height: 100%;
    display: block;
    fill: currentColor;
}
.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 85%;
    max-width: 340px;
    height: 100vh;
    background: var(--bg-color);
    z-index: 1200;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    padding: 2rem;
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.15);
}
.mobile-menu.active {
    transform: translateX(0);
    visibility: visible;
}
.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(90, 58, 46, 0.1);
    margin-bottom: 2rem;
    gap: 1rem;
}
.mobile-menu-brand {
    display: flex;
    align-items: center;
}
.mobile-menu-close {
    background: transparent;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: var(--accent-dark);
    cursor: pointer;
    transition: transform 0.4s ease, color 0.3s ease;
    font-weight: 200;
}
.mobile-menu-close:hover {
    transform: rotate(90deg);
    color: var(--accent);
}
.mobile-menu-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.mobile-menu-nav a {
    display: block;
    padding: 1rem 0;
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent-dark);
    text-decoration: none;
    border-bottom: 1px solid rgba(90, 58, 46, 0.08);
    transition: color 0.3s ease, padding-left 0.4s ease;
}
.mobile-menu-nav a:hover {
    color: var(--accent);
    padding-left: 0.5rem;
}
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 12, 8, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1150;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}
body.menu-open { overflow: hidden; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
    .gallery-row {
        grid-template-columns: repeat(4, 1fr);
    }
    .gallery-row .gallery-item:nth-child(5) { display: none; }
}

@media (max-width: 900px) {
    :root { --book-half: 120px; }

    #hero { padding: 90px 6% 30px; }
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        text-align: center;
    }
    .hero-image-wrapper {
        width: 240px; height: 340px; margin: 0 auto;
    }
    .hero-text { align-items: center; text-align: center; }
    .hero-subtitle { margin: 0 auto; }
    .hero-title {
        font-size: 2.4rem;
        white-space: normal;
    }

    nav ul { display: none; }
    .menu-toggle { display: flex !important; }

    .book-section { padding: 2rem 5% 2rem; }
    .book-section.active { padding-bottom: calc(4rem + var(--book-half)); }
    .book-layout {
        flex-direction: column;
        gap: 2rem !important;
        align-items: center;
    }
    .book-section.active .book-layout {
        gap: 2rem;
        transform: translateY(0);
    }
    .book-text-wrapper {
        max-width: 100%;
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        transition: max-height 1.1s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                    opacity 0.6s ease;
    }
    .book-section.active .book-text-wrapper {
        max-width: 100%;
        max-height: 3000px;
        opacity: 1;
    }
    .book-text {
        width: 100%;
        opacity: 0;
        transition: opacity 0.6s ease 0.3s;
    }
    .book-section.active .book-text { opacity: 1; }
    .book-text h2 { font-size: 1.7rem; }
    .book-text p { font-size: 0.9rem; text-align: left; }
    .book-cover { width: 180px; }
    .book-meta h2 { font-size: 1.5rem; }
    .book-btn { padding: 0.85rem 1.8rem; font-size: 0.72rem; letter-spacing: 2px; }
    .book-cta { padding: 0.8rem 1.6rem; font-size: 0.72rem; letter-spacing: 1.8px; }

    .trayectoria-section { padding: 4rem 5%; }
    .gallery-row {
        display: flex;
        gap: 1rem;
        margin: 2rem -5%;
        padding: 0.5rem 5% 1rem;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -webkit-mask-image: linear-gradient(to right, #000 85%, transparent 100%);
        mask-image: linear-gradient(to right, #000 85%, transparent 100%);
        scroll-padding-left: 5%;
    }
    .gallery-row::-webkit-scrollbar { display: none; }
    .gallery-item {
        flex: 0 0 auto;
        width: 65vw;
        max-width: 320px;
        scroll-snap-align: start;
    }
    .gallery-row .gallery-item:nth-child(4),
    .gallery-row .gallery-item:nth-child(5) { display: flex; }
    .gallery-caption { font-size: 0.78rem; margin-top: 0.6rem; }

    .tray-text-block { margin: 2.5rem auto; }
    .tray-text-block h2 { font-size: 1.9rem; }
    .tray-text-block p { font-size: 1rem; text-align: left; }

    .tres-cantos-block,
    .acirema-block {
        display: flex;
        flex-direction: column;
        gap: 2rem;
        padding: 2rem 1.5rem;
        text-align: center;
        align-items: center;
    }
    .tres-cantos-block { border-left: none; border-top: 6px solid var(--accent); }
    .acirema-block { border-right: none; border-bottom: 6px solid var(--accent); }
    .acirema-logo { order: -1; }
    .acirema-block .acirema-text { order: 1; }

    .tres-cantos-img,
    .acirema-img {
        max-width: 160px;
    }
    .tres-cantos-text h3,
    .acirema-text h3 { text-align: center; }
    .tres-cantos-text p,
    .acirema-text p { text-align: left; }

    .acirema-final-text { margin: 2rem auto 3rem; }
    .acirema-final-text p { font-size: 1rem; text-align: left; }

    .agradecimientos-section { padding: 4rem 5%; }
    .agradecimientos-header h2 { font-size: 2rem; }
    .agradecimientos-header p { font-size: 1rem; text-align: left; }
    .agradecimientos-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }
    .agradecimiento-wide { grid-column: span 1; }
    .agradecimiento-card { padding: 1.5rem; gap: 1.2rem; }
    .state-svg { width: 65px; height: 65px; padding: 10px; }
    .agradecimiento-content h3 { font-size: 1.2rem; }
    .agradecimiento-content p { font-size: 0.9rem; text-align: left; }
    .agradecimiento-final h3 { font-size: 1.5rem; }
    .agradecimiento-final p { font-size: 1rem; text-align: left; }
    .agradecimiento-cierre { font-size: 1.15rem !important; text-align: center !important; }

    .contacto-section { padding: 4rem 5%; }
    .contacto-header h2 { font-size: 2rem; }
    .contacto-form { padding: 2rem 1.5rem; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .form-group input,
    .form-group textarea { padding: 0.9rem 1rem; font-size: 0.95rem; }

    .site-footer { padding: 3rem 5% 2rem; }
    .footer-main {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    .footer-menu ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.2rem;
    }
    .footer-menu a { font-size: 0.72rem; }
    .footer-legal {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    .footer-legal-links {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }
    .footer-copy {
        text-align: center;
        font-size: 0.72rem;
    }
    .legal-modal-content { padding: 1.5rem; }
    .legal-modal-content h2 { font-size: 1.5rem; }
    .legal-modal-body { font-size: 0.9rem; }

    .lightbox-close { top: 1rem; right: 1rem; font-size: 2.4rem; }
    .lightbox-caption { font-size: 1rem; padding: 0 1rem; }
}

@media (max-width: 600px) {
    :root { --book-half: 100px; }

    #hero { padding: 80px 6% 25px; }
    .hero-image-wrapper { width: 200px; height: 282px; }
    .hero-title { font-size: 2rem; letter-spacing: -0.5px; }
    .hero-eyebrow { font-size: 0.7rem; letter-spacing: 3px; }
    .hero-subtitle { font-size: 0.95rem; }

    .book-cover { width: 150px; }
    .book-text h2 { font-size: 1.5rem; }
    .book-text p { font-size: 0.85rem; line-height: 1.7; }
    .book-meta h2 { font-size: 1.3rem; margin-bottom: 1.2rem; }

    .trayectoria-section { padding: 3rem 5%; }
    .gallery-row {
        display: flex;
        gap: 0.9rem;
        margin: 1.8rem -5%;
        padding: 0.5rem 5% 1rem;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -webkit-mask-image: linear-gradient(to right, #000 82%, transparent 100%);
        mask-image: linear-gradient(to right, #000 82%, transparent 100%);
        scroll-padding-left: 5%;
    }
    .gallery-row::-webkit-scrollbar { display: none; }
    .gallery-item {
        flex: 0 0 auto;
        width: 75vw;
        max-width: 280px;
        scroll-snap-align: start;
    }
    .gallery-row .gallery-item:nth-child(3),
    .gallery-row .gallery-item:nth-child(4),
    .gallery-row .gallery-item:nth-child(5) { display: flex; }
    .gallery-caption { font-size: 0.72rem; }

    .tray-text-block h2 { font-size: 1.6rem; }
    .tray-text-block p,
    .acirema-text p,
    .acirema-final-text p { font-size: 0.92rem; line-height: 1.75; }

    .tres-cantos-img,
    .acirema-img {
        max-width: 130px;
    }

    .agradecimientos-section { padding: 3rem 5%; }
    .agradecimiento-card {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        padding: 1.2rem;
        gap: 1rem;
    }
    .state-svg { width: 55px; height: 55px; padding: 8px; }
    .agradecimiento-content h3 { font-size: 1.1rem; }

    .contacto-form { padding: 1.5rem 1.2rem; }
    .contacto-btn { width: 100%; justify-content: center; padding: 0.9rem 1.5rem; }
}

@media (max-width: 380px) {
    .hero-title { font-size: 1.75rem; }
    .hero-image-wrapper { width: 180px; height: 254px; }
    .book-cover { width: 130px; }
    .book-text h2 { font-size: 1.3rem; }
    .gallery-caption { font-size: 0.68rem; }
}