* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  background: #000;
  color: #fff;
  overflow: hidden;
  font-family: Arial, Helvetica, sans-serif;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

#app,
.screen {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
}

.screen {
  position: fixed;
  inset: 0;
  background: #000;
}

.is-hidden {
  display: none !important;
}

/* ---------------------------
   ENTRY SCREEN
---------------------------- */

.start-screen {
  display: grid;
  place-items: center;
  padding: 24px;
}

.enter-button {
  appearance: none;
  border: 0;
  background: transparent;
  color: #fff;
  text-align: center;
  cursor: pointer;
  padding: 30px;
}

.enter-kicker {
  display: block;
  margin-bottom: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.42em;
  opacity: 0.55;
}

.enter-title {
  display: block;
  font-size: clamp(34px, 7vw, 72px);
  font-weight: 300;
  letter-spacing: 0.22em;
  transform: translateX(0.11em);
}

.enter-hint {
  display: block;
  margin-top: 20px;
  font-size: 12px;
  letter-spacing: 0.12em;
  opacity: 0.45;
}

.enter-button:hover .enter-title,
.enter-button:focus-visible .enter-title {
  opacity: 0.78;
}

.enter-button:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.5);
  outline-offset: 12px;
}

/* ---------------------------
   VIDEO SCREEN
---------------------------- */

.video-screen {
  display: block;
}

.intro-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
  object-fit: cover;
}

.skip-button {
  position: absolute;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 3;

  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  padding: 10px 16px;

  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;

  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.skip-button:hover,
.skip-button:focus-visible {
  border-color: rgba(255, 255, 255, 0.9);
  background: rgba(0, 0, 0, 0.6);
}

/* ---------------------------
   LOGIN SCREEN
---------------------------- */

.login-screen {
  display: grid;
  place-items: center;
  padding:
    max(24px, env(safe-area-inset-top))
    max(24px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom))
    max(24px, env(safe-area-inset-left));
}

.login-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 34px;
  width: min(92vw, 560px);
  animation: fadeIn 700ms ease both;
}

.brand-logo {
  width: min(46vw, 230px);
  max-height: 34vh;
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.login-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: min(82vw, 330px);
  min-height: 56px;
  padding: 15px 28px;

  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 999px;

  color: #fff;
  background: transparent;
  text-decoration: none;
  text-align: center;

  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;

  transition:
    background 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.login-button:hover,
.login-button:focus-visible {
  background: #fff;
  color: #000;
  transform: translateY(-1px);
}

.login-button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* On very tall mobile screens, avoid oversized logo */
@media (max-width: 600px) {
  .brand-logo {
    width: min(62vw, 220px);
  }

  .login-card {
    gap: 28px;
  }
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Separate CA reports sign-in beneath the owner portal. */
.login-actions { display:flex; flex-direction:column; align-items:center; gap:14px; width:100%; }
.ca-login-button { border-color:rgba(255,255,255,.38); font-size:12px; min-height:46px; }
