@font-face {
  font-family: "SFX Observatory";
  src: url("fonts/exo2-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}

@font-face {
  font-family: "SFX Text";
  src: url("fonts/jakarta.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}

.observatory-v5,
.callsign-access-v5 {
  --v5-abyss: #06110f;
  --v5-moss: #0d211c;
  --v5-ivory: #f1ecdd;
  --v5-fog: #b8c7be;
  --v5-jade: #7bd6be;
  --v5-copper: #c8834b;
  --v5-spore: #b7d77a;
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden auto;
  color: var(--v5-ivory);
  background: var(--v5-abyss);
  font-family: "SFX Text", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.observatory-v5 *,
.observatory-v5 *::before,
.observatory-v5 *::after,
.callsign-access-v5 *,
.callsign-access-v5 *::before,
.callsign-access-v5 *::after {
  box-sizing: border-box;
}

.observatory-v5 button,
.callsign-access-v5 button {
  color: inherit;
  font: inherit;
}

.observatory-v5::before,
.callsign-access-v5::before {
  content: "";
  position: fixed;
  z-index: -2;
  inset: 0;
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
}

.observatory-v5::before {
  background-image: url("assets/v5/observatory-mobile.webp");
}

.callsign-access-v5::before {
  background-image: url("assets/v5/observatory-mobile.webp");
}

.observatory-v5::after,
.callsign-access-v5::after {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
}

.observatory-v5::after {
  background:
    linear-gradient(180deg, rgba(3, 13, 12, .82) 0%, rgba(3, 13, 12, .23) 23%, transparent 46%),
    linear-gradient(0deg, rgba(3, 13, 12, .98) 0%, rgba(3, 13, 12, .72) 24%, transparent 52%),
    linear-gradient(90deg, rgba(3, 13, 12, .24), transparent 65%);
}

.callsign-access-v5::after {
  background: linear-gradient(180deg, rgba(3, 11, 11, .17), rgba(3, 11, 11, .96) 57%, #030b0b 100%);
}

.v5-observatory-header {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 70px;
  padding: max(14px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
}

.v5-wordmark {
  display: grid;
  grid-template-columns: auto auto;
  align-items: end;
  width: min-content;
  color: var(--v5-ivory);
  font-family: "SFX Observatory", sans-serif;
  line-height: .76;
  text-transform: uppercase;
  text-shadow: 0 2px 16px #000;
}

.v5-wordmark__space {
  grid-column: 1 / -1;
  margin-bottom: 3px;
  color: var(--v5-fog);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .31em;
}

.v5-wordmark strong {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -.075em;
}

.v5-wordmark i {
  color: var(--v5-copper);
  font-style: normal;
}

.v5-wordmark small {
  align-self: end;
  margin: 0 0 1px 8px;
  color: var(--v5-spore);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .15em;
}

.v5-pilot {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 7px 0 7px 9px;
  border: 0;
  background: transparent;
  text-align: right;
}

button.v5-pilot {
  cursor: pointer;
}

.v5-pilot__signal {
  order: 2;
  width: 9px;
  height: 9px;
  border: 2px solid rgba(241, 236, 221, .82);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(123, 214, 190, .12), 0 0 16px rgba(123, 214, 190, .42);
}

.v5-pilot__copy {
  display: grid;
  min-width: 0;
}

.v5-pilot small {
  overflow: hidden;
  color: var(--v5-fog);
  font-size: 10px;
  letter-spacing: .08em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.v5-pilot strong {
  overflow: hidden;
  max-width: 120px;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v5-observatory-main {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto auto minmax(245px, 1fr) auto;
  min-height: calc(100dvh - 70px);
  padding: 4px max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}

.v5-destinations {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 3px;
  max-width: 520px;
  border-top: 1px solid rgba(241, 236, 221, .2);
}

.v5-destination {
  position: relative;
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr);
  gap: 6px;
  min-height: 48px;
  padding: 11px 2px 6px;
  border: 0;
  background: transparent;
  color: var(--v5-fog);
  text-align: left;
  cursor: pointer;
}

.v5-destination::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 4px;
  width: calc(100% - 8px);
  height: 1px;
  background: transparent;
  transition: background-color 160ms ease, box-shadow 160ms ease;
}

.v5-destination__star {
  width: 7px;
  height: 7px;
  margin-top: 4px;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: rgba(6, 17, 15, .7);
}

.v5-destination__copy {
  display: grid;
  min-width: 0;
}

.v5-destination strong {
  overflow: hidden;
  color: var(--v5-ivory);
  font-family: "SFX Observatory", sans-serif;
  font-size: clamp(10px, 3vw, 13px);
  font-weight: 650;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v5-destination small {
  display: none;
}

.v5-destination:hover,
.v5-destination:focus-visible {
  color: var(--v5-jade);
  outline: none;
}

.v5-destination:hover::before,
.v5-destination:focus-visible::before {
  background: var(--v5-jade);
  box-shadow: 0 0 14px rgba(123, 214, 190, .48);
}

.v5-observatory-intro {
  max-width: 450px;
  padding-top: clamp(16px, 4vh, 42px);
  text-shadow: 0 3px 24px #000, 0 1px 2px #000;
}

.v5-observatory-kicker {
  margin: 0 0 7px;
  color: var(--v5-spore);
  font-family: "SFX Observatory", sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.v5-observatory-intro h1 {
  max-width: 13ch;
  margin: 0;
  color: var(--v5-ivory);
  font-family: "SFX Observatory", sans-serif;
  font-size: clamp(31px, 9.2vw, 48px);
  font-style: normal;
  font-weight: 650;
  letter-spacing: -.055em;
  line-height: .98;
  text-transform: none;
}

.v5-observatory-briefing {
  max-width: 34ch;
  margin: 12px 0 0;
  color: var(--v5-fog);
  font-size: 12px;
  line-height: 1.52;
}

.v5-launch-zone {
  align-self: end;
  display: grid;
  gap: 10px;
}

.v5-active-deck {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 82px;
  padding: 8px 10px 8px 6px;
  border: 1px solid rgba(241, 236, 221, .14);
  border-left-color: rgba(200, 131, 75, .78);
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(6, 17, 15, .92), rgba(9, 27, 23, .74));
  box-shadow: 0 14px 36px rgba(0, 0, 0, .22);
  text-align: left;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.v5-active-deck__cards {
  position: relative;
  display: block;
  height: 68px;
}

.v5-active-deck__cards img,
.v5-active-deck__empty {
  position: absolute;
  left: 28px;
  bottom: -2px;
  width: 44px;
  height: 61px;
  border: 1px solid rgba(241, 236, 221, .48);
  border-radius: 4px;
  background: #13211d;
  object-fit: cover;
  object-position: center 25%;
  box-shadow: 0 5px 12px rgba(0, 0, 0, .48);
  transform-origin: 50% 100%;
}

.v5-active-deck__cards > :nth-child(1) { transform: translateX(-27px) rotate(-13deg); }
.v5-active-deck__cards > :nth-child(2) { transform: translateX(-13px) rotate(-7deg); }
.v5-active-deck__cards > :nth-child(3) { transform: rotate(0); }
.v5-active-deck__cards > :nth-child(4) { transform: translateX(13px) rotate(7deg); }
.v5-active-deck__cards > :nth-child(5) { transform: translateX(27px) rotate(13deg); }

.v5-active-deck__copy {
  display: grid;
  min-width: 0;
}

.v5-active-deck__copy small {
  color: var(--v5-jade);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.v5-active-deck__copy strong {
  overflow: hidden;
  margin-top: 2px;
  color: var(--v5-ivory);
  font-family: "SFX Observatory", sans-serif;
  font-size: 15px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v5-active-deck__copy span {
  margin-top: 3px;
  color: var(--v5-fog);
  font-size: 10px;
}

.v5-active-deck__open {
  display: none;
  color: var(--v5-copper);
  font-size: 10px;
  font-weight: 700;
}

.v5-active-deck:hover,
.v5-active-deck:focus-visible {
  border-color: rgba(123, 214, 190, .58);
  outline: none;
}

.v5-launch-action {
  display: grid;
  gap: 5px;
}

.v5-launch-button,
.v5-access-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 0 22px;
  border: 1px solid rgba(183, 215, 122, .72);
  border-radius: 3px;
  background: linear-gradient(135deg, #a8c965, #739f63);
  color: #07120f;
  box-shadow: 0 12px 30px rgba(70, 116, 82, .23), inset 0 1px rgba(255, 255, 255, .35);
  font-family: "SFX Observatory", sans-serif;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .02em;
  cursor: pointer;
}

.v5-launch-button i {
  width: 7px;
  height: 7px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}

.v5-launch-button:hover:not(:disabled),
.v5-launch-button:focus-visible,
.v5-access-button:hover:not(:disabled),
.v5-access-button:focus-visible {
  outline: 2px solid var(--v5-ivory);
  outline-offset: 3px;
  filter: brightness(1.08);
}

.v5-launch-button:disabled,
.v5-access-button:disabled {
  cursor: wait;
  filter: grayscale(.38) brightness(.72);
}

.v5-launch-action > small {
  color: var(--v5-fog);
  font-size: 10px;
  letter-spacing: .05em;
  text-align: center;
}

/* Callsign registration -------------------------------------------------- */

/* O atributo HTML `hidden` precisa vencer os `display:flex/grid` dos CTAs.
   Sem este escopo, o retorno ainda sem href aparecia junto do botão principal
   e quebrava o cartão externo em 320 px. */
.callsign-access-v5 [hidden] { display: none !important; }

.v5-access-brand {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: max(18px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 0 max(20px, env(safe-area-inset-left));
  font-family: "SFX Observatory", sans-serif;
  text-shadow: 0 2px 16px #000;
}

.v5-access-brand > span {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -.055em;
}

.v5-access-brand strong {
  color: var(--v5-copper);
}

.v5-access-brand small {
  color: var(--v5-spore);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.v5-access-main {
  position: relative;
  z-index: 1;
  display: grid;
  align-items: end;
  min-height: calc(100dvh - 46px);
  padding: 42vh max(16px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}

.v5-access-card {
  width: min(100%, 520px);
  margin-inline: auto;
  padding: 24px 20px 20px;
  border-top: 1px solid rgba(200, 131, 75, .7);
  background: linear-gradient(145deg, rgba(5, 17, 15, .97), rgba(10, 29, 24, .92));
  box-shadow: 0 20px 70px rgba(0, 0, 0, .48);
}

.v5-access-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--v5-jade);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.v5-access-status__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
}

.v5-access-card h1 {
  max-width: 15ch;
  margin: 0;
  color: var(--v5-ivory);
  font-family: "SFX Observatory", sans-serif;
  font-size: clamp(28px, 8.5vw, 42px);
  font-style: normal;
  font-weight: 650;
  letter-spacing: -.045em;
  line-height: 1;
  text-transform: none;
}

.v5-access-copy {
  max-width: 44ch;
  margin: 12px 0 0;
  color: var(--v5-fog);
  font-size: 12px;
  line-height: 1.55;
}

.v5-access-safety {
  margin: 12px 0 0;
  color: rgba(184, 199, 190, .74);
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
}

.v5-callsign-form {
  display: grid;
  gap: 9px;
  margin-top: 22px;
}

.v5-callsign-form label {
  color: var(--v5-ivory);
  font-size: 12px;
  font-weight: 750;
}

.v5-callsign-input {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid rgba(123, 214, 190, .42);
  border-radius: 2px;
  outline: 0;
  background: rgba(2, 12, 10, .78);
  color: var(--v5-ivory);
  font: 650 16px/1 "SFX Text", system-ui, sans-serif;
  box-shadow: inset 0 1px 12px rgba(0, 0, 0, .3);
}

.v5-callsign-input::placeholder { color: rgba(184, 199, 190, .52); }
.v5-callsign-input:focus {
  border-color: var(--v5-jade);
  box-shadow: 0 0 0 3px rgba(123, 214, 190, .12), inset 0 1px 12px rgba(0, 0, 0, .3);
}

.v5-callsign-help {
  margin-bottom: 5px;
  color: var(--v5-fog);
  font-size: 12px;
  line-height: 1.4;
}

@media (max-width: 719px) and (max-height: 640px) {
  .v5-access-main {
    align-items: start;
    min-height: calc(100dvh - 42px);
    padding-top: clamp(78px, 18vh, 102px);
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }

  .v5-access-card { padding: 14px 16px 10px; }
  .v5-access-card h1 { font-size: clamp(25px, 8vw, 31px); }
  .v5-access-copy { margin-top: 7px; font-size: 12px; line-height: 1.42; }
  .v5-access-button { min-height: 48px; }
  .v5-access-safety { margin-top: 6px; }
  .v5-callsign-form { gap: 5px; margin-top: 10px; }
  .v5-callsign-input { min-height: 48px; }
  .v5-callsign-help { margin-bottom: 2px; }
}

@media (min-width: 720px) {
  .observatory-v5::before {
    background-image: url("assets/v5/observatory-desktop.webp");
    background-position: center;
  }

  .callsign-access-v5::before {
    background-image: url("assets/v5/observatory-desktop.webp");
    background-position: center;
  }

  .observatory-v5::after {
    background:
      linear-gradient(90deg, rgba(3, 13, 12, .92) 0%, rgba(3, 13, 12, .63) 30%, rgba(3, 13, 12, .08) 63%),
      linear-gradient(0deg, rgba(3, 13, 12, .74) 0%, transparent 32%),
      linear-gradient(180deg, rgba(3, 13, 12, .52), transparent 20%);
  }

  .callsign-access-v5::after {
    background: linear-gradient(90deg, rgba(3, 11, 11, .96) 0%, rgba(3, 11, 11, .83) 34%, rgba(3, 11, 11, .08) 67%);
  }

  .v5-observatory-header {
    min-height: 88px;
    padding: 22px clamp(28px, 4vw, 72px) 12px;
  }

  .v5-wordmark strong { font-size: 32px; }
  .v5-wordmark__space { font-size: 10px; }
  .v5-wordmark small { font-size: 10px; }

  .v5-pilot { padding: 9px 0 9px 12px; }
  .v5-pilot small { font-size: 10px; }
  .v5-pilot strong { max-width: 220px; font-size: 13px; }

  .v5-observatory-main {
    grid-template-rows: auto auto minmax(80px, 1fr) auto;
    width: min(680px, 54vw);
    min-height: calc(100dvh - 88px);
    padding: 10px 0 clamp(28px, 5vh, 56px) clamp(28px, 4vw, 72px);
  }

  .v5-destinations { gap: 10px; }
  .v5-destination { grid-template-columns: 10px minmax(0, 1fr); gap: 9px; min-height: 68px; padding: 14px 7px 8px; }
  .v5-destination strong { font-size: 13px; }
  .v5-destination small { display: block; overflow: hidden; margin-top: 4px; color: var(--v5-fog); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }

  .v5-observatory-intro {
    align-self: start;
    padding-top: clamp(28px, 8vh, 88px);
  }

  .v5-observatory-intro h1 { font-size: clamp(42px, 4vw, 65px); }
  .v5-observatory-briefing { font-size: 13px; }

  .v5-launch-zone {
    grid-template-columns: minmax(0, 1fr) minmax(210px, .58fr);
    align-items: center;
    gap: 14px;
    max-width: 650px;
  }

  .v5-active-deck { min-height: 94px; grid-template-columns: 130px minmax(0, 1fr) auto; padding-right: 15px; }
  .v5-active-deck__cards { height: 78px; }
  .v5-active-deck__cards img,
  .v5-active-deck__empty { left: 36px; width: 51px; height: 71px; }
  .v5-active-deck__copy strong { font-size: 17px; }
  .v5-active-deck__open { display: block; }
  .v5-launch-button { min-height: 62px; }

  .v5-access-brand { padding: 25px clamp(30px, 5vw, 78px) 0; }
  .v5-access-main {
    align-items: center;
    min-height: calc(100dvh - 52px);
    padding: 24px clamp(30px, 5vw, 78px) 48px;
  }
  .v5-access-card {
    width: min(480px, 43vw);
    margin: 0;
    padding: clamp(28px, 4vw, 46px);
    border-top-width: 2px;
  }
  .v5-access-card h1 { font-size: clamp(38px, 3.4vw, 54px); }
  .v5-access-copy { font-size: 13px; }
}

@media (max-width: 359px) {
  .v5-observatory-main { grid-template-rows: auto auto minmax(190px, 1fr) auto; }
  .v5-observatory-intro h1 { font-size: 28px; }
  .v5-observatory-briefing { font-size: 11px; }
  .v5-active-deck { grid-template-columns: 92px minmax(0, 1fr); min-height: 76px; }
  .v5-active-deck__cards { transform: scale(.86); transform-origin: left center; }
  .v5-active-deck__open { display: none; }
  .v5-access-main { padding-inline: 12px; }
  .v5-access-card { padding: 16px; }
}

@media (max-height: 700px) and (max-width: 719px) {
  .v5-observatory-main { grid-template-rows: auto auto minmax(125px, 1fr) auto; }
  .v5-observatory-intro { padding-top: 9px; }
  .v5-observatory-intro h1 { font-size: 28px; }
  .v5-observatory-briefing { margin-top: 7px; }
  .v5-active-deck { min-height: 72px; }
  .v5-active-deck__cards { height: 60px; transform: scale(.88); transform-origin: left center; }
  .v5-launch-button { min-height: 49px; }
  .v5-access-main { padding-top: clamp(78px, 18vh, 112px); }
  .v5-access-card { padding-block: 14px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .v5-destination::before,
  .v5-launch-button,
  .v5-access-button {
    transition: none;
  }
}
