/* ── VARIABLES ── */
:root {
  --adobe:   #C4602A;  /* barro cocido */
  --tierra:  #8B4A2F;  /* tierra oscura */
  --arena:   #F0E4CC;  /* papel antiguo */
  --humo:    #FAF5EC;  /* fondo claro */
  --verde:   #3B5E45;  /* maguey */
  --oro:     #D4A44C;  /* maíz dorado */
  --tinta:   #2A1F14;  /* tinta oscura */
  --r: 0.8rem;
}

/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Crimson Pro', Georgia, serif;
  color: var(--tinta);
  background: var(--humo);
  overflow-x: hidden;
}
h1, h2, h3 { font-family: 'Playfair Display', serif; line-height: 1.1; }
em { font-style: italic; color: var(--adobe); }

/* ── NAV ── */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: .9rem 2.5rem;
  background: rgba(250,245,236,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(196,96,42,.18);
  transition: box-shadow .3s;
}
#nav.scrolled { box-shadow: 0 2px 20px rgba(139,74,47,.15); }
.logo {
  font-family: 'Playfair Display', serif; font-size: 1.4rem;
  color: var(--adobe); letter-spacing: .12em;
}
#nav ul { list-style: none; display: flex; gap: 2rem; }
#nav a {
  text-decoration: none; font-size: .85rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--tierra);
  transition: color .25s;
}
#nav a:hover { color: var(--adobe); }
#burger { display: none; background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--tierra); }

/* ── REVEAL ANIMATION ── */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .8s ease, transform .8s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ── SECCIÓN BASE ── */
section {
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 7rem 10% 5rem;
  position: relative;
}
.label-sec {
  font-size: .75rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--adobe); margin-bottom: 1rem; display: block;
}
/* patrón de fondo reutilizable (SVG inline como bg) */
section::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 20 L20 0 L40 20 L20 40Z' fill='%238B4A2F'/%3E%3C/svg%3E");
  background-size: 40px 40px;
}

/* ── 1 INICIO ── */
.s-inicio {
  background: linear-gradient(160deg, #2A1F14 0%, #5C2E0E 55%, #8B4A2F 100%);
  align-items: flex-start;
}
.s-inicio::before { opacity: .06; }
.s-inicio h1 { font-size: clamp(3rem, 8vw, 7rem); color: var(--arena); }
.s-inicio .sub { color: var(--arena); opacity: .75; font-size: 1.2rem; margin: 1.5rem 0 2.5rem; max-width: 420px; }
.glyph { font-size: 3rem; color: var(--oro); margin-bottom: 1.5rem; animation: spin 20s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* botón scroll */
.btn-scroll {
  display: inline-block; padding: .7rem 2rem;
  border: 1.5px solid var(--oro); color: var(--oro);
  text-decoration: none; font-size: .85rem; letter-spacing: .15em; text-transform: uppercase;
  transition: background .3s, color .3s;
}
.btn-scroll:hover { background: var(--oro); color: var(--tinta); }

/* ── 2 MIEMBROS ── */
.s-miembros { background: var(--humo); }
.s-miembros h2 { font-size: clamp(2rem, 5vw, 4rem); margin-bottom: 3rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.5rem; }
.card {
  background: white; border-top: 3px solid var(--adobe);
  padding: 1.8rem 1.4rem; display: flex; flex-direction: column; gap: .4rem;
  box-shadow: 0 4px 20px rgba(139,74,47,.08);
  transition: transform .3s;
}
.card:hover { transform: translateY(-6px); }
.avatar { font-size: 2rem; color: var(--adobe); margin-bottom: .5rem; }
.card strong { font-family: 'Playfair Display', serif; font-size: 1.1rem; }
.card span { font-size: .9rem; color: var(--tierra); opacity: .8; }

/* ── 3 LIBROS ── */
.s-libros {
  background: linear-gradient(170deg, #3B5E45 0%, #2A4533 100%);
}
.s-libros::before { opacity: .08; }
.s-libros .label-sec { color: var(--oro); }
.s-libros h2 { color: var(--arena); font-size: clamp(2rem, 5vw, 4rem); margin-bottom: 3rem; }
.libros-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; }
.libro { background: rgba(255,255,255,.07); padding: 1.5rem; border-radius: 2px; transition: background .3s; }
.libro:hover { background: rgba(255,255,255,.13); }
.libro-img { height: 220px; margin-bottom: 1rem; border-radius: 2px; }
/* colores simbólicos para cada libro */
.l1 { background: linear-gradient(135deg, #C4602A, #8B4A2F); }
.l2 { background: linear-gradient(135deg, #D4A44C, #A07830); }
.l3 { background: linear-gradient(135deg, #3B5E45, #6B8F71); }
.libro h3 { font-family: 'Playfair Display', serif; color: var(--arena); font-size: 1.2rem; }
.libro p  { color: var(--arena); opacity: .65; font-size: .85rem; margin-top: .3rem; }

/* ── 4 COMUNIDAD ── */
.s-comunidad {
  background: var(--arena);
  text-align: center; align-items: center;
}
.s-comunidad h2 { font-size: clamp(2.5rem, 6vw, 5rem); margin-bottom: 3rem; }
.stats { display: flex; gap: 4rem; flex-wrap: wrap; justify-content: center; margin-bottom: 3rem; }
.stat { display: flex; flex-direction: column; align-items: center; }
.num { font-family: 'Playfair Display', serif; font-size: clamp(2.5rem,5vw,4.5rem); color: var(--adobe); }
.stat span:last-child { font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; color: var(--tierra); }
.quote { font-size: clamp(1rem,2.5vw,1.4rem); font-style: italic; max-width: 560px; color: var(--tierra); border-left: 3px solid var(--adobe); padding-left: 1.2rem; text-align: left; }

/* ── 5 HISTORIA ── */
.s-historia {
  background: linear-gradient(160deg, #1A0F08 0%, #2A1F14 100%);
}
.s-historia::before { opacity: .05; }
.s-historia .label-sec { color: var(--oro); }
.s-historia h2 { color: var(--arena); font-size: clamp(2rem, 5vw, 4rem); margin-bottom: 3rem; }
.timeline { max-width: 620px; }
.t-item { display: grid; grid-template-columns: 80px 1fr; gap: 1.5rem; padding: 1.4rem 0; border-bottom: 1px solid rgba(212,164,76,.2); }
.t-item:last-child { border-bottom: none; }
.t-year { font-family: 'Playfair Display', serif; font-size: 1.5rem; color: var(--oro); font-style: italic; }
.t-item p { color: var(--arena); opacity: .85; font-size: 1rem; align-self: center; }

/* ── 6 CONTACTO ── */
.s-contacto {
  background: var(--adobe);
  align-items: center; text-align: center;
}
.s-contacto .label-sec { color: rgba(255,255,255,.6); }
.s-contacto h2 { color: white; font-size: clamp(2.5rem,6vw,5rem); margin-bottom: 1rem; }
.s-contacto > p { color: rgba(255,255,255,.75); font-size: 1rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 2rem; }
.mailto {
  display: inline-block; color: white;
  font-size: clamp(1rem,2.5vw,1.5rem); text-decoration: none;
  border-bottom: 2px solid rgba(255,255,255,.4);
  padding-bottom: .2rem; transition: border-color .3s;
  margin-bottom: 2.5rem;
}
.mailto:hover { border-color: white; }
.redes { display: flex; gap: 2rem; margin-bottom: 4rem; }
.redes a { color: rgba(255,255,255,.75); text-decoration: none; letter-spacing: .12em; font-size: .85rem; text-transform: uppercase; transition: color .25s; }
.redes a:hover { color: white; }
.footer-note { color: rgba(255,255,255,.4); font-size: .75rem; letter-spacing: .1em; }

/* ── RESPONSIVE ── */
@media (max-width: 700px) {
  section { padding: 6rem 6% 4rem; }
  #nav ul { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--humo); padding: 1rem 2rem; gap: 1rem; }
  #nav ul.open { display: flex; }
  #burger { display: block; }
  .stats { gap: 2rem; }
}
