/* Daniella Ley books. Palette and type taken from «Una maleta llena de diciembre»:
   warm paper, bottle green, raspberry, mustard, coral, dusty rose and plum.
   Headings: Fraunces. Text: Alegreya. Hand lettering: Caveat. */
:root {
  --paper: #f6ecdd;
  --paper-2: #efe4de;
  --ink: #3a2c27;
  --muted: #76625a;
  --green: #1f4a42;
  --green-2: #2f6a5c;
  --rasp: #9c1f52;
  --mustard: #e2a530;
  --coral: #e4573d;
  --rose: #e7b3bd;
  --plum: #5b2c5e;
  --peach: #f3c9a8;
  --radius: 20px;
  --wa-bg: #25d366;
  --notice-accent: var(--green);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Alegreya, Georgia, serif; font-size: 1.12rem; line-height: 1.6; overflow-x: hidden; }
h1, h2, h3 { font-family: Fraunces, Georgia, serif; font-weight: 800; line-height: 1.08; margin: 0 0 .4em; color: var(--green); }
h2 { font-size: clamp(1.9rem, 4.2vw, 2.8rem); }
a { color: var(--rasp); }
img { max-width: 100%; height: auto; display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.small { font-size: .92rem; }
.muted { color: var(--muted); }
.script { font-family: Caveat, cursive; color: var(--rasp); font-weight: 700; font-size: 1.35em; line-height: .8; display: inline-block; transform: rotate(-3deg); position: relative; }
.script::after { content: ""; position: absolute; left: 4%; right: 2%; bottom: -.08em; height: .12em; background: var(--mustard); border-radius: 99px; transform: rotate(-1deg); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; background: rgba(246,236,221,.94); backdrop-filter: blur(8px); border-bottom: 1px solid #e4d4bf; }
.brand { font-family: Fraunces, serif; font-weight: 800; font-size: 1.3rem; color: var(--green); text-decoration: none; display: flex; align-items: center; gap: 8px; }
.brand-star { color: var(--mustard); font-size: 1.3rem; display: inline-block; animation: twinkle 3s ease-in-out infinite; }
.site-header nav { display: flex; gap: 2px; align-items: center; }
.site-header nav a { color: var(--ink); text-decoration: none; font-weight: 700; padding: 6px 12px; border-radius: 99px; }
.site-header nav a:hover { background: #eadbc7; }
.site-header .nav-cta { background: var(--rasp); color: #fff; }
.site-header .nav-cta:hover { background: var(--green); }
@media (max-width: 680px) { .site-header nav a:not(.nav-cta) { display: none; } }

/* Buttons */
.btn { display: inline-block; font: 700 1.08rem Fraunces, serif; padding: 13px 26px; border-radius: 99px; text-decoration: none; border: 2px solid var(--green); cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s; }
.btn-primary { background: var(--rasp); border-color: var(--rasp); color: #fff; box-shadow: 0 4px 0 #6d1239; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 0 #6d1239; }
.btn-primary:disabled { background: #cdbcb2; border-color: #cdbcb2; box-shadow: none; transform: none; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--green); }
.btn-ghost:hover { background: var(--green); color: #fff; }
.btn-block { width: 100%; text-align: center; }

/* Hero */
.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; max-width: 1140px; margin: 0 auto; padding: 56px 20px 80px; }
.pill { display: inline-block; background: var(--green); color: var(--paper); font-weight: 700; font-size: .95rem; padding: 4px 16px; border-radius: 99px; margin: 0 0 18px; }
.hero h1 { font-size: clamp(2.6rem, 6.4vw, 4.8rem); }
.lead { font-size: 1.3rem; font-style: italic; color: var(--ink); margin: .6em 0 .3em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.hero-book { position: relative; display: grid; place-items: center; }
.hero-book::before { content: ""; position: absolute; inset: 8% -4% -2% 6%; border-radius: 46% 54% 40% 60% / 55% 45% 55% 45%; background: var(--rose); opacity: .55; animation: blob 14s ease-in-out infinite; }
.book-cover { position: relative; width: min(380px, 100%); border-radius: 6px 14px 14px 6px; box-shadow: -8px 0 0 var(--green-2) inset, 0 24px 50px rgba(58,44,39,.32); transform: rotate(3deg); transition: transform .4s; }
.book-cover:hover { transform: rotate(0) translateY(-6px); }
.spark { position: absolute; color: var(--mustard); font-size: 2.2rem; z-index: 1; animation: twinkle 2.8s ease-in-out infinite; }
.s1 { top: -10px; left: 6%; } .s2 { top: 28%; right: -6px; animation-delay: -1s; font-size: 1.5rem; } .s3 { bottom: 6%; left: -4px; animation-delay: -2s; font-size: 1.7rem; color: var(--coral); }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; padding-top: 28px; text-align: center; } .hero-actions { justify-content: center; } .hero-book { order: -1; } .book-cover { width: min(270px, 70vw); } }

/* Quote */
.quote-band { background: var(--green); color: var(--paper); padding: 64px 20px; text-align: center; }
.quote-band blockquote { margin: 0 auto; max-width: 820px; }
.quote-band blockquote p { font: 600 clamp(1.6rem, 3.6vw, 2.4rem)/1.25 Fraunces, serif; margin: 0 0 12px; }
.quote-band strong { color: var(--mustard); }
.quote-band cite { font-style: italic; opacity: .8; }
.quote-more { max-width: 640px; margin: 22px auto 0; opacity: .92; }

/* Nights */
.nights { padding: 72px 20px; text-align: center; }
.section-lead { margin: 0 auto 32px; max-width: 36em; color: var(--muted); }
.flip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 16px; max-width: 1060px; margin: 0 auto; }
.flip-card { position: relative; height: 190px; border: 0; padding: 0; background: none; cursor: pointer; perspective: 900px; font: inherit; color: var(--ink); }
.flip-front, .flip-back { position: absolute; inset: 0; border-radius: var(--radius); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; backface-visibility: hidden; transition: transform .55s; }
.flip-front { font: 700 1.18rem/1.15 Fraunces, serif; gap: 8px; border: 2px dashed rgba(255,255,255,.55); outline: 6px solid transparent; }
.flip-front small { font: 700 .8rem Alegreya, serif; letter-spacing: .14em; text-transform: uppercase; opacity: .85; }
.flip-back { transform: rotateY(180deg); background: #fff; border: 2px solid var(--green); font-size: 1rem; line-height: 1.35; }
.flip-card[aria-pressed="true"] .flip-front { transform: rotateY(-180deg); }
.flip-card[aria-pressed="true"] .flip-back { transform: rotateY(0); }
.flip-card:hover .flip-front { transform: rotate(-2deg) translateY(-3px); }
.flip-card[aria-pressed="true"]:hover .flip-front { transform: rotateY(-180deg); }
.c1 .flip-front { background: var(--rasp); color: #fff; } .c2 .flip-front { background: var(--green); color: #fff; }
.c3 .flip-front { background: var(--mustard); color: var(--ink); border-color: rgba(58,44,39,.3); } .c4 .flip-front { background: var(--plum); color: #fff; }
.c5 .flip-front { background: var(--coral); color: #fff; } .c6 .flip-front { background: var(--rose); color: var(--ink); border-color: rgba(58,44,39,.3); }
@media (max-width: 500px) { .flip-grid { grid-template-columns: 1fr 1fr; gap: 12px; } .flip-card { height: 170px; } .flip-front { font-size: 1.02rem; } .flip-back { font-size: .9rem; padding: 12px; } }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; max-width: 1180px; margin: 0 auto; padding: 8px 20px 72px; }
.gallery figure { margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: 0 14px 30px rgba(58,44,39,.18); transition: transform .3s; }
.gallery img { width: 100%; aspect-ratio: 2/3; object-fit: cover; }
.gallery .g1 { transform: rotate(-2deg); } .gallery .g2 { transform: translateY(24px) rotate(1.5deg); }
.gallery .g3 { transform: rotate(-1deg); } .gallery .g4 { transform: translateY(18px) rotate(2deg); }
.gallery figure:hover { transform: scale(1.03) rotate(0); }
@media (max-width: 760px) { .gallery { grid-template-columns: 1fr 1fr; } }

/* Invent */
.invent { display: grid; grid-template-columns: 1.2fr .8fr; gap: 32px; align-items: center; max-width: 1000px; margin: 0 auto; padding: 32px 20px 80px; }
.invent-card { position: relative; background: var(--rose); border-radius: 28px; padding: 44px 32px 32px; }
.invent-card h2 { color: var(--ink); }
.tape { position: absolute; top: -16px; left: 24px; background: #cfc2e3; color: var(--ink); font: 700 1.05rem Fraunces, serif; padding: 6px 18px; transform: rotate(-3deg); box-shadow: 0 2px 0 rgba(0,0,0,.08); }
.hand { font: 700 1.5rem/1.5 Caveat, cursive; color: var(--plum); background: #fffaf0; border-radius: 6px; padding: 14px 18px; transform: rotate(1deg); margin: 18px 0 0; }
.invent figure { margin: 0; border-radius: var(--radius); overflow: hidden; transform: rotate(3deg); box-shadow: 0 14px 30px rgba(58,44,39,.2); }
@media (max-width: 760px) { .invent { grid-template-columns: 1fr; } .invent figure { max-width: 300px; margin: 0 auto; } }

/* Bands and offers */
.band { padding: 72px 20px; text-align: center; }
.band-cream { background: var(--paper-2); }
.offer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 26px; max-width: 800px; margin: 0 auto; }
.offer { position: relative; background: #fffaf3; border: 2px solid var(--green); border-radius: var(--radius); padding: 36px 24px 28px; box-shadow: 0 8px 0 var(--green); }
.offer-featured { border-color: var(--rasp); box-shadow: 0 8px 0 var(--rasp); }
.badge { display: inline-block; background: var(--mustard); color: var(--ink); font-size: .85rem; font-weight: 700; padding: 3px 12px; border-radius: 99px; }
.offer .badge { position: absolute; top: -14px; left: 50%; transform: translateX(-50%) rotate(-2deg); white-space: nowrap; }
.price { font: 800 2.6rem Fraunces, serif; margin: 0; color: var(--rasp); }
.price-alt { font-size: 1.1rem; color: var(--muted); font-weight: 600; }
.offer-note { color: var(--muted); min-height: 3.4em; }

/* Reader teaser */
.reader-teaser { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; max-width: 1040px; margin: 0 auto; padding: 80px 20px; }
.devices { position: relative; height: 300px; }
.device { position: absolute; background: #2b211d; border-radius: 22px; padding: 10px; box-shadow: 0 18px 36px rgba(58,44,39,.28); }
.device .screen { width: 100%; height: 100%; border-radius: 12px; overflow: hidden; display: flex; background: var(--paper-2); }
.device .screen img { width: 50%; height: 100%; object-fit: cover; }
.phone .screen img { width: 100%; }
.tablet { width: 380px; height: 290px; left: 0; top: 0; }
.phone { width: 135px; height: 250px; right: 0; top: 50px; transform: rotate(6deg); }
@media (max-width: 800px) { .reader-teaser { grid-template-columns: 1fr; text-align: center; } .devices { max-width: 360px; margin: 0 auto; width: 100%; height: 240px; } .tablet { width: 290px; height: 220px; } .phone { width: 105px; height: 195px; } }

/* Author */
.author-teaser { display: flex; gap: 32px; align-items: center; max-width: 840px; margin: 0 auto; padding: 24px 20px 72px; }
.author-photo { flex: none; width: 150px; height: 150px; border-radius: 50%; background: var(--plum); color: #fff; display: grid; place-items: center; font: 800 2.6rem Fraunces, serif; border: 6px solid var(--mustard); }
.author-photo.big { width: 190px; height: 190px; margin: 0 auto 20px; }
@media (max-width: 600px) { .author-teaser { flex-direction: column; text-align: center; } }

/* Subscribe */
.subscribe { padding: 0 16px 72px; }
.subscribe-inner { position: relative; max-width: 900px; margin: 0 auto; background: var(--green); color: var(--paper); border-radius: 32px; padding: 48px 28px; text-align: center; overflow: hidden; }
.subscribe-inner::before, .subscribe-inner::after { content: "✦"; position: absolute; color: var(--mustard); font-size: 3rem; }
.subscribe-inner::before { top: 18px; left: 26px; } .subscribe-inner::after { bottom: 14px; right: 30px; font-size: 2rem; color: var(--rose); }
.subscribe h2 { color: var(--paper); }
.subscribe-form { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 22px 0 8px; }
.subscribe-form input, .login-form input { font: inherit; padding: 12px 18px; border-radius: 99px; border: 2px solid transparent; min-width: 0; flex: 1 1 200px; max-width: 280px; }
.login-form input { border-color: var(--green); }
.subscribe-form button { font: 700 1.05rem Fraunces, serif; padding: 12px 26px; border-radius: 99px; border: 0; background: var(--mustard); color: var(--ink); cursor: pointer; }
.subscribe-form button:hover { background: #fff; }
.form-msg { flex-basis: 100%; margin: 4px 0 0; font-weight: 700; min-height: 1.4em; }

/* FAQ and pages */
.faq-short { max-width: 760px; margin: 0 auto; padding: 24px 20px 72px; }
details { background: #fffaf3; border: 1.5px solid #d9c6ae; border-radius: 16px; padding: 12px 18px; margin: 10px 0; }
details[open] { border-color: var(--green); }
summary { font-weight: 700; cursor: pointer; }
.page { max-width: 760px; margin: 0 auto; padding: 48px 20px 64px; }
.page.center { text-align: center; }
.big-emoji { font-size: 4rem; }
.legal h2 { font-size: 1.4rem; margin-top: 1.4em; }
.login-form { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 20px 0; }

/* Checkout */
.checkout { max-width: 1000px; margin: 0 auto; padding: 24px 20px 64px; }
.back { font-weight: 700; text-decoration: none; }
.checkout-grid { display: grid; grid-template-columns: 300px 1fr; gap: 32px; margin-top: 18px; align-items: start; }
@media (max-width: 760px) { .checkout-grid { grid-template-columns: 1fr; } }
.summary { background: var(--paper-2); border-radius: var(--radius); padding: 28px 22px; text-align: center; position: sticky; top: 90px; }
@media (max-width: 760px) { .summary { position: static; } }
.summary .book-cover { width: 160px; margin: 0 auto 18px; transform: rotate(-2deg); }
.summary h1 { font-size: 1.6rem; }
.totals { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; text-align: left; border-top: 2px dashed #cdb9a2; padding-top: 12px; }
.totals dt, .totals dd { margin: 0; } .totals dd { font-weight: 700; }
.order-form, .pay-card { background: #fffaf3; border: 2px solid var(--green); border-radius: var(--radius); padding: 24px; box-shadow: 0 8px 0 var(--green); }
.order-form h2, .pay-card h2 { font-size: 1.4rem; }
.order-form h2 { margin-top: 1em; display: flex; align-items: center; gap: 10px; }
.order-form h2:first-child { margin-top: 0; }
.step { display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--rasp); color: #fff; font-size: 1.05rem; }
.order-form label { display: block; font-weight: 700; margin: 10px 0; font-size: 1rem; }
.order-form input { display: block; width: 100%; font: inherit; font-weight: 400; margin-top: 4px; padding: 11px 14px; border: 1.5px solid #cdb9a2; border-radius: 12px; background: #fff; }
.order-form input:focus { outline: none; border-color: var(--rasp); box-shadow: 0 0 0 3px rgba(156,31,82,.15); }
.order-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 500px) { .order-form .row { grid-template-columns: 1fr; } }
.yape { display: flex; gap: 16px; align-items: center; background: #f3e6ef; border-radius: 16px; padding: 14px; margin: 10px 0; }
.yape img { flex: none; border-radius: 12px; }
@media (max-width: 500px) { .yape { flex-direction: column; text-align: center; } }
.pay-options { display: grid; gap: 26px; }
.order-form.compact { border: 0; box-shadow: none; padding: 0; background: none; }

/* Footer */
.textile { height: 18px; background:
  linear-gradient(135deg, var(--rasp) 25%, transparent 25%) -9px 0/18px 18px,
  linear-gradient(225deg, var(--coral) 25%, transparent 25%) -9px 0/18px 18px,
  linear-gradient(315deg, var(--mustard) 25%, transparent 25%) 0 0/18px 18px,
  linear-gradient(45deg, var(--mustard) 25%, var(--paper) 25%) 0 0/18px 18px; }
.footer-wrap { background: var(--green); color: var(--paper); }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; padding: 28px 20px 0; font-weight: 700; }
.footer-nav a { color: var(--mustard); text-decoration: none; }
.site-footer { color: #cfe0d8; }

@keyframes twinkle { 50% { transform: scale(.75) rotate(20deg); opacity: .7; } }
@keyframes blob { 50% { border-radius: 58% 42% 52% 48% / 45% 55% 45% 55%; transform: rotate(4deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }
