/* Entrada del portal: la portada de Niche Scanner Pro (la Tierra, el espacio y los satélites) con el acceso en el centro. */
:root {
  --bg: #050506;
  --txt: #f7f7f8;
  --gold: #f5d67b;
  --gold-soft: rgba(245, 214, 123, 0.5);
  --cyan: #22d3ee;
  --cyan-soft: #7deeff;
  --bad: #ff6b6b;
  --font-display: "Space Grotesk", Inter, system-ui, sans-serif;
  --font-body: -apple-system, "Inter", "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: dark;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; }
body { background: var(--bg); color: var(--txt); font-family: var(--font-body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }

.page-stars { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }

.topbar { position: relative; z-index: 10; display: flex; align-items: center; padding: 22px clamp(20px, 5vw, 64px); }
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.04); }
.brand-mark img { filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.4)); }
.brand-text { display: grid; gap: 4px; }
.brand-name { font: 700 19px/1 var(--font-display); letter-spacing: 0.32em; }
.brand-sub { font: 700 9px/1 var(--font-mono); letter-spacing: 0.3em; color: rgba(255, 255, 255, 0.5); }

main { position: relative; z-index: 1; }
.hero {
  position: relative; isolation: isolate; width: min(1500px, 100%); min-height: calc(100vh - 88px); margin: 0 auto;
  padding: clamp(40px, 7vh, 96px) clamp(20px, 6vw, 96px) 120px;
  display: flex; flex-direction: column; justify-content: center; align-items: center; overflow: hidden;
}
.hero::after { content: ""; position: absolute; z-index: 4; pointer-events: none; left: 0; right: 0; bottom: 0; height: 160px; background: linear-gradient(to bottom, transparent, var(--bg)); }
.hero-ambient { position: absolute; inset: 0; z-index: -2; pointer-events: none; overflow: hidden; }
.hero-ambient canvas { width: 100%; height: 100%; display: block; }

.hero-stars { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; }
.hero-stars i { position: absolute; width: 130px; height: 1.5px; background: linear-gradient(90deg, transparent, rgba(255, 240, 210, 0.9), transparent); border-radius: 999px; opacity: 0; transform: rotate(-32deg); animation: starStreak 9s linear infinite; }
.hero-stars i:nth-child(1) { top: 14%; left: 12%; animation-delay: 2s; }
.hero-stars i:nth-child(2) { top: 8%; left: 62%; animation-delay: 6.4s; animation-duration: 11s; }
.hero-stars i:nth-child(3) { top: 26%; left: 78%; animation-delay: 10.8s; animation-duration: 13s; }
@keyframes starStreak { 0%, 92% { opacity: 0; transform: rotate(-32deg) translateX(0); } 93% { opacity: 0.9; } 100% { opacity: 0; transform: rotate(-32deg) translateX(340px); } }

.orbit-path { position: absolute; z-index: 2; border: 1px dashed rgba(245, 214, 123, 0.16); border-radius: 50%; pointer-events: none; mask-image: linear-gradient(to bottom, transparent 44%, #000 58%); -webkit-mask-image: linear-gradient(to bottom, transparent 44%, #000 58%); }
.hero-orbitals { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.hero-orbitals span {
  position: absolute; left: 0; top: 0; display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px;
  border: 1px solid var(--gold-soft); border-radius: 999px; color: #ffe9bd; background: rgba(12, 10, 6, 0.8);
  box-shadow: 0 0 26px rgba(245, 214, 123, 0.28), inset 0 1px rgba(255, 255, 255, 0.1); backdrop-filter: blur(8px);
  font: 700 10.5px/1 var(--font-mono); letter-spacing: 0.14em; white-space: nowrap; opacity: 0; will-change: transform, opacity;
}

.hero-copy { position: relative; z-index: 8; width: 100%; max-width: 860px; padding-bottom: 20px; text-align: center; }
.hero-copy > * { opacity: 0; transform: translateY(14px); animation: heroIn 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards; }
.hero-copy > *:nth-child(2) { animation-delay: 0.12s; }
.hero-copy > *:nth-child(3) { animation-delay: 0.22s; }
.hero-copy > *:nth-child(4) { animation-delay: 0.32s; }
@keyframes heroIn { to { opacity: 1; transform: none; } }
.eyebrow { display: inline-flex; margin-bottom: 30px; color: rgba(255, 255, 255, 0.55); font: 700 9px/1 var(--font-mono); letter-spacing: 0.3em; }
.hero h1 { font: 650 clamp(44px, 5.6vw, 84px)/1.04 var(--font-display); letter-spacing: -0.024em; text-wrap: balance; text-shadow: 0 2px 30px rgba(0, 0, 0, 0.6); }
.hero h1 em { font-style: normal; background: linear-gradient(96deg, #fff 10%, var(--cyan-soft) 55%, var(--cyan) 90%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-subtitle { max-width: 500px; margin: 22px auto 42px; color: rgba(255, 255, 255, 0.74); font-size: 16px; line-height: 1.7; text-shadow: 0 1px 14px rgba(0, 0, 0, 0.85), 0 0 30px rgba(0, 0, 0, 0.6); }

.login-box {
  position: relative; width: 100%; max-width: 700px; margin: 0 auto; text-align: left; padding: 18px 20px;
  border: 1px solid rgba(245, 214, 123, 0.32); border-radius: 22px;
  background: linear-gradient(145deg, rgba(26, 24, 18, 0.92), rgba(10, 10, 12, 0.9));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.07), 0 28px 85px rgba(0, 0, 0, 0.55), 0 0 40px rgba(245, 214, 123, 0.08);
  backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.login-box:focus-within { border-color: rgba(245, 214, 123, 0.6); box-shadow: 0 28px 85px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(245, 214, 123, 0.2), 0 0 50px rgba(245, 214, 123, 0.12); }
.login-head { display: flex; gap: 8px; margin-bottom: 14px; }
.mode-chip, .context-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 31px; padding: 0 12px; border-radius: 999px; font: 700 11px var(--font-body); }
.mode-chip { border: 1px solid var(--gold-soft); background: rgba(245, 214, 123, 0.08); color: #ffe9bd; }
.context-chip { border: 1px solid rgba(34, 211, 238, 0.32); background: rgba(34, 211, 238, 0.06); color: var(--cyan-soft); }
.mode-orb { width: 8px; height: 8px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, var(--gold) 48%, #6b4e0c); box-shadow: 0 0 14px rgba(245, 214, 123, 0.7); }
.login-fields { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; }
.field { display: grid; gap: 7px; }
.field-label { font: 700 9.5px var(--font-mono); letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255, 255, 255, 0.5); }
.field input {
  width: 100%; height: 48px; padding: 0 14px; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 14px; outline: none;
  background: rgba(5, 5, 6, 0.75); color: var(--txt); font: 500 15px var(--font-body); transition: border-color 0.18s;
}
.field input::placeholder { color: rgba(255, 255, 255, 0.28); }
.field input:focus { border-color: rgba(245, 214, 123, 0.55); }
.send-button {
  width: 48px; height: 48px; display: grid; place-items: center; border: 0; border-radius: 50%; cursor: pointer; color: #1a1305;
  background: radial-gradient(circle at 35% 30%, #fff3cf, var(--gold) 55%, #c89b2c); box-shadow: 0 8px 28px rgba(245, 214, 123, 0.35);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.send-button:hover { transform: translateY(-2px); box-shadow: 0 12px 34px rgba(245, 214, 123, 0.5); }
.send-button:disabled { opacity: 0.5; cursor: wait; transform: none; }
.send-button svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.form-message { margin-top: 12px; font-size: 13px; color: var(--bad); }
.form-message.is-ok { color: var(--cyan-soft); }

@media (max-width: 760px) {
  .hero-orbitals { display: none; }
  .login-fields { grid-template-columns: 1fr; }
  .send-button { width: 100%; border-radius: 14px; }
  .hero h1 { font-size: clamp(36px, 10vw, 48px); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-copy > * { opacity: 1; transform: none; animation: none; }
  .hero-stars i { animation: none; }
}
