/* =============================================================
   GUARIDA — "Noche literaria"
   Medianoche + azul de marca + cobre cálido + papel crema
   Los colores base se pueden cambiar desde config.json (paletas)
   ============================================================= */

/* ── Tokens ─────────────────────────────────────────────────── */
:root {
  --bg:          #F6EFE3;   /* papel crema */
  --bg-dark:     #06121D;   /* tinta / medianoche */
  --bg-card:     #FFFFFF;
  --text:        #14212C;
  --text-muted:  #5C6975;
  --accent:      #E8A064;   /* cobre cálido (sobre fondos oscuros) */
  --accent-dark: #9C4F17;   /* cobre profundo (sobre fondos claros) */
  --border:      #E5DAC8;
  --brand:       #3493C3;   /* azul del logo */
  --brand-glow:  #6CC6F5;
  --ink-2:       #0B2236;

  --radius:      26px;
  --sheet-r:     56px;
  --overlap:     120px;     /* cuánto cruza el carrusel hacia la sección siguiente */
  --nav-h:       76px;

  --shadow:       0 1px 2px rgba(20,33,44,.06), 0 14px 34px -14px rgba(20,33,44,.22);
  --shadow-lift:  0 2px 4px rgba(20,33,44,.06), 0 34px 64px -22px rgba(20,33,44,.4);
  --ease:         cubic-bezier(.2,.7,.2,1);

  --font-head:   'Cormorant Garamond', Georgia, serif;
  --font-body:   'Inter', system-ui, sans-serif;
}

/* ── Reset base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg-dark);
  color: #fff;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ── Utilidades ─────────────────────────────────────────────── */
.container { max-width: 1120px; margin: 0 auto; padding: 0 28px; }
.container--wide { max-width: 1360px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 30px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: .92rem;
  font-weight: 500;
  letter-spacing: .02em;
  cursor: pointer;
  transition: transform .35s var(--ease), background .3s, box-shadow .35s var(--ease), border-color .3s, color .3s;
}
.btn--primary {
  color: #1d1006;
  background: linear-gradient(135deg, #F6C193, var(--accent) 55%, #D9803F);
  box-shadow: 0 12px 32px -12px rgba(232,160,100,.75);
}
.btn--primary:hover { transform: translateY(-3px); box-shadow: 0 22px 44px -14px rgba(232,160,100,.95); }
.btn--primary:disabled { opacity: .6; cursor: wait; transform: none; }
.btn--outline {
  color: #fff;
  border-color: rgba(255,255,255,.35);
  background: rgba(255,255,255,.05);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.btn--outline:hover { border-color: #fff; background: rgba(255,255,255,.14); }

/* ── Nav ────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  z-index: 100;
  transition: background .4s, box-shadow .4s;
}
.nav.is-scrolled {
  background: rgba(6,18,29,.72);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  backdrop-filter: blur(18px) saturate(1.5);
  box-shadow: 0 1px 0 rgba(255,255,255,.08);
}
.nav__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav__logo { display: flex; align-items: center; flex-shrink: 0; }
.nav__logo img { width: 272px; height: 60px; object-fit: contain; object-position: left center; }
.nav__logo img[src=""] { visibility: hidden; }
#nav-nombre { display: none; }

.nav__links { display: flex; gap: 34px; }
.nav__links a {
  padding: 6px 0;
  font-size: .9rem;
  color: rgba(255,255,255,.86);
  background: linear-gradient(var(--accent), var(--accent)) left 100% / 0 1.5px no-repeat;
  transition: background-size .4s var(--ease), color .3s;
}
.nav__links a:hover { color: #fff; background-size: 100% 1.5px; }

.nav #nav-cta { padding: 11px 18px; flex-shrink: 0; }
.nav-cta__user { width: 18px; height: 18px; flex-shrink: 0; }
.nav-cta__icon { width: 16px; height: 16px; flex-shrink: 0; transition: transform .3s var(--ease); }
.nav #nav-cta:hover .nav-cta__icon { transform: translateX(4px); }

.scroll-progress {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--brand-glow), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
}

/* ── Scroll spy ─────────────────────────────────────────────── */
.scrollspy {
  position: fixed;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 150;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 16px 9px;
  border-radius: 999px;
  background: rgba(6,18,29,.55);
  border: 1px solid rgba(255,255,255,.12);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.scrollspy__dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.4);
  transition: transform .35s var(--ease), background .35s, box-shadow .35s;
}
.scrollspy__dot::before { content: ''; position: absolute; inset: -9px; }
.scrollspy__dot::after {
  content: attr(aria-label);
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translate(6px, -50%);
  white-space: nowrap;
  padding: 5px 11px;
  border-radius: 8px;
  font-size: .72rem;
  letter-spacing: .04em;
  color: #fff;
  background: rgba(6,18,29,.92);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
}
.scrollspy__dot:hover::after { opacity: 1; transform: translate(0, -50%); }
.scrollspy__dot.active {
  background: var(--accent);
  transform: scale(1.5);
  box-shadow: 0 0 0 4px rgba(232,160,100,.25);
}

/* ── Hero ───────────────────────────────────────────────────── */
/* .hero no crea stacking context a propósito: el carrusel
   necesita quedar por encima de la sección siguiente */
.hero {
  position: relative;
  padding: calc(var(--nav-h) + 52px) 0 0;
}
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(60% 50% at 12% 8%, rgba(52,147,195,.38), transparent 70%),
    radial-gradient(50% 45% at 92% 88%, rgba(232,160,100,.2), transparent 70%),
    var(--bg-dark);
}
.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(6,18,29,.3) 0%, rgba(6,18,29,.78) 58%, var(--bg-dark) 100%);
}
.hero__ambient { position: absolute; inset: -12%; }
.hero__ambient div {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(64px) saturate(1.5);
  transform: scale(1.2);
  opacity: 0;
  transition: opacity 1.8s ease;
}
.hero__ambient div.active { opacity: .55; }

/* Estrellas (las genera app.js) */
.starfield { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.starfield span {
  position: absolute;
  border-radius: 50%;
  background: #fff;
  opacity: 0;
  animation: twinkle var(--t, 4s) ease-in-out infinite;
  animation-delay: var(--d, 0s);
}
.starfield span.warm { background: #ffd9b3; }
@keyframes twinkle {
  0%, 100% { opacity: .12; transform: scale(.8); }
  50%      { opacity: .95; transform: scale(1.25); }
}

/* Luna de la marca */
.hero__moon {
  position: absolute;
  z-index: 2;
  top: calc(var(--nav-h) + 26px);
  right: clamp(16px, 7vw, 140px);
  width: clamp(110px, 14vw, 210px);
  height: auto;
  filter: drop-shadow(0 0 38px rgba(108,198,245,.6));
  animation: moon-float 10s ease-in-out infinite;
}
@keyframes moon-float {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50%      { transform: translateY(-16px) rotate(3deg); }
}

.hero__inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  font-size: .78rem;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--accent);
}
.hero__eyebrow::before,
.hero__eyebrow::after {
  content: '';
  width: 44px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent));
}
.hero__eyebrow::after { transform: scaleX(-1); }

.hero__banner {
  width: min(100%, 480px);
  height: auto;
  filter: drop-shadow(0 10px 44px rgba(52,147,195,.55));
}
.hero__sub {
  margin-top: 10px;
  font-family: var(--font-head);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.55rem, 3vw, 2.45rem);
  line-height: 1.2;
  color: #fff;
}
.hero__desc {
  max-width: 560px;
  margin-top: 14px;
  font-size: 1.02rem;
  font-weight: 300;
  color: rgba(255,255,255,.78);
}

/* Carrusel: cruza el borde entre el hero y la sección siguiente */
.hero__carousel {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 48px;
  margin-bottom: calc(var(--overlap) * -1);
}
.hero__carousel-imgs {
  position: relative;
  width: min(100%, var(--carousel-w, 960px));
  aspect-ratio: var(--carousel-ratio, 2.67);
  border-radius: 30px;
  overflow: hidden;
  cursor: pointer;
  background: var(--ink-2);
  border: 1px solid rgba(255,255,255,.18);
  box-shadow:
    0 40px 90px -28px rgba(0,0,0,.65),
    0 0 120px -34px var(--brand);
  transform: perspective(1400px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .5s var(--ease);
}
.hero__carousel-imgs::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 55%, rgba(6,18,29,.6));
}
.hero__carousel-imgs img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.12);
  transition: opacity 1.1s ease, transform 8s var(--ease);
  pointer-events: none;
}
.hero__carousel-imgs img.active { opacity: 1; transform: scale(1); }

.hero__carousel-dots {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 3;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}
.hero__carousel-dots .dot {
  position: relative;
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  overflow: hidden;
  cursor: pointer;
  background: rgba(255,255,255,.5);
  transition: width .5s var(--ease), background .3s;
}
.hero__carousel-dots .dot.active { width: 34px; background: rgba(255,255,255,.32); }
.hero__carousel-dots .dot.active::after {
  content: '';
  position: absolute;
  inset: 0;
  background: #fff;
  transform-origin: left;
  animation: dotfill var(--carousel-interval, 7000ms) linear forwards;
}
@keyframes dotfill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Entrada del hero */
.js .hero__inner > * { animation: rise 1s var(--ease) both; }
.js .hero__inner > :nth-child(1) { animation-delay: .1s; }
.js .hero__inner > :nth-child(2) { animation-delay: .22s; }
.js .hero__inner > :nth-child(3) { animation-delay: .34s; }
.js .hero__inner > :nth-child(4) { animation-delay: .46s; }
.js .hero__inner > :nth-child(5) { animation-delay: .6s; }
@keyframes rise { from { opacity: 0; transform: translateY(28px); } }

/* ── Secciones (hojas que se apilan con esquinas redondeadas) ── */
.section { position: relative; padding: 120px 0; }
.section--paper {
  z-index: 1;
  margin-top: calc(var(--sheet-r) * -1);
  padding-top: calc(var(--overlap) + 104px);
  border-radius: var(--sheet-r) var(--sheet-r) 0 0;
  color: var(--text);
  background:
    radial-gradient(42% 30% at 100% 0%, rgba(52,147,195,.14), transparent 70%),
    radial-gradient(36% 30% at 0% 100%, rgba(232,160,100,.2), transparent 70%),
    var(--bg);
}
.section--ink {
  z-index: 2;
  margin-top: calc(var(--sheet-r) * -1);
  border-radius: var(--sheet-r) var(--sheet-r) 0 0;
  color: #fff;
  background:
    radial-gradient(50% 40% at 85% 10%, rgba(52,147,195,.22), transparent 70%),
    radial-gradient(40% 40% at 10% 90%, rgba(232,160,100,.12), transparent 70%),
    var(--ink-2);
}

.section__title {
  margin-bottom: 64px;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: clamp(2.6rem, 5.4vw, 4.7rem);
  line-height: 1.02;
  letter-spacing: -.015em;
  text-align: center;
}
.section__title em { font-style: italic; }
.section__title::after {
  content: '';
  display: block;
  width: 72px;
  height: 3px;
  margin: 24px auto 0;
  border-radius: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.section--paper .section__title { color: var(--text); }
.section--paper .section__title em { color: var(--accent-dark); }
.section--ink .section__title { color: #fff; }
.section--ink .section__title em { color: var(--accent); }

/* ── Propuesta cultural: bento ──────────────────────────────── */
.grid-servicios {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-flow: dense;
  gap: 22px;
}
.servicio-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text);
  box-shadow: var(--shadow);
  transition: translate .5s var(--ease), box-shadow .5s var(--ease);
}
a.servicio-card { cursor: pointer; }
.servicio-card:hover { translate: 0 -8px; box-shadow: var(--shadow-lift); }

.servicio-card__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.servicio-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease);
}
.servicio-card:hover .servicio-card__media img { transform: scale(1.07); }

.servicio-card__body {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
  padding: 24px 26px 28px;
}
.servicio-card__num {
  font-family: var(--font-head);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--accent-dark);
}
.servicio-card__nombre {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.75rem;
  line-height: 1.08;
}
.servicio-card__desc { font-size: .93rem; line-height: 1.65; color: var(--text-muted); }
.servicio-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  font-size: .88rem;
  font-weight: 500;
  color: var(--accent-dark);
}
.servicio-card__cta .arrow { display: inline-block; transition: transform .45s var(--ease); }
a.servicio-card:hover .servicio-card__cta .arrow { transform: translateX(6px); }

/* Tarjeta destacada (la primera): ocupa 2 columnas y la foto sangra completa */
.servicio-card--feature { grid-column: span 2; min-height: 440px; }
.servicio-card--feature .servicio-card__media { position: absolute; inset: 0; aspect-ratio: auto; }
.servicio-card--feature .servicio-card__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6,18,29,0) 25%, rgba(6,18,29,.92) 100%);
}
.servicio-card--feature .servicio-card__body { z-index: 1; margin-top: auto; flex: none; gap: 14px; padding: 40px; }
.servicio-card--feature .servicio-card__num,
.servicio-card--feature .servicio-card__cta { color: var(--accent); }
.servicio-card--feature .servicio-card__nombre { font-size: clamp(2.3rem, 3.6vw, 3.4rem); color: #fff; }
.servicio-card--feature .servicio-card__desc { max-width: 48ch; font-size: 1.04rem; color: rgba(255,255,255,.86); }

/* ── Autores ────────────────────────────────────────────────── */
.grid-autores {
  --autor-w: 300px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--autor-w)), var(--autor-w)));
  justify-content: center;
  gap: 28px;
  padding: 0 24px;
}
.autor-card {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  isolation: isolate;
  cursor: pointer;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 34px 64px -28px rgba(0,0,0,.75);
  transition: translate .5s var(--ease), box-shadow .5s var(--ease), border-color .4s;
}
.autor-card:hover,
.autor-card.is-expanded {
  translate: 0 -8px;
  border-color: rgba(232,160,100,.5);
  box-shadow: 0 44px 80px -28px rgba(0,0,0,.85), 0 0 60px -20px rgba(232,160,100,.35);
}
.autor-card__foto { position: absolute; inset: 0; }
.autor-card__foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease);
}
.autor-card:hover .autor-card__foto img,
.autor-card.is-expanded .autor-card__foto img { transform: scale(1.09); }

.autor-card__overlay {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  max-height: 80%;
  overflow: hidden;
  padding: 22px 22px 22px;
  background: linear-gradient(to top, rgba(6,18,29,.97), rgba(6,18,29,.78) 65%, rgba(6,18,29,0));
}
.autor-card__nombre {
  position: relative;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.55rem;
  line-height: 1.1;
  color: #fff;
}
.autor-card__nombre::before {
  content: '';
  display: block;
  width: 28px;
  height: 2px;
  margin-bottom: 12px;
  background: var(--accent);
  transition: width .5s var(--ease);
}
.autor-card:hover .autor-card__nombre::before,
.autor-card.is-expanded .autor-card__nombre::before { width: 64px; }
.autor-card__desc-wrap { max-height: 0; overflow: hidden; transition: max-height .6s var(--ease); }
.autor-card__desc {
  margin-top: 10px;
  font-size: .84rem;
  line-height: 1.6;
  color: rgba(255,255,255,.88);
}
.autor-card:hover .autor-card__desc-wrap,
.autor-card.is-expanded .autor-card__desc-wrap { max-height: 300px; }

/* ── Footer ─────────────────────────────────────────────────── */
.footer {
  position: relative;
  z-index: 3;
  margin-top: calc(var(--sheet-r) * -1);
  padding: calc(var(--sheet-r) + 72px) 0 64px;
  overflow: hidden;
  border-radius: var(--sheet-r) var(--sheet-r) 0 0;
  color: #fff;
  background:
    radial-gradient(45% 60% at 0% 0%, rgba(52,147,195,.2), transparent 70%),
    #040E17;
}
.footer-grid {
  position: relative;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 48px 32px;
}
.footer-col-group { display: flex; flex-wrap: wrap; gap: 40px 56px; }
.footer-col { display: flex; flex-direction: column; gap: 13px; min-width: 200px; }
.footer-col a,
.footer-col .footer-col__title { font-size: .94rem; font-weight: 400; color: #fff; }
.footer-col a {
  width: fit-content;
  background: linear-gradient(var(--accent), var(--accent)) left 100% / 0 1px no-repeat;
  transition: background-size .4s var(--ease), color .3s;
}
.footer-col a:hover { color: var(--accent); background-size: 100% 1px; }
.footer-col .footer-col__title {
  margin-bottom: 4px;
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 500;
}
.footer-col__title--rule { padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,.5); }
.footer-col #footer-servicios { display: flex; flex-direction: column; gap: 13px; }

.horarios-list li {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,.1);
  font-size: .94rem;
}
.horarios-list .dias { color: #fff; }
.horarios-list .hora { color: #fff; white-space: nowrap; }

/* ── Ventanilla abierta ─────────────────────────────────────── */
.ventanilla {
  position: relative;
  min-height: 100svh;
  padding: calc(var(--nav-h) + 72px) 0 96px;
  overflow: hidden;
  background: var(--bg-dark);
}
.ventanilla__inner { position: relative; z-index: 2; max-width: 680px; }
.ventanilla .section__title { color: #fff; margin-bottom: 32px; }
.ventanilla .section__title em { color: var(--accent); }
.ventanilla-desc {
  max-width: 520px;
  margin: 0 auto 8px;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 300;
  color: rgba(255,255,255,.82);
}

/* ── Formulario ─────────────────────────────────────────────── */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 36px;
  padding: 38px;
  border-radius: 30px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 44px 90px -34px rgba(0,0,0,.7);
}
.contact-form input,
.contact-form textarea {
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
  color: #fff;
  font-family: var(--font-body);
  font-size: .95rem;
  resize: vertical;
  transition: border-color .3s, box-shadow .3s, background .3s;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: #fff; opacity: .7; }
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--brand-glow);
  background: rgba(255,255,255,.1);
  box-shadow: 0 0 0 4px rgba(108,198,245,.18);
}
.contact-form button { align-self: flex-start; margin-top: 6px; }
.contact-form__status { min-height: 1.3em; font-size: .9rem; color: #fff; }
.contact-form__status.ok { color: var(--accent); }
.ventanilla-volver { align-self: center; margin-top: 18px; }

/* ── Botón de WhatsApp (solo mobile) ────────────────────────── */
.whatsapp-btn { display: none; }

/* ── Revelado al hacer scroll ───────────────────────────────── */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  transition-delay: calc(var(--i, 0) * 90ms);
}
.js [data-reveal].in-view { opacity: 1; transform: none; }
/* las tarjetas con hover usan "translate" aparte, y acá se combina con la transición de entrada */
.js .servicio-card[data-reveal],
.js .autor-card[data-reveal] {
  transition: opacity .9s var(--ease), transform .9s var(--ease), translate .5s var(--ease), box-shadow .5s var(--ease), border-color .4s;
  transition-delay: calc(var(--i, 0) * 90ms), calc(var(--i, 0) * 90ms), 0s, 0s, 0s;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1180px) {
  .nav__links { gap: 24px; }
  .nav__links a { font-size: .84rem; }
  .nav__logo img { width: 220px; height: 52px; }
}
@media (max-width: 1000px) {
  .grid-servicios { grid-template-columns: repeat(2, 1fr); }
  .servicio-card--feature { min-height: 400px; }
}
@media (max-width: 860px) {
  .nav__links { display: none; }
}
@media (max-width: 640px) {
  :root { --sheet-r: 36px; --overlap: 56px; --nav-h: 68px; }
  .container { padding: 0 20px; }
  .section { padding: 84px 0; }
  .section--paper { padding-top: calc(var(--overlap) + 72px); }
  .section__title { margin-bottom: 44px; }
  .hero { padding-top: calc(var(--nav-h) + 36px); }
  .hero__banner { width: min(86%, 380px); }
  .hero__carousel { margin-top: 32px; }
  .hero__carousel-imgs { aspect-ratio: 16 / 10; border-radius: 22px; }
  .hero__moon { display: none; }
  .grid-servicios { grid-template-columns: 1fr; }
  .servicio-card--feature { grid-column: auto; min-height: 420px; }
  .servicio-card--feature .servicio-card__body { padding: 28px; }
  .grid-autores { padding: 0 20px; }
  .footer-grid { flex-direction: column; }
  .footer-col-group { flex-direction: column; gap: 36px; }
  .contact-form { padding: 24px; border-radius: 24px; }
  .scrollspy { display: none; }
}
@media (max-width: 480px) {
  .nav__logo img { width: 168px; height: 44px; }
  .nav #nav-cta {
    padding: 10px 16px;
    color: #1d1006;
    border-color: transparent;
    background: linear-gradient(135deg, #F6C193, var(--accent) 55%, #D9803F);
  }
  .whatsapp-btn {
    position: fixed;
    right: 20px;
    bottom: 24px;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #25D366;
    box-shadow: 0 10px 28px -6px rgba(37,211,102,.6);
    animation: wa-bounce 2.2s ease-in-out infinite;
  }
  .whatsapp-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid #25D366;
    animation: wa-ring 2.2s ease-out infinite;
  }
  .whatsapp-btn svg { width: 38px; height: 38px; }
}
@keyframes wa-bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
@keyframes wa-ring {
  0%   { transform: scale(1);   opacity: .7; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* ── Accesibilidad: menos movimiento ────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .starfield span { opacity: .6; }
}
