/* =============================================================================
   KidsCal · sitio de presentación (kids-cal.com)
   Estático, sin build. Comparte los tokens de marca con la app para que se
   sienta el mismo producto; el layout sí es propio de una página de venta.
   ========================================================================== */

:root {
    --grad:      linear-gradient(120deg, #874BFF 0%, #4B8BFF 55%, #00C5FF 100%);
    --grad-glow: rgba(135, 75, 255, 0.35);

    --bg:        #F6F7FB;
    --surface:   #ffffff;
    --ink:       #14162B;
    --ink-2:     #565B78;
    --ink-3:     #868BA6;
    --line:      rgba(20, 22, 43, 0.13);
    --line-soft: rgba(20, 22, 43, 0.07);
    --accent:    #6D28D9;

    --dia-verde:    #22c55e;
    --dia-amarillo: #fbbf24;
    --dia-evento:   #8b5cf6;

    --radius:    22px;
    --radius-sm: 15px;
    --shadow:    0 1px 2px rgba(20,22,43,.04), 0 10px 30px rgba(20,22,43,.07);
    --shadow-lg: 0 2px 6px rgba(20,22,43,.05), 0 24px 60px rgba(20,22,43,.12);

    --glow-1: rgba(99, 102, 241, 0.13);
    --glow-2: rgba(34, 211, 238, 0.10);

    --ancho: 1080px;
    color-scheme: light;
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --bg:        #0B0D16;
    --surface:   #161A2A;
    --ink:       #F2F3F8;
    --ink-2:     #9BA0B4;
    --ink-3:     #5F6478;
    --line:      rgba(255, 255, 255, 0.16);
    --line-soft: rgba(255, 255, 255, 0.10);
    --accent:    #A78BFA;
    --shadow:    0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.35);
    --shadow-lg: 0 2px 6px rgba(0,0,0,.35), 0 24px 60px rgba(0,0,0,.45);
    --glow-1: rgba(135, 75, 255, 0.16);
    --glow-2: rgba(0, 197, 255, 0.10);
}

/* Quien no ha elegido tema sigue al sistema; el atributo del toggle manda. */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --bg:        #0B0D16;
        --surface:   #161A2A;
        --ink:       #F2F3F8;
        --ink-2:     #9BA0B4;
        --ink-3:     #5F6478;
        --line:      rgba(255, 255, 255, 0.16);
        --line-soft: rgba(255, 255, 255, 0.10);
        --accent:    #A78BFA;
        --shadow:    0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.35);
        --shadow-lg: 0 2px 6px rgba(0,0,0,.35), 0 24px 60px rgba(0,0,0,.45);
        --glow-1: rgba(135, 75, 255, 0.16);
        --glow-2: rgba(0, 197, 255, 0.10);
    }
}

/* --- base ---------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html {
    overflow-x: clip;              /* iOS ignora esto en body */
    scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
}

/* Resplandores de fondo, iguales a los de la app. */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background:
        radial-gradient(60rem 40rem at 12% -8%,  var(--glow-1), transparent 65%),
        radial-gradient(50rem 34rem at 92% 12%,  var(--glow-2), transparent 62%);
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 { line-height: 1.18; letter-spacing: -0.025em; margin: 0 0 0.6rem; }
h1 { font-size: clamp(2.1rem, 5.5vw, 3.5rem); font-weight: 750; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); font-weight: 720; }
h3 { font-size: 1.12rem; font-weight: 680; }
p  { margin: 0 0 1rem; color: var(--ink-2); }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }

.contenedor { width: min(var(--ancho), 100% - 2.5rem); margin-inline: auto; }

section { padding: clamp(3.5rem, 8vw, 6rem) 0; }

.centrado { text-align: center; }
.centrado p { max-width: 42rem; margin-inline: auto; }

/* Etiqueta de sección: pequeña, en el acento, sobre cada título. */
.rotulo {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 750;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.6rem;
}

/* --- botones ------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.95rem 1.7rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font: inherit;
    font-weight: 680;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.btn-primario {
    background: var(--grad);
    color: #fff;
    box-shadow: 0 6px 22px var(--grad-glow);
}
.btn-primario:hover { transform: translateY(-2px); box-shadow: 0 10px 30px var(--grad-glow); }
.btn-borde {
    background: transparent;
    color: var(--ink);
    border-color: var(--line);
}
.btn-borde:hover { border-color: var(--accent); color: var(--accent); }
@media (prefers-reduced-motion: reduce) {
    .btn:hover { transform: none; }
}

.acciones {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.6rem;
}
.centrado .acciones { justify-content: center; }

/* --- barra superior ------------------------------------------------------ */

.barra {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line-soft);
}
.barra-cuerpo {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.7rem 0;
}
.barra .logo img { height: 42px; width: auto; }
.barra nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 1.4rem;
}
.barra nav a.enlace {
    color: var(--ink-2);
    text-decoration: none;
    font-size: 0.94rem;
    font-weight: 600;
}
.barra nav a.enlace:hover { color: var(--ink); }
.barra .btn { padding: 0.6rem 1.2rem; font-size: 0.93rem; }

/* En móvil los enlaces de sección estorban: solo quedan los botones. */
@media (max-width: 780px) {
    .barra nav a.enlace { display: none; }
}

/* El sufijo dice en QUÉ TEMA se muestra, no de qué color es el archivo:
   .solo-claro lleva el logo de tinta oscura, .solo-oscuro el de texto blanco. */
.solo-oscuro { display: none; }
:root[data-theme="dark"] .solo-claro  { display: none; }
:root[data-theme="dark"] .solo-oscuro { display: block; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .solo-claro  { display: none; }
    :root:not([data-theme="light"]) .solo-oscuro { display: block; }
}

/* Botón de tema: discreto, a la derecha. */
.tema {
    background: none;
    border: 0;
    padding: 0.35rem;
    color: var(--ink-3);
    cursor: pointer;
    display: flex;
    border-radius: 50%;
}
.tema:hover { color: var(--ink); }
.tema svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8;
            stroke-linecap: round; stroke-linejoin: round; }
.ic-sol { display: none; }
:root[data-theme="dark"] .ic-luna { display: none; }
:root[data-theme="dark"] .ic-sol  { display: block; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .ic-luna { display: none; }
    :root:not([data-theme="light"]) .ic-sol  { display: block; }
}

/* --- hero ---------------------------------------------------------------- */

.hero { padding-top: clamp(2.5rem, 6vw, 4.5rem); padding-bottom: clamp(1rem, 3vw, 2rem); }
.hero-rejilla {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}
@media (max-width: 900px) {
    .hero-rejilla { grid-template-columns: 1fr; }
    .hero-arte { order: -1; }
}
.hero p.entrada {
    font-size: clamp(1.05rem, 2vw, 1.2rem);
    max-width: 34rem;
}
.hero .nota {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--ink-3);
}

/* --- calendario de muestra ----------------------------------------------- */

.muestra {
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 1.25rem;
}
.muestra-cabeza {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.9rem;
}
.muestra-mes { font-weight: 720; font-size: 1.02rem; }
.muestra-quien { display: flex; gap: 0.9rem; font-size: 0.78rem; font-weight: 650; }
.muestra-quien span { display: flex; align-items: center; gap: 0.32rem; }
.muestra-quien i {
    width: 11px; height: 11px; border-radius: 4px; display: block;
}
.dot-a { background: linear-gradient(140deg, var(--dia-verde), #06b6d4 118%); }
.dot-b { background: linear-gradient(140deg, var(--dia-amarillo), #ec4899 118%); }

.muestra-rejilla {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}
.muestra-rejilla b {
    text-align: center;
    font-size: 0.66rem;
    font-weight: 700;
    color: var(--ink-3);
    padding-bottom: 0.2rem;
}
.muestra-rejilla i {
    aspect-ratio: 1;
    border-radius: 8px;
    background: color-mix(in srgb, var(--ink) 7%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.66rem;
    font-style: normal;
    font-weight: 650;
    color: var(--ink-3);
}
.muestra-rejilla i.a { background: linear-gradient(140deg, var(--dia-verde), #06b6d4 118%); color: #fff; }
.muestra-rejilla i.b { background: linear-gradient(140deg, var(--dia-amarillo), #ec4899 118%); color: #fff; }
.muestra-rejilla i.ev { background: linear-gradient(140deg, var(--dia-evento), #6366f1 118%); color: #fff; }
.muestra-rejilla i.vacio { background: transparent; }

.muestra-pie {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.9rem;
    font-size: 0.76rem;
    color: var(--ink-3);
}
.muestra-pie i { width: 10px; height: 10px; border-radius: 3px; display: block;
                 background: linear-gradient(140deg, var(--dia-evento), #6366f1 118%); }

/* --- rejillas de contenido ----------------------------------------------- */

.rejilla {
    display: grid;
    gap: 1.1rem;
    margin-top: 2.5rem;
}
.rejilla.tres  { grid-template-columns: repeat(3, 1fr); }
.rejilla.dos   { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .rejilla.tres { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .rejilla.dos  { grid-template-columns: 1fr; } }

.ficha {
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-sm);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}
.ficha h3 { margin-bottom: 0.35rem; }
.ficha p  { margin: 0; font-size: 0.95rem; }

/* Icono de la ficha: cuadro con el gradiente de marca. */
.ficha .ic {
    width: 42px; height: 42px;
    border-radius: 13px;
    background: var(--grad);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 0.9rem;
}
.ficha .ic svg { width: 21px; height: 21px; fill: none; stroke: #fff; stroke-width: 1.9;
                 stroke-linecap: round; stroke-linejoin: round; }

/* Pasos numerados */
.paso .num {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--grad);
    color: #fff;
    font-weight: 780;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 0.9rem;
}

/* Lista de funciones, agrupada en columnas */
.grupo h3 {
    display: flex; align-items: center; gap: 0.5rem;
    padding-bottom: 0.7rem;
    margin-bottom: 0.9rem;
    border-bottom: 1px solid var(--line-soft);
}
.grupo h3 svg { width: 18px; height: 18px; fill: none; stroke: var(--accent);
                stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.grupo ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; }
.grupo li { display: flex; gap: 0.6rem; font-size: 0.94rem; color: var(--ink-2); }
.grupo li b { color: var(--ink); font-weight: 650; }
.grupo li::before {
    content: '';
    flex: none;
    width: 7px; height: 7px;
    margin-top: 0.58rem;
    border-radius: 50%;
    background: var(--grad);
}

/* --- precio -------------------------------------------------------------- */

.precio-caja {
    max-width: 34rem;
    margin: 2.5rem auto 0;
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: clamp(1.75rem, 4vw, 2.6rem);
    text-align: center;
    position: relative;
    overflow: hidden;
}
/* Filo de color arriba, para que la caja no se vea plana. */
.precio-caja::before {
    content: '';
    position: absolute; inset: 0 0 auto 0;
    height: 4px;
    background: var(--grad);
}
.precio-cifra {
    font-size: clamp(2.8rem, 7vw, 3.8rem);
    font-weight: 780;
    letter-spacing: -0.04em;
    line-height: 1;
}
.precio-cifra span { font-size: 1.1rem; font-weight: 650; color: var(--ink-3); }
.precio-que { color: var(--ink-2); margin-top: 0.4rem; }

.precio-lista {
    list-style: none;
    margin: 1.75rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.75rem;
    text-align: left;
}
.precio-lista li { display: flex; gap: 0.65rem; align-items: flex-start; font-size: 0.96rem; }
.precio-lista svg {
    flex: none; width: 19px; height: 19px; margin-top: 0.15rem;
    fill: none; stroke: var(--dia-verde); stroke-width: 2.4;
    stroke-linecap: round; stroke-linejoin: round;
}

/* --- confianza ----------------------------------------------------------- */

.confianza {
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    padding: clamp(1.75rem, 4vw, 2.75rem);
    box-shadow: var(--shadow);
}

/* --- preguntas ----------------------------------------------------------- */

.preguntas { max-width: 46rem; margin: 2.5rem auto 0; display: grid; gap: 0.7rem; }
.preguntas details {
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-sm);
    padding: 1.05rem 1.3rem;
    box-shadow: var(--shadow);
}
.preguntas summary {
    cursor: pointer;
    font-weight: 660;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.preguntas summary::-webkit-details-marker { display: none; }
.preguntas summary::after {
    content: '';
    flex: none;
    width: 9px; height: 9px;
    border-right: 2px solid var(--ink-3);
    border-bottom: 2px solid var(--ink-3);
    transform: rotate(45deg);
    transform-origin: center;
    margin-bottom: 4px;              /* centra ópticamente la punta */
    transition: transform 0.2s ease, margin 0.2s ease;
}
.preguntas details[open] summary::after { transform: rotate(-135deg); margin: 4px 0 0; }
.preguntas details p { margin: 0.85rem 0 0; font-size: 0.95rem; }

/* --- cierre -------------------------------------------------------------- */

.cierre {
    background: var(--grad);
    border-radius: var(--radius);
    padding: clamp(2.25rem, 6vw, 3.5rem);
    text-align: center;
    color: #fff;
    box-shadow: 0 18px 50px var(--grad-glow);
}
.cierre h2 { color: #fff; }
.cierre p  { color: rgba(255,255,255,0.9); max-width: 34rem; margin-inline: auto; }
.cierre .btn-primario {
    background: #fff;
    color: #4B2AAF;
    box-shadow: 0 6px 20px rgba(0,0,0,0.16);
}
.cierre .btn-borde { color: #fff; border-color: rgba(255,255,255,0.5); }
.cierre .btn-borde:hover { color: #fff; border-color: #fff; background: rgba(255,255,255,0.12); }

/* --- pie ----------------------------------------------------------------- */

.pie {
    border-top: 1px solid var(--line-soft);
    padding: 2.5rem 0 3rem;
    font-size: 0.9rem;
    color: var(--ink-3);
}
.pie-cuerpo {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
    justify-content: space-between;
}
.pie img { height: 36px; width: auto; }
.pie nav { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.pie a { color: var(--ink-3); text-decoration: none; }
.pie a:hover { color: var(--ink); }
.pie-legal { width: 100%; margin: 0; font-size: 0.84rem; }

/* --- documento legal (aviso.html) ---------------------------------------- */

.doc { max-width: 46rem; margin-inline: auto; padding: clamp(2rem, 5vw, 3.5rem) 0; }
.doc h2 { margin-top: 2.5rem; }
.doc h3 { margin-top: 1.6rem; }
.doc p, .doc li { color: var(--ink-2); }
.doc ul { padding-left: 1.2rem; }
.doc li { margin-bottom: 0.4rem; }
.doc .volver {
    display: inline-flex; align-items: center; gap: 0.35rem;
    color: var(--ink-3); text-decoration: none; font-weight: 600; font-size: 0.92rem;
    margin-bottom: 1.5rem;
}
.doc .volver:hover { color: var(--ink); }
.doc .volver svg { width: 16px; height: 16px; fill: none; stroke: currentColor;
                   stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* --- entradas suaves al hacer scroll ------------------------------------- */

.aparece {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.aparece.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .aparece { opacity: 1; transform: none; transition: none; }
}
