/* Sitio de la marca. Idea: las apps son cartas que se abren en abanico al entrar (lo único que se mueve, una vez).
   Fondo liso y tranquilo; el color fuerte se queda en la portada y en el botón de descarga. */

@font-face { font-family: 'Unbounded'; src: url('fuentes/Unbounded.woff2') format('woff2'); font-weight: 200 900; font-display: swap; }
@font-face { font-family: 'Atkinson'; src: url('fuentes/Atkinson-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Atkinson'; src: url('fuentes/Atkinson-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --papel: #faf9ff;      /* fondo de la página: blanco apenas lila */
  --lila: #cbc5ff;       /* portada */
  --tinta: #1e1650;      /* texto y botones: violeta muy oscuro */
  --tinta-suave: #4f4880;
  --menta: #2bd69b;      /* descargar: la acción principal de la página */
  --sol: #fff0c2;        /* recuadro de "ayúdanos" */
  --linea: #dcd8f5;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 18px/1.6 'Atkinson', system-ui, sans-serif;
  color: var(--tinta);
  background: var(--papel);
}
a { color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--tinta); outline-offset: 3px; }
.oculto-visual { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

h1, h2, h3, h4, .logo { font-family: 'Unbounded', 'Arial Black', sans-serif; letter-spacing: -.02em; }

/* Logotipo: la nutria + "pebblito" en minúsculas, con la piedrita en lugar del punto de la i, y "studio" ligero
   al lado (separado por una línea fina), no amontonado debajo. */
.logo { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; line-height: 1; margin: 0; }
.logo img { width: 46px; height: 46px; flex: none; }
.marca { display: inline-flex; align-items: center; gap: .65rem; }
.nombre { font-weight: 800; font-size: 1.6rem; letter-spacing: -.045em; }
.i-piedra { position: relative; }
/* La piedrita tapa el punto de la i. */
.i-piedra::after {
  content: ""; position: absolute; left: 50%; top: .14em; width: .38em; height: .32em;
  background: #8f86f0; border-radius: 58% 42% 52% 48% / 62% 58% 42% 38%;
  transform: translateX(-50%) rotate(-14deg);
}
.estudio {
  font-weight: 400; font-size: .95rem; letter-spacing: .01em; color: var(--tinta-suave);
  padding: .2rem 0 .2rem .65rem; border-left: 2px solid var(--linea);
}

.boton {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: .7rem 1.5rem;
  border-radius: 14px; font-weight: 700; text-decoration: none; font-size: 1.05rem;
}
.boton-tinta { background: var(--tinta); color: #fff; }
.boton-tinta:hover { background: #33297a; }
.boton-menta { background: var(--menta); color: var(--tinta); box-shadow: 0 3px 0 #1c9e71; }
.boton-menta:hover { background: #40e3aa; }
/* Apps que aún no se publican: parece botón pero no es enlace (no lleva a ningún lado). */
.pronto { background: transparent; color: var(--tinta-suave); border: 2px dashed #b3acec; cursor: default; }
.pronto-texto { font-weight: 700; color: var(--tinta-suave); }
.enlace { font-weight: 700; text-underline-offset: .2em; text-decoration-thickness: 2px; }

/* --- Cabecera ----------------------------------------------------------------------------------------- */
.cabecera {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1.5rem;
  max-width: 1180px; margin: 0 auto; padding: 1.3rem clamp(1rem, 4vw, 2.5rem);
}
.cabecera nav { display: flex; gap: .3rem 1.6rem; }
.cabecera nav a { text-decoration: none; font-weight: 700; padding: .3rem 0; border-bottom: 2px solid transparent; }
.cabecera nav a:hover { border-bottom-color: currentColor; }

/* --- Portada ------------------------------------------------------------------------------------------ */
.portada {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: 2rem;
  max-width: 1180px; margin: 0 auto;
  padding: clamp(2.2rem, 5vw, 4rem) clamp(1.4rem, 4vw, 3.5rem);
  background: var(--lila); border-radius: 32px;
  overflow: hidden;
}
.portada h1 {
  margin: 0; font-weight: 700; font-size: clamp(2rem, 4.1vw, 3.4rem); line-height: 1.06; max-width: 14ch;
}
.entrada { max-width: 40ch; margin: 1.3rem 0 1.8rem; font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--tinta-suave); }

/* El abanico: las tres apps empiezan apiladas y se abren una sola vez al cargar. */
.abanico { position: relative; height: clamp(300px, 34vw, 430px); }
.carta {
  position: absolute; left: 50%; top: 50%; width: 62%;
  padding: .55rem .55rem .7rem; background: #fff; border-radius: 22px;
  box-shadow: 0 18px 40px -14px rgba(30, 22, 80, .45);
  transform: translate(-50%, -50%) var(--final);
  animation: abrir .9s cubic-bezier(.2, .9, .25, 1.15) .15s backwards;
}
.carta img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 15px; }
.carta span { display: block; padding: .55rem .4rem 0; font-family: 'Unbounded', sans-serif; font-weight: 600; font-size: .95rem; }
.carta-1 { --final: translate(-34%, -4%) rotate(-13deg); z-index: 1; }
.carta-2 { --final: translate(0, -8%) rotate(1deg); z-index: 3; }
.carta-3 { --final: translate(34%, 6%) rotate(12deg); z-index: 2; }
@keyframes abrir { from { transform: translate(-50%, -50%) translate(0, 6%) rotate(0deg); } }

/* --- Apps --------------------------------------------------------------------------------------------- */
.apps { max-width: 1180px; margin: 0 auto; padding: clamp(3rem, 7vw, 6rem) clamp(1rem, 4vw, 2.5rem) 2rem; display: grid; gap: clamp(3.5rem, 8vw, 6.5rem); }
.app { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.6rem, 5vw, 4.5rem); align-items: center; }
.app-qr figure { order: 2; }
.app figure { margin: 0; }
.app figure img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 26px; }
.app figcaption { margin-top: .5rem; font-size: .88rem; color: var(--tinta-suave); }
.app h3 { margin: 0 0 .7rem; font-weight: 700; font-size: clamp(1.7rem, 3.2vw, 2.4rem); line-height: 1.05; }
.app p { margin: 0 0 1rem; max-width: 46ch; }
.donde { color: var(--tinta-suave); font-size: .95rem; }
.app .boton { margin-top: .3rem; }

.instalar { margin-top: 1rem; max-width: 46ch; }
.instalar summary { cursor: pointer; font-weight: 700; width: fit-content; text-decoration: underline; text-underline-offset: .2em; }
.instalar ol { margin: .6rem 0 0; padding-left: 1.3rem; color: var(--tinta-suave); }
.instalar li { margin-bottom: .3rem; }

.ayuda { margin-top: 1.8rem; padding: 1.2rem 1.4rem 1.3rem; background: var(--sol); border-radius: 18px; max-width: 50ch; }
.ayuda h4 { margin: 0 0 .45rem; font-weight: 600; font-size: 1.1rem; line-height: 1.25; }
.ayuda p { margin: 0 0 .7rem; font-size: .98rem; }

/* --- Historia de la mascota -------------------------------------------------------------------------- */
.historia {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: clamp(1.5rem, 5vw, 4rem);
  max-width: 980px; margin: clamp(2rem, 5vw, 4rem) auto 0; padding: 0 clamp(1rem, 4vw, 2.5rem);
}
.historia img { width: clamp(160px, 22vw, 240px); height: auto; }
.historia h2 { margin: 0 0 .8rem; font-weight: 700; font-size: clamp(1.6rem, 3.2vw, 2.3rem); line-height: 1.08; }
.historia p { margin: 0 0 .8rem; max-width: 48ch; }

/* --- Promesas ----------------------------------------------------------------------------------------- */
.promesas {
  max-width: 1180px; margin: clamp(3rem, 7vw, 5rem) auto 0;
  padding: clamp(2.2rem, 5vw, 3.5rem) clamp(1.4rem, 4vw, 3.5rem);
  background: var(--tinta); color: #ece9ff; border-radius: 32px;
}
.promesas h2 { margin: 0 0 1.6rem; font-weight: 700; font-size: clamp(1.6rem, 3.4vw, 2.4rem); color: #fff; }
.promesas ul { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem 3rem; }
.promesas li { padding-top: .9rem; border-top: 2px solid #4a4290; }
.promesas strong { display: block; color: var(--lila); font-size: 1.1rem; }

/* --- Pie ---------------------------------------------------------------------------------------------- */
.pie {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem;
  max-width: 1180px; margin: 0 auto; padding: 3rem clamp(1rem, 4vw, 2.5rem) 3rem;
}
.pie > div:first-child { max-width: 42ch; }
.pie .logo { margin-bottom: .7rem; }
.pie p { margin: 0 0 .5rem; }
.pie-legal { font-size: .88rem; color: var(--tinta-suave); max-width: 44ch; }

/* --- Documento (aviso de privacidad) ------------------------------------------------------------------ */
.documento { max-width: 70ch; margin: 1rem auto 4rem; padding: 0 clamp(1rem, 4vw, 2.5rem); }
.documento h1 { font-weight: 700; font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.08; }
.documento h2 { font-size: 1.15rem; margin: 2rem 0 .4rem; }

/* --- Pantallas angostas ------------------------------------------------------------------------------- */
@media (max-width: 820px) {
  .portada { grid-template-columns: minmax(0, 1fr); border-radius: 0 0 28px 28px; }
  .abanico { height: clamp(240px, 62vw, 380px); }
  .app { grid-template-columns: minmax(0, 1fr); }
  .app-qr figure { order: 0; }
  .promesas { border-radius: 0; }
  .promesas ul { grid-template-columns: minmax(0, 1fr); }
  .historia { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
  .historia p { margin-inline: auto; }
}
@media (max-width: 520px) {
  body { font-size: 17px; }
  .carta { width: 66%; }
  .carta span { font-size: .8rem; }
  .boton { width: 100%; }
}

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