/* ═══════════════════════════════════════════════════════════════
   HOMENAJE A MIGUEL GRAU SEMINARIO
   El Caballero de los Mares — Gran Almirante del Perú
   Paleta: Azul marino naval + oro + crema (identidad Recordándote)
   ═══════════════════════════════════════════════════════════════ */

/* ─── VARIABLES ─────────────────────────────────────────────── */
:root {
    /* Naval navy scale */
    --navy-900: #070b17;
    --navy-800: #0b1224;
    --navy-700: #0f1a33;
    --navy-600: #16233f;
    --navy-500: #1e3055;

    /* Brand (Recordándote) */
    --gold: #c9a84c;
    --gold-light: #e8d5a3;
    --gold-dark: #a8872f;
    --gold-glow: rgba(201, 168, 76, 0.35);
    --cream: #faf8f5;

    /* Text & surfaces */
    --text-dark: #1a1a2e;
    --text-body: #4a4a5e;
    --text-muted: #8a8a9a;
    --text-on-dark: #f5f2ea;
    --card-bg: #ffffff;
    --border-soft: #e5ddcd;

    /* Typography */
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-body: 'Merriweather', Georgia, serif;
    --font-script: 'Great Vibes', cursive;

    /* Effects */
    --shadow-soft: 0 8px 30px rgba(15, 26, 51, 0.08);
    --shadow-gold: 0 10px 40px rgba(201, 168, 76, 0.25);
    --shadow-deep: 0 20px 60px rgba(7, 11, 23, 0.45);
    --radius: 18px;
    --transition: all 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.1);
}

/* ─── RESET ─────────────────────────────────────────────────── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 84px;
}

body {
    font-family: var(--font-body);
    font-weight: 300;
    color: var(--text-body);
    background: var(--cream);
    line-height: 1.75;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
}

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

ul {
    list-style: none;
}

h1, h2, h3, h4 {
    font-family: var(--font-serif);
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.2;
}

button {
    font-family: inherit;
    cursor: pointer;
}

.container {
    width: min(1180px, 92%);
    margin-inline: auto;
}

.container--narrow {
    width: min(860px, 92%);
}

.section {
    padding: clamp(4.5rem, 9vw, 7.5rem) 0;
    position: relative;
}

/* ═══════════════════════════════════════════════════════════════
   NAVBAR
   ═══════════════════════════════════════════════════════════════ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(7, 11, 23, 0.55);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(201, 168, 76, 0.12);
    transition: var(--transition);
}

.navbar--scrolled {
    background: rgba(7, 11, 23, 0.92);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.35);
    border-bottom-color: rgba(201, 168, 76, 0.25);
}

.navbar__container {
    width: min(1240px, 94%);
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 96px;
    padding: 0.5rem 0;
    transition: height 0.4s ease;
}

.navbar--scrolled .navbar__container {
    height: 88px;
}

.navbar__brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.navbar__logo {
    height: 4.5rem;
    width: auto;
    border-radius: 2px;
    filter: drop-shadow(0 0 8px var(--gold-glow));
}

.navbar__brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    color: inherit;
    text-decoration: none;
}

.navbar__brand-text strong {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    color: #fff;
    letter-spacing: 0.5px;
}

.navbar__brand-text small {
    font-size: 0.62rem;
    color: var(--gold-light);
    letter-spacing: 2.5px;
    text-transform: uppercase;
}

.navbar__menu {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.navbar__link {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-size: 0.82rem;
    font-weight: 400;
    letter-spacing: 0.8px;
    color: rgba(255, 255, 255, 0.82);
    border-radius: 50px;
    transition: var(--transition);
    position: relative;
}

.navbar__link::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0.25rem;
    width: 0;
    height: 2px;
    background: var(--gold);
    transform: translateX(-50%);
    transition: width 0.35s ease;
}

.navbar__link:hover,
.navbar__link.active {
    color: var(--gold-light);
}

.navbar__link:hover::after,
.navbar__link.active::after {
    width: 55%;
}

.navbar__cta {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: #fff !important;
    font-weight: 600;
    margin-left: 0.5rem;
    box-shadow: 0 4px 18px var(--gold-glow);
}

.navbar__cta::after {
    display: none;
}

.navbar__cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 26px var(--gold-glow);
}

.navbar__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    padding: 0.5rem;
}

.navbar__toggle span {
    width: 26px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: var(--transition);
}

.navbar__toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.navbar__toggle.active span:nth-child(2) {
    opacity: 0;
}

.navbar__toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ═══════════════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════════════ */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(30, 48, 85, 0.6) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 80%, rgba(201, 168, 76, 0.12) 0%, transparent 50%),
        linear-gradient(160deg, var(--navy-900) 0%, var(--navy-800) 40%, var(--navy-600) 100%);
    overflow: hidden;
    padding: 7rem 1rem 6rem;
}

/* Olas — canvas procedural (dibujadas en JS, sin costuras, espuma en la cresta) */
.hero__waves {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: clamp(120px, 18vw, 230px);
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

.hero__waves canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* Partículas doradas */
.hero__stars {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.star {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--gold-light);
    border-radius: 50%;
    opacity: 0;
    animation: twinkle 4s ease-in-out infinite;
    box-shadow: 0 0 8px 2px rgba(232, 213, 163, 0.35);
}

@keyframes twinkle {
    0%, 100% { opacity: 0; transform: scale(0.6); }
    50%      { opacity: 0.9; transform: scale(1.1); }
}

.hero__content {
    position: relative;
    z-index: 3;
    max-width: 760px;
}

.hero__kicker {
    display: inline-block;
    font-size: 0.78rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--gold-light);
    border: 1px solid rgba(201, 168, 76, 0.35);
    padding: 0.55rem 1.4rem;
    border-radius: 50px;
    background: rgba(201, 168, 76, 0.08);
    margin-bottom: 2.2rem;
}

/* Retrato enmarcado con timón giratorio */
.hero__portrait {
    margin-bottom: 1.6rem;
}

.hero__helm {
    position: relative;
    width: clamp(160px, 21vw, 230px);
    margin-inline: auto;
    aspect-ratio: 1;
}

/* Resplandor dorado ambiente detrás del timón, como luz de cubierta */
.hero__helm::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 118%;
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(201, 168, 76, 0.30) 0%, rgba(201, 168, 76, 0.10) 45%, transparent 70%);
    filter: blur(10px);
    pointer-events: none;
    z-index: 0;
}

.hero__helm-wheel {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    animation: helmSpin 70s linear infinite;
    filter: drop-shadow(0 0 14px rgba(201, 168, 76, 0.30)) drop-shadow(0 8px 24px rgba(0, 0, 0, 0.6));
    z-index: 1;
}

/* El retrato va en el centro del timón */
.hero__helm-photo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 50%;
    height: 50%;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--gold-light);
    box-shadow:
        inset 0 0 0 3px rgba(7, 11, 23, 0.55),
        0 0 0 2px rgba(58, 44, 16, 0.9),
        0 0 0 4px var(--gold-dark),
        0 0 0 6px rgba(7, 11, 23, 0.35),
        0 0 26px rgba(201, 168, 76, 0.35),
        0 12px 34px rgba(0, 0, 0, 0.6);
    z-index: 2;
}

.hero__helm-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@keyframes helmSpin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .hero__helm-wheel {
        animation: none;
    }
}

.hero__name {
    font-family: var(--font-serif);
    font-size: clamp(2.6rem, 6.5vw, 4.4rem);
    font-weight: 800;
    color: #fff;
    letter-spacing: 1px;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    margin-bottom: 0.4rem;
}

.hero__epithet {
    font-family: var(--font-script);
    font-size: clamp(1.8rem, 4.5vw, 2.8rem);
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    text-shadow: none;
}

.hero__dates {
    font-size: 0.95rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 1.6rem;
}

.hero__motto {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2.2rem;
}

.hero__motto p {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.05rem;
    color: var(--gold-light);
    white-space: nowrap;
}

.hero__motto-line {
    height: 1px;
    width: clamp(30px, 6vw, 80px);
    background: linear-gradient(90deg, transparent, var(--gold));
}

.hero__motto-line:last-child {
    background: linear-gradient(90deg, var(--gold), transparent);
}

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 2rem;
    border-radius: 50px;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    border: none;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn--gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: #fff;
    box-shadow: 0 6px 24px var(--gold-glow);
}

.btn--gold:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 34px var(--gold-glow);
}

.btn--outline {
    background: transparent;
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.45);
}

.btn--outline:hover {
    border-color: var(--gold);
    color: var(--gold-light);
    transform: translateY(-3px);
    background: rgba(201, 168, 76, 0.08);
}

.btn--block {
    width: 100%;
    justify-content: center;
}

.hero__actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero__scroll {
    position: absolute;
    bottom: 2.2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

.hero__scroll-mouse {
    display: block;
    width: 26px;
    height: 42px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 14px;
    position: relative;
}

.hero__scroll-mouse::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    width: 4px;
    height: 8px;
    background: var(--gold-light);
    border-radius: 3px;
    transform: translateX(-50%);
    animation: scrollDot 1.8s ease-in-out infinite;
}

@keyframes scrollDot {
    0%   { opacity: 1; transform: translate(-50%, 0); }
    70%  { opacity: 0; transform: translate(-50%, 14px); }
    100% { opacity: 0; transform: translate(-50%, 14px); }
}

/* Estados iniciales controlados por GSAP (animations.js).
   Se ocultan SOLO si GSAP está presente (clase en <body>), evitando
   flash de contenido y dejando la página visible si el CDN falla. */
body.gsap-ready .animate-up,
body.gsap-ready .reveal,
body.gsap-ready .hero__scroll,
body.gsap-ready .codigo__thread,
body.gsap-ready .camino__line {
    opacity: 0;
}

/* ═══════════════════════════════════════════════════════════════
   SECCIÓN — Encabezados genéricos
   ═══════════════════════════════════════════════════════════════ */
.section-head {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-head__overline {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--gold-dark);
    font-weight: 600;
}

.section-head__title {
    font-size: clamp(1.9rem, 4vw, 2.7rem);
    font-weight: 800;
    margin: 0.5rem 0 0.9rem;
}

.section-head__title--left {
    text-align: left;
}

.section-head__divider {
    width: 70px;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    border-radius: 3px;
    margin: 0 auto;
}

.section-head__divider--left {
    margin-inline: 0;
}

.section-head__subtitle {
    max-width: 620px;
    margin: 1rem auto 0;
    font-size: 1rem;
    color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════
   CITA
   ═══════════════════════════════════════════════════════════════ */
.cita {
    background: var(--cream);
}

.cita__block {
    position: relative;
    text-align: center;
    padding: clamp(2rem, 5vw, 3.5rem) clamp(1.2rem, 4vw, 3rem);
}

.cita__quote-mark {
    font-family: var(--font-serif);
    font-size: 5rem;
    color: var(--gold);
    opacity: 0.35;
    line-height: 0.6;
    display: block;
    margin-bottom: 0.4rem;
}

.cita__text {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(1.15rem, 2.6vw, 1.5rem);
    color: var(--text-dark);
    line-height: 1.8;
    margin-bottom: 1.6rem;
}

/* Cursor del telégrafo dentro de la cita */
.cita__cursor {
    display: inline-block;
    width: 8px;
    height: 1em;
    background: var(--gold);
    vertical-align: text-bottom;
    margin-left: 3px;
    animation: signalBlink 0.9s steps(1) infinite;
}

@keyframes signalBlink {
    50% { opacity: 0; }
}

.cita__source cite {
    display: block;
    font-style: normal;
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--gold-dark);
}

.cita__context {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════
   HISTORIA — Biografía + Línea de tiempo
   ═══════════════════════════════════════════════════════════════ */
.historia {
    background: #fff;
}

.historia__grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: clamp(2.5rem, 5vw, 4.5rem);
    align-items: start;
}

.historia__bio p {
    margin-bottom: 1.2rem;
    font-size: 0.98rem;
    line-height: 1.9;
}

.historia__bio strong {
    color: var(--text-dark);
    font-weight: 700;
}

.historia__bio em {
    color: var(--gold-dark);
}

/* Línea de tiempo */
.timeline {
    position: relative;
    padding-left: 2.2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 4px;
    bottom: 4px;
    width: 2px;
    background: linear-gradient(180deg, var(--gold-light), var(--gold), var(--gold-dark));
}

.timeline__item {
    position: relative;
    padding-bottom: 1.8rem;
}

.timeline__item:last-child {
    padding-bottom: 0;
}

.timeline__item::before {
    content: '';
    position: absolute;
    left: -2.2rem;
    top: 0.35rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--cream);
    border: 3px solid var(--gold);
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.18);
    transition: var(--transition);
}

.timeline__item--final::before {
    background: var(--gold);
    box-shadow: 0 0 0 4px rgba(201, 168, 76, 0.3), 0 0 18px var(--gold-glow);
}

.timeline__year {
    display: inline-block;
    font-family: var(--font-serif);
    font-weight: 800;
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: #fff;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    padding: 0.25rem 0.9rem;
    border-radius: 50px;
    margin-bottom: 0.6rem;
    box-shadow: 0 3px 12px var(--gold-glow);
}

.timeline__card {
    background: var(--card-bg);
    border: 1px solid var(--border-soft);
    border-left: 3px solid var(--gold);
    border-radius: 12px;
    padding: 1.1rem 1.3rem;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
}

.timeline__item:hover .timeline__card {
    transform: translateX(6px);
    box-shadow: var(--shadow-gold);
    border-left-color: var(--gold-dark);
}

.timeline__card h4 {
    font-size: 1rem;
    margin-bottom: 0.35rem;
}

.timeline__card p {
    font-size: 0.86rem;
    line-height: 1.7;
    color: var(--text-body);
}

.timeline__card em {
    color: var(--gold-dark);
}

/* ═══════════════════════════════════════════════════════════════
   HUÁSCAR — Sección oscura naval
   ═══════════════════════════════════════════════════════════════ */
.huascar {
    background:
        radial-gradient(ellipse at 15% 20%, rgba(30, 48, 85, 0.7) 0%, transparent 60%),
        radial-gradient(ellipse at 85% 85%, rgba(201, 168, 76, 0.1) 0%, transparent 50%),
        linear-gradient(150deg, var(--navy-800) 0%, var(--navy-700) 60%, var(--navy-900) 100%);
    color: var(--text-on-dark);
}

.huascar .section-head__overline {
    color: var(--gold-light);
}

.huascar .section-head__title {
    color: #fff;
}

.huascar__inner {
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    gap: clamp(2.5rem, 5vw, 4.5rem);
    align-items: center;
}

.huascar__figure {
    position: relative;
    border-radius: 2px;
    overflow: hidden;
    box-shadow:
        inset 0 0 0 1px rgba(0, 0, 0, 0.22),
        inset 0 6px 24px rgba(0, 0, 0, 0.35);
}

.huascar__figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 4 / 3;
    transition: transform 0.8s ease;
}

.huascar__figure:hover img {
    transform: scale(1.04);
}

.huascar__figure figcaption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 2.5rem 1.2rem 1rem;
    background: linear-gradient(transparent, rgba(7, 11, 23, 0.9));
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.8rem;
    text-align: center;
}

.huascar__figure figcaption em {
    color: var(--gold-light);
    font-style: italic;
}

.huascar__content p {
    font-size: 0.98rem;
    line-height: 1.9;
    color: rgba(245, 242, 234, 0.82);
    margin-bottom: 1.4rem;
}

.huascar__content strong {
    color: var(--gold-light);
}

/* Especificaciones */
.huascar__specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 1.8rem 0;
}

.spec {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(201, 168, 76, 0.22);
    border-radius: 12px;
    padding: 0.9rem 1.1rem;
    transition: var(--transition);
}

.spec:hover {
    background: rgba(201, 168, 76, 0.1);
    transform: translateY(-3px);
}

.spec__icon {
    font-size: 1.5rem;
}

.spec__text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.spec__text strong {
    color: #fff;
    font-family: var(--font-serif);
    font-size: 1.05rem;
}

.spec__text span {
    font-size: 0.72rem;
    color: rgba(245, 242, 234, 0.55);
}

.huascar__note {
    font-size: 0.9rem !important;
    font-style: italic;
    border-left: 3px solid var(--gold);
    padding-left: 1rem;
    color: rgba(245, 242, 234, 0.7) !important;
}

/* ═══════════════════════════════════════════════════════════════
   MARCO DE LATÓN — marco de museo profesional
   (adaptado del prototipo miguel-grau-galeria (1).html)
   Moldura de latón pulido + paspartú crema + esquinas + placa.
   Se usa tanto en la sección HUÁSCAR como en la GALERÍA.
   ═══════════════════════════════════════════════════════════════ */
.marco {
    position: relative;
    padding: clamp(9px, 1.1vw, 15px);
    border-radius: 3px;
    background: linear-gradient(155deg,
        #f5e3a6 0%, #d9b968 20%, #a8872f 42%,
        #7c5e22 55%, #b8933f 76%, #f2d98a 100%);
    box-shadow:
        0 26px 55px rgba(0, 0, 0, 0.55),
        0 0 44px rgba(201, 168, 76, 0.08),
        inset 0 0 0 1px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.marco__mat {
    position: relative;
    background: linear-gradient(180deg, #fffdf6 0%, #f1e8d2 100%);
    padding: clamp(7px, 0.9vw, 11px);
    box-shadow:
        inset 0 0 0 1px rgba(0, 0, 0, 0.12),
        inset 0 2px 12px rgba(0, 0, 0, 0.16);
}

/* Esquinas en L del paspartú */
.marco__corner {
    position: absolute;
    width: 15px;
    height: 15px;
    z-index: 3;
    opacity: 0.85;
    pointer-events: none;
}
.marco__corner::before,
.marco__corner::after {
    content: '';
    position: absolute;
    background: rgba(42, 30, 10, 0.85);
}
.marco__corner::before { width: 100%; height: 2px; }
.marco__corner::after { width: 2px; height: 100%; }

.marco__corner--tl { top: 4px; left: 4px; }
.marco__corner--tl::before { top: 0; left: 0; }
.marco__corner--tl::after { top: 0; left: 0; }
.marco__corner--tr { top: 4px; right: 4px; }
.marco__corner--tr::before { top: 0; right: 0; }
.marco__corner--tr::after { top: 0; right: 0; }
.marco__corner--bl { bottom: 4px; left: 4px; }
.marco__corner--bl::before { bottom: 0; left: 0; }
.marco__corner--bl::after { bottom: 0; left: 0; }
.marco__corner--br { bottom: 4px; right: 4px; }
.marco__corner--br::before { bottom: 0; right: 0; }
.marco__corner--br::after { bottom: 0; right: 0; }

/* Placa de latón grabada */
.marco__plate {
    position: absolute;
    left: 50%;
    bottom: -13px;
    transform: translateX(-50%);
    background: linear-gradient(180deg, #edcf85 0%, #a8872f 100%);
    color: #2a1e0a;
    font-family: var(--font-serif);
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-align: center;
    padding: 5px 16px;
    border: 1px solid rgba(0, 0, 0, 0.45);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    white-space: nowrap;
    z-index: 4;
}

/* ═══════════════════════════════════════════════════════════════
   GALERÍA — slideshow de fotos con crossfade
   ═══════════════════════════════════════════════════════════════ */
.galeria {
    background:
        radial-gradient(ellipse at 82% 8%, rgba(30, 48, 85, 0.6) 0%, transparent 55%),
        radial-gradient(ellipse at 12% 92%, rgba(201, 168, 76, 0.08) 0%, transparent 50%),
        linear-gradient(160deg, var(--navy-900) 0%, var(--navy-800) 55%, var(--navy-700) 100%);
    color: var(--text-on-dark);
    overflow: hidden;
}

.galeria .section-head__overline {
    color: var(--gold-light);
}

.galeria .section-head__title {
    color: #fff;
}

.galeria .section-head__subtitle {
    color: rgba(245, 242, 234, 0.65);
}

.gallery__stage {
    position: relative;
    max-width: 960px;
    margin-inline: auto;
}

.gallery__frame {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 2px;
    box-shadow:
        inset 0 0 0 1px rgba(0, 0, 0, 0.22),
        inset 0 6px 24px rgba(0, 0, 0, 0.35);
}

.gallery__slides {
    position: absolute;
    inset: 0;
}

.gallery__slides .slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.6s ease;
}

.gallery__slides .slide.active {
    opacity: 1;
}

.gallery__slides .slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery__cap {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1.1rem 1.4rem;
    background: linear-gradient(0deg, rgba(7, 11, 23, 0.85), transparent);
    pointer-events: none;
}

.gallery__tag {
    display: inline-block;
    font-size: 0.68rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold-light);
    font-weight: 600;
}

.gallery__cap h3 {
    font-family: var(--font-serif);
    font-size: clamp(1rem, 2vw, 1.3rem);
    font-weight: 600;
    color: #fff;
    margin-top: 0.35rem;
    letter-spacing: 0.02em;
}

/* Flechas sobre el marco (visibles al pasar el cursor o al enfocar) */
.gallery__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(201, 168, 76, 0.45);
    background: rgba(7, 11, 23, 0.55);
    color: var(--gold-light);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: opacity 0.35s ease, background 0.35s ease, border-color 0.35s ease;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
}

.gallery__arrow--prev { left: 1rem; }
.gallery__arrow--next { right: 1rem; }

.gallery__frame:hover .gallery__arrow,
.gallery__frame:focus-within .gallery__arrow,
.gallery__arrow:focus-visible {
    opacity: 1;
}

.gallery__arrow:hover {
    background: rgba(201, 168, 76, 0.2);
    border-color: var(--gold);
}

/* Pantallas táctiles: las flechas siempre visibles */
@media (hover: none) {
    .gallery__arrow { opacity: 1; }
}

.gallery__dots {
    display: flex;
    justify-content: center;
    gap: 0.7rem;
    margin-top: clamp(2.9rem, 7vw, 3.7rem);
}

.gallery__dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: 1.5px solid rgba(232, 213, 163, 0.45);
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

.gallery__dot.active {
    background: var(--gold);
    border-color: var(--gold);
    box-shadow: 0 0 8px var(--gold-glow);
}

/* ═══════════════════════════════════════════════════════════════
   VALORES — El Código del Caballero
   ═══════════════════════════════════════════════════════════════ */
.valores {
    background: var(--cream);
    overflow: hidden;
}

.valores__glow {
    position: absolute;
    top: -10%;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    height: 500px;
    background: radial-gradient(ellipse, rgba(201, 168, 76, 0.09) 0%, transparent 65%);
    pointer-events: none;
}

.codigo {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.8rem;
    padding-top: 1.5rem;
}

/* Hilo dorado que atraviesa los medallones */
.codigo__thread {
    position: absolute;
    top: 3.9rem;
    left: 9%;
    right: 9%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--gold) 12%,
        var(--gold) 88%,
        transparent
    );
    opacity: 0.45;
    pointer-events: none;
}

.codigo__thread::before,
.codigo__thread::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 10px;
    height: 10px;
    border: 1px solid var(--gold);
    border-radius: 50%;
    transform: translateY(-50%);
    background: var(--cream);
}

.codigo__thread::before {
    left: 0;
}

.codigo__thread::after {
    right: 0;
}

.codigo__item {
    position: relative;
    text-align: center;
    padding: 0 0.6rem;
}

/* Medallón naval */
.codigo__medallion {
    position: relative;
    width: 118px;
    height: 118px;
    margin: 0 auto 1.4rem;
}

.codigo__medallion::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background:
        radial-gradient(circle at 30% 25%, #f6eeda 0%, #dfc889 35%, #b8942e 78%, #8a6d1f 100%);
    box-shadow:
        0 0 0 1px rgba(201, 168, 76, 0.6),
        0 0 0 5px rgba(201, 168, 76, 0.15),
        0 10px 28px rgba(168, 135, 47, 0.35);
}

.codigo__medallion::after {
    content: '';
    position: absolute;
    inset: 7px;
    border-radius: 50%;
    border: 1.5px dashed rgba(122, 96, 24, 0.55);
}

.codigo__numeral {
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    font-family: var(--font-serif);
    font-weight: 800;
    font-size: 0.72rem;
    letter-spacing: 1px;
    color: #fff;
    background: var(--navy-700);
    border: 1px solid rgba(201, 168, 76, 0.6);
    padding: 0.15rem 0.7rem;
    border-radius: 50px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.codigo__icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.codigo__icon svg {
    width: 52px;
    height: 52px;
    color: var(--navy-700);
    filter: drop-shadow(0 2px 3px rgba(255, 255, 255, 0.4));
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.3);
}

.codigo__item:hover .codigo__icon svg {
    transform: scale(1.12);
}

.codigo__item:hover .codigo__medallion::before {
    box-shadow:
        0 0 0 1px rgba(201, 168, 76, 0.7),
        0 0 0 6px rgba(201, 168, 76, 0.22),
        0 14px 36px rgba(168, 135, 47, 0.45);
}

.codigo__name {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 0.2rem;
}

.codigo__latin {
    display: inline-block;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 0.8rem;
    color: var(--gold-dark);
    letter-spacing: 2px;
    text-transform: uppercase;
    padding-bottom: 0.9rem;
    margin-bottom: 0.9rem;
    position: relative;
}

.codigo__latin::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 28px;
    height: 1.5px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.codigo__text {
    font-size: 0.86rem;
    line-height: 1.75;
    color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════
   CIFRAS — Contadores
   ═══════════════════════════════════════════════════════════════ */
.cifras {
    background:
        radial-gradient(ellipse at 50% 0%, rgba(201, 168, 76, 0.1) 0%, transparent 55%),
        var(--navy-900);
    padding: clamp(3.5rem, 8vw, 5.5rem) 0;
}

.cifras__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
}

.cifra {
    padding: 1rem;
}

.cifra__number {
    display: block;
    font-family: var(--font-serif);
    font-weight: 800;
    font-size: clamp(2.6rem, 6vw, 4rem);
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.3rem;
    line-height: 1;
}

.cifra__label {
    font-size: 0.82rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(245, 242, 234, 0.6);
}

/* ═══════════════════════════════════════════════════════════════
   LEGADO
   ═══════════════════════════════════════════════════════════════ */
.legado {
    background: #fff;
}

.camino {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.6rem;
    margin-bottom: 3.5rem;
    padding-top: 1rem;
}

/* Línea horizontal que une los nodos */
.camino__line {
    position: absolute;
    top: 2.6rem;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--gold) 15%,
        var(--gold) 85%,
        transparent
    );
    opacity: 0.5;
    pointer-events: none;
}

.camino__stop {
    position: relative;
    text-align: center;
    padding: 0 0.4rem;
}

/* Nodo diamante */
.camino__node {
    position: relative;
    width: 74px;
    height: 74px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.camino__node::before {
    content: '';
    position: absolute;
    inset: 4px;
    background: linear-gradient(135deg, var(--gold-light), var(--gold) 60%, var(--gold-dark));
    transform: rotate(45deg);
    border-radius: 6px;
    box-shadow:
        0 6px 22px rgba(168, 135, 47, 0.4),
        0 0 0 1px rgba(122, 96, 24, 0.6);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.3), box-shadow 0.5s ease;
}

.camino__node::after {
    content: '';
    position: absolute;
    inset: 14px;
    border: 1px solid rgba(255, 255, 255, 0.75);
    transform: rotate(45deg);
    border-radius: 3px;
    opacity: 0.6;
}

.camino__numeral {
    position: relative;
    z-index: 2;
    font-family: var(--font-serif);
    font-weight: 800;
    font-size: 1.15rem;
    color: #fff;
    text-shadow: 0 1px 3px rgba(122, 96, 24, 0.6);
}

.camino__stop:hover .camino__node::before {
    transform: rotate(45deg) scale(1.12);
    box-shadow:
        0 10px 30px rgba(168, 135, 47, 0.55),
        0 0 0 1px rgba(122, 96, 24, 0.7);
}

.camino__tag {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #fff;
    background: var(--navy-700);
    border: 1px solid rgba(201, 168, 76, 0.4);
    padding: 0.28rem 0.9rem;
    border-radius: 50px;
    margin-bottom: 0.85rem;
}

.camino__title {
    font-size: 1.12rem;
    font-weight: 800;
    margin-bottom: 0.6rem;
}

.camino__text {
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--text-muted);
    max-width: 260px;
    margin-inline: auto;
}

/* Banda de honor */
.legado__band {
    position: relative;
    text-align: center;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(201, 168, 76, 0.12) 0%, transparent 60%),
        var(--navy-800);
    border-radius: var(--radius);
    padding: clamp(2.5rem, 6vw, 4rem) clamp(1.5rem, 5vw, 4rem);
    color: var(--text-on-dark);
    overflow: hidden;
    box-shadow: var(--shadow-deep);
}

.legado__band-quote {
    font-family: var(--font-serif);
    font-size: 4rem;
    color: var(--gold);
    opacity: 0.4;
    line-height: 0.6;
    display: block;
    margin-bottom: 0.8rem;
}

.legado__band p {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(1.2rem, 2.6vw, 1.6rem);
    color: #fff;
    line-height: 1.7;
    max-width: 640px;
    margin-inline: auto;
    margin-bottom: 1.4rem;
}

.legado__band-credit {
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold-light);
}

/* ═══════════════════════════════════════════════════════════════
   HOMENAJE — Formulario y mensajes
   ═══════════════════════════════════════════════════════════════ */
.homenaje {
    background:
        radial-gradient(ellipse at 20% 10%, rgba(30, 48, 85, 0.65) 0%, transparent 55%),
        radial-gradient(ellipse at 85% 90%, rgba(201, 168, 76, 0.1) 0%, transparent 50%),
        linear-gradient(155deg, var(--navy-700) 0%, var(--navy-900) 100%);
}

.homenaje .section-head__overline {
    color: var(--gold-light);
}

.homenaje .section-head__title {
    color: #fff;
}

.homenaje .section-head__subtitle {
    color: rgba(245, 242, 234, 0.65);
}

.homenaje__card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(201, 168, 76, 0.22);
    border-radius: 24px;
    padding: clamp(2rem, 5vw, 3.5rem);
    backdrop-filter: blur(6px);
}

.homenaje__form {
    margin-top: 2.2rem;
}

.homenaje__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    font-size: 0.78rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--gold-light);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.07);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: #fff;
    padding: 0.85rem 1.1rem;
    font-family: var(--font-body);
    font-size: 0.92rem;
    transition: var(--transition);
    resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold);
    background: rgba(201, 168, 76, 0.08);
    box-shadow: 0 0 0 4px rgba(201, 168, 76, 0.12);
}

.form-group input.error,
.form-group textarea.error {
    border-color: #e05a5a;
}

.homenaje__form .btn {
    margin-top: 0.4rem;
}

.homenaje__note {
    margin-top: 1rem;
    font-size: 0.75rem;
    text-align: center;
    color: rgba(245, 242, 234, 0.45);
}

/* Mensajes publicados */
/* Muro de mensajes — rejilla responsive (3 / 2 / 1 columnas) */
.homenaje__messages {
    margin-top: 2.8rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.1rem;
    /* Las tarjetas no se estiran a la altura de la fila: cada una ocupa
       solo lo que su contenido necesita (así no queda "hueco" debajo de
       los mensajes cortos). */
    align-items: start;
}

.mensaje {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(201, 168, 76, 0.18);
    border-radius: 16px;
    padding: 1.25rem 1.35rem;
    box-shadow: 0 10px 30px rgba(7, 11, 23, 0.28);
    cursor: pointer;
    transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.mensaje:hover {
    transform: translateY(-4px);
    border-color: rgba(201, 168, 76, 0.4);
    box-shadow: 0 18px 44px rgba(7, 11, 23, 0.42);
}

.mensaje--short {
    border-color: rgba(201, 168, 76, 0.4);
}

.mensaje--tall {
    border-left: 3px solid var(--gold);
}

.mensaje__avatar {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: #fff;
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(201, 168, 76, 0.35);
}

.mensaje__body {
    flex: 1;
    min-width: 0; /* permite que el texto se trunque dentro del flex */
}

.mensaje__body p {
    color: rgba(245, 242, 234, 0.85);
    font-size: 0.88rem;
    line-height: 1.7;
    font-style: italic;
    margin: 0;
    /* Texto truncado a 3 líneas; si desborda, aparece "Leer completo" */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Botón "Leer completo" — abre el mensaje entero en un popup */
.mensaje__more {
    display: none;
    background: none;
    border: none;
    padding: 0;
    margin-top: 0.7rem;
    color: var(--gold-light);
    font-family: var(--font-serif);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    cursor: pointer;
}

.mensaje__more:hover {
    color: var(--gold);
    text-decoration: underline;
}

.mensaje__head {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 0.35rem;
}

.mensaje__head strong {
    color: #fff;
    font-family: var(--font-serif);
    font-size: 0.95rem;
}

.mensaje__ciudad {
    font-size: 0.72rem;
    color: var(--gold-light);
    letter-spacing: 0.5px;
}

/* ── Campo trampa anti-spam (honeypot): oculto para humanos, los bots lo ven y rellenan ── */
.hp-field {
    position: absolute !important;
    left: -9999px !important;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

/* ── Popup (modal) de lectura completa del mensaje ── */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.is-open {
    opacity: 1;
    visibility: visible;
}

.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(7, 11, 23, 0.75);
    backdrop-filter: blur(4px);
}

.modal__dialog {
    position: relative;
    width: min(520px, 100%);
    max-height: 85vh;
    overflow-y: auto;
    background: linear-gradient(160deg, #16233f, #0f1a33);
    border: 1px solid rgba(201, 168, 76, 0.35);
    border-radius: 18px;
    padding: 2.2rem 2rem 2rem;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
    transform: translateY(18px) scale(0.97);
    transition: transform 0.35s ease;
}

.modal.is-open .modal__dialog {
    transform: translateY(0) scale(1);
}

.modal__close {
    position: absolute;
    top: 1rem;
    right: 1.1rem;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s ease;
}

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

.modal__avatar {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: #fff;
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.1rem;
    overflow: hidden;
}

.modal__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
    box-shadow: 0 4px 16px rgba(201, 168, 76, 0.4);
}

.modal__head {
    margin-bottom: 1rem;
}

.modal__head strong {
    display: block;
    color: #fff;
    font-family: var(--font-serif);
    font-size: 1.2rem;
}

.modal__ciudad {
    font-size: 0.8rem;
    color: var(--gold-light);
    letter-spacing: 0.5px;
}

.modal__texto {
    color: rgba(245, 242, 234, 0.92);
    font-size: 0.98rem;
    line-height: 1.85;
    font-style: italic;
    margin: 0;
}

/* ── Modal del QR grande ── */
.qr-modal__dialog {
    width: min(420px, 100%);
    text-align: center;
}

.qr-modal__title {
    margin: 0 0 1rem;
    font-family: var(--font-serif);
    font-size: 1.4rem;
    color: var(--gold-light);
    letter-spacing: 0.03em;
}

.qr-modal__img {
    width: 230px;
    height: 230px;
    max-width: 100%;
    border-radius: 12px;
    background: #fff;
    padding: 10px;
    display: inline-block;
    box-shadow: 0 0 0 1px rgba(201, 168, 76, 0.4), 0 16px 40px rgba(0, 0, 0, 0.5);
}

.qr-modal__sub {
    margin: 1.1rem auto 0;
    max-width: 300px;
    font-size: 0.85rem;
    line-height: 1.6;
    color: rgba(245, 242, 234, 0.7);
}

.qr-modal .footer__share {
    margin-top: 1.4rem;
    margin-bottom: 0;
}

/* ── Toast: confirmación al copiar el enlace (Instagram) ── */
.share-toast {
    position: fixed;
    left: 50%;
    bottom: 1.6rem;
    transform: translate(-50%, 12px);
    z-index: 1100;
    padding: 0.6rem 1.2rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--navy-900);
    font-size: 0.82rem;
    font-weight: 600;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.share-toast.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════ */
.footer {
    background: var(--navy-900);
    color: rgba(245, 242, 234, 0.7);
    padding: 3.5rem 0 2rem;
    text-align: center;
}

.footer__brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    margin-bottom: 0.6rem;
}

.footer__logo {
    height: 4.5rem;
    width: auto;
    border-radius: 2px;
}

.footer__name {
    font-family: var(--font-script);
    font-size: 1.7rem;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer__tagline {
    font-size: 0.9rem;
    margin-bottom: 1.6rem;
}

.footer__divider {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    margin: 0 auto 1.4rem;
    border-radius: 2px;
}

.footer__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    font-size: 0.75rem;
    color: rgba(245, 242, 234, 0.4);
    flex-wrap: wrap;
}

.footer__creds {
    letter-spacing: 0.5px;
}

/* ── Bloque QR del footer: invita a escanear el homenaje ──
   Es un botón: al pulsarlo se abre el QR en grande (modal) ── */
.footer__qr {
    display: inline-flex;
    align-items: center;
    gap: 1.2rem;
    margin: 0 auto 1.8rem;
    padding: 1rem 1.4rem;
    background: linear-gradient(180deg, #121d38 0%, var(--navy-800) 100%);
    border: 1px solid rgba(201, 168, 76, 0.28);
    border-radius: 14px;
    text-align: left;
    font: inherit;
    color: inherit;
    cursor: pointer;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.footer__qr:hover,
.footer__qr:focus-visible {
    transform: translateY(-3px);
    border-color: rgba(201, 168, 76, 0.6);
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.07);
    outline: none;
}

.footer__qr:active {
    transform: translateY(-1px);
}

.footer__qr-img {
    width: 92px;
    height: 92px;
    border-radius: 8px;
    background: #fff;
    padding: 6px;
    box-shadow: 0 0 0 1px rgba(201, 168, 76, 0.35), 0 6px 16px rgba(0, 0, 0, 0.35);
    display: block;
}

.footer__qr-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    max-width: 220px;
}

.footer__qr-title {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    color: var(--gold-light);
    letter-spacing: 0.02em;
}

.footer__qr-sub {
    font-size: 0.78rem;
    color: rgba(245, 242, 234, 0.6);
    line-height: 1.5;
}

/* ── Compartir en redes sociales (footer y modal del QR) ── */
.footer__share {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 1.8rem;
}

.footer__share-label {
    font-size: 0.72rem;
    color: rgba(245, 242, 234, 0.45);
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.footer__share-row {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
}

.footer__share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(201, 168, 76, 0.28);
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.footer__share-btn svg {
    width: 19px;
    height: 19px;
    fill: currentColor;
}

.footer__share-btn:hover {
    transform: translateY(-3px);
}

.footer__share-btn--whatsapp:hover {
    background: #25d366;
    box-shadow: 0 6px 18px rgba(37, 211, 102, 0.4);
}

.footer__share-btn--facebook:hover {
    background: #1877f2;
    box-shadow: 0 6px 18px rgba(24, 119, 242, 0.4);
}

.footer__share-btn--linkedin:hover {
    background: #0a66c2;
    box-shadow: 0 6px 18px rgba(10, 102, 194, 0.4);
}

.footer__share-btn--instagram:hover {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    box-shadow: 0 6px 18px rgba(228, 64, 95, 0.4);
}

/* ═══════════════════════════════════════════════════════════════
   BOTÓN VOLVER ARRIBA
   ═══════════════════════════════════════════════════════════════ */
.back-to-top {
    position: fixed;
    right: 1.6rem;
    bottom: 1.6rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: #fff;
    font-size: 1.2rem;
    box-shadow: var(--shadow-gold);
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: var(--transition);
    z-index: 900;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 40px var(--gold-glow);
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 992px) {
    .historia__grid,
    .huascar__inner {
        grid-template-columns: 1fr;
    }

    .codigo,
    .camino {
        grid-template-columns: repeat(2, 1fr);
        row-gap: 3rem;
    }

    .codigo__thread,
    .camino__line {
        display: none;
    }

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

@media (max-width: 768px) {
    html {
        scroll-padding-top: 70px;
    }

    /* Menú móvil */
    .navbar__toggle {
        display: flex;
    }

    .navbar__menu {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0.2rem;
        background: rgba(7, 11, 23, 0.98);
        padding: 1.2rem 1.4rem 1.6rem;
        border-bottom: 1px solid rgba(201, 168, 76, 0.25);
        transform: translateY(-120%);
        opacity: 0;
        transition: var(--transition);
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    }

    .navbar__menu.open {
        transform: translateY(0);
        opacity: 1;
    }

    .navbar__link {
        padding: 0.9rem 1rem;
        text-align: center;
        font-size: 0.95rem;
    }

    .navbar__cta {
        margin: 0.6rem 0 0;
    }

    .navbar__link::after {
        display: none;
    }

    .hero {
        padding-top: 8rem;
    }

    .homenaje__row {
        grid-template-columns: 1fr;
    }

    .footer__bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 520px) {
    .codigo,
    .camino {
        grid-template-columns: 1fr;
    }

    .cifras__grid {
        grid-template-columns: 1fr;
        gap: 1.4rem;
    }

    .huascar__specs {
        grid-template-columns: 1fr;
    }

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

    .hero__actions .btn {
        width: min(280px, 100%);
        justify-content: center;
    }
}

/* ─── Accesibilidad: respeta preferencia de movimiento reducido ─── */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}
