
:root{
  --ink:#3a2014;
  --brown:#7a4d2e;
  --paper:#f3dfb9;
  --paper2:#e8cfa3;
  --gold:#b8862b;
  --green:#3e4a2e;
  --rose:#844b3f;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  min-height:100vh;
  font-family:"Cormorant Garamond", Georgia, serif;
  color:var(--ink);
  background:
    radial-gradient(circle at top, rgba(92,58,35,.42), transparent 45%),
    linear-gradient(180deg,#26170e 0%,#0c0704 100%);
}
a{color:inherit}
.home-sanchez{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
}
.open-book-home{
  width:min(1450px,98vw);
  min-height:calc(100vh - 36px);
  position:relative;
  overflow:hidden;
  border-radius:26px;
  padding:26px 48px 42px;
  background:
    linear-gradient(90deg, rgba(60,28,12,.38) 0 2.5%, transparent 8% 48%, rgba(90,55,24,.15) 49.5%, rgba(45,25,12,.18) 50%, transparent 51.5% 92%, rgba(55,28,12,.45) 98%),
    radial-gradient(circle at 20% 20%,rgba(255,255,255,.42),transparent 24%),
    radial-gradient(circle at 80% 16%,rgba(255,255,255,.30),transparent 22%),
    repeating-linear-gradient(12deg,rgba(75,40,18,.035) 0 2px, transparent 2px 11px),
    linear-gradient(90deg,#d9b986 0%,#f7e7c7 11%,#efd9b1 48%,#d2b17c 50%,#efd9b1 52%,#f7e7c7 89%,#d5b27c 100%);
  box-shadow:
    inset 0 0 0 3px rgba(120,70,33,.50),
    inset 0 0 0 12px rgba(80,40,18,.22),
    0 20px 55px rgba(0,0,0,.72);
}
.open-book-home:before,
.open-book-home:after{
  content:"";
  position:absolute;
  top:0; bottom:0;
  width:36px;
  background:linear-gradient(180deg,#4a2b19,#1e110b 45%,#4a2b19);
  opacity:.85;
  z-index:1;
}
.open-book-home:before{left:0;border-radius:22px 0 0 22px}
.open-book-home:after{right:0;border-radius:0 22px 22px 0}
.top-nav{
  position:relative;
  z-index:3;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:24px;
  padding:9px 18px 15px;
  border-bottom:1px solid rgba(77,42,22,.35);
  font-size:20px;
  font-weight:700;
}
.top-nav a{
  text-decoration:none;
  padding:6px 12px;
  border-bottom:1px solid rgba(77,42,22,.36);
}
.top-nav a:after{content:" ✧"; padding-left:14px; color:#8b5a2b}
.top-nav .brand-small{
  margin-left:auto;
  text-align:center;
  font-size:13px;
  line-height:1.05;
  border-left:1px solid rgba(77,42,22,.35);
  padding-left:20px;
}
.hero-book{
  position:relative;
  z-index:2;
  display:grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  gap:10px;
  min-height:390px;
  align-items:center;
  border-bottom:1px solid rgba(77,42,22,.26);
}
.hero-center{text-align:center; padding:20px 10px}
.ornament{font-size:26px;color:#74451f;margin-bottom:4px}
.hero-center h1{
  margin:0;
  font-family:"Cinzel", Georgia, serif;
  font-size:clamp(62px,8vw,118px);
  line-height:.82;
  letter-spacing:-3px;
  color:#4b2414;
  text-shadow: 0 2px 0 rgba(255,255,255,.35);
}
.hero-center h1 span{font-size:1.06em}
.hero-center h2{
  margin:18px 0 12px;
  font-size:31px;
  font-weight:700;
}
.hero-center p{
  margin:0 auto;
  font-style:italic;
  font-size:23px;
  line-height:1.25;
  max-width:460px;
}
.small-divider{margin:14px auto;color:#6d3c20}
.main-button,
.chapter-grid a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  min-width:250px;
  margin-top:10px;
  padding:13px 28px;
  color:#f7e6bb;
  text-decoration:none;
  font-size:18px;
  font-weight:700;
  font-style:italic;
  background:
    linear-gradient(180deg,rgba(255,255,255,.12),transparent),
    linear-gradient(90deg,#2f3b27,#53613d,#2f3b27);
  border:2px solid #aa7c35;
  border-radius:6px;
  box-shadow:0 6px 13px rgba(0,0,0,.25), inset 0 0 0 2px rgba(255,255,255,.08);
}
.hero-side{
  position:relative;
  min-height:350px;
}
.hero-left:before{
  content:"";
  position:absolute;
  left:0; top:28px;
  width:145px; height:200px;
  background:
    linear-gradient(90deg,#2b160b,#70461e 18%,#25120a 22%,#9c6a2a 28%,#2a170b 34%,#795122 54%,#29160b 60%,#a27432 66%,#2c170c 72%);
  border-radius:14px;
  box-shadow:0 18px 28px rgba(0,0,0,.23);
  transform:rotate(-4deg);
}
.hero-left:after{
  content:"✿ ✿ ✿";
  position:absolute;
  left:4px; top:0;
  font-size:45px;
  color:#faf0cf;
  text-shadow:0 2px 3px rgba(0,0,0,.2);
  transform:rotate(-12deg);
}
.hero-photo{
  margin:0;
  position:absolute;
  background:#f1dfbd;
  padding:10px;
  box-shadow:0 12px 22px rgba(50,25,10,.32);
  border:1px solid rgba(95,55,28,.35);
}
.hero-photo img{
  width:100%;
  height:100%;
  display:block;
  object-fit:contain;
  background:#e9d5b1;
}
.hero-photo.tilted{
  left:128px; top:40px;
  width:180px; height:208px;
  transform:rotate(4deg);
}
.stack-photo{
  right:90px; bottom:54px;
  width:190px; height:130px;
  transform:rotate(-6deg);
}
.window-view{
  position:absolute;
  right:95px; top:34px;
  width:220px; height:170px;
  border:9px solid rgba(112,64,30,.55);
  background:
    linear-gradient(rgba(255,244,213,.20),rgba(255,244,213,.12)),
    radial-gradient(circle at 60% 55%,#d6b47e 0 5%, transparent 6%),
    linear-gradient(150deg,#bad1d6 0 34%,#a88b58 35% 41%,#e3c48d 42% 53%,#6c7a55 54% 100%);
  box-shadow:0 12px 25px rgba(0,0,0,.18);
}
.note{
  position:absolute;
  width:150px;
  min-height:120px;
  padding:22px 14px;
  background:#ead7ad;
  box-shadow:0 10px 20px rgba(0,0,0,.20);
  font-family:"Great Vibes", cursive;
  color:#5a321f;
  font-size:25px;
  line-height:1.05;
  text-align:center;
}
.note-left{left:28px; bottom:20px; transform:rotate(-9deg)}
.note-right{right:18px; bottom:28px; transform:rotate(7deg)}
.hero-right:after{
  content:"✿ ✿ ✿";
  position:absolute;
  right:0; top:45px;
  font-size:48px;
  color:#f2d0b0;
  text-shadow:0 2px 3px rgba(0,0,0,.22);
  transform:rotate(9deg);
}
.section-head{
  text-align:center;
  position:relative;
  z-index:2;
}
.section-head h2{
  margin:14px 0 0;
  font-size:45px;
  font-style:italic;
  line-height:1;
}
.section-head h2:before,
.section-head h2:after{
  content:"❧";
  display:inline-block;
  margin:0 22px;
  color:#7c4c24;
}
.section-head p{
  margin:4px auto 8px;
  font-size:18px;
  font-style:italic;
}
.section-head>a{
  position:absolute;
  right:35px;
  top:12px;
  color:#72471f;
  font-weight:700;
  text-decoration:none;
}
.album-row{
  display:grid;
  grid-template-columns:42px repeat(6, 1fr) 42px;
  gap:13px;
  align-items:center;
  margin:14px 0 24px;
}
.album-row figure{
  margin:0;
  padding:8px 8px 6px;
  background:#e8d2ac;
  border:1px solid rgba(105,60,28,.25);
  box-shadow:0 6px 10px rgba(80,40,15,.18);
  transform:rotate(var(--rot, -1deg));
  position:relative;
}
.album-row figure:nth-of-type(even){--rot:1.5deg}
.album-row img{
  width:100%;
  height:105px;
  object-fit:contain;
  background:#d8bf96;
  display:block;
}
.album-row figcaption{
  font-style:italic;
  font-size:17px;
  margin-top:6px;
}
.round-arrow{
  width:38px;height:38px;border-radius:50%;
  border:1px solid rgba(100,60,28,.35);
  background:#f3dfbd;
  color:#6a3f20;
  font-size:32px;
  line-height:1;
}
.chapters{
  border-top:1px solid rgba(77,42,22,.25);
  padding-top:6px;
}
.chapter-grid{
  display:grid;
  grid-template-columns:repeat(6,1fr);
  gap:12px;
  margin-top:10px;
}
.chapter-grid article{
  text-align:center;
  background:rgba(255,238,201,.45);
  border:1px solid rgba(115,70,32,.25);
  padding:10px 9px 12px;
  min-height:215px;
  box-shadow:inset 0 0 28px rgba(138,88,42,.08);
}
.chapter-grid img{
  width:100%;
  height:82px;
  display:block;
  object-fit:contain;
  background:#e0c8a1;
  margin-bottom:8px;
}
.chapter-grid h3{font-size:18px;margin:3px 0;color:#4b2716}
.chapter-grid p{font-size:15px;line-height:1.15;margin:0 0 8px}
.chapter-grid a{
  min-width:auto;
  width:92%;
  padding:8px 10px;
  font-size:14px;
  margin-top:4px;
}
.chapter-grid article:nth-child(even) a{
  background:linear-gradient(180deg,rgba(255,255,255,.12),transparent),linear-gradient(90deg,#703d31,#9b5e4d,#703d31);
}

/* PÁGINAS INTERIORES: mantener texto e imágenes en su orden original */
body:not(.home-sanchez){
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:28px 18px;
  background:
    radial-gradient(circle at center,rgba(120,80,45,.20),transparent 42%),
    linear-gradient(180deg,#21150d,#080503);
}
.scene{
  width:min(1180px,96vw);
  perspective:1600px;
}
.page{
  position:relative;
  width:100%;
  min-height:78vh;
  padding:52px clamp(20px,4vw,60px);
  border-radius:26px;
  overflow:hidden;
  background:
    linear-gradient(90deg,rgba(65,35,16,.20) 0 3%, transparent 9% 48%,rgba(80,45,20,.15) 50%,transparent 52% 91%,rgba(65,35,16,.24) 98%),
    radial-gradient(circle at 30% 15%,rgba(255,255,255,.42),transparent 28%),
    repeating-linear-gradient(13deg,rgba(89,52,25,.035) 0 2px,transparent 2px 11px),
    linear-gradient(90deg,#d4b684,#f5e3c0 12%,#ecd4aa 48%,#d0ad76 50%,#ecd4aa 52%,#f5e3c0 88%,#d4b684);
  box-shadow:0 26px 70px rgba(0,0,0,.60), inset 0 0 0 4px rgba(92,55,26,.35);
}
.page:before{
  content:"";
  position:absolute;
  inset:18px;
  border:1.5px solid rgba(111,67,31,.38);
  border-radius:18px;
  pointer-events:none;
  box-shadow:inset 0 0 35px rgba(105,68,35,.10);
}
.page:after{
  content:"";
  position:absolute;
  top:20px; bottom:20px; left:50%;
  width:1px;
  background:linear-gradient(transparent,rgba(70,35,15,.30),transparent);
  pointer-events:none;
}
header{text-align:center;margin:0 auto 24px;position:relative;z-index:1}
header h1{
  margin:0;
  font-family:"Cinzel", Georgia, serif;
  font-size:clamp(32px,5vw,58px);
  color:#4b2516;
  text-shadow:0 1px 0 rgba(255,255,255,.45);
}
header h1:before, header h1:after{content:" ❧ "; color:#7d4b23; font-family:Georgia,serif}
h2,h3{
  position:relative;
  z-index:1;
  text-align:center;
}
h2{font-size:32px;color:#4b2516}
h3{
  max-width:980px;
  margin:0 auto;
  font-size:21px;
  line-height:1.55;
  font-weight:500;
  color:#3b2418;
}
p{font-size:20px;line-height:1.58}
.photos{
  position:relative;
  z-index:2;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(210px,1fr));
  gap:22px;
  align-items:start;
  justify-items:center;
  margin-top:24px;
}
.photos img,
.page img{
  display:block;
  max-width:100%;
  width:auto;
  height:auto;
  max-height:520px;
  object-fit:contain!important;
  object-position:center center!important;
  margin:18px auto;
  padding:10px;
  background:#f1dfbd;
  border:1px solid rgba(90,55,25,.28);
  box-shadow:0 10px 22px rgba(55,30,14,.28);
}
.photos img{
  width:100%;
  height:260px!important;
}
.page > img,
main.page img:not(.photos img){
  max-width:min(720px,100%);
}
.nav{
  position:relative;
  z-index:2;
  margin-top:34px;
  display:flex;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
}
.nav a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:150px;
  padding:11px 18px;
  color:#f7e6bb;
  text-decoration:none;
  font-weight:700;
  background:linear-gradient(90deg,#35412d,#59653f,#35412d);
  border:2px solid #aa7c35;
  border-radius:6px;
  box-shadow:0 6px 13px rgba(0,0,0,.25);
}
@media(max-width:1100px){
  .open-book-home{padding:18px 26px}
  .hero-book{grid-template-columns:1fr;min-height:auto}
  .hero-side{display:none}
  .album-row{grid-template-columns:repeat(2,1fr)}
  .round-arrow{display:none}
  .chapter-grid{grid-template-columns:repeat(2,1fr)}
  .section-head>a{position:static;display:block;margin:8px auto}
}
@media(max-width:680px){
  .home-sanchez{padding:0}
  .open-book-home{border-radius:0;width:100vw;padding:10px 15px 30px}
  .top-nav{gap:6px;flex-wrap:wrap;font-size:16px}
  .top-nav .brand-small{width:100%;margin:6px auto 0;border-left:0}
  .hero-center h1{font-size:58px}
  .album-row,.chapter-grid{grid-template-columns:1fr}
  .album-row img{height:190px}
  .page{padding:34px 18px}
  h3{font-size:18px}
}
