/* Concepto "Caja de bloques": las letras de la marca son cubos de juguete que caen y se apilan. */
@font-face { font-family: "Bagel Fat One"; src: url("fonts/bagel-fat-one-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("fonts/nunito-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("fonts/nunito-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  --carton: #FFF6E5;      /* fondo: caja de cartón */
  --carton-2: #F7E7C6;
  --tinta: #1D1A2F;       /* texto */
  --crayon: #1B2A6B;      /* azul crayón: marca */
  --tomate: #C8321E;      /* rojo tomate: marca (texto AA sobre cartón) */
  --tomate-vivo: #E2402B; /* solo superficies grandes */
  --yema: #FFC53D;        /* acento */
  --pasto: #2E8B5E;
  --display: "Bagel Fat One", "Arial Black", sans-serif;
  --texto: "Nunito", system-ui, sans-serif;
  --radio: 18px;
  --sombra-bloque: 0 6px 0 rgba(29, 26, 47, .9);
  --ease-rebote: cubic-bezier(.34, 1.56, .64, 1);
  --franja-alto: 2.75rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--franja-alto) + 1rem); }
body {
  margin: 0; padding-top: var(--franja-alto);
  font: 400 1.0625rem/1.6 var(--texto); color: var(--tinta);
  background-color: var(--carton);
  background-image: radial-gradient(rgba(27, 42, 107, .07) 1.5px, transparent 1.6px);
  background-size: 22px 22px;
  overflow-x: hidden;
}
h1, h2, h3 { margin: 0; line-height: 1.1; }
p { margin: 0 0 1rem; }
a { color: var(--crayon); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .bloque:focus-visible {
  outline: 3px solid var(--crayon); outline-offset: 3px; border-radius: 6px;
}
ul, ol { list-style: none; margin: 0; padding: 0; }
.contenedor { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }

.franja {
  position: fixed; inset: 0 0 auto; z-index: 50; margin: 0;
  min-height: var(--franja-alto); display: grid; place-items: center;
  padding: .4rem 1rem; text-align: center; font-size: .8125rem; font-weight: 800; line-height: 1.3;
  background: var(--tinta); color: var(--carton);
}

/* Navegación */
.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  width: min(1180px, 100% - 2.5rem); margin: 1rem auto 0;
}
.nav__marca { display: inline-flex; align-items: center; gap: .3rem; text-decoration: none; color: var(--tinta); min-height: 44px; }
.nav__nombre { font-family: var(--display); font-size: 1.35rem; margin-left: .4rem; }
.mini-bloque {
  display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 7px;
  font-family: var(--display); color: var(--carton); border: 2px solid var(--tinta); box-shadow: 0 3px 0 var(--tinta);
}
.mini-bloque--rojo { background: var(--tomate); rotate: -6deg; }
.mini-bloque--azul { background: var(--crayon); rotate: 5deg; }
.nav__links { display: none; gap: .25rem; }
.nav__links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 .9rem; font-weight: 800; text-decoration: none; color: var(--tinta); border-radius: 999px; transition: background-color .2s; }
.nav__links a:hover { background: var(--carton-2); }
@media (min-width: 640px) { .nav__links { display: flex; } }

/* Hero */
.hero {
  position: relative; isolation: isolate;
  min-height: calc(100svh - var(--franja-alto) - 4rem);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 3rem 1.25rem 4rem;
}
.hero__eyebrow {
  font-weight: 800; letter-spacing: .14em; text-transform: uppercase; font-size: .8125rem; color: var(--tomate);
  margin-bottom: 1.25rem;
}
.hero__titulo {
  font-family: var(--display); font-weight: 400; color: var(--crayon);
  font-size: clamp(4rem, 17vw, 9.5rem); letter-spacing: -.01em; line-height: .95;
  display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(.25rem, 1vw, .6rem);
  perspective: 900px;
}
.hero__titulo.es-bloques { font-size: clamp(2.6rem, 12vw, 7rem); }
.bloque {
  display: inline-grid; place-items: center;
  width: 1.15em; height: 1.15em; border-radius: .2em;
  color: var(--carton); border: .045em solid var(--tinta); box-shadow: 0 .09em 0 var(--tinta);
  cursor: pointer; user-select: none; transform-origin: 50% 100%;
}
.bloque:nth-child(5n + 1) { background: var(--tomate-vivo); }
.bloque:nth-child(5n + 2) { background: var(--crayon); }
.bloque:nth-child(5n + 3) { background: var(--yema); color: var(--tinta); }
.bloque:nth-child(5n + 4) { background: var(--pasto); }
.bloque:nth-child(5n)     { background: var(--tomate-vivo); }
.bloque--espacio { width: .35em; background: none !important; border: 0; box-shadow: none; cursor: default; }
.hero__bajada { max-width: 38rem; margin: 2rem auto 2rem; font-size: clamp(1.0625rem, 2.2vw, 1.3rem); }
.hero__acciones { display: flex; flex-wrap: wrap; gap: .9rem; justify-content: center; }
.hero__pista { margin-top: 1.5rem; font-size: .875rem; color: #5A5468; visibility: hidden; }
.js-listo .hero__pista { visibility: visible; }

.hero__juguete { position: absolute; z-index: -1; width: clamp(48px, 9vw, 96px); opacity: .9; }
.hero__juguete--trompo { top: 8%; left: 6%; }
.hero__juguete--pelota { bottom: 12%; right: 7%; }
.hero__juguete--barrilete { top: 12%; right: 10%; }
@media (max-width: 520px) { .hero__juguete--barrilete { top: 2%; right: 4%; } .hero__juguete--trompo { top: 1%; left: 3%; } }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 1.6rem;
  font: 800 1.0625rem/1 var(--texto); text-decoration: none; border-radius: 14px; cursor: pointer;
  border: 2.5px solid var(--tinta); transition: box-shadow .2s, translate .2s, background-color .2s;
}
.btn--principal { background: var(--crayon); color: var(--carton); box-shadow: 0 5px 0 var(--tinta); }
.btn--principal:hover { background: #24378A; }
.btn--principal:active { box-shadow: 0 1px 0 var(--tinta); translate: 0 4px; }
.btn--secundario { background: var(--carton); color: var(--tinta); box-shadow: 0 5px 0 var(--tinta); }
.btn--secundario:hover { background: var(--yema); }

/* Secciones */
section:not(.hero) { padding-block: clamp(4.5rem, 10vw, 8.5rem); }
.titulo-seccion { font-family: var(--display); font-weight: 400; font-size: clamp(2.1rem, 5.5vw, 3.6rem); color: var(--crayon); margin-bottom: 2.25rem; }
.subrayado { background: linear-gradient(transparent 62%, var(--yema) 62% 92%, transparent 92%); padding-inline: .1em; }
.nota-demo { margin-top: 1.75rem; font-size: .9375rem; color: #5A5468; border-left: 4px solid var(--yema); padding-left: .8rem; }

.nosotros__grid { display: grid; gap: 1.5rem; }
.nosotros__texto { font-size: 1.15rem; max-width: 36rem; }
@media (min-width: 900px) { .nosotros__grid { grid-template-columns: 1.1fr 1fr; align-items: end; gap: 4rem; } .nosotros .titulo-seccion { margin: 0; } }

/* Estantes: cajas de distinto color y tamaño */
.estantes { background: var(--crayon); color: var(--carton); }
.estantes .titulo-seccion { color: var(--carton); }
.estantes .nota-demo { color: #E7E3F5; }
.estantes__grid { display: grid; gap: 1.1rem; grid-template-columns: 1fr; }
@media (min-width: 560px) { .estantes__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .estantes__grid { grid-template-columns: repeat(4, 1fr); } .caja--ancha { grid-column: span 2; } }
.caja {
  position: relative; overflow: hidden; min-height: 180px; padding: 1.4rem;
  display: flex; align-items: flex-end;
  border-radius: var(--radio); border: 3px solid var(--tinta); box-shadow: 0 8px 0 var(--tinta);
  transition: transform .35s var(--ease-rebote); transform-style: preserve-3d;
}
.caja h3 { position: relative; font-size: 1.25rem; font-weight: 800; max-width: 14ch; }
.caja__letra {
  position: absolute; top: -.12em; right: .08em; font-family: var(--display); font-size: 8rem; line-height: 1;
  opacity: .22; pointer-events: none;
}
.caja--rojo { background: var(--tomate-vivo); color: #fff; }
.caja--rojo h3 { color: var(--tinta); }
.caja--azul { background: #8FB3FF; color: var(--tinta); }
.caja--amarillo { background: var(--yema); color: var(--tinta); }
.caja--verde { background: #7FD3A6; color: var(--tinta); }
.caja--crema { background: var(--carton); color: var(--tinta); }

/* Motivos */
.motivos__lista { display: grid; gap: 2.5rem; }
@media (min-width: 860px) { .motivos__lista { grid-template-columns: repeat(3, 1fr); } .motivo:nth-child(2) { translate: 0 2.5rem; } }
.motivo { display: flex; gap: 1.1rem; align-items: flex-start; }
.motivo h3 { font-size: 1.3rem; font-weight: 800; margin-bottom: .4rem; }
.motivo p { margin: 0; }
.icono { flex: none; width: 64px; height: 64px; padding: 6px; border-radius: 16px; background: var(--yema); border: 2.5px solid var(--tinta); }
.icono .trazo { fill: none; stroke: var(--tinta); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.icono .relleno { fill: var(--tomate); }
.motivo:nth-child(2) .icono { background: #8FB3FF; }
.motivo:nth-child(3) .icono { background: #7FD3A6; }

/* Locales */
.locales { background: var(--carton-2); }
.locales__grid { display: grid; gap: 1.1rem; }
@media (min-width: 640px) { .locales__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .locales__grid { grid-template-columns: repeat(4, 1fr); } }
.local { position: relative; padding: 1.6rem 1.4rem 1.4rem; background: var(--carton); border: 2.5px solid var(--tinta); border-radius: var(--radio); box-shadow: 0 6px 0 var(--tinta); }
.local h3 { font-size: 1.2rem; font-weight: 800; margin: .9rem 0 .4rem; }
.local p { margin-bottom: .6rem; }
.local__num { display: inline-grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 10px; font-family: var(--display); font-size: 1.4rem; color: var(--carton); background: var(--crayon); border: 2px solid var(--tinta); }
.local--little .local__num { background: var(--pasto); }
.local__link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 800; }

/* Contacto */
.contacto__grid { display: grid; gap: 3rem; }
@media (min-width: 900px) { .contacto__grid { grid-template-columns: 1fr 1fr; align-items: start; } }
.contacto__datos li { padding: .6rem 0; border-bottom: 2px dashed rgba(29, 26, 47, .2); overflow-wrap: anywhere; }
.contacto__datos a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 800; }
.etiqueta { display: block; font-size: .8125rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--tomate); }
.form { display: grid; gap: .45rem; padding: 1.6rem; background: #fff; border: 2.5px solid var(--tinta); border-radius: var(--radio); box-shadow: 0 8px 0 var(--tinta); }
.form__aviso { justify-self: start; margin-bottom: .6rem; padding: .25rem .7rem; font-size: .8125rem; font-weight: 800; background: var(--yema); border-radius: 999px; }
.form label { font-weight: 800; margin-top: .5rem; }
.form input, .form select, .form textarea { width: 100%; min-height: 48px; padding: .7rem .85rem; font: 400 1rem var(--texto); color: var(--tinta); background: var(--carton); border: 2px solid var(--tinta); border-radius: 10px; }
.form .btn { margin-top: 1rem; }
.form__estado { margin: .4rem 0 0; font-weight: 800; color: var(--pasto); min-height: 1.5em; }

/* Pie */
.pie { background: var(--tinta); color: #E9E5F2; padding-block: 3.5rem; font-size: .9375rem; }
.pie a { color: var(--yema); }
.pie__marca { font-family: var(--display); font-size: 2rem; color: var(--carton); }

/* Scroll reveal: solo CSS, sin soporte el contenido queda visible */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .fade-on-scroll { animation: subir linear both; animation-timeline: view(); animation-range: entry 0% entry 30%; }
  }
  .hero__juguete--trompo { animation: girar 3.2s ease-in-out infinite alternate; }
  .hero__juguete--pelota { animation: picar 1.6s cubic-bezier(.55, 0, 1, .45) infinite alternate; }
  .hero__juguete--barrilete { animation: volar 4.5s ease-in-out infinite alternate; }
}
@keyframes subir { from { opacity: 0; translate: 0 48px; rotate: -1.5deg; } to { opacity: 1; translate: 0 0; rotate: 0deg; } }
@keyframes girar { from { rotate: -10deg; } to { rotate: 10deg; } }
@keyframes picar { from { translate: 0 -26px; } to { translate: 0 0; } }
@keyframes volar { from { translate: 0 0; rotate: -6deg; } to { translate: -10px 14px; rotate: 6deg; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; animation-iteration-count: 1 !important; }
  html { scroll-behavior: auto; }
}
