@font-face {
  font-family: "Cormorant Local";
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  /* src: url("../fonts/cormorant-garamond-italic.woff2") format("woff2"),
       url("../fonts/cormorant-garamond-italic.ttf") format("truetype"); */
}
@font-face {
  font-family: "Josefin Local";
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  /* src: url("../fonts/josefin-sans.woff2") format("woff2"),
       url("../fonts/josefin-sans.ttf") format("truetype"); */
}
@font-face {
  font-family: "Fredoka Local";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  /* src: url("../fonts/fredoka.woff2") format("woff2"),
       url("../fonts/fredoka.ttf") format("truetype"); */
}

:root {
  
  --fondo: #F9F5EF;            
  --tarjeta: #FFFFFF;          
  --principal: #737C45;        
  --melocoton: #F5D5B5;       
  --terracota: #E58A43;        
  --texto: #493B2E;            

  --texto-suave: #6B5A49;      
  --principal-hover: #646C3B;  
  --principal-base: #4F5629;  
  --principal-claro: #EEF0E0;  
  --linea: #EADBC8;            

  --fondo-imagen: none;
  /* --fondo-imagen: url("../img/fondo.jpg"); */
  --velo: 0.85;

  --error: #A8201C;
  --error-fondo: #F7E6E3;

  --f-titulo: "Cormorant Local", "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --f-texto: "Josefin Local", "Josefin Sans", "Century Gothic", "Trebuchet MS", system-ui, sans-serif;
  --f-logo: "Fredoka Local", "Fredoka", "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;

  --radio: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background-color: var(--fondo);
  background-image: linear-gradient(rgba(249, 245, 239, var(--velo)), rgba(249, 245, 239, var(--velo))), var(--fondo-imagen);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--texto);
  font: 300 19px/1.6 var(--f-texto);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--texto); }
a:hover { color: var(--principal); }
:focus-visible { outline: 3px solid var(--texto); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, p { margin: 0; }
h1:focus, h2:focus { outline: none; }
button, input { font-family: inherit; }

.titular, .titulo, .perfil-nombre, .grupo-nombre, .info h3, .cierre h3 {
  font-family: var(--f-titulo);
  font-style: italic;
  font-weight: 600;
}

.app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }

.cabecera {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 18px 20px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
}

.marca {
  display: inline-flex; align-items: center;
  padding: 9px 20px 10px;
  background: var(--principal); color: var(--melocoton);
  border-radius: 999px; text-decoration: none;
}
.marca:hover { color: var(--melocoton); background: var(--principal-hover); }
.marca-nombre { font: 700 22px/1 var(--f-logo); letter-spacing: 0.01em; }

.volver {
  appearance: none; background: none; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 10px 6px 10px 2px; margin-right: -4px;
  font: 400 17px/1 var(--f-texto); color: var(--texto-suave);
}
.volver:hover { color: var(--texto); }


.principal { width: 100%; max-width: 1040px; margin: 0 auto; padding: 8px 20px 40px; flex: 1; }
.pantalla-estrecha { max-width: 520px; margin-inline: auto; }
.pie { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 20px 28px; font: 400 16px/1.4 var(--f-texto); text-align: center; }
.pie a { color: var(--texto-suave); }


.progreso { display: flex; gap: 3px; max-width: 520px; margin: 4px auto 26px; }
.progreso span { flex: 1; height: 10px; background: var(--linea); transition: background-color .25s; }
.progreso span:first-child { border-radius: 4px 0 0 4px; }
.progreso span:last-child { border-radius: 0 4px 4px 0; }
.progreso span:only-child { border-radius: 4px; }
.progreso span.on { background: var(--principal); }


.pantalla-intro {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 68vh; padding-top: 14px;
  text-align: center;
}
.titular {
  font-size: clamp(38px, 10vw, 66px);
  line-height: 1.03;
  letter-spacing: -0.01em;
  max-width: 19ch;
  margin-inline: auto;
  text-wrap: balance;
}
.subtitulo { margin: 18px auto 0; font-size: 21px; line-height: 1.5; color: var(--texto-suave); max-width: 34ch; }


.caminos { display: grid; gap: 22px; margin: 28px auto 0; width: 100%; max-width: 420px; }
.camino .nota { margin-top: 12px; }


.titulo { font-size: clamp(32px, 8.4vw, 42px); line-height: 1.08; letter-spacing: -0.005em; text-wrap: balance; }
.ayuda { margin-top: 8px; color: var(--texto-suave); font: 400 17px/1.4 var(--f-texto); }
.nota { font: 400 16px/1.45 var(--f-texto); color: var(--texto-suave); }

.opciones { display: grid; gap: 12px; margin-top: 24px; padding-bottom: 4px; }
.opcion {
  appearance: none;
  display: flex; align-items: center; gap: 14px;
  width: 100%; min-height: 62px; padding: 13px 16px;
  text-align: left; font: 400 18px/1.3 var(--f-texto); color: var(--texto);
  background: var(--tarjeta);
  border: 2px solid var(--linea);
  border-radius: var(--radio);
  box-shadow: 0 4px 0 var(--melocoton);
  cursor: pointer;
  transition: transform .08s, box-shadow .08s, border-color .15s, background-color .15s;
}
.opcion:hover { border-color: var(--principal); }
.opcion:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--melocoton); }
.opcion[aria-pressed="true"] { border-color: var(--principal); background: var(--principal-claro); box-shadow: 0 4px 0 var(--principal); }

.marca-opcion {
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid var(--terracota); background: var(--tarjeta);
  display: grid; place-items: center;
}
.marca-opcion.cuadrada { border-radius: 7px; }
.opcion[aria-pressed="true"] .marca-opcion { background: var(--principal); border-color: var(--principal); }
.opcion:not([aria-pressed="true"]) .marca-opcion svg { display: none; }

.acciones { margin-top: 24px; }

.boton {
  appearance: none; display: inline-flex; align-items: center; justify-content: center;
  min-height: 58px; padding: 0 28px;
  font: 700 19px/1.1 var(--f-texto); text-align: center; text-decoration: none;
  color: #fff; background: var(--principal);
  border: 0; border-radius: var(--radio);
  box-shadow: 0 5px 0 var(--principal-base);
  cursor: pointer;
  transition: transform .08s, box-shadow .08s, background-color .15s;
}
.boton:hover { background: var(--principal-hover); color: #fff; }
.boton:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--principal-base); }
.boton[disabled] { background: #CDC3B4; box-shadow: 0 5px 0 #B5AB9C; cursor: not-allowed; transform: none; }
.boton-ancho { width: 100%; }
.boton-secundario { color: var(--texto); background: var(--tarjeta); border: 2px solid var(--texto); box-shadow: 0 4px 0 var(--texto); min-height: 54px; font-size: 18px; }
.boton-secundario:hover { background: var(--principal-claro); color: var(--texto); }
.boton-secundario:active { box-shadow: 0 1px 0 var(--texto); }
.boton-secundario[disabled] { color: var(--texto-suave); background: var(--tarjeta); border-color: var(--linea); box-shadow: 0 4px 0 var(--linea); }

.perfil { display: flex; align-items: center; gap: 16px; margin-top: 26px; }
.perfil-icono {
  flex: none; width: 80px; height: 80px; border-radius: 50%;
  background: var(--melocoton); color: var(--principal);
  display: grid; place-items: center;
}
.perfil-icono svg { width: 46px; height: 46px; }
.perfil-intro { font: 400 16.5px/1.3 var(--f-texto); color: var(--texto-suave); }
.perfil-nombre { margin-top: 2px; font-size: clamp(34px, 9vw, 42px); line-height: 1.02; letter-spacing: -0.005em; }
.perfil-desc { margin-top: 16px; font-size: 20px; line-height: 1.55; max-width: 44ch; }
.perfil-toque { margin-top: 8px; color: var(--texto-suave); font: 400 17px/1.4 var(--f-texto); }

.grupo { margin-top: 24px; padding: 18px 18px 16px; background: var(--tarjeta); border: 2px solid var(--linea); border-radius: var(--radio); }
.grupo h3 { font: 400 16.5px/1.3 var(--f-texto); color: var(--texto-suave); }
.grupo-nombre { margin-top: 4px; font-size: 28px; line-height: 1.1; }
.grupo-extra { margin-top: 6px; font: 400 17px/1.45 var(--f-texto); color: var(--texto); }

.formulario { margin-top: 26px; }
.formulario-secundario { margin-top: 30px; padding-top: 26px; border-top: 2px solid var(--linea); }
.bloqueado {
  display: flex; gap: 12px; align-items: flex-start;
  margin-bottom: 22px; font: 400 17px/1.45 var(--f-texto); color: var(--texto);
}
.bloqueado svg { flex: none; margin-top: 1px; color: var(--principal); }

.etiqueta { display: block; margin-bottom: 8px; font: 600 17.5px/1.35 var(--f-texto); }
.campo {
  display: block; width: 100%; min-height: 58px; padding: 0 16px;
  font: 400 19px/1.2 var(--f-texto); color: var(--texto);
  background: var(--tarjeta); border: 2px solid var(--texto-suave); border-radius: var(--radio);
}
.campo::placeholder { color: #9A8B7B; opacity: 1; }
.campo:focus-visible { outline: 3px solid var(--principal); outline-offset: 2px; border-color: var(--principal); }
.campo[aria-invalid="true"] { border-color: var(--error); }

.consentimiento { display: flex; gap: 12px; align-items: flex-start; margin: 18px 0 18px; font: 400 16.5px/1.45 var(--f-texto); cursor: pointer; }
.consentimiento input { flex: none; width: 24px; height: 24px; margin: 0; accent-color: var(--principal); cursor: pointer; }

.error { margin: 0 0 14px; padding: 12px 14px; font: 400 17px/1.4 var(--f-texto); color: var(--error); background: var(--error-fondo); border-radius: 10px; }
.formulario .nota { margin-top: 14px; }
.formulario-secundario .campo + .error,
.formulario-secundario .campo + .boton,
.formulario-secundario .error + .boton { margin-top: 14px; }

.trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.enlace {
  appearance: none; display: block; margin: 18px 0 0; padding: 10px 0; width: 100%;
  background: none; border: 0; cursor: pointer;
  font: 600 17px/1.35 var(--f-texto); color: var(--texto); text-align: left; text-decoration: underline;
}
.enlace:hover { color: var(--principal); }

.info .info-intro { margin-top: 14px; font-size: 20px; max-width: 44ch; }
.info h3 { margin-top: 32px; font-size: 29px; line-height: 1.1; }
.info h3 + p { margin-top: 8px; }
.lista { margin: 10px 0 0; padding-left: 22px; }
.lista li { margin-top: 8px; padding-left: 4px; }
.lista li::marker { color: var(--terracota); }

.preguntas { margin-top: 12px; border-top: 2px solid var(--linea); }
.preguntas details { border-bottom: 2px solid var(--linea); }
.preguntas summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 56px; padding: 12px 2px; cursor: pointer; list-style: none;
  font: 600 18px/1.3 var(--f-texto);
}
.preguntas summary::-webkit-details-marker { display: none; }
.preguntas summary::after {
  content: ""; flex: none; width: 10px; height: 10px; margin-right: 4px;
  border-right: 2.5px solid var(--terracota); border-bottom: 2.5px solid var(--terracota);
  transform: rotate(45deg); transition: transform .15s;
}
.preguntas details[open] summary::after { transform: rotate(-135deg); }
.preguntas details p { margin: 0 0 16px; padding-right: 22px; }

.cierre { margin-top: 34px; padding: 20px 18px 22px; background: var(--tarjeta); border: 2px solid var(--linea); border-radius: var(--radio); display: grid; gap: 14px; }
.cierre h3 { margin: 0; font-size: 29px; line-height: 1.1; }
.cierre p { margin: 0; }

#p-gracias > p { margin-top: 14px; font-size: 20px; max-width: 44ch; }
#p-gracias strong { font-weight: 600; overflow-wrap: anywhere; }
.extras { margin-top: 30px; display: grid; gap: 14px; }
.extras .nota { margin-top: -2px; min-height: 1.4em; }

.aviso-js { margin-top: 24px; padding: 14px; background: var(--error-fondo); border-radius: 10px; }

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