/* Mujeres de Impacto · embudo de postulación · kit: design-system/mujeres-de-impacto/MASTER.md
   Fondo claro, todo en cacao, Playfair Display + Inter, Great Vibes solo en la firma. Sin negro, sin fondos oscuros. */
:root {
  --crema: #FBF3EA;
  --papel: #FFFDF9;
  --cacao: #5A3A2E;
  --cacao-80: rgba(90, 58, 46, .8);
  --durazno: #F1C3A7;
  --petalo: #EAB09A;
  --terracota: #D18C76;
  --champana: #D8B67C;
  --linea: #EDDACB;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --firma: 'Great Vibes', 'Playfair Display', cursive;
  --ancho: 620px;
  --barra: 86px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  display: flex; flex-direction: column;
  margin: 0;
  background: var(--crema);
  color: var(--cacao);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
[hidden] { display: none !important; }
.oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.trampa { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
:focus-visible { outline: 2px solid var(--terracota); outline-offset: 3px; border-radius: 6px; }
.titulo:focus { outline: none; }

/* ── Barra de arriba: marca + avance por tramos ───────────────────────────── */
.barra {
  width: 100%;
  position: sticky; top: 0; z-index: 5;
  background: var(--crema);
  padding: calc(12px + env(safe-area-inset-top)) 20px 10px;
  display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center;
  max-width: calc(var(--ancho) + 40px); margin: 0 auto;
}
.marca { display: flex; align-items: center; gap: 9px; font-family: var(--serif); font-weight: 500; font-size: 16.5px; letter-spacing: .01em; }
.marca img { width: 26px; height: auto; }
.tramo { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--cacao-80); text-align: right; }
.avance { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.avance span { height: 4px; border-radius: 4px; background: var(--linea); overflow: hidden; }
.avance i { display: block; height: 100%; width: 0; background: var(--terracota); border-radius: 4px; transition: width .45s cubic-bezier(.2, .7, .2, 1); }

/* ── Cada pantalla ─────────────────────────────────────────────────────────── */
main { flex: 1; display: flex; flex-direction: column; width: 100%; max-width: calc(var(--ancho) + 40px); margin: 0 auto; }
.paso {
  flex: 1;
  padding: 26px 20px calc(132px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; justify-content: center;
  animation: entra .38s cubic-bezier(.2, .7, .2, 1) both;
}
.paso.vuelve { animation-name: vuelve; }
@keyframes entra { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes vuelve { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

.titulo { font-family: var(--serif); font-weight: 500; font-size: clamp(30px, 8.2vw, 44px); line-height: 1.14; letter-spacing: -.005em; margin: 0 0 16px; text-wrap: balance; }
.titulo.grande { font-size: clamp(38px, 11vw, 58px); line-height: 1.06; }
legend.titulo { padding: 0; font-size: clamp(25px, 6.6vw, 34px); line-height: 1.2; margin-bottom: 20px; }
.entrada { font-size: 18.5px; line-height: 1.55; margin: 0 0 26px; text-wrap: pretty; }
.texto { font-size: 19px; line-height: 1.6; margin: 0 0 18px; max-width: 34em; text-wrap: pretty; }
.texto.corto { font-size: 16.5px; color: var(--cacao-80); margin-bottom: 20px; }
.cuenta { margin: 0 0 14px; font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--cacao-80); }
.dato { margin: 6px 0 0; padding-top: 16px; border-top: 1px solid var(--linea); font-size: 16px; color: var(--cacao-80); max-width: 34em; }
.nota { font-size: 13.5px; line-height: 1.5; color: var(--cacao-80); margin: 16px 0 0; text-align: center; }
.nota.izq { text-align: left; margin-top: 18px; }
.firma { font-family: var(--firma); font-size: 27px; line-height: 1; margin: 26px 0 0; text-align: center; color: var(--cacao); }
.frase { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(30px, 8.6vw, 46px); line-height: 1.15; margin: 4px 0 22px; }
.frase.chica { font-size: 24px; text-align: center; margin: 34px 0 0; }

/* ── Botones ───────────────────────────────────────────────────────────────── */
.boton {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  min-height: 56px; padding: 14px 30px; width: 100%;
  background: var(--durazno); color: var(--cacao);
  border: 0; border-radius: 999px;
  font-weight: 600; font-size: 17px; letter-spacing: .01em; text-decoration: none;
  transition: transform .12s ease, background-color .2s ease, opacity .2s ease;
}
@media (hover: hover) { .boton:hover { background: var(--petalo); } .boton.claro:hover { background: #FFF6EE; } .boton[disabled]:hover { background: var(--durazno); } }
.boton:active { transform: scale(.975); }
.boton[disabled], .boton[aria-disabled="true"] { opacity: .45; cursor: default; }
.boton.claro { background: var(--papel); box-shadow: inset 0 0 0 1.5px var(--petalo); }
.enlace { background: none; border: 0; padding: 12px 4px; margin-top: 14px; align-self: flex-start; font-size: 15.5px; font-weight: 500; color: var(--cacao); text-decoration: underline; text-decoration-color: var(--petalo); text-decoration-thickness: 1.5px; text-underline-offset: 4px; text-align: left; }
.enlace:hover { text-decoration-color: var(--cacao); }

/* ── Pie fijo: Atrás y Seguir ──────────────────────────────────────────────── */
.pie {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 6;
  display: flex; gap: 10px; align-items: center; justify-content: center;
  padding: 26px 20px calc(16px + env(safe-area-inset-bottom));
  background: linear-gradient(to bottom, rgba(251, 243, 234, 0), var(--crema) 34%);
  pointer-events: none;
}
.pie > * { pointer-events: auto; }
.pie .boton { max-width: 400px; flex: 1; }
.atras { background: none; border: 0; min-height: 56px; padding: 0 16px 0 6px; font-weight: 500; font-size: 16px; color: var(--cacao-80); }
.atras:hover { color: var(--cacao); }

/* ── Portada ───────────────────────────────────────────────────────────────── */
.portada { justify-content: flex-start; padding-top: 6px; padding-bottom: 40px; }
.portada-foto { position: relative; width: min(58vw, 250px); margin: 4px auto 24px; }
.portada-foto::before { content: ""; position: absolute; inset: -16% -30% -6%; border-radius: 50%; background: radial-gradient(closest-side, rgba(241, 195, 167, .62), rgba(241, 195, 167, 0)); z-index: 0; }
.portada-foto img { position: relative; z-index: 1; width: 100%; aspect-ratio: 4 / 5; max-height: 36dvh; object-fit: cover; object-position: 50% 22%; border-radius: 999px 999px 20px 20px; border: 5px solid var(--papel); }
.portada-texto { text-align: center; }
.portada-texto .titulo { margin-bottom: 14px; }

/* ── La historia ───────────────────────────────────────────────────────────── */
.relato .titulo { font-size: clamp(34px, 9.4vw, 52px); }
.relato .texto { font-size: 20px; }
.quien { display: flex; align-items: center; gap: 12px; margin: 14px 0 0; font-weight: 600; font-size: 15.5px; line-height: 1.3; }
.quien img { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; object-position: 50% 20%; border: 3px solid var(--papel); }
.quien small { font-weight: 400; font-size: 13.5px; color: var(--cacao-80); }
.promesa .frase { background: var(--durazno); margin: 8px -20px 24px; padding: 34px 20px; }

/* ── Cómo funciona ─────────────────────────────────────────────────────────── */
.lista { list-style: none; counter-reset: n; margin: 6px 0 0; padding: 0; }
.lista li { counter-increment: n; display: grid; grid-template-columns: 44px 1fr; align-items: baseline; padding: 15px 0; border-bottom: 1px solid var(--linea); font-size: 18px; line-height: 1.45; }
.lista li:first-child { border-top: 1px solid var(--linea); }
.lista li::before { content: counter(n, decimal-leading-zero); font-family: var(--serif); font-style: italic; font-size: 19px; color: var(--terracota); }
.lista b, .tres b, .camino b { font-weight: 600; }
.numero { font-style: italic; white-space: nowrap; }
.cien .titulo { font-size: clamp(36px, 10vw, 56px); }
.tres { list-style: none; margin: 4px 0 18px; padding: 0; display: grid; gap: 10px; }
.tres li { background: var(--papel); border: 1px solid var(--linea); border-radius: 18px; padding: 15px 18px; font-size: 16px; line-height: 1.5; }
.tres b { display: block; font-size: 17px; }
.camino { list-style: none; counter-reset: c; margin: 6px 0 20px; padding: 0; position: relative; }
.camino::before { content: ""; position: absolute; left: 19px; top: 22px; bottom: 34px; width: 1.5px; background: var(--petalo); }
.camino li { counter-increment: c; position: relative; padding: 0 0 22px 58px; }
.camino li::before { content: counter(c); position: absolute; left: 0; top: 0; width: 40px; height: 40px; border-radius: 50%; background: var(--papel); border: 1.5px solid var(--petalo); display: grid; place-items: center; font-family: var(--serif); font-size: 19px; }
.camino b { display: block; font-family: var(--serif); font-weight: 500; font-size: 22px; line-height: 1.25; padding-top: 5px; }
.camino span { display: block; font-size: 16px; color: var(--cacao-80); margin-top: 3px; }

/* ── Formulario ────────────────────────────────────────────────────────────── */
.campos { display: grid; gap: 16px; }
.campo { display: grid; gap: 6px; }
.campo > span { font-weight: 600; font-size: 15.5px; }
.campo > span i { font-style: normal; font-weight: 400; color: var(--cacao-80); }
.campo small { font-size: 13.5px; line-height: 1.45; color: var(--cacao-80); }
input[type="text"], input[type="tel"], input[type="email"], textarea {
  width: 100%; min-height: 56px; padding: 14px 16px;
  background: var(--papel); border: 1.5px solid var(--linea); border-radius: 16px;
  font-size: 17px; line-height: 1.5; color: var(--cacao);
  transition: border-color .2s ease, box-shadow .2s ease; appearance: none;
}
textarea { resize: vertical; min-height: 190px; }
::placeholder { color: rgba(90, 58, 46, .45); }
input:focus, textarea:focus { outline: none; border-color: var(--terracota); box-shadow: 0 0 0 4px rgba(241, 195, 167, .45); }
.mal input, .mal textarea { border-color: var(--terracota); }
.error { display: block; min-height: 0; font-style: normal; font-weight: 600; font-size: 14.5px; line-height: 1.4; }
.error:empty { display: none; }
.error::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--terracota); margin-right: 8px; transform: translateY(-1px); }

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 10px; }
.opcion, .casilla { position: relative; display: flex; align-items: center; gap: 14px; background: var(--papel); border: 1.5px solid var(--linea); border-radius: 18px; padding: 16px 18px; min-height: 60px; font-size: 16.5px; line-height: 1.4; cursor: pointer; transition: border-color .18s ease, background-color .18s ease, transform .12s ease; }
.opcion:active, .casilla:active { transform: scale(.985); }
.opcion input, .casilla input { appearance: none; flex: none; width: 24px; height: 24px; margin: 0; border: 1.5px solid var(--petalo); background: var(--crema); display: grid; place-items: center; transition: background-color .18s ease, border-color .18s ease; }
.opcion input { border-radius: 50%; }
.casilla input { border-radius: 8px; }
.opcion input::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--cacao); transform: scale(0); transition: transform .18s cubic-bezier(.2, .7, .2, 1); }
.casilla input::after { content: ""; width: 11px; height: 6px; border-left: 2.2px solid var(--cacao); border-bottom: 2.2px solid var(--cacao); transform: rotate(-45deg) scale(0); margin-top: -3px; transition: transform .18s cubic-bezier(.2, .7, .2, 1); }
.opcion input:checked, .casilla input:checked { background: var(--durazno); border-color: var(--terracota); }
.opcion input:checked::after { transform: scale(1); }
.casilla input:checked::after { transform: rotate(-45deg) scale(1); }
.opcion:has(input:checked), .casilla:has(input:checked) { border-color: var(--terracota); background: #FFF6EE; }
.opcion:has(input:focus-visible), .casilla:has(input:focus-visible) { outline: 2px solid var(--terracota); outline-offset: 2px; }
.opcion input:focus-visible, .casilla input:focus-visible { outline: none; }
.compromisos { display: grid; gap: 10px; }
.casilla.legal { margin-top: 18px; background: none; border: 0; border-top: 1px solid var(--linea); border-radius: 0; padding: 18px 2px 4px; align-items: flex-start; font-size: 14px; line-height: 1.5; color: var(--cacao-80); }
.casilla.legal:has(input:checked) { background: none; }
.casilla.legal input { margin-top: 1px; background: var(--papel); }
.casilla.legal input:checked { background: var(--durazno); }
.guia { margin: 0 0 16px; padding: 0 0 0 18px; font-size: 15.5px; line-height: 1.6; color: var(--cacao-80); }
.guia li::marker { color: var(--terracota); }

/* ── La cita ───────────────────────────────────────────────────────────────── */
.rotulo { margin: 8px 0 10px; font-weight: 600; font-size: 15.5px; }
.rotulo small { font-weight: 400; font-size: 13.5px; color: var(--cacao-80); }
.dias { display: flex; gap: 8px; overflow-x: auto; margin: 0 -20px 14px; padding: 2px 20px 10px; scroll-snap-type: x proximity; scrollbar-width: none; overscroll-behavior-x: contain; }
.dias::-webkit-scrollbar { display: none; }
.dia { flex: none; scroll-snap-align: start; width: 68px; padding: 10px 0 11px; background: var(--papel); border: 1.5px solid var(--linea); border-radius: 18px; display: grid; justify-items: center; gap: 0; line-height: 1.2; transition: border-color .18s ease, background-color .18s ease; }
.dia small { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--cacao-80); }
.dia b { font-family: var(--serif); font-weight: 500; font-size: 26px; }
.horas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hora { min-height: 52px; background: var(--papel); border: 1.5px solid var(--linea); border-radius: 999px; font-weight: 500; font-size: 15.5px; white-space: nowrap; transition: border-color .18s ease, background-color .18s ease; }
.dia[aria-pressed="true"], .hora[aria-pressed="true"] { background: var(--durazno); border-color: var(--terracota); }
.hora[disabled] { opacity: .4; text-decoration: line-through; cursor: default; }
.sin-horas { grid-column: 1 / -1; margin: 0; font-size: 15px; color: var(--cacao-80); }

/* ── Gracias ───────────────────────────────────────────────────────────────── */
.gracias { justify-content: flex-start; text-align: center; padding-top: 18px; padding-bottom: 48px; }
.sello { width: 138px; margin: 0 auto 20px; }
.gracias .texto { margin-left: auto; margin-right: auto; font-size: 17px; }
.cita-elegida { font-family: var(--serif); font-style: italic; font-size: 23px; line-height: 1.3; margin: 0 auto 14px; padding: 16px 20px; background: var(--papel); border: 1px solid var(--linea); border-radius: 20px; max-width: 420px; }
.cita-elegida:empty { display: none; }
.acciones { display: grid; gap: 10px; margin: 12px auto 0; max-width: 420px; width: 100%; }
.acciones .enlace { align-self: auto; justify-self: center; margin-top: 2px; text-align: center; }
.pie-legal { margin: 22px 0 0; font-size: 13.5px; line-height: 1.6; color: var(--cacao-80); }

/* ── Preguntas (hoja) ──────────────────────────────────────────────────────── */
dialog { border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 660px; max-height: 88dvh; background: var(--papel); color: var(--cacao); border-radius: 24px 24px 0 0; }
dialog::backdrop { background: rgba(90, 58, 46, .28); }
dialog[open] { animation: sube .32s cubic-bezier(.2, .7, .2, 1); }
@keyframes sube { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.hoja { padding: 8px 22px calc(26px + env(safe-area-inset-bottom)); }
.hoja-cabeza { position: sticky; top: 0; background: var(--papel); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0 12px; }
.hoja h2 { font-family: var(--serif); font-weight: 500; font-size: 25px; line-height: 1.2; margin: 0; }
.cerrar { background: var(--crema); border: 0; border-radius: 999px; min-height: 44px; padding: 0 18px; font-weight: 600; font-size: 14.5px; }
details { border-top: 1px solid var(--linea); }
summary { list-style: none; cursor: pointer; padding: 17px 30px 17px 0; position: relative; font-weight: 600; font-size: 16.5px; line-height: 1.35; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; position: absolute; right: 6px; top: 22px; width: 9px; height: 9px; border-right: 1.8px solid var(--cacao); border-bottom: 1.8px solid var(--cacao); transform: rotate(45deg); transition: transform .2s ease; }
details[open] summary::after { transform: rotate(-135deg); top: 26px; }
details p { margin: 0 0 18px; font-size: 16px; line-height: 1.6; color: var(--cacao-80); }
.sin-js { max-width: 560px; margin: 20px auto; padding: 16px 20px; text-align: center; }

/* ── Pantalla grande (computador y proyección) ─────────────────────────────── */
@media (min-width: 900px) {
  :root { --ancho: 700px; --barra: 92px; }
  body { font-size: 18px; }
  .paso { padding-top: 34px; }
  .portada { flex-direction: row-reverse; align-items: center; justify-content: center; gap: 52px; }
  .portada-foto { width: 290px; margin: 0; flex: none; }
  .portada-foto img { max-height: 62dvh; }
  .portada-texto { text-align: left; }
  .portada-texto .titulo.grande { font-size: 56px; }
  .portada-texto .nota, .portada-texto .firma { text-align: left; }
  .portada-texto .boton { width: auto; min-width: 280px; }
  .promesa .frase { margin-left: 0; margin-right: 0; border-radius: 22px; padding-left: 34px; padding-right: 34px; }
  .horas { grid-template-columns: repeat(6, 1fr); }
  .dias { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; flex-wrap: wrap; }
  dialog { margin: auto; border-radius: 24px; }
}

@media (max-height: 640px) {
  .portada-foto { width: min(40vw, 170px); margin-bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
