/* =========================================================
   Confite — estilos (demo de Tereré Estudio)
   Concepto: el cumple se arma como un juego por niveles, con barra de progreso,
   y la reserva termina con la invitación lista para mandar.
   ========================================================= */
@font-face { font-family: "Poppins"; src: url("../../fonts/poppins-bold.woff") format("woff"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../../fonts/inter-regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../../fonts/inter-semibold.woff") format("woff"); font-weight: 600; font-display: swap; }

:root {
  --crema: #fff7ec;
  --papel: #ffffff;
  --tinta: #2b2350;
  --suave: #645d84;
  --rosa: #ff4f7b;
  --rosa-osc: #d62f5c;
  --amarillo: #ffcb2f;
  --celeste: #35c3ee;
  --violeta: #7b5cff;
  --verde: #2ec4a0;
  --linea: rgba(43, 35, 80, .14);
  --tit: "Poppins", "Avenir Next", system-ui, sans-serif;
  --txt: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --te-toast-bg: var(--tinta);
  --te-toast-fg: var(--amarillo);
  --te-demo-bg: var(--tinta);
  --te-demo-fg: var(--amarillo);
}
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--crema); color: var(--tinta); font: 400 1rem/1.55 var(--txt); overflow-x: clip; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--tit); font-weight: 700; line-height: 1.02; letter-spacing: -.03em; }
h2 { font-size: clamp(2.2rem, 1.4rem + 3.4vw, 4rem); }
h1 span, h2 span { color: var(--rosa-osc); }
:focus-visible { outline: 3px solid var(--violeta); outline-offset: 3px; }
.sutil { color: var(--suave); font-size: .84rem; font-weight: 400; }
.nota { font-size: .82rem; color: var(--suave); }
.ayuda { font-size: .86rem; color: var(--suave); }
.enlace { padding: 0; border: 0; background: none; color: var(--violeta); font-weight: 600; text-decoration: underline; cursor: pointer; justify-self: start; }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 12px 22px; border: 0; border-radius: 999px; font: 700 1rem/1.1 var(--tit); text-decoration: none; text-align: center; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; box-shadow: 0 4px 0 rgba(43, 35, 80, .25); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(43, 35, 80, .25); }
.btn svg { width: 20px; height: 20px; }
.btn--rosa { background: var(--rosa-osc); color: #fff; }
.btn--amarillo { background: var(--amarillo); color: var(--tinta); }
.btn--linea { background: var(--papel); color: var(--tinta); box-shadow: inset 0 0 0 2px var(--tinta), 0 4px 0 rgba(43, 35, 80, .25); }
.btn--chico { min-height: 40px; padding: 8px 16px; font-size: .9rem; }
.btn--ancho { width: 100%; min-height: 58px; font-size: 1.12rem; }
.btn--wa { background: #148a47; color: #fff; }
.btn--ig { background: #b4246f; color: #fff; }
.botones { display: flex; gap: 10px; flex-wrap: wrap; }
.botones .btn { flex: 1 1 0; min-width: 0; }

/* ---------- Cabecera con barra de progreso ---------- */
.cab { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 12px; padding: 8px 16px; background: rgba(255, 247, 236, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--linea); }
.cab > a:first-child { flex: none; }
.cab__logo { width: 100px; }
.xp { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.xp__barra { flex: 1; height: 12px; border-radius: 999px; background: var(--linea); overflow: hidden; }
.xp__barra span { display: block; height: 100%; width: var(--p, 0%); border-radius: inherit; background: linear-gradient(90deg, var(--rosa), var(--amarillo), var(--celeste)); transition: width .4s ease; }
.xp b { font: 700 .86rem/1 var(--tit); min-width: 3ch; }
@media (min-width: 900px) { .cab { padding: 10px 40px; gap: 26px; } .cab__logo { width: 134px; } .xp { max-width: 360px; margin-left: auto; } }

/* ---------- Armar ---------- */
.armar { max-width: 1320px; margin: 0 auto; padding: 22px 16px 50px; display: grid; gap: 18px; }
.armar__titulo h1 { font-size: clamp(2.3rem, 1.4rem + 4vw, 4.6rem); }
.armar__titulo h1 span { display: block; }
.armar__titulo p { margin-top: 10px; color: var(--suave); font-size: 1.05rem; }
.escena { position: sticky; top: 62px; z-index: 20; border-radius: 26px; overflow: hidden; background: var(--papel); box-shadow: 0 0 0 3px var(--tinta), 0 8px 0 var(--tinta); }
.escena svg { width: 100%; height: auto; max-height: 34svh; }
.escena__barra { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 16px; background: var(--tinta); color: var(--crema); }
.escena__total { font: 700 1.4rem/1 var(--tit); color: var(--amarillo); white-space: nowrap; }
.escena__det { flex: 1; min-width: 0; font-size: .8rem; color: #d6d1ef; line-height: 1.25; }
@media (min-width: 1000px) {
  .armar { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); grid-template-areas: "t t" "e n"; gap: 26px 40px; padding: 40px 40px 70px; align-items: start; }
  .armar__titulo { grid-area: t; }
  .escena { grid-area: e; top: 92px; }
  .escena svg { max-height: none; }
  .niveles { grid-area: n; }
}

/* Escena: colores por temática */
.escena { --t1: var(--rosa); --t2: var(--amarillo); --t3: var(--celeste); --pared: #fff1f4; }
.s-pared { fill: var(--pared); transition: fill .4s ease; }
.s-piso { fill: #f3e2c8; }
.s-zocalo { fill: #e7cfa8; }
.s-t1 { fill: var(--t1); transition: fill .4s ease; }
.s-t2 { fill: var(--t2); transition: fill .4s ease; }
.s-t3 { fill: var(--t3); transition: fill .4s ease; }
.s-hilo { fill: none; stroke: var(--tinta); stroke-width: 1.2; opacity: .5; }
.s-motivo { fill: var(--t1); opacity: .16; transition: fill .4s ease; }
.s-mesa { fill: #fff; stroke: var(--tinta); stroke-width: 2.5; }
.s-cara { fill: #f6c9a0; }
.s-torta { fill: #fff; stroke: var(--tinta); stroke-width: 2; }
.s-vela { fill: var(--t3); }
.s-llama { fill: #ffb703; }
.s-tinta { fill: var(--tinta); }
.s-blanco { fill: #fff; }
.extra { opacity: 0; transform: translateY(8px); transition: opacity .35s ease, transform .35s ease; transform-box: fill-box; }
.extra.on { opacity: 1; transform: none; }
@media (prefers-reduced-motion: no-preference) {
  .s-globo { animation: flotar 3.6s ease-in-out infinite; transform-box: fill-box; }
  .s-globo:nth-of-type(2n) { animation-delay: -1.2s; }
  .s-pinata.on { animation: hamaca 2.4s ease-in-out infinite; transform-origin: 50% 0; }
  @keyframes flotar { 50% { transform: translateY(-5px); } }
  @keyframes hamaca { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
}

/* Niveles */
.niveles { display: grid; gap: 14px; min-width: 0; }
.nivel { margin: 0; padding: 18px 16px 20px; border: 0; border-radius: 22px; background: var(--papel); box-shadow: 0 0 0 2px var(--linea); display: grid; gap: 12px; min-width: 0; }
.nivel legend { float: left; width: 100%; padding: 0; margin-bottom: 4px; display: flex; align-items: center; gap: 10px; font: 700 1.2rem/1.15 var(--tit); }
.nivel legend + * { clear: both; }
.nivel__n { flex: none; width: 34px; height: 34px; border-radius: 12px; display: inline-grid; place-items: center; background: var(--violeta); color: #fff; font: 700 1rem/1 var(--tit); transform: rotate(-6deg); }
.nivel__n--grande { width: 46px; height: 46px; font-size: 1.4rem; vertical-align: middle; margin-right: 8px; }
.nivel.hecho .nivel__n { background: var(--verde); }
.chicos { display: flex; align-items: center; justify-content: center; gap: 18px; }
.chicos__n { font: 700 3.4rem/1 var(--tit); min-width: 2.4ch; text-align: center; color: var(--rosa-osc); }
.redondo { width: 54px; height: 54px; border-radius: 50%; border: 0; background: var(--amarillo); color: var(--tinta); font: 700 1rem/1 var(--tit); cursor: pointer; box-shadow: 0 4px 0 rgba(43, 35, 80, .25); }
.redondo:active { transform: translateY(3px); box-shadow: none; }
.redondo:disabled { opacity: .4; cursor: not-allowed; }
input[type="range"] { width: 100%; accent-color: var(--rosa-osc); height: 32px; }
.tematicas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tema { display: grid; justify-items: center; gap: 4px; padding: 10px 6px; border: 0; border-radius: 16px; background: var(--crema); cursor: pointer; box-shadow: inset 0 0 0 2px var(--linea); font: 600 .84rem/1.15 var(--txt); text-align: center; min-width: 0; }
.tema__chapa { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; }
.tema__chapa svg { width: 26px; height: 26px; }
.tema[aria-checked="true"] { box-shadow: inset 0 0 0 3px var(--tinta); background: var(--papel); }
.menus, .extras { display: grid; gap: 8px; }
.menu, .extra-op { display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px 14px; border: 0; border-radius: 16px; background: var(--crema); cursor: pointer; box-shadow: inset 0 0 0 2px var(--linea); min-width: 0; }
.menu b, .extra-op b { display: block; font-weight: 600; }
.menu small, .extra-op small { color: var(--suave); font-size: .8rem; }
.menu > span:first-child, .extra-op > span:first-child { flex: 1; min-width: 0; }
.precio { font: 700 .95rem/1 var(--tit); white-space: nowrap; }
.menu[aria-checked="true"] { box-shadow: inset 0 0 0 3px var(--tinta); background: var(--papel); }
.extra-op[aria-pressed="true"] { box-shadow: inset 0 0 0 3px var(--rosa-osc); background: #fff0f4; }
.tilde { flex: none; width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--tinta); display: grid; place-items: center; background: var(--papel); }
.tilde svg { width: 16px; height: 16px; opacity: 0; color: #fff; }
.extra-op[aria-pressed="true"] .tilde { background: var(--rosa-osc); border-color: var(--rosa-osc); }
.extra-op[aria-pressed="true"] .tilde svg { opacity: 1; }

/* ---------- Fecha y reserva ---------- */
.fecha { padding: 60px 16px 70px; background: var(--papel); border-top: 3px solid var(--tinta); }
.fecha__grilla { max-width: 1180px; margin: 0 auto; display: grid; gap: 26px; align-items: start; }
@media (min-width: 960px) { .fecha__grilla { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 48px; } .ticket { position: sticky; top: 92px; } }
.form, .listo { display: grid; gap: 12px; min-width: 0; }
.campo__t { font-weight: 600; font-size: .95rem; }
.form > .campo__t { margin-top: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 48px; padding: 9px 16px; border: 0; border-radius: 16px; background: var(--crema); box-shadow: inset 0 0 0 2px var(--linea); cursor: pointer; font-weight: 600; text-align: left; }
.chip small { font-weight: 400; font-size: .78rem; color: var(--suave); }
.chip[aria-checked="true"] { background: var(--tinta); color: #fff; box-shadow: none; }
.chip[aria-checked="true"] small { color: var(--amarillo); }
.chip:disabled { opacity: .4; cursor: not-allowed; text-decoration: line-through; }
.dias { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 2px 8px; scrollbar-width: thin; }
.dia { flex: 0 0 auto; scroll-snap-align: start; display: grid; justify-items: center; gap: 2px; width: 70px; padding: 10px 4px; border: 0; border-radius: 18px; background: var(--crema); box-shadow: inset 0 0 0 2px var(--linea); cursor: pointer; }
.dia small { font-size: .72rem; color: var(--suave); text-transform: uppercase; letter-spacing: .06em; }
.dia b { font: 700 1.5rem/1 var(--tit); }
.dia em { font-style: normal; font-size: .68rem; color: var(--rosa-osc); font-weight: 600; }
.dia[aria-checked="true"] { background: var(--rosa-osc); color: #fff; box-shadow: none; }
.dia[aria-checked="true"] small, .dia[aria-checked="true"] em { color: #fff; }
.campos { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); margin-top: 8px; }
.campo { display: grid; gap: 6px; min-width: 0; align-content: end; }
.campo input, .campo select { width: 100%; min-height: 50px; padding: 10px 14px; border: 2px solid var(--linea); border-radius: 14px; background: var(--papel); }
.campo input:focus, .campo select:focus { border-color: var(--violeta); outline: none; box-shadow: 0 0 0 3px rgba(123, 92, 255, .25); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; }
.check input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--rosa-osc); }
.error { color: #b42318; font-weight: 600; min-height: 1.2em; }
.ticket { padding: 22px 20px 26px; border-radius: 22px 22px 6px 6px; background: var(--crema); box-shadow: 0 0 0 2px var(--linea); position: relative; }
.ticket::after { content: ""; position: absolute; left: 0; right: 0; bottom: -10px; height: 12px;
  background: linear-gradient(135deg, var(--crema) 6px, transparent 0) 0 0 / 14px 12px repeat-x, linear-gradient(225deg, var(--crema) 6px, transparent 0) 0 0 / 14px 12px repeat-x; }
.ticket h3 { font-size: 1.6rem; margin-bottom: 10px; }
.ticket__lineas { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.ticket__lineas li { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 6px; border-bottom: 1px dashed var(--linea); font-size: .92rem; }
.ticket__lineas li span:last-child { font-weight: 600; white-space: nowrap; }
.ticket__total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 12px; }
.ticket__total b { font: 700 clamp(1.9rem, 1.5rem + 1.6vw, 2.6rem)/1 var(--tit); color: var(--rosa-osc); }
.ticket__sena { font-size: .88rem; color: var(--suave); }
.listo { justify-items: start; }
.listo__eti { font: 700 .9rem/1 var(--tit); padding: 6px 12px; border-radius: 999px; background: var(--verde); color: #fff; }
.invitacion { width: min(100%, 420px); border-radius: 22px; overflow: hidden; box-shadow: 0 0 0 3px var(--tinta), 0 8px 0 var(--tinta); }
.invitacion canvas { display: block; width: 100%; height: auto; }
.listo details { width: 100%; }
.listo summary { cursor: pointer; font-weight: 600; margin-bottom: 8px; }
.globo { padding: 12px 14px; border-radius: 4px 16px 16px 16px; background: #dcf8c6; color: #111b21; white-space: pre-line; font-size: .92rem; overflow-wrap: anywhere; }

/* ---------- Salón (bento) ---------- */
.salon { padding: 60px 16px 70px; }
.salon > h2, .salon > .nota { max-width: 1180px; margin: 0 auto; }
.salon > .nota { margin-top: 14px; }
.bento { max-width: 1180px; margin: 26px auto 0; display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 4px 10px; }
.bento__item { flex: 0 0 80%; scroll-snap-align: start; min-width: 0; min-height: 210px; display: grid; align-content: end; gap: 8px; padding: 22px; border-radius: 26px; background: var(--papel); box-shadow: 0 0 0 2px var(--linea); }
.bento__item h3 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); }
.bento__item p { color: var(--suave); }
.bento__item--grande { background: var(--rosa-osc); color: #fff; box-shadow: none; }
.bento__item--grande p { color: #ffe3ea; }
.bento__item--amarillo { background: var(--amarillo); box-shadow: none; }
.bento__item--amarillo p, .bento__item--celeste p { color: var(--tinta); }
.bento__item--celeste { background: var(--celeste); box-shadow: none; }
.bento__item--violeta { background: var(--violeta); color: #fff; box-shadow: none; }
.bento__item--violeta p { color: #ece7ff; }
@media (min-width: 760px) {
  .bento { display: grid; overflow: visible; padding: 0; grid-template-columns: 1.3fr 1fr 1fr; grid-template-areas: "a b c" "a d d"; }
  .bento__item:nth-child(1) { grid-area: a; min-height: 440px; }
  .bento__item:nth-child(2) { grid-area: b; }
  .bento__item:nth-child(3) { grid-area: c; }
  .bento__item:nth-child(4) { grid-area: d; }
}

/* ---------- Quiero una así ---------- */
.quiero { padding: 60px 16px; background: var(--amarillo); }
.quiero__fila { max-width: 1180px; margin: 0 auto; display: grid; gap: 22px; align-items: center; }
.quiero h2 { font-size: clamp(2rem, 1.3rem + 3vw, 3.2rem); margin-bottom: 12px; }
.quiero p { max-width: 56ch; }
.quiero .btn { justify-self: start; }
@media (min-width: 900px) { .quiero__fila { grid-template-columns: 1fr auto; } }

/* ---------- Pie y páginas internas ---------- */
.pie { background: var(--tinta); color: #d6d1ef; padding: 44px 16px 16px; font-size: .92rem; }
.pie__fila { max-width: 1180px; margin: 0 auto; display: grid; gap: 22px; }
.pie__fila > div { display: grid; gap: 8px; align-content: start; }
@media (min-width: 768px) { .pie__fila { grid-template-columns: 1.4fr 1fr; } }
.pie__logo { width: 150px; }
.pie__t { font: 700 1.1rem/1 var(--tit); color: var(--amarillo); }
.pie a { color: #fff; }
.pie .btn { justify-self: start; min-height: 44px; }
.pie__aviso { max-width: 1180px; margin: 26px auto 0; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .15); font-size: .8rem; }
.interna { max-width: 760px; margin: 0 auto; padding: 40px 16px 60px; display: grid; gap: 14px; }
.interna h1 { font-size: clamp(2.3rem, 1.6rem + 3vw, 3.4rem); }
.interna h2 { font-size: 1.5rem; margin-top: 10px; }
.interna ul { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; }
.interna .aviso { padding: 14px 18px; border-radius: 16px; background: var(--papel); box-shadow: 0 0 0 2px var(--linea); }
