/* File: css/pages/dashboard.css
 * Owner: Person B (Saurav)
 * AI-assisted (update): Claude, 2026-11-15 - responsive pass: title screen scrolls instead of clipping, compact layout for short landscape screens. Reviewed by a human: YES, Person C (Yochan).
 * AI-assisted: YES — Gemini, 2026-11-15. Reviewed by a human: YES, Person C (Yochan).
 * Sources used: none
 */
#title {
  position: fixed;
  inset: 0;
  z-index: 9;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  text-align: center;
  /* Scrolls when the box is taller than the screen. It used to be overflow: hidden, which clipped
     the rocket and the disclaimer on short (landscape phone) screens. */
  overflow-x: hidden;
  overflow-y: auto;
  background: radial-gradient(circle at 68% 32%, #14365a33, #07162994 72%);
}

.tbox {
  position: relative;
  z-index: 2;
  /* margin: auto centres the box when there is room and lets it scroll from the top when there is not */
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  max-width: 740px;
  padding: 24px 28px;
  background: #091b30c4;
  border: 1px solid #3c78b577;
  border-radius: 18px;
  box-shadow: 0 18px 48px #030a14aa;
}

.tbox .row {
  position: relative;
  z-index: 2;
  justify-content: center;
}

.tbox h1 {
  margin: 0;
  font-size: clamp(2.4rem, 8vw, 4.5rem);
  letter-spacing: 8px;
  text-shadow: 0 4px 22px #040d18cc;
  cursor: pointer;
  user-select: none;
}

.tbox p {
  margin: 0 0 10px;
  font-size: 1.1rem;
  color: #dce9f7;
  text-shadow: 0 2px 10px #040d18cc;
}

#start {
  font-weight: 700;
  color: #0b2038;
  background: var(--accent);
  border: 0;
}

#start:hover:not(:disabled) {
  background: #ffd475;
}

/* Pure GPU translate3d animation without drop-shadow repaints */
.trk {
  height: 165px;
  will-change: transform;
  animation: bob 3.2s ease-in-out infinite;
}

.tmars {
  position: fixed;
  right: -30px;
  bottom: -45px;
  width: 240px;
  z-index: 1;
  opacity: 0.85;
  pointer-events: none;
}

@keyframes bob {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -10px, 0); }
}

body:has(#title:not([hidden])) header,
body:has(#title:not([hidden])) #app {
  visibility: hidden;
}

#cr {
  margin: 0 !important;
  font-size: 0.85rem;
  color: var(--muted);
}

.mission-badge {
  float: right;
  width: 130px;
  margin: 0 0 8px 14px;
}

#s4 li {
  margin: 4px 0;
}

#s4 .box {
  max-width: 820px;
}

@media (max-width: 768px) {
  .tbox {
    padding: 18px 14px;
  }
  .tmars {
    display: none;
  }
  .trk {
    height: 130px;
  }
  .mission-badge {
    float: none;
    display: block;
    margin: 0 auto 12px;
  }
}

/* Short screens (landscape phones): drop the decorations, keep every button reachable */
@media (max-height: 520px) {
  .trk,
  .tmars {
    display: none;
  }

  .tbox {
    gap: 8px;
    padding: 14px 18px;
  }

  .tbox h1 {
    font-size: clamp(2rem, 9vh, 3rem);
    letter-spacing: 6px;
  }

  .tbox p {
    margin: 0 0 4px;
    font-size: 1rem;
  }
}
