/* ============================================================
   layout.css · fondo, nav, hero, secciones, split, mapa, footer
   ============================================================ */

/* ---------- Fondo de pergamino (color + viñeta cálida sutil) ---------- */
body {
  background-image:
    radial-gradient(120% 85% at 50% 6%, rgba(252, 245, 226, 0.9), rgba(252, 245, 226, 0) 55%),
    radial-gradient(130% 110% at 50% 110%, rgba(160, 116, 58, 0.22), rgba(160, 116, 58, 0) 52%);
  background-attachment: fixed;
}

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: 820px; }

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

/* ---------- Barra de progreso ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright), var(--ember));
  z-index: 100; box-shadow: 0 0 12px rgba(232, 171, 78, 0.6);
  transition: width 0.1s linear;
}

/* ---------- Navegación ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90;
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: 0.9rem; }
.nav.is-scrolled {
  background: rgba(239, 226, 194, 0.86);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line), var(--shadow-sm);
}

.nav__brand { display: flex; align-items: center; gap: 0.8rem; }
.nav__logo { width: 58px; height: 58px; filter: drop-shadow(0 2px 6px rgba(36,26,17,0.4)); transition: transform 0.5s var(--ease); }
.nav__brand:hover .nav__logo { transform: rotate(-4deg) scale(1.05); }
.nav__brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.nav__brand-name { font-family: var(--font-display); font-size: 1.45rem; font-weight: 700; color: var(--paper); text-shadow: 0 1px 10px rgba(36,26,17,0.6); transition: color 0.4s var(--ease), text-shadow 0.4s var(--ease); }
.nav__brand-sub { font-family: var(--font-label); font-size: 0.58rem; letter-spacing: 0.28em; text-transform: uppercase; color: rgba(239,226,194,0.85); transition: color 0.4s var(--ease); }
.nav.is-scrolled .nav__brand-name { color: var(--ink); text-shadow: none; }
.nav.is-scrolled .nav__brand-sub { color: var(--ink-soft); }

.nav__links { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 2.2rem); }
.nav__links a {
  font-family: var(--font-label); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--paper); text-shadow: 0 1px 8px rgba(36,26,17,0.55);
  position: relative; padding-block: 0.3rem;
  transition: color 0.4s var(--ease), text-shadow 0.4s var(--ease);
}
.nav.is-scrolled .nav__links a { color: var(--ink); text-shadow: none; }
.nav__links a:not(.nav__cta)::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 1px; width: 0;
  background: var(--gold-bright); transition: width 0.35s var(--ease);
}
.nav__links a:not(.nav__cta):hover::after { width: 100%; }
.nav__cta {
  border: 1px solid var(--gold-bright);
  padding: 0.5rem 1.15rem !important; border-radius: 999px;
  transition: background 0.35s var(--ease), color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.nav__cta:hover { background: var(--gold); border-color: var(--gold); color: var(--paper) !important; box-shadow: var(--glow-gold); }

/* ---------- Botón flotante: volver arriba (pantalla chica) ---------- */
.toTop {
  display: none; position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 95;
  width: 46px; height: 46px; border-radius: 999px; border: 0;
  background: linear-gradient(135deg, var(--gold), var(--ember)); color: #f8efd9; font-size: 1.15rem;
  box-shadow: var(--shadow-md); opacity: 0; pointer-events: none; cursor: pointer;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.toTop.show { opacity: 1; pointer-events: auto; }
.toTop:hover { transform: translateY(-2px); }

/* ---------- HERO: foto aérea + logo ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; text-align: center; overflow: hidden; padding: 7rem 0 4rem; }
.hero__bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.hero__photo {
  width: 100%; height: 100%; object-fit: cover; object-position: center 38%;
  transform-origin: center;
  animation: kenburns 26s ease-in-out infinite alternate;
  will-change: transform;
}
.hero__veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(36,26,17,0.55) 0%, rgba(36,26,17,0.28) 30%, rgba(43,32,22,0.34) 62%, rgba(36,26,17,0.72) 100%),
    radial-gradient(90% 60% at 50% 46%, rgba(36,26,17,0) 30%, rgba(36,26,17,0.30) 100%);
}
.hero__inner { display: flex; flex-direction: column; align-items: center; max-width: 900px; }
.hero__logo {
  width: clamp(182px, 22vw, 280px);
  filter: drop-shadow(0 12px 34px rgba(0,0,0,0.5));
  margin-bottom: 1.6rem;
  animation: logoFloat 7s ease-in-out infinite;
}
.hero__badge {
  font-family: var(--font-label); font-size: 0.74rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--gold-bright); margin-bottom: 1rem;
  display: inline-flex; align-items: center; gap: 0.8rem;
}
.hero__badge::before, .hero__badge::after { content: ''; width: 34px; height: 1px; background: var(--gold-bright); opacity: 0.7; }
.hero__title {
  font-size: clamp(2.6rem, 7vw, 5.6rem); color: #f8efd9;
  text-shadow: 0 2px 30px rgba(0,0,0,0.5); letter-spacing: -0.01em;
  margin-bottom: 1.2rem;
}
.hero__title em { color: var(--gold-bright); }
.hero__lead { font-size: clamp(1.06rem, 1.6vw, 1.32rem); color: rgba(248,239,217,0.92); max-width: 58ch; text-shadow: 0 1px 14px rgba(0,0,0,0.4); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-top: 2.2rem; }
.hero__stats {
  display: flex; flex-wrap: wrap; gap: clamp(1.6rem, 5vw, 4rem); justify-content: center;
  margin-top: 3rem; padding-top: 1.8rem; border-top: 1px solid rgba(248,239,217,0.25);
}
.hero__stats li { display: flex; flex-direction: column; align-items: center; }
.hero__stats strong { font-family: var(--font-display); font-size: 1.55rem; font-weight: 600; color: var(--gold-bright); }
.hero__stats span { font-family: var(--font-label); font-size: 0.64rem; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(248,239,217,0.75); }

/* ---------- Split (historia) ---------- */
.split { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2.5rem, 6vw, 6rem); align-items: center; }
.split__text h2 { font-size: clamp(2rem, 4vw, 3.4rem); margin: 0.4rem 0 1.2rem; }
.split__text h2 em { color: var(--ember); }
.split__text p { color: var(--ink-soft); margin-bottom: 1.1rem; max-width: 56ch; }
.historia__quote {
  font-family: var(--font-script); font-size: clamp(1.5rem, 2.6vw, 2rem); color: var(--gold);
  line-height: 1.3; margin-top: 1.4rem;
}

/* Mesa de fotos históricas: superpuestas, clic para traer al frente */
.photo-table { position: relative; aspect-ratio: 10 / 8; }
.photo-table__item {
  position: absolute; padding: 0; cursor: pointer; display: block;
  border-radius: var(--r-sm);
  transition: transform 0.55s var(--ease), box-shadow 0.55s var(--ease), filter 0.55s var(--ease);
}
.photo-table__item img {
  width: 100%; border-radius: inherit;
  border: 6px solid #f6ecd4; box-shadow: var(--shadow-md);
  filter: sepia(0.22) contrast(0.97);
  transition: inherit;
}
.photo-table__item:hover { transform: var(--rot) scale(1.03); }
.photo-table__item--gaucho     { --rot: rotate(-3.5deg); left: 0;   top: 0;    width: 60%; z-index: 3; transform: var(--rot); }
.photo-table__item--guerra     { --rot: rotate(3deg);    right: 4%; top: 2%;   width: 46%; z-index: 1; transform: var(--rot); }
.photo-table__item--escritorio { --rot: rotate(2deg);    left: 10%; top: 36%;  width: 58%; z-index: 2; transform: var(--rot); }
.photo-table__item--afiche     { --rot: rotate(-2deg);   right: 0;  top: 22%;  width: 33%; z-index: 4; transform: var(--rot); }
.photo-table__item.is-front {
  z-index: 10;
  transform: rotate(0deg) scale(1.14);
}
.photo-table__item.is-front img {
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(201,138,46,0.3);
  filter: sepia(0.08) contrast(1);
}
.photo-table__hint {
  font-family: var(--font-label); font-size: 0.66rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-soft); text-align: center; margin-top: 1.4rem; opacity: 0.8;
}

/* ---------- Section head ---------- */
.section__head { max-width: 760px; margin-bottom: clamp(2.4rem, 5vw, 4rem); }
.section__head h2 { font-size: clamp(2.2rem, 5vw, 3.8rem); margin: 0.5rem 0 0.8rem; }
.section__head h2 em { color: var(--ember); }
.section__lead { color: var(--ink-soft); font-size: 1.1rem; max-width: 60ch; }

/* ---------- Cómo llegar ---------- */
.map { display: grid; grid-template-columns: 1.7fr 1fr; gap: clamp(1.2rem, 2.5vw, 2rem); align-items: stretch; }
.map__frame { position: relative; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-lg); border: 1px solid var(--line); min-height: 420px; }
.map__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: sepia(0.15) saturate(0.95); }
.map__info { background: var(--card-strong); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.9rem; display: flex; flex-direction: column; gap: 1.35rem; }
.map__label { font-family: var(--font-label); font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); display: block; margin-bottom: 0.35rem; }
.map__info p { color: var(--ink-soft); }
.map__info a { transition: color 0.3s var(--ease); }
.map__info a:hover { color: var(--ember); }
.map__info .btn { margin-top: auto; }

/* ---------- Footer ---------- */
.footer { position: relative; background: var(--brown-900); color: var(--paper); padding-top: clamp(3rem, 6vw, 5rem); margin-top: clamp(2rem, 5vw, 4rem); }
.footer__inner { display: grid; grid-template-columns: 1.6fr 1fr 1.2fr 1fr; gap: 2.5rem; padding-bottom: 3rem; }
.footer__logo { width: 84px; height: 84px; filter: drop-shadow(0 3px 10px rgba(0,0,0,0.4)); margin-bottom: 1rem; }
.footer__brand p { color: rgba(239,226,194,0.72); font-size: 0.95rem; }
.footer__homage { color: var(--gold-bright); font-style: italic; }
.footer__col h4 { font-family: var(--font-label); font-size: 0.74rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold-bright); margin-bottom: 1rem; }
.footer__col a, .footer__col p { display: block; color: rgba(239,226,194,0.78); margin-bottom: 0.55rem; transition: color 0.3s var(--ease); }
.footer__col a:hover { color: var(--gold-bright); }
.footer__bar { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: 1.4rem; border-top: 1px solid rgba(239,226,194,0.14); font-family: var(--font-label); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(239,226,194,0.6); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  /* Sin menú hamburguesa en pantalla chica: se navega scrolleando y
     se vuelve arriba con el botón flotante. */
  .nav__links { display: none; }
  .toTop { display: grid; place-items: center; }

  .split { grid-template-columns: 1fr; }
  .map { grid-template-columns: 1fr; }
  .map__frame { min-height: 320px; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .footer__inner { grid-template-columns: 1fr; }
  .nav__brand-sub { display: none; }
  .hero { padding-top: 6rem; }
}
