/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg: #faf5eb;
  --bg-alt: #e0f4ed;
  --text: #1b1b1b;
  --text-soft: #5c5850;
  --accent: #3a9c85;
  --accent-dark: #2c8571;
  --cream: #ffffff;
  --border: #dbe8e1;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --radius: 14px;
  --container: 1120px;
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
p { text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; line-height: 1.1; letter-spacing: -0.01em; font-family: var(--serif); font-weight: 600; }

::selection { background: var(--accent); color: var(--cream); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* =============================================================
   3. Utilities
   ============================================================= */
.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: .6rem 1rem; background: var(--cream); color: var(--text);
  z-index: 9999; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 1rem; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* =============================================================
   4. Components
   ============================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .8rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  transition: transform .25s var(--ease-out), background .25s var(--ease-out), box-shadow .25s var(--ease-out);
}
.btn-primary {
  background: var(--accent-dark);
  color: var(--cream);
}
.btn-primary:hover { background: var(--accent); transform: translateY(-2px); box-shadow: 0 10px 24px -12px rgba(107,79,54,.5); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--cream); transform: translateY(-2px); }
.btn-nav {
  padding: .55rem 1.2rem;
  background: var(--accent-dark);
  color: var(--cream);
  font-size: .85rem;
}
.btn-nav:hover { background: var(--accent); }
.btn-cream { background: var(--cream); color: var(--accent-dark); }
.btn-cream:hover { background: var(--bg); transform: translateY(-2px); }

.card {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out);
}
.card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -24px rgba(42,37,31,.25); }
.card h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.card p { color: var(--text-soft); font-size: .95rem; }
.card-link { margin-top: 1rem; padding: .55rem 1.1rem; font-size: .85rem; }
.card-img { width: 100%; border-radius: 10px; margin-bottom: 1rem; aspect-ratio: 3/4; object-fit: cover; }

.audience-tag {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  padding: .2rem .6rem;
  border-radius: 999px;
  margin-bottom: .5rem;
}
.audience-mayores { background: var(--bg-alt); color: var(--accent-dark); }
.audience-todos { background: #f1ede4; color: var(--text-soft); }
.audience-familia { background: #fbe8ee; color: #b3486a; }
.audience-ninos { background: #fef1d8; color: #a8710f; }
.audience-jovenes { background: #e3ecfb; color: #3159a8; }

.contact-card {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: grid;
  gap: .6rem;
  max-width: 460px;
}

/* =============================================================
   5. Sections
   ============================================================= */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250, 247, 242, .85);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  border-bottom: 1px solid var(--border);
}
@supports not (backdrop-filter: blur(1px)) {
  .nav { background: var(--bg); }
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding-block: .9rem;
  gap: 1rem;
}
.nav-brand { font-family: var(--serif); font-weight: 600; font-size: 1.15rem; }
.nav-links { display: none; align-items: center; gap: 1.1rem; font-size: .88rem; flex-wrap: wrap; }
.nav-links a { transition: color .2s var(--ease-out); }
.nav-links a:hover { color: var(--accent-dark); }

.nav-item { position: relative; }
.nav-item > a::after { content: " ▾"; font-size: .7em; opacity: .6; }
.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translate(-50%, 4px);
  min-width: 200px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .4rem;
  box-shadow: 0 16px 32px -16px rgba(27,27,27,.25);
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s var(--ease-out), transform .18s var(--ease-out);
  z-index: 200;
}
.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}
.nav-dropdown a {
  display: block;
  padding: .55rem .75rem;
  border-radius: 8px;
  font-size: .85rem;
  white-space: nowrap;
}
.nav-dropdown a::after { content: none; }
.nav-dropdown a:hover { background: var(--bg-alt); }

.hero {
  padding-block: 4.5rem 3.5rem;
  text-align: center;
}
.eyebrow {
  color: var(--accent-dark);
  font-weight: 600;
  font-size: .85rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  max-width: 16ch;
  margin-inline: auto;
}
.hero-lead {
  margin-top: 1.25rem;
  color: var(--text-soft);
  max-width: 46ch;
  margin-inline: auto;
  font-size: 1.05rem;
}
.hero-actions {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: .8rem;
  align-items: center;
}

.section { padding-block: 3.5rem; }
.section-alt { background: var(--bg-alt); }
.section h2 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  margin-bottom: 1.5rem;
}
.section-lead {
  color: var(--text-soft);
  max-width: 60ch;
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
}

.grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

.footer {
  padding-block: 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-soft);
  font-size: .875rem;
}

/* =============================================================
   6. Responsive (mobile-first)
   ============================================================= */
@media (min-width: 540px) {
  .hero-actions { flex-direction: row; justify-content: center; }
}

@media (min-width: 720px) {
  .nav-links { display: flex; }
  .grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 960px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .hero { padding-block: 6.5rem 5rem; }
}

@media (min-width: 1280px) {
  .hero h1 { max-width: 20ch; }
}

/* =============================================================
   7. Club de lectura
   ============================================================= */
.hero-compact { padding-block: 3rem 2.5rem; }
.hero-compact h1 { max-width: 20ch; }

.curso-block { margin-bottom: 3rem; }
.curso-block:last-child { margin-bottom: 0; }
.curso-block h2 {
  font-size: clamp(1.4rem, 3.5vw, 1.9rem);
  margin-bottom: 1.5rem;
  padding-bottom: .6rem;
  border-bottom: 2px solid var(--border);
}

.book-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 540px) { .book-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 720px) { .book-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1280px) { .book-grid { grid-template-columns: repeat(4, 1fr); } }

.book-card {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out);
}
.book-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -24px rgba(27,27,27,.25); }
.book-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: var(--bg-alt);
}
.book-card-body { padding: 1.1rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.book-card-body h3 { font-size: 1rem; line-height: 1.25; }
.book-autor { color: var(--text-soft); font-size: .85rem; margin-bottom: .3rem; }
.book-actions { margin-top: auto; display: flex; flex-direction: column; gap: .5rem; padding-top: .6rem; }
.btn-sm { padding: .55rem 1rem; font-size: .82rem; width: 100%; }

.amazon-disclosure {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-soft);
  font-size: .82rem;
  max-width: 65ch;
}
.amazon-disclosure a { text-decoration: underline; }

.poster-block {
  display: grid;
  gap: 1.25rem;
  max-width: 420px;
}
.poster-block img {
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.book-reco {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1.25rem;
  align-items: center;
  padding: 1.25rem;
  max-width: 480px;
}
.book-reco img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 8px;
}
.book-reco .book-card-body { padding: 0; }
.book-reco .btn-sm { width: auto; padding: .6rem 1.25rem; }

.news-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .news-grid { grid-template-columns: repeat(2, 1fr); } }

.news-card {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.news-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: top;
}
.news-card-body { padding: 1.25rem; display: flex; flex-direction: column; gap: .5rem; }
.news-date {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--accent-dark);
}
.news-card-body h3 { font-size: 1.1rem; }
.news-card-body p { color: var(--text-soft); font-size: .92rem; }

.news-card.is-past { opacity: .65; filter: grayscale(.5); }
.news-card.is-past .news-date { color: var(--text-soft); }

.legal-content { max-width: 72ch; }
.legal-content h2 {
  font-size: 1.25rem;
  margin-top: 2.25rem;
  margin-bottom: .75rem;
}
.legal-content h2:first-child { margin-top: 0; }
.legal-content p { color: var(--text-soft); margin-bottom: .9rem; }
.legal-content ul { margin: 0 0 .9rem 1.25rem; color: var(--text-soft); }
.legal-content li { margin-bottom: .4rem; }
.legal-updated { font-size: .85rem; margin-top: 2.5rem; font-style: italic; }

.map-embed {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 1.25rem;
}
.map-embed iframe { width: 100%; height: 100%; border: 0; display: block; }
.map-link { display: inline-block; margin-top: .6rem; font-size: .85rem; text-decoration: underline; text-underline-offset: 2px; }

.promo-banner { background: var(--accent-dark); color: var(--cream); }
.promo-banner-inner { max-width: 640px; }
.promo-eyebrow { color: var(--bg-alt); }
.promo-banner h2 { color: var(--cream); font-size: clamp(1.5rem, 3.5vw, 2rem); margin-bottom: .9rem; }
.promo-lead { color: rgba(255,255,255,.85); font-size: 1.02rem; margin-bottom: 1.25rem; }
.promo-features { list-style: none; display: grid; gap: .55rem; margin-bottom: 1.75rem; }
.promo-features li { position: relative; padding-left: 1.5rem; font-size: .92rem; color: rgba(255,255,255,.92); }
.promo-features li::before { content: "✓"; position: absolute; left: 0; font-weight: 700; color: var(--bg-alt); }

.places-list {
  display: grid;
  gap: .75rem;
  grid-template-columns: 1fr;
  margin-top: 1.5rem;
}
@media (min-width: 720px) { .places-list { grid-template-columns: repeat(2, 1fr); } }
.place-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out);
}
.place-chip:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -18px rgba(42,37,31,.3); }
.place-chip-name { font-weight: 600; font-size: .95rem; }
.place-chip-tag { color: var(--text-soft); font-size: .8rem; }
.place-chip-arrow { color: var(--accent-dark); font-weight: 600; flex-shrink: 0; }

.contact-card a,
.section-lead a { text-decoration: underline; text-underline-offset: 2px; }
