/* ===========================================================================
   QWise Portal — portal.qwise.org
   Tenant-picker landing. Visually consistent with qwise.org marketing.
   =========================================================================== */

:root {
  --bg-deep:    #050D24;
  --bg-mid:     #071B3A;
  --bg-soft:    #0C2453;
  --ink:        #E7ECFF;
  --ink-muted:  rgba(231, 236, 255, 0.65);
  --ink-faint:  rgba(231, 236, 255, 0.45);
  --line:       rgba(255, 255, 255, 0.10);
  --line-strong:rgba(255, 255, 255, 0.18);
  --mint-400:   #34D399;
  --cyan-400:   #22D3EE;
  --violet-400: #A78BFA;
  --rose-400:   #FB7185;
  --grad: linear-gradient(95deg, #38BDF8 0%, #818CF8 50%, #C084FC 100%);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: radial-gradient(ellipse 90% 60% at 50% 0%, #0C2453 0%, var(--bg-deep) 60%);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.grad-text {
  background: var(--grad);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12.5px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  color: var(--ink);
}

/* ----- Topbar ----- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(5, 13, 36, 0.7);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 14px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.brand__mark { width: 28px; height: 28px; }
.brand__name sup { font-size: 0.55em; opacity: 0.75; }
.topbar__nav { display: inline-flex; gap: 22px; }
.topbar__nav a {
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease;
}
.topbar__nav a:hover { color: var(--ink); }

/* ----- Background orbs ----- */
.portal {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  padding: 70px 0 90px;
}
.portal__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.portal__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
}
.portal__orb--1 {
  width: 540px;
  height: 540px;
  left: -180px;
  top: -120px;
  background: radial-gradient(closest-side, rgba(56,189,248,0.55), transparent 70%);
}
.portal__orb--2 {
  width: 620px;
  height: 620px;
  right: -200px;
  bottom: -160px;
  background: radial-gradient(closest-side, rgba(192,132,252,0.45), transparent 70%);
}
.portal__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}

.portal__inner {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
}

/* ----- The card ----- */
.portal__card {
  width: 100%;
  max-width: 640px;
  background: linear-gradient(180deg, rgba(20, 36, 70, 0.85), rgba(8, 18, 42, 0.85));
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  padding: 40px clamp(24px, 5vw, 44px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(14px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 100px;
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.25);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mint-400);
}
.eyebrow__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint-400);
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.7);
}

.portal__title {
  font-size: clamp(28px, 4.5vw, 38px);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 20px 0 12px;
}
.portal__sub {
  font-size: 15px;
  color: var(--ink-muted);
  line-height: 1.65;
  margin: 0 0 28px;
}

/* ----- Form ----- */
.portal__form { margin-bottom: 32px; }
.portal__inputrow {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  padding: 6px 6px 6px 6px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.portal__inputrow:focus-within {
  border-color: rgba(56, 189, 248, 0.55);
  background: rgba(255, 255, 255, 0.06);
}
.portal__inputrow input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--ink);
  font-size: 15px;
  padding: 14px 18px;
  font-family: inherit;
}
.portal__inputrow input::placeholder { color: var(--ink-faint); }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  border-radius: 100px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  text-decoration: none;
  font-family: inherit;
}
.btn--primary {
  background: var(--grad);
  color: white;
  padding: 12px 22px;
  box-shadow: 0 8px 24px rgba(56, 189, 248, 0.3);
}
.btn--primary:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(56, 189, 248, 0.4); }
.btn--lg { padding: 14px 26px; font-size: 15.5px; }
.btn:disabled, .btn.is-loading { opacity: 0.6; cursor: progress; }

.portal__hint {
  margin: 14px 4px 0;
  font-size: 13px;
  color: var(--ink-faint);
}
.portal__err {
  margin: 12px 4px 0;
  font-size: 13.5px;
  color: var(--rose-400);
  min-height: 1.2em;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.portal__err.show { opacity: 1; transform: translateY(0); }

/* ----- Footnote + security ----- */
.portal__footnote {
  font-size: 13.5px;
  color: var(--ink-muted);
  margin: 8px 0 22px;
  line-height: 1.6;
}
.portal__footnote a {
  color: var(--cyan-400);
  text-decoration: none;
  border-bottom: 1px solid rgba(34, 211, 238, 0.35);
}
.portal__footnote a:hover { color: white; border-bottom-color: white; }

.portal__security {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(52, 211, 153, 0.05);
  border: 1px solid rgba(52, 211, 153, 0.18);
  border-radius: 14px;
  font-size: 12.5px;
  color: var(--ink-muted);
  line-height: 1.55;
  margin-bottom: 22px;
}
.portal__lock {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(52, 211, 153, 0.14);
  color: var(--mint-400);
}

.trust {
  list-style: none;
  margin: 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  font-size: 11.5px;
  color: var(--ink-faint);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.trust li strong {
  color: var(--ink-muted);
  font-weight: 600;
}

/* ----- Footer ----- */
.portalfoot {
  border-top: 1px solid var(--line);
  padding: 22px 0;
  background: rgba(5, 13, 36, 0.6);
}
.portalfoot__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--ink-faint);
}
.portalfoot__legal { display: inline-flex; gap: 18px; }
.portalfoot__legal a { color: var(--ink-muted); text-decoration: none; }
.portalfoot__legal a:hover { color: white; }

/* ----- Mobile ----- */
@media (max-width: 640px) {
  .topbar__nav { gap: 12px; }
  .topbar__nav a { font-size: 12.5px; }
  .portal { padding: 36px 0 60px; }
  .portal__card { border-radius: 22px; padding: 28px 20px; }
  .portal__inputrow { grid-template-columns: 1fr; border-radius: 18px; padding: 8px; }
  .portal__inputrow input { padding: 12px 14px; }
  .btn--lg { justify-content: center; width: 100%; }
  .tenant { padding: 12px 14px; gap: 12px; }
  .tenant__mark { width: 36px; height: 36px; font-size: 15px; }
  .trust { gap: 12px 18px; font-size: 11px; }
}
