/* ============================================================
   Kifki · Literatura Infantil — landing
   Paleta tomada del logo:
   crema #FAF5EC · azul #294A91 · noche #111E3D
   amarillo #FFB938 / #FFAD15
   ============================================================ */

:root {
  --crema: #faf5ec;
  --crema-osc: #f3ead9;
  --azul: #294a91;
  --noche: #111e3d;
  --noche-2: #0c1730;
  --amarillo: #ffb938;
  --amarillo-2: #ffad15;
  --tinta: #22315b;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Albert Sans", system-ui, -apple-system, sans-serif;
  --font-script: "Dancing Script", "Segoe Script", cursive;   /* marca "Kifki" (script del logo) */
  --font-hand: "Patrick Hand", "Comic Sans MS", cursive;      /* títulos de sección */
  --font-brush: "Caveat Brush", "Bradley Hand", cursive;      /* palabras acento */
}

/* ---------- Fuentes de marca (self-host, licencia OFL) ---------- */
@font-face {
  font-family: "Dancing Script";
  src: url("../fonts/DancingScript-VariableFont.ttf") format("truetype-variations");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Patrick Hand";
  src: url("../fonts/PatrickHand-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Caveat Brush";
  src: url("../fonts/CaveatBrush-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: auto; }

body {
  font-family: var(--font-body);
  background: var(--crema);
  color: var(--tinta);
  overflow-x: hidden;
  line-height: 1.6;
}

/* Grano fílmico sutil sobre toda la página */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

em { font-style: italic; }

/* ---------- Encabezado ---------- */

.site-head {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem clamp(1rem, 4vw, 2.5rem);
  transition: background 0.4s ease, box-shadow 0.4s ease, transform 0.4s ease;
}

.site-head.is-solid {
  background: color-mix(in srgb, var(--crema) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(41, 74, 145, 0.12);
}

.head-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--azul);
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 1.3rem;
}

.head-brand span {
  font-family: var(--font-script);
  font-weight: 700;
  font-size: 1.75rem;
  line-height: 1;
  padding-bottom: 2px;
}

.head-brand img { display: block; }

.head-mark {
  border-radius: 50%;
  box-shadow: 0 3px 10px color-mix(in srgb, var(--azul) 26%, transparent);
  transition: transform 0.25s ease;
}

.head-brand:hover .head-mark { transform: rotate(-6deg) scale(1.06); }

.head-cta {
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--crema);
  background: var(--azul);
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.head-cta:hover {
  background: var(--amarillo);
  color: var(--azul);
  transform: translateY(-2px);
}

.head-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.6rem, 2vw, 1.1rem);
}

.head-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  color: var(--azul);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  transition: color 0.25s ease;
}

.head-link:hover { color: var(--amarillo-2); }

.soon-tag {
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--azul);
  background: color-mix(in srgb, var(--amarillo) 55%, transparent);
  padding: 0.12rem 0.42rem;
  border-radius: 999px;
  line-height: 1;
}

@media (max-width: 420px) {
  .head-link { display: none; }
}

/* ---------- Escena 1 · Portada ---------- */

.hero {
  position: relative;
  background:
    radial-gradient(120% 90% at 50% 0%, #fffdf7 0%, var(--crema) 55%, var(--crema-osc) 100%);
}

.hero-stage {
  position: relative;
  height: 100vh;
  height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.hero-line {
  position: absolute;
  top: clamp(4.5rem, 12vh, 8rem);
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 650;
  font-size: clamp(1.6rem, 4.5vw, 3.2rem);
  color: var(--azul);
  padding: 0 1rem;
}

.hero-line em {
  font-family: var(--font-brush);
  font-style: normal;
  font-weight: 400;
  font-size: 1.14em;
  color: var(--amarillo-2);
}

.logo-mount {
  width: min(78vw, 62vh, 540px);
  aspect-ratio: 1;
}

.logo-mount svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
  /* capa propia de composición: evita parpadeos al redibujar la máscara */
  will-change: transform;
  transform: translateZ(0);
}

.scroll-cue {
  position: absolute;
  bottom: clamp(1.2rem, 5vh, 3rem);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: var(--azul);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.85;
}

.scroll-cue svg { animation: cue-bob 1.6s ease-in-out infinite; }

@keyframes cue-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(7px); }
}

/* ---------- Escenas nocturnas (manifiesto y cita) ---------- */

.manifiesto,
.cita {
  position: relative;
  background:
    radial-gradient(130% 100% at 50% 0%, #1a2a52 0%, var(--noche) 45%, var(--noche-2) 100%);
  color: var(--crema);
  overflow: hidden;
}

/* borde ondulado de transición crema → noche */
.manifiesto::before {
  content: "";
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 70px;
  background: var(--crema);
  clip-path: ellipse(60% 100% at 50% 0%);
}

.stars { position: absolute; inset: 0; pointer-events: none; }

.star {
  position: absolute;
  border-radius: 50%;
  background: var(--crema);
  opacity: 0.7;
  animation: twinkle 3.2s ease-in-out infinite;
}

.star--amarilla { background: var(--amarillo); }

@keyframes twinkle {
  0%, 100% { opacity: 0.15; transform: scale(0.8); }
  50% { opacity: 0.9; transform: scale(1.15); }
}

.manifiesto-inner {
  position: relative;
  max-width: 46rem;
  margin: 0 auto;
  padding: clamp(9rem, 22vh, 14rem) 1.5rem;
  display: flex;
  flex-direction: column;
  gap: clamp(3.5rem, 10vh, 6rem);
  text-align: center;
}

.mani-line {
  font-family: var(--font-display);
  font-weight: 450;
  font-size: clamp(1.5rem, 3.6vw, 2.6rem);
  line-height: 1.35;
}

.mani-line--accent {
  font-weight: 650;
  color: var(--amarillo);
}

/* ---------- Escena 3 · Qué hacemos ---------- */

.hacemos {
  position: relative;
  background: var(--crema);
  overflow: hidden;
}

.hacemos::before {
  content: "";
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 70px;
  background: var(--noche-2);
  clip-path: ellipse(60% 100% at 50% 0%);
}

.hacemos-inner {
  position: relative;
  z-index: 1;
  max-width: 72rem;
  margin: 0 auto;
  padding: clamp(7rem, 16vh, 10rem) 1.5rem clamp(5rem, 12vh, 8rem);
}

.section-title {
  font-family: var(--font-hand);
  font-weight: 400;
  font-size: clamp(2.2rem, 6vw, 4rem);
  color: var(--azul);
  text-align: center;
  margin-bottom: clamp(3rem, 8vh, 5rem);
}

.title-dot { color: var(--amarillo-2); }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: clamp(1.2rem, 3vw, 2rem);
}

.card {
  background: #fffdf8;
  border: 1.5px solid rgba(41, 74, 145, 0.14);
  border-radius: 22px;
  padding: 2.2rem 1.8rem;
  box-shadow: 0 14px 34px -22px rgba(41, 74, 145, 0.35);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.card:hover {
  transform: translateY(-8px) rotate(-0.4deg);
  box-shadow: 0 26px 48px -24px rgba(41, 74, 145, 0.45);
}

.card-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  color: var(--azul);
  background: color-mix(in srgb, var(--amarillo) 28%, transparent);
  border-radius: 16px;
  margin-bottom: 1.3rem;
}

.card-icon svg { width: 32px; height: 32px; }

.card h3 {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 1.35rem;
  color: var(--azul);
  margin-bottom: 0.5rem;
}

.card p { font-size: 0.98rem; }

.card p em {
  font-family: var(--font-brush);
  font-style: normal;
  font-weight: 400;
  font-size: 1.12em;
  color: var(--azul);
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.5;
  pointer-events: none;
}

.blob--a {
  width: 300px; height: 300px;
  background: radial-gradient(circle, var(--amarillo) 0%, transparent 70%);
  top: 8%; left: -120px;
}

.blob--b {
  width: 380px; height: 380px;
  background: radial-gradient(circle, color-mix(in srgb, var(--azul) 30%, transparent) 0%, transparent 70%);
  bottom: -60px; right: -140px;
}

/* ---------- Escena · Tienda online (próximamente) ---------- */

.tienda {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 95% at 50% 8%, #fff7e2 0%, #fdf0d6 34%, var(--crema) 66%, var(--crema-osc) 100%);
}

.tienda::before {
  content: "";
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 70px;
  background: var(--crema);
  clip-path: ellipse(60% 100% at 50% 0%);
}

/* halo dorado que respira detrás del contenido */
.tienda-glow {
  position: absolute;
  top: -8%;
  left: 50%;
  width: min(120vw, 900px);
  aspect-ratio: 1;
  transform: translateX(-50%);
  pointer-events: none;
  background: radial-gradient(circle, color-mix(in srgb, var(--amarillo) 40%, transparent) 0%, transparent 62%);
  opacity: 0.7;
  animation: tienda-breathe 7s ease-in-out infinite;
}

@keyframes tienda-breathe {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.55; }
  50% { transform: translateX(-50%) scale(1.12); opacity: 0.8; }
}

.tienda-inner {
  position: relative;
  z-index: 1;
  max-width: 46rem;
  margin: 0 auto;
  padding: clamp(7rem, 16vh, 10rem) 1.5rem clamp(6rem, 14vh, 9rem);
  text-align: center;
}

.proximamente {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--azul);
  background: color-mix(in srgb, var(--amarillo) 32%, #fffdf8);
  border: 1.5px solid color-mix(in srgb, var(--amarillo-2) 55%, transparent);
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  box-shadow: 0 10px 26px -16px rgba(255, 173, 21, 0.7);
  margin-bottom: 1.8rem;
}

.prox-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--amarillo-2);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--amarillo-2) 70%, transparent);
  animation: prox-pulse 1.8s ease-out infinite;
}

@keyframes prox-pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--amarillo-2) 65%, transparent); }
  70% { box-shadow: 0 0 0 12px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.tienda-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2rem, 6vw, 3.6rem);
  line-height: 1.12;
  color: var(--azul);
  margin-bottom: 1.4rem;
}

.tienda-title em {
  font-family: var(--font-brush);
  font-style: normal;
  font-weight: 400;
  font-size: 1.16em;
  color: var(--amarillo-2);
  /* brillo que barre la palabra */
  background: linear-gradient(100deg, var(--amarillo-2) 0%, #ffe08a 45%, var(--amarillo-2) 60%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: tienda-shimmer 4.5s linear infinite;
}

@keyframes tienda-shimmer {
  to { background-position: -220% 0; }
}

.tienda-texto {
  font-size: 1.1rem;
  max-width: 34rem;
  margin: 0 auto clamp(2.4rem, 6vh, 3.4rem);
}

/* estante flotante con lomos de libros */
.estante {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.5rem;
  height: 150px;
  margin-bottom: clamp(2.4rem, 6vh, 3.4rem);
}

.libro {
  display: block;
  width: 30px;
  border-radius: 4px 4px 2px 2px;
  box-shadow: 0 12px 24px -14px rgba(41, 74, 145, 0.6);
  transform-origin: bottom center;
  animation: libro-float 4s ease-in-out infinite;
}

.libro--1 { height: 96px;  background: linear-gradient(160deg, var(--azul), #1c366e); animation-delay: 0s; }
.libro--2 { height: 124px; background: linear-gradient(160deg, var(--amarillo), var(--amarillo-2)); animation-delay: 0.4s; }
.libro--3 { height: 108px; background: linear-gradient(160deg, #e9603f, #c8452a); animation-delay: 0.8s; }
.libro--4 { height: 132px; background: linear-gradient(160deg, #3f9d86, #2c7e6b); animation-delay: 1.2s; }
.libro--5 { height: 100px; background: linear-gradient(160deg, var(--noche), var(--noche-2)); animation-delay: 1.6s; }

.estante-tabla {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: min(90%, 260px);
  height: 10px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--azul) 22%, transparent);
  filter: blur(0.3px);
}

@keyframes libro-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(-1.2deg); }
}

.btn-aviso {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  color: var(--azul);
  background: var(--amarillo);
  padding: 1rem 2rem;
  border-radius: 999px;
  box-shadow: 0 16px 32px -16px rgba(255, 173, 21, 0.75);
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.btn-aviso:hover {
  background: var(--azul);
  color: var(--crema);
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 22px 40px -16px rgba(41, 74, 145, 0.6);
}

.tienda-nota {
  margin-top: 1rem;
  font-size: 0.92rem;
  color: color-mix(in srgb, var(--tinta) 70%, transparent);
}

/* ---------- Escena 4 · Cita ---------- */

.cita::before {
  content: "";
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 70px;
  background: var(--crema-osc);
  clip-path: ellipse(60% 100% at 50% 0%);
}

.cita-inner {
  position: relative;
  max-width: 52rem;
  margin: 0 auto;
  padding: clamp(9rem, 22vh, 13rem) 1.5rem;
  text-align: center;
}

.cita blockquote p {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 450;
  font-size: clamp(1.7rem, 4.4vw, 3.1rem);
  line-height: 1.35;
}

.cita blockquote .palabra {
  display: inline-block;
  white-space: pre;
}

.cita figcaption {
  margin-top: 2.2rem;
  font-size: 1rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amarillo);
  font-weight: 500;
}

/* ---------- Escena 5 · Encontranos ---------- */

.encontranos {
  position: relative;
  background: var(--crema);
  overflow: hidden;
}

.encontranos::before {
  content: "";
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 70px;
  background: var(--noche-2);
  clip-path: ellipse(60% 100% at 50% 0%);
}

.encontranos-inner {
  position: relative;
  z-index: 1;
  max-width: 42rem;
  margin: 0 auto;
  padding: clamp(8rem, 18vh, 11rem) 1.5rem clamp(6rem, 14vh, 9rem);
  text-align: center;
}

.encontranos-lugar {
  font-size: 1rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--amarillo-2);
  margin: -1.5rem 0 1.6rem;
}

.encontranos-texto {
  font-size: 1.1rem;
  margin-bottom: 2.6rem;
}

.btn-ig {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  color: var(--crema);
  background: var(--azul);
  padding: 1rem 2rem;
  border-radius: 999px;
  box-shadow: 0 16px 32px -16px rgba(41, 74, 145, 0.55);
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.btn-ig:hover {
  background: var(--amarillo);
  color: var(--azul);
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 22px 40px -16px rgba(255, 173, 21, 0.6);
}

/* huellas del elefante que cruzan la escena */
.huellas {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.huella {
  position: absolute;
  width: clamp(30px, 4.5vw, 46px);
  opacity: 0;
  color: color-mix(in srgb, var(--azul) 32%, transparent);
}

/* ---------- Pie ---------- */

.site-foot {
  background: var(--noche-2);
  color: color-mix(in srgb, var(--crema) 75%, transparent);
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: 0.9rem;
}

.foot-brand {
  font-family: var(--font-script);
  font-weight: 700;
  font-size: 1.35em;
  color: color-mix(in srgb, var(--crema) 92%, transparent);
}

/* ---------- Accesibilidad: menos movimiento ---------- */

@media (prefers-reduced-motion: reduce) {
  .scroll-cue svg, .star { animation: none; }
  html { scroll-behavior: auto; }
}
