/* =============================================================================
   Estilo de la web de My Creative Theme Park.
   Claro y luminoso, con el azul y el amarillo de la marca, y todo redondeado.
   ============================================================================= */
:root {
  --fondo: #f7f9fc;
  --fondo-2: #eef2f8;
  --tarjeta: #ffffff;
  --borde: #d7e0ec;
  --texto: #16202e;
  --texto-suave: #5a6b80;
  --verde: #1f9d55;
  --azul: #1d6fd0;
  --amarillo: #f0b429;
  --rojo: #d34f3c;
  --radio: 16px;
  --ancho: 1180px;
  --sombra: 0 14px 38px rgba(22, 40, 70, 0.12);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--fondo);
  color: var(--texto);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* `height: auto` es imprescindible: las imágenes llevan width y height fijos en el HTML
   (para que el navegador reserve el hueco y la página no dé saltos al cargar), y sin esto
   al encogerlas en el móvil se quedaban con el alto de escritorio y salían deformadas. */
img { max-width: 100%; height: auto; display: block; }
a { color: var(--azul); text-decoration: none; }
a:hover { text-decoration: underline; }

.contenedor { width: min(var(--ancho), calc(100% - 48px)); margin: 0 auto; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 16px; font-weight: 600; letter-spacing: -0.02em; }
h1 { font-size: clamp(38px, 6vw, 68px); }
h2 { font-size: clamp(28px, 3.6vw, 42px); }
h3 { font-size: 20px; }
p { margin: 0 0 16px; color: var(--texto-suave); }
.lead { font-size: clamp(18px, 2vw, 22px); color: #3d4d63; }

/* --- Barra de arriba --- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid var(--borde);
}
.nav .contenedor { display: flex; align-items: center; gap: 28px; height: 68px; }
.marca { display: flex; align-items: center; gap: 12px; font-weight: 600; color: var(--texto); }
.marca:hover { text-decoration: none; }
.marca-icono {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(140deg, var(--verde), var(--azul));
  display: grid; place-items: center; font-size: 18px;
}
.nav nav { display: flex; gap: 22px; margin-left: auto; }
.nav nav a { color: var(--texto-suave); font-size: 15px; }
.nav nav a:hover { color: var(--texto); text-decoration: none; }

/* --- Botones --- */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 24px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 16px; cursor: pointer; transition: transform .12s ease, filter .12s ease;
  font-family: inherit;
}
.boton:hover { text-decoration: none; transform: translateY(-1px); filter: brightness(1.07); }
.boton:active { transform: translateY(0); }
.boton-primario { background: linear-gradient(135deg, var(--azul), #2f8ae0); color: #ffffff; }
.boton-secundario { background: transparent; border-color: var(--borde); color: var(--texto); }
.boton-ancho { width: 100%; }
.boton:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* --- Portada --- */
.portada { position: relative; padding: 88px 0 72px; overflow: hidden; }
.portada::before {
  content: ''; position: absolute; inset: -30% -10% auto; height: 620px;
  background: radial-gradient(60% 60% at 50% 40%, rgba(29, 111, 208, .10), transparent 70%),
              radial-gradient(45% 45% at 80% 10%, rgba(240, 180, 41, .16), transparent 70%);
  pointer-events: none;
}
.portada .contenedor { position: relative; }
.etiqueta {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  background: rgba(29, 111, 208, .09); border: 1px solid rgba(29, 111, 208, .28);
  color: var(--azul); font-size: 14px; font-weight: 500; margin-bottom: 20px;
}
.portada-acciones { display: flex; flex-wrap: wrap; gap: 14px; margin: 28px 0 18px; }
.portada-nota { font-size: 14px; color: var(--texto-suave); }
.portada-imagen {
  margin-top: 46px; border-radius: 22px; overflow: hidden;
  border: 1px solid var(--borde); box-shadow: var(--sombra);
}
.portada-imagen img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }

/* --- Secciones --- */
section { padding: 72px 0; }
.seccion-titulo { max-width: 720px; margin-bottom: 44px; }

.rejilla { display: grid; gap: 22px; }
.rejilla-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.rejilla-2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }

.tarjeta {
  background: var(--tarjeta); box-shadow: 0 2px 10px rgba(22, 40, 70, .05);
  border: 1px solid var(--borde); border-radius: var(--radio); padding: 26px;
}
.tarjeta h3 { margin-bottom: 8px; }
.tarjeta p { margin: 0; font-size: 15px; }
.tarjeta-icono {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  font-size: 22px; margin-bottom: 16px; background: rgba(29, 111, 208, .10);
}

/* --- Tira de ilustraciones --- */
/* Son dibujos de promoción, no capturas: por eso van con su aviso debajo (.pie-arte)
   y en la galería quedan solo las capturas de verdad. */
.arte-tira { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin-bottom: 10px; }
.arte-tira figure { margin: 0; border-radius: var(--radio); overflow: hidden; border: 1px solid var(--borde); background: var(--tarjeta); }
.arte-tira img { aspect-ratio: 6 / 5; object-fit: cover; }
.arte-tira figcaption { padding: 12px 16px; font-size: 15px; font-weight: 600; }
.pie-arte { font-size: 13px; color: var(--texto-suave); margin: 8px 0 34px; text-align: center; }

/* --- Galería --- */
.galeria { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.galeria figure { margin: 0; border-radius: var(--radio); overflow: hidden; border: 1px solid var(--borde); cursor: zoom-in; }
.galeria img { transition: transform .35s ease; aspect-ratio: 16 / 9; object-fit: cover; }
.galeria figure:hover img { transform: scale(1.04); }
.galeria figcaption { padding: 12px 16px; font-size: 14px; color: var(--texto-suave); background: var(--tarjeta); }

.lupa {
  position: fixed; inset: 0; background: rgba(12, 20, 34, .88); display: none;
  place-items: center; z-index: 100; padding: 24px; cursor: zoom-out;
}
.lupa.abierta { display: grid; }
.lupa img { max-height: 88vh; border-radius: 14px; }

/* --- Precio --- */
.precio-caja {
  max-width: 460px; margin: 0 auto; text-align: center; padding: 38px 32px;
  border: 1px solid rgba(29, 111, 208, .28); border-radius: 22px;
  background: linear-gradient(180deg, #ffffff, var(--fondo-2));
  box-shadow: var(--sombra);
}
.precio-numero { font-size: 60px; font-weight: 700; letter-spacing: -0.03em; }
.precio-numero span { font-size: 22px; color: var(--texto-suave); font-weight: 500; }
.precio-lista { list-style: none; margin: 24px 0; padding: 0; text-align: left; }
.precio-lista li { padding: 9px 0 9px 30px; position: relative; color: #3d4d63; font-size: 15px; }
.precio-lista li::before {
  content: '✓'; position: absolute; left: 0; top: 9px; color: var(--verde); font-weight: 700;
}

/* --- Preguntas --- */
details {
  border: 1px solid var(--borde); border-radius: 14px; padding: 18px 22px; margin-bottom: 12px;
  background: var(--tarjeta);
}
details summary { cursor: pointer; font-weight: 600; list-style: none; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: '+'; float: right; color: var(--texto-suave); font-size: 22px; line-height: 1; }
details[open] summary::after { content: '–'; }
details p { margin: 14px 0 0; font-size: 15px; }

/* --- Pie --- */
footer { border-top: 1px solid var(--borde); padding: 42px 0; margin-top: 40px; }
footer .contenedor { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; }
footer p { margin: 0; font-size: 14px; }
.pie-enlaces { display: flex; gap: 20px; font-size: 14px; }

/* --- Formularios y cuenta --- */
.panel {
  max-width: 460px; margin: 0 auto; background: var(--tarjeta);
  border: 1px solid var(--borde); border-radius: 20px; padding: 32px;
}
.panel-ancho { max-width: 760px; }
label { display: block; font-size: 14px; color: var(--texto-suave); margin: 16px 0 6px; }
input[type=text], input[type=email], input[type=password] {
  width: 100%; padding: 13px 15px; border-radius: 12px; font-size: 16px; font-family: inherit;
  background: #ffffff; border: 1px solid var(--borde); color: var(--texto);
}
input:focus { outline: 2px solid rgba(88, 166, 255, .55); outline-offset: 1px; }
.pestañas { display: flex; gap: 6px; background: var(--fondo-2); padding: 5px; border-radius: 999px; margin-bottom: 8px; }
.pestañas button {
  flex: 1; padding: 10px; border-radius: 999px; border: none; cursor: pointer; font-family: inherit;
  font-size: 15px; font-weight: 600; background: transparent; color: var(--texto-suave);
}
.pestañas button.activa { background: var(--azul); color: #ffffff; }
.aviso { padding: 12px 16px; border-radius: 12px; font-size: 15px; margin: 16px 0 0; }
.aviso-error { background: rgba(211, 79, 60, .10); border: 1px solid rgba(211, 79, 60, .35); color: #a3301f; }
.aviso-ok { background: rgba(31, 157, 85, .10); border: 1px solid rgba(31, 157, 85, .35); color: #156b3a; }
.dato { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--borde); font-size: 15px; }
.dato:last-child { border-bottom: none; }
.dato span:first-child { color: var(--texto-suave); }
.clave {
  font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: 18px; letter-spacing: 1px;
  background: var(--fondo-2); border: 1px dashed var(--borde); border-radius: 12px; padding: 14px; text-align: center; margin: 8px 0 0;
}
.insignia { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.insignia-ok { background: rgba(78, 201, 127, .15); color: var(--verde); }
.insignia-no { background: rgba(239, 106, 90, .15); color: var(--rojo); }

/* --- Animación de aparición ---
   Se esconde SOLO cuando el JavaScript ha arrancado (clase `con-animaciones` en <html>).
   Así, si el archivo no carga, la página se ve entera en vez de quedarse en blanco. */
.con-animaciones .aparece { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.con-animaciones .aparece.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .con-animaciones .aparece { opacity: 1; transform: none; transition: none; }
}

@media (max-width: 760px) {
  .nav nav { display: none; }
  section { padding: 54px 0; }
}
