/* ============================================================================
   ALLPROTA - la puerta (portada sin cuenta, entrar y registro)
   ----------------------------------------------------------------------------
   Blanco y dorado. El blanco es calido, no de hoja de calculo; el oro se gasta
   en tres cosas: la palabra "protagonistas", lo que hay que pulsar y la linea
   que dice quien te muestra. Todo lo demas es tinta.
   ========================================================================= */

@font-face {
  font-family: "Instrument";
  src: url("/estatico/fuentes/instrument-latin.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument";
  src: url("/estatico/fuentes/instrument-latin-ext.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Bricolage";
  src: url("/estatico/fuentes/bricolage-latin.woff2") format("woff2");
  font-weight: 400 800; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+2000-206F, U+2122, U+2212, U+FEFF, U+FFFD;
}

:root {
  --blanco:    #fffcf4;
  --papel:     #ffffff;
  --crema:     #fbf5e6;
  --tinta:     #1b1609;
  --tinta-2:   #574f3c;
  --tinta-3:   #8a8067;
  --linea:     #ebdfc2;
  --oro-claro: #f7dc86;
  --oro:       #d6a21e;
  --oro-hondo: #a4740c;
  --oro-texto: #8f650a;          /* oro que se lee sobre blanco */
  --degradado: linear-gradient(100deg, #e9b93a 0%, #c98f12 45%, #f0c95a 100%);
  --sombra:    0 24px 60px -18px rgba(120, 84, 10, .35), 0 2px 6px rgba(60, 40, 0, .08);
  --pila:      "Instrument", system-ui, -apple-system, "Segoe UI", sans-serif;
  --pila-marca:"Bricolage", "Instrument", Georgia, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body.portal {
  min-height: 100vh;
  display: flex; flex-direction: column;
  background: var(--blanco);
  color: var(--tinta);
  font-family: var(--pila);
  font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { display: block; max-width: 100%; }

/* --- la rejilla: porque a la izquierda, entrada a la derecha ------------ */

.portal-rejilla {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 1fr);
}

.portal-presenta {
  position: relative;
  padding: 32px 56px 28px;
  display: flex; flex-direction: column; align-items: center;
  overflow: hidden;
}
/* un halo de oro muy bajo detras de la escena, para que el blanco no sea plano */
.portal-presenta::before {
  content: ""; position: absolute; inset: auto -10% -20% -10%; height: 70%;
  background: radial-gradient(60% 55% at 50% 45%, rgba(247, 210, 110, .28), transparent 70%);
  pointer-events: none;
}

.portal-marca {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 12px;
  text-decoration: none;
  font-family: var(--pila-marca); font-weight: 700; font-size: 26px;
  letter-spacing: -.01em;
}

.portal-titulo {
  margin: 22px 0 0;
  text-align: center;
  font-family: var(--pila-marca); font-weight: 600;
  font-size: clamp(34px, 4.1vw, 60px); line-height: 1.12;
  letter-spacing: -.025em;
}
.oro {
  background: var(--degradado);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  font-weight: 700;
}

.portal-lore {
  margin: 18px auto 0; max-width: 600px;
  text-align: center;
  font-size: 18px; line-height: 1.55; color: var(--tinta-2);
}
.portal-lore b { color: var(--tinta); font-weight: 600; }

/* --- la escena: tres moviles con piezas reales de la red --------------- */

.portal-escena {
  position: relative;
  width: 440px; max-width: 100%; height: 320px;
  margin: 22px auto 0;
}
.movil {
  position: absolute; bottom: 0;
  border-radius: 26px; overflow: hidden;
  background: var(--crema);
  border: 3px solid var(--papel);
  box-shadow: var(--sombra);
}
.movil img { width: 100%; height: 100%; object-fit: cover; }
.movil-centro { left: 50%; width: 190px; height: 320px; margin-left: -95px; z-index: 3; }
.movil-izq    { left: 36px;  width: 150px; height: 250px; transform: rotate(-8deg); z-index: 1; }
.movil-der    { right: 36px; width: 150px; height: 250px; transform: rotate(8deg);  z-index: 1; }
.movil-barra {
  position: absolute; top: 12px; left: 14px; right: 14px; height: 3px;
  border-radius: 3px; background: rgba(255, 255, 255, .75);
}
.movil-pie {
  position: absolute; left: 10px; right: 10px; bottom: 10px;
  padding: 6px 10px; border-radius: 999px;
  background: rgba(20, 14, 2, .55); color: #fff;
  font-size: 12px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  backdrop-filter: blur(6px);
}
.movil-corazon {
  position: absolute; right: 12px; bottom: 50px;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--papel); color: var(--oro);
  box-shadow: 0 6px 16px rgba(120, 84, 10, .3);
}
.burbuja {
  position: absolute; z-index: 4;
  padding: 8px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 600; white-space: nowrap;
  box-shadow: 0 10px 24px -8px rgba(120, 84, 10, .45);
}
.burbuja-muestra { top: 8px; left: -6px; background: var(--degradado); color: var(--tinta); }
.burbuja-sigue   { top: 118px; right: -18px; background: var(--papel); color: var(--oro-texto);
                   border: 1px solid var(--linea); }

/* --- los tres pasos: el lore en una linea cada uno ---------------------- */

.portal-pasos {
  list-style: none; margin: 22px auto 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px;
  max-width: 720px; width: 100%;
  position: relative;
}
.portal-pasos li {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px;
  background: var(--papel); border: 1px solid var(--linea); border-radius: 16px;
  font-size: 14px; line-height: 1.4; color: var(--tinta-2);
}
.portal-pasos .num {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--degradado); color: var(--tinta);
  font-family: var(--pila-marca); font-weight: 700; font-size: 14px;
}

/* --- la entrada --------------------------------------------------------- */

.portal-acceso {
  display: flex; align-items: center; justify-content: center;
  padding: 40px 48px;
  background: var(--crema);
  border-left: 1px solid var(--linea);
}
.portal-tarjeta { width: 100%; max-width: 420px; }
.portal-tarjeta h2 {
  margin: 0 0 22px;
  font-family: var(--pila-marca); font-weight: 600; font-size: 22px;
  letter-spacing: -.01em;
}
.portal-campo {
  display: block; width: 100%;
  margin: 0 0 12px; padding: 17px 18px;
  font: inherit; font-size: 15px; color: var(--tinta);
  background: var(--papel);
  border: 1px solid var(--linea); border-radius: 14px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.portal-campo::placeholder { color: var(--tinta-3); }
.portal-campo:focus { border-color: var(--oro); box-shadow: 0 0 0 4px rgba(214, 162, 30, .18); }

.portal-boton {
  display: flex; align-items: center; justify-content: center;
  width: 100%; min-height: 52px; margin-top: 8px; padding: 0 18px;
  border-radius: 999px;
  font: inherit; font-size: 16px; font-weight: 600;
  text-decoration: none; cursor: pointer;
  transition: transform .12s, box-shadow .15s, background-color .15s;
}
.portal-boton.lleno {
  border: 0; background: var(--degradado); color: var(--tinta);
  box-shadow: 0 10px 24px -10px rgba(164, 116, 12, .7);
}
.portal-boton.lleno:hover { transform: translateY(-1px); box-shadow: 0 14px 30px -10px rgba(164, 116, 12, .8); }
.portal-boton.borde {
  border: 1.5px solid var(--oro); background: transparent; color: var(--oro-texto);
}
.portal-boton.borde:hover { background: rgba(214, 162, 30, .08); }
.portal-boton:focus-visible, .portal-enlace:focus-visible, .portal-pie a:focus-visible {
  outline: 3px solid var(--oro); outline-offset: 3px;
}

.portal-enlace {
  display: block; margin: 20px 0 0; text-align: center;
  font-weight: 600; color: var(--tinta); text-decoration: none;
}
.portal-enlace:hover { color: var(--oro-texto); }

.portal-o {
  display: flex; align-items: center; gap: 14px;
  margin: 26px 0 18px; color: var(--tinta-3); font-size: 13px;
}
.portal-o::before, .portal-o::after { content: ""; flex: 1; height: 1px; background: var(--linea); }

.portal-nota { margin: 14px 0 0; font-size: 13px; color: var(--tinta-3); text-align: center; }
.portal-nota a { color: var(--oro-texto); }
.portal-promesa { margin: 26px 0 0; font-size: 13px; color: var(--tinta-3); text-align: center; }

.portal-error {
  margin: 0 0 14px; padding: 12px 14px; border-radius: 12px;
  background: #fff1ec; border: 1px solid #f3c7b8; color: #8a2a12; font-size: 14px;
}

/* --- pie ---------------------------------------------------------------- */

.portal-pie {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px;
  padding: 18px 16px 22px;
  border-top: 1px solid var(--linea);
  font-size: 13px; color: var(--tinta-3);
}
.portal-pie a { text-decoration: none; }
.portal-pie a:hover { color: var(--oro-texto); }

/* --- pantallas medianas y moviles --------------------------------------- */

@media (max-width: 1100px) {
  .portal-presenta { padding: 36px 32px; }
  .portal-pasos { grid-template-columns: 1fr; max-width: 460px; }
}

@media (max-width: 860px) {
  .portal-rejilla { grid-template-columns: 1fr; }
  .portal-presenta { padding: 22px 16px 8px; }
  .portal-marca { font-size: 22px; }
  .portal-marca img { width: 36px; height: 36px; }
  .portal-titulo { margin-top: 22px; font-size: clamp(32px, 9vw, 44px); }
  .portal-lore { font-size: 16px; }
  /* en el movil la entrada va justo despues del porque; la escena y los
     pasos bajan detras, como prueba */
  .portal-acceso { order: 2; border-left: 0; border-top: 1px solid var(--linea); padding: 28px 16px; }
  .portal-presenta { display: contents; }
  .portal-presenta::before { display: none; }
  .portal-marca, .portal-titulo, .portal-lore { order: 1; }
  .portal-marca { margin: 22px 16px 0; }
  .portal-titulo, .portal-lore { padding: 0 16px; }
  .portal-lore { margin-bottom: 26px; }
  .portal-escena { order: 3; width: 340px; height: 270px; margin-top: 30px; }
  .movil-centro { width: 150px; height: 256px; margin-left: -75px; }
  .movil-izq, .movil-der { width: 118px; height: 200px; }
  .movil-izq { left: 20px; } .movil-der { right: 20px; }
  .burbuja { font-size: 12px; padding: 7px 12px; }
  .burbuja-muestra { left: 0; }
  .burbuja-sigue { right: 0; top: 96px; }
  .portal-pasos { order: 4; padding: 0 16px; margin: 26px auto 28px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
