/* Portal de clientes — "acoplamiento orbital" */
.portal {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  min-height: 100vh;
  min-height: 100svh;
}

/* ---------- Escena ---------- */
.station {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-right: 1px solid var(--line);
  opacity: 0;
  transition: opacity 1.2s ease;
}
.is-ready .station { opacity: 1; }
.planet {
  position: absolute;
  width: 135%;
  max-width: none;
  left: -18%;
  top: 50%;
  transform: translateY(-50%) rotate(-12deg);
  filter: brightness(0.7);
  -webkit-mask: radial-gradient(50% 50% at 50% 57%, #000 65%, transparent);
  mask: radial-gradient(50% 50% at 50% 57%, #000 65%, transparent);
  z-index: 0;
}
.station::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(9, 13, 29, 0.55), transparent 30%, transparent 62%, rgba(9, 13, 29, 0.9)),
    linear-gradient(90deg, transparent 70%, rgba(9, 13, 29, 0.6));
}
.reticle {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 46%;
  width: min(62%, 520px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  overflow: visible;
}
.reticle * { vector-effect: non-scaling-stroke; }
.r-outer { fill: none; stroke: rgba(164, 172, 198, 0.25); }
.r-dash { fill: none; stroke: rgba(167, 107, 255, 0.55); stroke-dasharray: 2 10; stroke-width: 1.5; }
.r-mid { fill: none; stroke: rgba(164, 172, 198, 0.3); stroke-dasharray: 1 4; }
.r-ticks line { stroke: rgba(102, 223, 255, 0.55); }
.r-cross { stroke: rgba(164, 172, 198, 0.3); }
.r-target { fill: rgba(102, 223, 255, 0.08); stroke: var(--cyan); stroke-width: 1.5; }
.r-core { fill: var(--cyan); }
.r-brackets { fill: none; stroke: var(--cyan); stroke-width: 1.5; opacity: 0.25; transition: opacity 0.3s; }
.reticle.locked .r-brackets { opacity: 1; }
.reticle.locked .r-target { fill: rgba(102, 223, 255, 0.3); filter: drop-shadow(0 0 10px var(--cyan)); }
.reticle.locked .r-outer { stroke: rgba(102, 223, 255, 0.6); }
.reticle.flash .r-outer { animation: dock 1s ease-out; }
@keyframes dock { 0% { stroke-width: 1; } 30% { stroke-width: 6; stroke: var(--cyan); } 100% { stroke-width: 1; } }

.telemetry {
  position: absolute;
  z-index: 3;
  left: clamp(20px, 4vw, 56px);
  bottom: clamp(24px, 5vh, 48px);
  display: flex;
  gap: 32px;
}
.telemetry small { display: block; font-size: 10px; letter-spacing: 0.22em; color: var(--gray); margin-bottom: 4px; }
.telemetry b { font-family: var(--display); font-weight: 500; font-size: 15px; color: var(--cyan); letter-spacing: 0.06em; font-variant-numeric: tabular-nums; }
.station-quote {
  position: absolute;
  z-index: 3;
  left: clamp(20px, 4vw, 56px);
  top: clamp(28px, 6vh, 56px);
  margin: 0;
  font-family: var(--display);
  font-size: clamp(20px, 1.8vw, 26px);
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--white);
}
.station-quote span { color: var(--nebula); }

/* ---------- Acceso ---------- */
.access {
  display: flex;
  flex-direction: column;
  padding: 28px clamp(20px, 4vw, 64px) calc(24px + env(safe-area-inset-bottom));
  background: radial-gradient(80% 60% at 50% 40%, rgba(84, 41, 128, 0.18), transparent 70%), var(--cosmos);
}
.access-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.access-top .brand .iso { width: 28px; }
.back { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--gray); }
.back:hover { color: var(--white); }

.card {
  position: relative;
  width: 100%;
  max-width: 380px;
  margin: auto;
  padding: 8px 0;
}
.card.docking .submit { box-shadow: 0 0 0 1px var(--cyan), 0 0 28px -4px rgba(102, 223, 255, 0.6); }

.card h1, .card h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(28px, 2.6vw, 36px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.card h1 span, .card h2 span { color: var(--nebula); }
.lead { margin: 10px 0 36px; color: var(--gray); font-size: 15px; line-height: 1.55; }

.field { margin-bottom: 14px; }
.field label, .label-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; font-weight: 500; color: var(--gray); margin-bottom: 8px; }
.label-row label { margin: 0; }
.minor { font-size: 13px; color: var(--gray); font-weight: 400; }
.minor:hover { color: var(--white); }
.control { position: relative; }
.control input {
  width: 100%;
  height: 50px;
  padding: 0 48px 0 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(21, 28, 53, 0.45);
  color: var(--white);
  font: 400 16px var(--ui);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.control input::placeholder { color: rgba(164, 172, 198, 0.55); }
.control input:focus { border-color: rgba(243, 245, 255, 0.45); background: rgba(21, 28, 53, 0.7); box-shadow: none; }
.field.invalid input { border-color: #ff7a9a; box-shadow: 0 0 0 4px rgba(255, 122, 154, 0.12); }
.err { min-height: 18px; margin: 6px 0 0; font-size: 12.5px; color: #ffa3b8; }
.peek {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--gray);
  cursor: pointer;
}
.peek:hover, .peek[aria-pressed='true'] { color: var(--white); background: rgba(164, 172, 198, 0.08); }

.submit { width: 100%; margin-top: 14px; justify-content: center; border: 0; cursor: pointer; font: 600 15px var(--ui); }
.submit .ico { transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); }
.submit:hover .ico { transform: translate(2px, -3px); }
.submit.is-loading { pointer-events: none; opacity: 0.9; }
.submit.is-loading .ico { animation: lift 0.9s ease-in-out infinite; }
@keyframes lift { 50% { transform: translate(3px, -5px); } }
.request { margin: 20px 0 0; text-align: center; font-size: 14px; color: var(--gray); }
.request a { color: var(--white); border-bottom: 1px solid var(--line-strong); }
.request a:hover { border-color: var(--white); }

.status { text-align: left; }
.status .btn { width: 100%; justify-content: center; }
.again { display: block; margin: 16px auto 0; background: none; border: 0; cursor: pointer; font: 500 14px var(--ui); }

.consent { margin: 14px 0 0; text-align: center; font-size: 12.5px; color: rgba(164, 172, 198, 0.75); }
.consent a, .legal a { color: inherit; border-bottom: 1px solid var(--line-strong); }
.consent a:hover, .legal a:hover { color: var(--white); }
.legal { margin: 24px 0 0; text-align: center; font-size: 12px; color: rgba(164, 172, 198, 0.6); }

@media (max-width: 900px) {
  .portal { grid-template-columns: 1fr; }
  .station { height: 38svh; min-height: 270px; border-right: 0; border-bottom: 1px solid var(--line); order: 0; }
  .planet { width: 220%; left: -60%; }
  .reticle { width: min(56vw, 240px); top: 48%; }
  .station-quote { display: none; }
  /* telemetría a la derecha, por encima del solape de la tarjeta */
  .telemetry { gap: 18px; left: auto; right: var(--gutter); bottom: 46px; text-align: right; }
  .telemetry b { font-size: 13px; }
  .telemetry .hide-m { display: none; }
  .access { padding-top: 0; }
  .access-top { position: absolute; top: 0; left: 0; right: 0; padding: 16px var(--gutter); z-index: 5; }
  .card { margin: 0 auto; padding: 32px 0 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .submit.is-loading .ico { animation: none; }
}
