/* Investor Materials overlay — shared by kwarkgroup.com and /plan. Built by /inv.js. */

/* ── Investor overlay ────────────────────────────────────────── */
.inv-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 8, 10, 0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 360ms ease, background 360ms ease,
              backdrop-filter 360ms ease, -webkit-backdrop-filter 360ms ease;
}

.inv-overlay.is-open {
  opacity: 1;
  pointer-events: all;
  background: rgba(8, 8, 10, 0.64);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

/* ── Content column (no card) ────────────────────────────────── */
.inv-modal {
  position: relative;
  width: min(92vw, 360px);
  transform: translateY(20px);
  opacity: 0;
  transition: transform 460ms cubic-bezier(0.16, 1, 0.3, 1) 50ms,
              opacity 380ms ease 50ms;
}

.inv-overlay.is-open .inv-modal {
  transform: translateY(0);
  opacity: 1;
}

/* ── Close button ────────────────────────────────────────────── */
.inv-x {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + clamp(1.25rem, 3.5vh, 2rem));
  right: clamp(1.25rem, 7vw, 8rem);
  background: none;
  border: none;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  color: rgba(255, 255, 255, 0.30);
  cursor: pointer;
  padding: 0.5rem;
  line-height: 0;
  transition: color 160ms ease;
}

.inv-x:hover { color: rgba(255, 255, 255, 0.70); }

/* ── Overlay footer ──────────────────────────────────────────── */
.inv-overlay-footer {
  position: absolute;
  bottom: calc(env(safe-area-inset-bottom, 0px) + clamp(1.25rem, 3.5vh, 2rem));
  left: clamp(1.25rem, 7vw, 8rem);
  right: clamp(1.25rem, 7vw, 8rem);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  pointer-events: none;
}

.inv-overlay-footer p,
.inv-overlay-footer a {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.24);
  text-decoration: none;
}

.inv-overlay-footer a { pointer-events: all; }
.inv-overlay-footer a:hover { color: rgba(255, 255, 255, 0.50); }

/* ── Eyebrow label ───────────────────────────────────────────── */
.inv-eyebrow {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
  margin-bottom: 1.5rem;
}

/* ── Password view ───────────────────────────────────────────── */
.inv-pv { transition: opacity 220ms ease; }
.inv-pv.fading { opacity: 0; }

.inv-field { margin-bottom: 0.5rem; }

.inv-field input[type="password"] {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.20);
  color: rgba(255, 255, 255, 0.92);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.9375rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  padding: 0.75rem 0.875rem;
  outline: none;
  transition: border-color 160ms ease, background 160ms ease;
}

.inv-field input[type="password"]:focus {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.09);
}

.inv-field input[type="password"]::placeholder {
  color: rgba(255, 255, 255, 0.18);
  letter-spacing: 0.28em;
}

.inv-err {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.6875rem;
  color: rgba(255, 106, 0, 0.90);
  height: 1.2rem;
  margin-bottom: 0.75rem;
  letter-spacing: 0.02em;
}

.inv-submit {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.65);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.875rem;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.inv-submit:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.30);
  color: rgba(255, 255, 255, 0.92);
}

@keyframes inv-shake {
  0%, 100% { transform: translateY(0) translateX(0); }
  20% { transform: translateY(0) translateX(-7px); }
  40% { transform: translateY(0) translateX(7px); }
  60% { transform: translateY(0) translateX(-4px); }
  80% { transform: translateY(0) translateX(4px); }
}

.inv-modal.shaking { animation: inv-shake 380ms ease; }

/* ── Documents view ──────────────────────────────────────────── */
.inv-dv {
  opacity: 0;
  transition: opacity 300ms ease;
}

.inv-dv.visible { opacity: 1; }

.inv-doc-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
  text-decoration: none;
  color: inherit;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  transition: opacity 160ms ease;
}

.inv-doc-link:hover { opacity: 0.68; }

.inv-doc-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.inv-doc-name {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1.0625rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: -0.015em;
}

.inv-doc-arr {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
  margin-left: 1rem;
}

/* ── Investor overlay: mobile ── */
@media (max-width: 640px) {
  /* JS (visualViewport) shrinks the overlay to the visible area above the
     keyboard — so the modal stays perfectly centered there with no layout shift. */
  .inv-overlay {
    align-items: center;
    justify-content: center;
  }

  .inv-modal {
    width: calc(100% - 3rem);
    max-width: none;
  }

  /* Close button absolute within the (JS-resized) overlay */
  .inv-x {
    position: absolute;
    top: calc(env(safe-area-inset-top, 0px) + 1rem);
    right: 1.25rem;
    z-index: 101;
  }

  /* Footer not useful on mobile — keyboard covers it */
  .inv-overlay-footer {
    display: none;
  }

  /* 16px prevents iOS Safari from zooming on input focus */
  .inv-field input[type="password"] {
    font-size: 16px;
    padding: 0.875rem;
  }

  .inv-submit {
    padding: 1rem;
  }

  .inv-eyebrow {
    margin-bottom: 1rem;
  }
}

/* ── Document the reader is already on ───────────────────────── */
.inv-doc-link.is-current .inv-doc-arr {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
