/* Portal de ingreso · Estudio de diseño Reality */
@font-face {
  font-family: "Figtree";
  src: url("figtree.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --carmesi: #e1232a;
  --rojo: #b51720;
  --plata: #f3f4f6;
  --plata-2: #e5e7eb;
  --plomo: #3a3d42;
  --plomo-2: #2c2e33;
  --tinta: #1d2024;
  --gris-texto: #5b5f66;
  --gris-suave: #6b6f76;
  --borde-campo: #dcdfe3;
  --suave: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  background: radial-gradient(120% 90% at 50% 0%, #ffffff 0%, var(--plata) 55%, #eceef1 100%) fixed;
  background-color: var(--plata);
  color: var(--tinta);
  font-family: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ---------- Fondo: malla de gradientes + trama isométrica ---------- */
.fondo { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }

.mancha {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  will-change: transform;
  animation: deriva 26s var(--suave) infinite alternate;
}
.m1 { width: 46vmax; height: 46vmax; left: -14vmax; top: -16vmax; background: radial-gradient(circle at 40% 40%, rgba(225, 35, 42, .20), rgba(225, 35, 42, 0) 68%); }
.m2 { width: 40vmax; height: 40vmax; right: -12vmax; bottom: -16vmax; background: radial-gradient(circle at 50% 50%, rgba(181, 23, 32, .16), rgba(181, 23, 32, 0) 68%); animation-duration: 32s; animation-delay: -8s; }
.m3 { width: 52vmax; height: 52vmax; right: -18vmax; top: -22vmax; background: radial-gradient(circle, rgba(200, 204, 210, .55), rgba(200, 204, 210, 0) 65%); animation-duration: 38s; animation-delay: -14s; }
.m4 { width: 44vmax; height: 44vmax; left: -10vmax; bottom: -22vmax; background: radial-gradient(circle, rgba(255, 255, 255, .95), rgba(255, 255, 255, 0) 65%); animation-duration: 30s; animation-delay: -20s; }

@keyframes deriva {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(4vmax, 3vmax, 0) scale(1.08); }
  100% { transform: translate3d(-3vmax, 5vmax, 0) scale(.96); }
}

/* Retícula isométrica fina: evoca la vista de un modelador 3D / cama de impresión. */
.trama {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='36.95' viewBox='0 0 64 36.95'%3E%3Cg fill='none' stroke='%233a3d42' stroke-width='.7'%3E%3Cpath d='M0 0L64 36.95M0 36.95L64 0M0 0V36.95M32 0V36.95'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 64px 36.95px;
  opacity: .055;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 50% 50%, transparent 18%, #000 78%);
          mask-image: radial-gradient(ellipse 75% 70% at 50% 50%, transparent 18%, #000 78%);
}

/* ---------- Escena y tarjeta de vidrio ---------- */
.escena {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 16px calc(28px + env(safe-area-inset-bottom));
}

.tarjeta {
  position: relative;
  width: 100%;
  max-width: 424px;
  padding: 40px 38px 34px;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .78), rgba(255, 255, 255, .58));
  border: 1px solid rgba(255, 255, 255, .75);
  -webkit-backdrop-filter: blur(26px) saturate(160%);
          backdrop-filter: blur(26px) saturate(160%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .9),
    0 1px 2px rgba(29, 32, 36, .04),
    0 12px 28px -14px rgba(29, 32, 36, .12),
    0 40px 90px -30px rgba(29, 32, 36, .22);
  animation: entrada 500ms var(--suave) both;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .tarjeta { background: rgba(255, 255, 255, .94); }
}
/* Filo carmesí en el borde superior */
.tarjeta::before {
  content: "";
  position: absolute;
  top: -1px; left: 50%;
  width: 38%; height: 2px;
  transform: translateX(-50%);
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(225, 35, 42, 0), var(--carmesi) 30%, var(--rojo) 70%, rgba(181, 23, 32, 0));
}

@keyframes entrada {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

.logo { display: block; width: 200px; height: auto; margin: 0 auto 26px; }

.encabezado { text-align: center; margin-bottom: 26px; }

.sello {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 5px 12px 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .7);
  border: 1px solid var(--plata-2);
  color: var(--plomo);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.punto {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--carmesi);
  box-shadow: 0 0 0 3px rgba(225, 35, 42, .15);
}

h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -.022em;
  color: var(--tinta);
}
.bajada { margin: 8px 0 0; font-size: 15px; color: var(--gris-texto); }

/* ---------- Error ---------- */
.error {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 20px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fdf2f2;
  border: 1px solid #f6d5d6;
  color: var(--rojo);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  animation: aviso 420ms var(--suave) both;
}
.error svg { flex: none; width: 18px; height: 18px; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
@keyframes aviso {
  0%   { opacity: 0; transform: translateY(-6px) scale(.98); }
  60%  { opacity: 1; transform: translateY(1px) scale(1); }
  100% { opacity: 1; transform: none; }
}

/* ---------- Campos ---------- */
form { display: grid; gap: 18px; }

.campo label {
  display: block;
  margin: 0 0 8px 2px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--plomo);
}

.campo input {
  display: block;
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--borde-campo);
  background: rgba(255, 255, 255, .88);
  color: var(--tinta);
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(29, 32, 36, .04);
  transition: border-color 200ms var(--suave), box-shadow 240ms var(--suave), background-color 200ms var(--suave);
  -webkit-appearance: none;
          appearance: none;
}
.campo input:hover { border-color: #c9ccd1; }
.campo input:focus {
  outline: none;
  border-color: var(--carmesi);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(225, 35, 42, .14), 0 1px 2px rgba(29, 32, 36, .04);
}

.con-ojo { position: relative; }
.js .con-ojo input { padding-right: 54px; }

.ojo {
  display: none;
  position: absolute;
  top: 50%; right: 6px;
  width: 40px; height: 40px;
  transform: translateY(-50%);
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--gris-suave);
  cursor: pointer;
  transition: background-color 180ms var(--suave), color 180ms var(--suave);
}
.js .ojo { display: grid; }
.ojo:hover { background: var(--plata); color: var(--plomo-2); }
.ojo:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(225, 35, 42, .28); color: var(--plomo-2); }
.ojo svg { grid-area: 1 / 1; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: opacity 160ms var(--suave), transform 220ms var(--suave); }
.ojo svg:last-child { opacity: 0; transform: scale(.85); }
.ojo[aria-pressed="true"] svg:first-child { opacity: 0; transform: scale(.85); }
.ojo[aria-pressed="true"] svg:last-child { opacity: 1; transform: none; }

/* ---------- Recordarme ---------- */
.recordar {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-self: start;
  margin: 2px 0 4px;
  font-size: 14.5px;
  color: var(--plomo);
  cursor: pointer;
  user-select: none;
}
.recordar input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.caja {
  display: grid;
  place-items: center;
  width: 20px; height: 20px;
  border-radius: 6px;
  border: 1.5px solid #c4c8cd;
  background: #fff;
  transition: background-color 200ms var(--suave), border-color 200ms var(--suave), box-shadow 200ms var(--suave), transform 200ms var(--suave);
}
.caja svg { width: 13px; height: 13px; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 16; stroke-dashoffset: 16; transition: stroke-dashoffset 260ms var(--suave) 40ms; }
.recordar:hover .caja { border-color: #a9adb3; }
.recordar input:checked + .caja { background: linear-gradient(135deg, var(--carmesi), var(--rojo)); border-color: var(--rojo); }
.recordar input:checked + .caja svg { stroke-dashoffset: 0; }
.recordar input:active + .caja { transform: scale(.92); }
.recordar input:focus-visible + .caja { box-shadow: 0 0 0 4px rgba(225, 35, 42, .18); border-color: var(--carmesi); }

/* ---------- Botón principal ---------- */
.entrar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 52px;
  margin-top: 4px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--carmesi) 0%, #cf1d25 55%, var(--rojo) 100%);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .22),
    0 1px 2px rgba(181, 23, 32, .25),
    0 12px 26px -12px rgba(181, 23, 32, .6);
  transition: transform 220ms var(--suave), box-shadow 260ms var(--suave), filter 220ms var(--suave);
}
.entrar:hover {
  transform: translateY(-1px);
  filter: saturate(1.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .24),
    0 2px 4px rgba(181, 23, 32, .22),
    0 18px 34px -14px rgba(181, 23, 32, .68);
}
.entrar:active { transform: translateY(0); transition-duration: 80ms; }
.entrar:focus-visible { outline: none; box-shadow: 0 0 0 3px #fff, 0 0 0 6px rgba(225, 35, 42, .45), 0 12px 26px -12px rgba(181, 23, 32, .6); }

.giro {
  display: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  animation: girar 700ms linear infinite;
}
.entrar.cargando { cursor: progress; transform: none; filter: saturate(.9); }
.entrar.cargando .giro { display: block; }
@keyframes girar { to { transform: rotate(360deg); } }

/* ---------- Pie ---------- */
.pie {
  margin-top: 28px;
  font-size: 12.5px;
  color: var(--gris-suave);
  text-align: center;
  animation: entrada 600ms var(--suave) 150ms both;
}

/* ---------- Vitrina (solo escritorio) ---------- */
.disposicion { display: flex; flex-direction: column; align-items: center; width: 100%; }
.vitrina { display: none; }

@media (min-width: 1024px) {
  .disposicion {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: clamp(48px, 7vw, 120px);
    max-width: 1120px;
  }
  .vitrina {
    display: block;
    flex: 0 1 520px;
    animation: entrada 700ms var(--suave) 80ms both;
  }
  .vitrina-sello {
    display: inline-flex; align-items: center; gap: 8px;
    margin: 0 0 18px;
    font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
    color: var(--plomo);
  }
  .vitrina-titulo {
    margin: 0;
    font-size: clamp(38px, 3.6vw, 50px);
    line-height: 1.04;
    font-weight: 700;
    letter-spacing: -.03em;
    color: var(--tinta);
  }
  .vitrina-titulo em {
    font-style: normal;
    background: linear-gradient(95deg, var(--carmesi), var(--rojo) 70%);
    -webkit-background-clip: text; background-clip: text;
    color: transparent;
  }
  .vitrina-bajada { margin: 18px 0 0; max-width: 40ch; font-size: 17px; line-height: 1.5; color: var(--gris-texto); }

  /* Composición de artefactos: tres piezas flotando, en plata y blanco con acentos carmesí */
  .artefactos { position: relative; height: 230px; margin: 34px 0 26px; }
  .art {
    position: absolute;
    background: linear-gradient(180deg, #fff, #fafafb);
    border: 1px solid rgba(29, 32, 36, .08);
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(29, 32, 36, .05), 0 24px 48px -24px rgba(29, 32, 36, .25);
    animation: flotar 9s ease-in-out infinite;
  }
  .art-slide { left: 0; top: 18px; width: 300px; height: 176px; padding: 18px; }
  .art-movil { left: 262px; top: 0; width: 112px; height: 224px; padding: 14px 12px; border-radius: 22px; animation-delay: -3s; animation-duration: 11s; }
  .art-paleta { left: 128px; top: 154px; width: 216px; height: 74px; padding: 14px; display: flex; gap: 8px; align-items: center; animation-delay: -6s; animation-duration: 10s; }
  .art span { display: block; border-radius: 6px; }
  .art-barra { width: 34%; height: 10px; background: linear-gradient(90deg, var(--carmesi), var(--rojo)); margin-bottom: 14px; }
  .art-linea { height: 8px; background: var(--plata-2); margin-bottom: 8px; }
  .art-slide .l1 { width: 82%; } .art-slide .l2 { width: 58%; }
  .art-bloque { margin-top: 14px; width: 100%; height: 62px; border-radius: 10px; background: linear-gradient(135deg, #f3f4f6, #e5e7eb); }
  .art-notch { width: 36px; height: 5px; margin: 0 auto 12px; background: var(--plata-2); border-radius: 3px; }
  .art-hero { width: 100%; height: 66px; border-radius: 10px; margin-bottom: 12px; background: linear-gradient(135deg, rgba(225, 35, 42, .9), var(--rojo)); }
  .art-movil .l1 { width: 90%; } .art-movil .l2 { width: 64%; }
  .art-boton { position: absolute; left: 12px; right: 12px; bottom: 14px; height: 24px; border-radius: 8px; background: var(--tinta); }
  .sw { width: 30px; height: 30px; border-radius: 9px; flex: none; }
  .s1 { background: var(--carmesi); } .s2 { background: var(--rojo); } .s3 { background: #c9ccd1; } .s4 { background: var(--plomo); }
  .art-paleta .l3 { flex: 1; height: 8px; margin: 0; background: var(--plata-2); }
  @keyframes flotar {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-9px); }
  }

  .chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
  .chips li {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .72);
    border: 1px solid var(--plata-2);
    color: var(--plomo);
    font-size: 13px; font-weight: 500;
  }
  .escena { padding-left: 32px; padding-right: 32px; }
  .tarjeta { flex: 0 0 424px; }
}

/* ---------- Móvil ---------- */
@media (max-width: 480px) {
  .escena { padding-top: 24px; justify-content: center; }
  .tarjeta { padding: 32px 22px 26px; border-radius: 22px; }
  .logo { width: 176px; margin-bottom: 22px; }
  h1 { font-size: 25px; }
  .campo input { height: 48px; }
  .entrar { height: 50px; }
  .mancha { filter: blur(70px); }
}

@media (prefers-reduced-motion: reduce) {
  .mancha, .tarjeta, .pie, .error, .vitrina, .art { animation: none; }
  .entrar, .entrar:hover { transform: none; }
  *, *::before, *::after { transition-duration: 1ms !important; }
}
