/* Portal de Compradores · Finques Farré — móvil primero */
@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 300 700; font-display: swap; src: url(fuentes/Fraunces-normal-latin.woff2) format('woff2'); }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 300 800; font-display: swap; src: url(fuentes/Manrope-normal-latin.woff2) format('woff2'); }

:root {
  --papel: #F4F1EA; --papel-2: #ECE7DC; --blanco: #FFFFFF; --tinta: #15212C; --tinta-2: #3A4651; --gris: #6B7580; --linea: #D9D2C4;
  /* azul corporativo Finques Farré (el de la marca y las presentaciones, #2558A8) en versión oscura y degradada */
  --farre: #2558A8; --acento: #2558A8; --suave: #E6EDF8; --profundo: #0F2A55; --mal: #B0473E;
  --degradado: linear-gradient(155deg, #0A1E3F 0%, #12305F 48%, #1D4A8E 100%);
  --degradado-btn: linear-gradient(135deg, #12305F 0%, #2558A8 100%);
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif; --sans: 'Manrope', 'Segoe UI', Arial, sans-serif;
  --radio: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
html, body { min-height: 100%; }
body { background: var(--papel); color: var(--tinta); font-family: var(--sans); font-size: 17px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
.app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }

/* ---------- barra superior */
.barra { position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 8px;
  padding: 10px 14px 0; padding-top: calc(10px + env(safe-area-inset-top)); background: var(--papel); }
.barra .logo { height: 30px; width: auto; justify-self: center; }
.atras { width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; font-size: 22px; color: var(--tinta-2); }
.atras:active { background: var(--papel-2); }
.atras[disabled] { visibility: hidden; }
.idioma { display: inline-flex; border: 1px solid var(--linea); border-radius: 999px; overflow: hidden; background: var(--blanco); }
.idioma button { border: 0; background: transparent; padding: 7px 11px; font-size: 13px; font-weight: 700; color: var(--gris); min-height: 36px; }
.idioma button.on { background: var(--profundo); color: #fff; }
.progreso { grid-column: 1 / -1; height: 5px; border-radius: 99px; background: var(--papel-2); overflow: hidden; margin-top: 8px; }
.progreso i { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--acento); transition: width .35s ease; }

/* ---------- pantalla */
.pantalla { flex: 1; width: 100%; max-width: 620px; margin: 0 auto; padding: 22px 18px 28px; display: flex; flex-direction: column; }
.entra { animation: entra .26s ease both; }
@keyframes entra { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .entra { animation: none; } .progreso i { transition: none; } }

.eyebrow { font-size: 12.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--acento); margin-bottom: 10px; }
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; line-height: 1.15; }
h2.pregunta { font-size: 27px; margin-bottom: 8px; outline: none; }
.ayuda { color: var(--gris); font-size: 15px; margin-bottom: 6px; }
.opciones { display: grid; gap: 10px; margin-top: 16px; }
.opciones.compacto { grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); }
.opciones.chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.op { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 14px 16px; text-align: left;
  background: var(--blanco); border: 1.5px solid var(--linea); border-radius: var(--radio); font-weight: 600; font-size: 16.5px; color: var(--tinta);
  transition: border-color .15s, background .15s, transform .08s; }
.op:active { transform: scale(.985); }
.op.on { border-color: var(--acento); background: var(--suave); }
.op .marca { flex: 0 0 24px; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--linea); display: grid; place-items: center; font-size: 13px; font-weight: 800; color: #fff; background: var(--blanco); }
.op.on .marca { background: var(--acento); border-color: var(--acento); }
.op.cuadro .marca { border-radius: 7px; }
.opciones.compacto .op { justify-content: center; text-align: center; font-size: 19px; }
.opciones.compacto .op .marca { display: none; }
.opciones.chips .op { min-height: 54px; padding: 12px 12px; font-size: 15.5px; }
@media (hover: hover) { .op:hover { border-color: var(--acento); } }

.campo { display: block; margin-top: 16px; }
.campo > span { display: block; font-weight: 700; font-size: 14.5px; margin-bottom: 6px; color: var(--tinta-2); }
.campo input, .campo textarea { width: 100%; min-height: 54px; padding: 14px; background: var(--blanco); border: 1.5px solid var(--linea); border-radius: var(--radio); font-size: 17px; }
.campo textarea { min-height: 150px; resize: vertical; }
.campo input:focus, .campo textarea:focus, .op:focus-visible, .btn:focus-visible { outline: 3px solid rgba(63, 127, 108, .35); outline-offset: 1px; border-color: var(--acento); }
.cuenta { text-align: right; font-size: 12.5px; color: var(--gris); margin-top: 4px; }
.fila2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grupo { margin-top: 18px; }
.grupo > .tit { font-weight: 700; font-size: 14.5px; color: var(--tinta-2); margin-bottom: 8px; }
.grupo .opciones { margin-top: 0; }

.acciones { margin-top: auto; padding-top: 22px; display: grid; gap: 10px; }
.btn { width: 100%; min-height: 58px; border-radius: 999px; border: 0; padding: 14px 22px; font-weight: 800; font-size: 17px; background: var(--profundo); color: #fff; }
.btn:disabled { opacity: .45; cursor: default; }
.btn.sec { background: transparent; color: var(--tinta-2); border: 1.5px solid var(--linea); }
.btn.claro { background: var(--papel); color: var(--profundo); }
.error { color: var(--mal); font-weight: 600; font-size: 15px; margin-top: 12px; }

/* ---------- privacidad */
.priv { margin-top: 20px; padding: 14px; background: var(--papel-2); border-radius: var(--radio); font-size: 13.5px; color: var(--tinta-2); }
.priv b { display: block; margin-bottom: 4px; color: var(--tinta); }
.priv button.enlace { border: 0; background: none; color: var(--farre); font-weight: 700; padding: 6px 0 0; text-decoration: underline; }
.check { display: flex; gap: 12px; align-items: flex-start; margin-top: 14px; font-size: 15px; }
.check input { flex: 0 0 26px; width: 26px; height: 26px; margin-top: 1px; accent-color: var(--acento); }
.trampa { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; opacity: 0; }

/* ---------- bienvenida y gracias */
body.portada { background: var(--profundo) var(--degradado) fixed; }
.btn:not(.sec):not(.claro) { background: var(--degradado-btn); box-shadow: 0 6px 18px rgba(15, 42, 85, .22); }
.progreso i { background: var(--degradado-btn); }
.portada-c { flex: 1; display: flex; flex-direction: column; justify-content: center; color: #fff; padding-top: calc(8px + env(safe-area-inset-top)); }
.portada-c .logo-b { height: 44px; width: auto; align-self: flex-start; margin-bottom: 34px; }
.portada-c h1 { font-size: 36px; margin-bottom: 18px; }
.portada-c p { color: rgba(255, 255, 255, .86); margin-bottom: 12px; font-size: 17px; }
.portada-c .tiempo { display: inline-flex; align-items: center; gap: 8px; margin: 10px 0 0; padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, .12); font-size: 14.5px; font-weight: 700; color: #fff; align-self: flex-start; }
.portada-c .idioma { align-self: flex-start; margin-bottom: 26px; background: transparent; border-color: rgba(255, 255, 255, .35); }
.portada-c .idioma button { color: rgba(255, 255, 255, .75); }
.portada-c .idioma button.on { background: #fff; color: var(--profundo); }
.gracias .ok { width: 62px; height: 62px; border-radius: 50%; background: var(--acento); color: #fff; display: grid; place-items: center; font-size: 30px; margin-bottom: 18px; }
.gracias h1 { font-size: 30px; margin-bottom: 14px; }
.gracias p { margin-bottom: 10px; color: var(--tinta-2); }
.gracias .caja { margin-top: 16px; padding: 16px; background: var(--blanco); border: 1.5px solid var(--linea); border-radius: var(--radio); }
.gracias .caja b { font-family: var(--serif); font-weight: 500; font-size: 20px; display: block; margin-bottom: 4px; }
.ref { font-size: 13.5px; color: var(--gris); margin-top: 10px; }
.aviso-demo { margin-top: 14px; padding: 10px 12px; border: 1.5px dashed var(--linea); border-radius: 10px; font-size: 13.5px; color: var(--gris); }
.aviso-demo a { color: var(--farre); font-weight: 700; }

.pie { text-align: center; font-size: 12.5px; color: var(--gris); padding: 10px 16px calc(14px + env(safe-area-inset-bottom)); }
body.portada .pie { color: rgba(255, 255, 255, .6); }
.nojs { padding: 24px; text-align: center; }

/* ---------- capa de información */
.capa { position: fixed; inset: 0; z-index: 20; background: rgba(21, 33, 44, .55); display: flex; align-items: flex-end; justify-content: center; }
.hoja { width: 100%; max-width: 620px; max-height: 88vh; overflow: auto; background: var(--blanco); border-radius: 20px 20px 0 0; padding: 22px 18px calc(18px + env(safe-area-inset-bottom)); }
.hoja h2 { font-size: 24px; margin-bottom: 12px; }
.hoja h3 { font-family: var(--sans); font-size: 14px; font-weight: 800; margin: 14px 0 3px; }
.hoja p { font-size: 14.5px; color: var(--tinta-2); }

@media (min-width: 720px) {
  body { font-size: 18px; }
  .pantalla { padding-top: 44px; }
  h2.pregunta { font-size: 34px; }
  .portada-c h1 { font-size: 48px; }
  .acciones { margin-top: 30px; }
  .capa { align-items: center; }
  .hoja { border-radius: 20px; }
  .barra { padding-left: max(14px, calc(50vw - 330px)); padding-right: max(14px, calc(50vw - 330px)); }
}

/* Marca personal de Adrià Pascual (16/11/2026): mismo azul noche y dorado que adriapascual.com */
body.marca-adria { --oro: #D4AF37; --oro-oscuro: #B8962E; }
.firma-adria { display: inline-block; margin: 14px 0 0; padding: 6px 12px; border: 1px solid rgba(212, 175, 55, .55); border-radius: 999px;
  color: #E9CF7A; font-size: 13px; font-weight: 600; letter-spacing: .02em; background: rgba(212, 175, 55, .08); }
body.marca-adria.portada .btn.claro { background: linear-gradient(135deg, #E2C35A 0%, #D4AF37 55%, #B8962E 100%); color: #0A1E3F; border-color: transparent; }
body.marca-adria .progreso i { background: linear-gradient(135deg, #12305F 0%, #D4AF37 100%); }
