:root {
  --pergamino: #f6efe0;
  --pergamino-oscuro: #ecdfc4;
  --tinta: #3b2a1c;
  --tinta-suave: #6b5340;
  --dorado: #b8862b;
  --dorado-oscuro: #8f6718;
  --violeta: #5a4a7a;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--pergamino);
  color: var(--tinta);
  font-family: Georgia, "Palatino Linotype", Palatino, "Book Antiqua", serif;
  font-size: 1.1rem;
  line-height: 1.65;
}

a { color: inherit; }

/* Barra superior */
.barra {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
}
.marca {
  font-size: 1.15rem;
  font-weight: bold;
  text-decoration: none;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0,0,0,.6);
}
.barra nav { display: flex; gap: 1.2rem; }
.barra nav a {
  text-decoration: none;
  color: var(--tinta);
  font-size: .95rem;
  font-weight: bold;
}
.barra nav a:hover { text-decoration: underline; }

/* Portada */
.portada {
  --alto: max(56.25vw, 600px);
  position: relative;
  height: var(--alto);
  background: url("../img/cabecera-horizontal.webp") right center / cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
/* La imagen se ajusta a la altura de la portada y se ancla a la derecha:
   el pergamino ocupa el tercio derecho (aprox. del 66 % al 96 % del ancho) */
.portada-texto {
  --ancho-img: calc(var(--alto) * 1.7778);
  width: calc(var(--ancho-img) * 0.27);
  margin-right: calc(var(--ancho-img) * 0.055);
  padding: 4rem 0 3rem;
  text-align: center;
}
.sobretitulo {
  margin: 0 0 .4rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-size: .85rem;
  color: var(--dorado-oscuro);
}
h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.2rem, 4.2vw, 4rem);
  line-height: 1.05;
  color: var(--tinta);
}
.lema {
  margin: 0 auto 1.8rem;
  max-width: 26em;
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  color: var(--tinta-suave);
  font-style: italic;
}

.botones { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; }
.boton {
  display: inline-block;
  padding: .8rem 1.2rem;
  border: 2px solid var(--dorado);
  border-radius: 999px;
  color: var(--tinta);
  text-decoration: none;
  font-weight: bold;
  font-size: 1rem;
  background: rgba(255,255,255,.35);
  transition: transform .15s, background .15s;
}
.boton:hover { transform: translateY(-2px); background: rgba(255,255,255,.7); }
.boton.principal { background: var(--dorado); color: #fff; }
.boton.principal:hover { background: var(--dorado-oscuro); }

/* Secciones */
.seccion {
  max-width: 1000px;
  margin: 0 auto;
  padding: 4.5rem 1.5rem;
}
.seccion h2 {
  margin: 0 0 .5rem;
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  text-align: center;
}
.intro { text-align: center; color: var(--tinta-suave); margin: 0 0 2rem; }

.video {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(59,42,28,.25);
  background: #000;
}
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.nota { text-align: center; margin-top: 1.2rem; }
.nota a { color: var(--violeta); font-weight: bold; }

/* Quiénes somos */
.quienes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.quienes h2 { text-align: left; }
.quienes-imagen img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(59,42,28,.3);
}

/* Redes */
.redes { background: transparent; }
.lista-redes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.lista-redes a {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  height: 100%;
  padding: 1.3rem 1rem;
  text-align: center;
  text-decoration: none;
  background: var(--pergamino-oscuro);
  border: 1px solid #d9c79f;
  border-radius: 14px;
  transition: transform .15s, box-shadow .15s;
}
.lista-redes a:hover { transform: translateY(-3px); box-shadow: 0 8px 18px rgba(59,42,28,.2); }
.lista-redes strong { font-size: 1.15rem; }
.lista-redes span { font-size: .9rem; color: var(--tinta-suave); }

/* Pie */
.pie {
  text-align: center;
  padding: 2rem 1rem 3rem;
  color: var(--tinta-suave);
  font-size: .9rem;
}
.pie p { margin: 0; }

/* Móvil */
@media (max-width: 800px) {
  .portada {
    height: auto;
    min-height: 100svh;
    background-image: url("../img/cabecera-vertical.webp");
    background-position: center bottom;
    align-items: flex-start;
    justify-content: center;
  }
  .portada-texto {
    width: 100%;
    margin-right: 0;
    padding: 5.5rem 1.4rem 2rem;
  }
  .sobretitulo { color: #4a3a6a; }
  h1 { color: #2f2140; text-shadow: 0 1px 10px rgba(255,255,255,.7); }
  .lema { color: #3d3150; text-shadow: 0 1px 8px rgba(255,255,255,.7); }
  .barra nav { display: none; }

  .quienes { grid-template-columns: 1fr; gap: 1.8rem; }
  .quienes h2 { text-align: center; }
  .lista-redes { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .boton, .lista-redes a { transition: none; }
}
