/* Platform access gate — cinematic video hero (SpaceX IR style) */

html.access-locked,
html.access-locked body {
  overflow: hidden;
  height: 100%;
}

html.access-checking,
html.access-checking body {
  overflow: auto;
  height: auto;
}

html.access-checking #root,
html.access-granted #root,
html.access-checking .ir-nav-desktop-spa,
html.access-granted .ir-nav-desktop-spa,
html.access-checking .ir-mobile-nav-root,
html.access-granted .ir-mobile-nav-root,
html.access-checking .ir-spa-block,
html.access-granted .ir-spa-block,
html.access-checking #mandate-chart-section,
html.access-granted #mandate-chart-section,
html.access-checking #mandate-doge-pipeline,
html.access-granted #mandate-doge-pipeline {
  visibility: visible !important;
  pointer-events: auto !important;
}

html.access-granted #access-gate,
html.access-checking #access-gate {
  display: none !important;
}

html.access-locked #root,
html.access-locked .ir-nav-desktop-spa,
html.access-locked .ir-mobile-nav-root,
html.access-locked .ir-spa-block,
html.access-locked #mandate-chart-section,
html.access-locked #mandate-doge-pipeline {
  visibility: hidden !important;
  pointer-events: none !important;
}

html.access-granted #root {
  visibility: visible;
}

/* ========== Hero video section ========== */
.access-gate.hero-video,
.hero-video.access-gate {
  position: fixed;
  inset: 0;
  z-index: 999999;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: center;
  color: #fff;
  font-family: var(--ir-font, 'D-DIN', 'Barlow', system-ui, sans-serif);
  -webkit-font-smoothing: antialiased;
}

.access-gate[hidden] {
  display: none !important;
}

.hero-video__media {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: 1;
  pointer-events: none;
  background: #000;
}

.hero-video__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.25) 0%,
    rgba(0, 0, 0, 0.45) 40%,
    rgba(0, 0, 0, 0.78) 100%
  );
  z-index: 2;
  pointer-events: none;
}

.hero-video__content {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  color: #fff;
}

.access-gate__inner {
  width: min(36rem, 100%);
  padding: clamp(2rem, 5vw, 3rem) 0;
}

.access-gate__logo {
  display: block;
  width: auto;
  height: 22px;
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
  opacity: 1;
  filter: brightness(0) invert(1);
}

.access-gate__eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.hero-title,
.access-gate__title {
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 1rem;
  color: #fff;
  text-transform: uppercase;
}

.hero-subtitle,
.access-gate__lead {
  font-size: clamp(0.95rem, 2.2vw, 1.15rem);
  color: rgba(255, 255, 255, 0.75);
  max-width: 32rem;
  margin: 0 0 2rem;
  line-height: 1.55;
}

.access-gate__form {
  max-width: 32rem;
}

.access-gate__row {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.access-gate__row label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.access-gate__input {
  width: 100%;
  padding: 0.85rem 1rem;
  font-family: inherit;
  font-size: 0.95rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.access-gate__input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.access-gate__input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
}

.access-gate__checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 1rem 0 1.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.5;
  cursor: pointer;
}

.access-gate__checkbox input {
  margin-top: 0.15rem;
  accent-color: #fff;
  flex-shrink: 0;
}

.access-gate__btn,
.hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.85rem 2rem;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s, opacity 0.25s;
}

.access-gate__btn:hover:not(:disabled),
.hero-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
}

.access-gate__btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.access-gate__status {
  margin-top: 1.5rem;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.45);
  font-size: 0.88rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
}

.access-gate__status[hidden] {
  display: none;
}

.access-gate__status--pending {
  border-color: rgba(255, 200, 100, 0.25);
}

.access-gate__status--denied {
  border-color: rgba(255, 100, 100, 0.25);
}

.access-gate__status--error {
  border-color: rgba(255, 100, 100, 0.25);
}

@media (prefers-reduced-motion: reduce) {
  .hero-video__media {
    display: none;
  }

  .access-gate.hero-video {
    background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.92)),
      url('https://images.unsplash.com/photo-1457364887197-9150188c107b?w=1920&q=85');
    background-size: cover;
    background-position: center;
  }
}

@media (max-width: 768px) {
  .access-gate.hero-video {
    height: 100vh;
    min-height: 0;
    align-items: flex-start;
    overflow-y: auto;
  }

  .hero-video__content {
    padding: 1.25rem 1.25rem 2rem;
  }

  .hero-title,
  .access-gate__title {
    font-size: 2.6rem;
  }

  .access-gate__logo {
    height: 18px;
    margin-bottom: 2rem;
  }
}

/* Agent desk — access requests panel */
.access-inbox-panel {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.access-inbox-panel h3 {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.access-inbox-count {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 0.75rem;
}

.access-request-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 220px;
  overflow-y: auto;
}

.access-request-item {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.access-request-email {
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  word-break: break-all;
}

.access-request-meta {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.45);
}

.access-request-actions {
  display: flex;
  gap: 0.5rem;
}

.access-request-actions button {
  flex: 1;
  padding: 0.4rem 0.6rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: transparent;
  color: #fff;
}

.access-request-actions .access-approve {
  border-color: rgba(110, 231, 160, 0.35);
  color: #6ee7a0;
}

.access-request-actions .access-deny {
  border-color: rgba(255, 120, 120, 0.25);
  color: #ffb4b4;
}

.access-request-empty {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  padding: 0.5rem 0;
}
