/* Factory Of Dreams · Masterclass Claude
   Lenguaje visual actual de FOD: Gordita grande en caja baja, O sustituida por el
   asterisco de IAMOKUDA, etiquetas en cápsula con flecha, bandas de color a sangre. */

@font-face { font-family: "Gordita"; src: url("fonts/Gordita-Light.otf") format("opentype"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Gordita"; src: url("fonts/Gordita-Regular.otf") format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Gordita"; src: url("fonts/Gordita-Medium.otf") format("opentype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Gordita"; src: url("fonts/Gordita-Bold.otf") format("opentype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Gordita"; src: url("fonts/Gordita-RegularItalic.otf") format("opentype"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "IAMOKUDA"; src: url("fonts/IAMOKUDA.ttf") format("truetype"); font-weight: 100 700; font-display: swap; }

:root {
  --amarillo: #F3CC23; --naranja: #FF732D; --azul: #00B5DE; --verde: #2DAA4B;
  --negro: #000; --blanco: #fff;
  --rosa-claro: #F6BED7; --rosa: #F687AB; --malva: #B174D9; --violeta: #8F24E2;
  --azul-oscuro: #5A6EE2; --verde-mar: #A9E5CB; --verde-hierba: #A8D42E; --naranja-claro: #FFB870;
  --rojo: #E8322A; --lima: #8DC63F; --verde-oscuro: #00853E;

  --bg: var(--blanco); --bg-2: #F3F3F3; --card: var(--blanco); --ink: var(--negro);
  --muted: #555; --line: #DADADA; --sec: var(--amarillo);
  --font: Gordita, "DM Sans", system-ui, -apple-system, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #000; --bg-2: #151515; --card: #0E0E0E; --ink: #fff; --muted: #B5B5B5; --line: #333; }
}
:root[data-theme="dark"] { --bg: #000; --bg-2: #151515; --card: #0E0E0E; --ink: #fff; --muted: #B5B5B5; --line: #333; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.5; overflow-x: hidden; }
h1, h2, h3 { margin: 0; font-weight: 400; line-height: 1; letter-spacing: -.015em; }
h1 { font-size: clamp(2.6rem, 9vw, 6rem); }
h2 { font-size: clamp(2rem, 6vw, 3.6rem); }
h3 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
p { margin: 0 0 1em; }
a { color: inherit; }
strong { font-weight: 700; }
em, .fecha { font-style: italic; }
.muted { color: var(--muted); }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 20px; }

/* La O como asterisco: glifo O.ss03 de IAMOKUDA dentro de un texto en Gordita */
.ast { font-family: IAMOKUDA, var(--font); font-feature-settings: "ss03"; font-weight: 400; font-size: .86em; line-height: 1; letter-spacing: 0; display: inline-block; transform-origin: 50% 61%; animation: girar 14s linear infinite; }
.ast.x { font-size: .6em; position: relative; top: -.01em; } /* a la altura de la caja baja (x-height de Gordita) */
@keyframes girar { to { transform: rotate(360deg); } }
.asterisco { transform-origin: 50% 50%; animation: girar 24s linear infinite; }
@media (prefers-reduced-motion: reduce) { .ast, .asterisco { animation: none; } }

/* Barra superior y pie: texto pequeño como en el programa de actividades */
header.top, footer.site { font-size: .95rem; }
header.top .wrap, footer.site .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 16px; padding-bottom: 16px; }
header.top a { text-decoration: none; display: block; }
header.top .wordmark { height: 42px; width: auto; display: block; fill: currentColor; }
@media (max-width: 640px) { header.top .wordmark { height: 36px; } }
footer.site { padding-bottom: 24px; }
footer.site .logo { height: 22px; width: auto; fill: currentColor; display: block; }

/* Bandas de color a sangre */
.band { color: var(--negro); padding: 28px 0 30px; }
.band { background: var(--band); }
.band.amarillo { --band: var(--amarillo); } .band.azul { --band: var(--azul); } .band.naranja { --band: var(--naranja); }
.band.verde { --band: var(--verde); } .band.rosa { --band: var(--rosa); } .band.lima { --band: var(--lima); }
.band.malva { --band: var(--malva); } .band.negro { --band: var(--negro); color: var(--blanco); }
.band.hero { padding: 56px 0 44px; }
.band.hero h1 { margin-bottom: 18px; }
.band .lead { font-size: clamp(1.05rem, 2vw, 1.3rem); max-width: 42em; margin: 18px 0 0; }
/* Filas tipo "programa": altura fija, título mayor que la banda y recortado por la siguiente */
.band.fila { --fh: clamp(84px, 13vw, 128px); height: var(--fh); padding: 0; overflow: hidden; }
.band.fila .wrap { height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) 34%; column-gap: 28px; align-items: center; }
a.band, .band.fila a { text-decoration: none; display: block; cursor: pointer; transition: filter .15s ease; }
a.band:hover { filter: brightness(1.08); }
.band.fila h2 { align-self: start; height: 100%; overflow: hidden; font-size: var(--fh); line-height: 1; white-space: nowrap; padding-top: calc(var(--fh) * 0.12); letter-spacing: -.025em; display: block; }
.band.fila h2 .bl { display: inline-block; width: 0; height: 0; vertical-align: baseline; }
.band.fila .num { font-style: italic; font-size: .5em; margin-right: .22em; letter-spacing: 0; vertical-align: baseline; }
.band.fila .desc { font-size: .9rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 760px) { .band.fila .wrap { grid-template-columns: minmax(0, 1fr); } .band.fila .desc { display: none; } }
.bands { display: block; }

/* Cápsula + flecha + cursiva: "ACTIVIDADES → 26/27" */
.pill-row { display: flex; align-items: center; flex-wrap: wrap; gap: .35em .55em; font-size: clamp(1.1rem, 2.6vw, 1.7rem); margin: 0; }
.pill { display: inline-block; border: 2px solid currentColor; border-radius: 999px; padding: .12em .75em .1em; text-transform: uppercase; font-weight: 500; letter-spacing: .02em; font-size: .78em; line-height: 1.4; }
.pill-row .arrow { font-weight: 300; }
.pill-row em { font-style: italic; }

/* Asterisco multicolor */
.asterisco { width: 120px; height: 120px; display: block; }

/* Bloques de contenido */
.card { background: var(--card); border: 1px solid var(--ink); padding: 26px 28px; }
.card + .card { margin-top: 18px; }
.cols { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* Botones en cápsula */
.btn {
  display: inline-flex; align-items: center; gap: 12px; padding: 13px 26px 12px; border-radius: 999px;
  border: 2px solid var(--ink); background: var(--ink); color: var(--bg); font: inherit; font-size: 1rem;
  font-weight: 500; text-transform: uppercase; letter-spacing: .02em; cursor: pointer; text-decoration: none; line-height: 1.3;
  transition: background .15s ease, color .15s ease;
}
.btn::after { content: "→"; font-weight: 300; font-size: 1.2em; line-height: 1; }
.btn.sin-flecha::after { content: none; }
.btn.grande { font-size: clamp(1.15rem, 2.4vw, 1.5rem); padding: 18px 34px 17px; gap: 16px; }
.cta { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 22px; margin: 30px 0 0; }
.cta-nota { font-size: .95rem; }
.band .btn.grande { background: var(--negro); color: var(--blanco); }
.band .btn.grande:hover { background: var(--amarillo); color: var(--negro); border-color: var(--negro); }
@media (max-width: 640px) { .btn.grande { width: 100%; justify-content: center; } }
.btn.secondary { background: transparent; color: var(--ink); }
.btn:hover { background: var(--sec); border-color: var(--ink); color: var(--negro); }
.band .btn { border-color: var(--negro); background: var(--negro); color: var(--blanco); }
.band .btn.secondary { background: transparent; color: var(--negro); }
.band .btn:hover { background: var(--blanco); color: var(--negro); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn:focus-visible, input:focus-visible, textarea:focus-visible, .opt:focus-within { outline: 3px solid var(--azul); outline-offset: 2px; }

/* Puerta de acceso */
.gate { position: fixed; inset: 0; background: var(--negro); color: var(--blanco); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 20px; }
.gate .box { width: 100%; max-width: 440px; text-align: center; }
.gate .asterisco { margin: 0 auto 28px; }
.gate h2 { margin-bottom: 10px; }
.gate p { color: #CFCFCF; }
.gate input { width: 100%; font: inherit; font-size: 1.1rem; letter-spacing: .08em; text-align: center; padding: 14px 20px; border: 2px solid #fff; border-radius: 999px; background: #000; color: #fff; margin: 14px 0; }
.gate input::placeholder { color: #777; letter-spacing: .02em; }
.gate .err { color: var(--naranja); min-height: 1.4em; margin: 0 0 8px; }
.gate .btn { width: 100%; justify-content: center; background: var(--amarillo); border-color: var(--amarillo); color: #000; }
.gate .btn:hover { background: #fff; border-color: #fff; }
body.locked > *:not(.gate) { visibility: hidden; }

/* Formulario */
.progress { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 10px 0 8px; }
.progress .bar { height: 10px; border-radius: 999px; background: var(--bg-2); overflow: hidden; }
.progress .bar > span { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--sec); transition: width .3s ease, background .3s ease; }
.progress .label-row { display: flex; justify-content: space-between; font-size: .9rem; margin-top: 6px; }
.progress .label-row em { font-style: italic; }

.section { display: none; }
.section.active { display: block; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.section .band { padding: 30px 0 32px; }
.section .band h2 { margin-bottom: 10px; }
.section .band p { margin: 0; max-width: 40em; }
.section .cuerpo { padding-top: 28px; }

.q { margin: 0 0 28px; }
.q:last-child { margin-bottom: 0; }
.q label.main, .q .main { display: block; font-weight: 500; font-size: 1.1rem; line-height: 1.3; margin-bottom: 12px; }
.q .main .req { color: var(--naranja); margin-left: 4px; }
.q .hint { font-size: .9rem; color: var(--muted); margin: -6px 0 10px; }
.q input[type=text], .q input[type=email], .q textarea {
  width: 100%; font: inherit; padding: 13px 18px; border: 2px solid var(--ink); border-radius: 26px; background: var(--card); color: var(--ink);
}
.q textarea { min-height: 120px; resize: vertical; border-radius: 22px; }
.opts { display: grid; gap: 10px; }
.opts.cols { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.opt { display: flex; align-items: center; gap: 12px; padding: 10px 18px 10px 14px; border: 2px solid var(--ink); border-radius: 999px; background: var(--card); cursor: pointer; transition: background .12s ease; line-height: 1.3; }
.opt:hover { background: var(--bg-2); }
.opt input { margin: 0; width: 18px; height: 18px; accent-color: var(--negro); flex: none; }
.opt.checked { background: var(--sec); color: var(--negro); }
.opt.otra { grid-column: 1 / -1; flex-wrap: wrap; }
.opt.otra input[type=text] { flex: 1; min-width: 160px; padding: 7px 16px; border: 2px solid var(--line); border-radius: 999px; background: var(--bg-2); font: inherit; color: var(--ink); }
.opt.otra input[type=text]::placeholder { color: var(--muted); }
.opt.otra input[type=text]:focus { border-color: var(--ink); background: var(--card); }
.opt.checked.otra input[type=text] { background: #fff; color: #000; border-color: #000; }
.escala { display: flex; gap: 10px; }
.escala .opt { flex: 1; justify-content: center; padding: 12px 6px; font-weight: 500; font-size: 1.15rem; position: relative; }
.escala .opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.escala-labels { display: flex; justify-content: space-between; font-size: .9rem; color: var(--muted); margin-top: 8px; }
.q.invalid .main { color: var(--naranja); }
.q.invalid input[type=text], .q.invalid input[type=email], .q.invalid textarea, .q.invalid .opt { border-color: var(--naranja); }
.q .error { display: none; color: var(--naranja); font-size: .9rem; font-weight: 500; margin-top: 6px; }
.q.invalid .error { display: block; }

.nav { display: flex; justify-content: space-between; gap: 12px; margin: 28px 0 48px; }
.nav .spacer { flex: 1; }
#atras::after { content: none; } #atras::before { content: "←"; font-weight: 300; font-size: 1.2em; line-height: 1; }

.fallback pre { white-space: pre-wrap; font: 14px/1.5 ui-monospace, Menlo, monospace; background: var(--bg-2); padding: 16px 18px; border-radius: 18px; max-height: 320px; overflow: auto; }
.fallback .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

/* Guion */
.bloque { display: grid; grid-template-columns: 120px 1fr; gap: 0 24px; padding: 22px 0; border-top: 1px solid var(--ink); }
.bloque:last-of-type { border-bottom: 1px solid var(--ink); }
.bloque .hora { font-style: italic; font-size: 1.5rem; line-height: 1.1; }
.bloque .hora small { display: block; font-style: normal; font-size: .85rem; color: var(--muted); margin-top: 4px; }
.bloque h3 { margin-bottom: 8px; }
.bloque p { margin-bottom: .5em; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .card { padding: 20px; }
  .nav { flex-direction: column-reverse; }
  .nav .btn { width: 100%; justify-content: center; }
  .bloque { grid-template-columns: 1fr; }
  .asterisco { width: 90px; height: 90px; }
}
