/*
 * STRATO branding for Gitea's signed-out home and authentication pages.
 * Scoped selectors keep repository and administration screens untouched.
 */
:is(body:has(.page-content.home), body:has(.page-content.user.signin), body:has(.page-content.user.signup)) {
  background-color: #05090f;
  background-image:
    linear-gradient(rgb(3 8 14 / 18%), rgb(3 8 14 / 72%)),
    url("/assets/strato/strato-gitea-wallpaper.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
}

:is(body:has(.page-content.home), body:has(.page-content.user.signin), body:has(.page-content.user.signup))
  .full.height,
:is(body:has(.page-content.home), body:has(.page-content.user.signin), body:has(.page-content.user.signup))
  .page-content {
  background: transparent;
}

/*
 * The stock Gitea marketing hero duplicates the logo and headline already
 * present in the wallpaper. Keep the public home page as a clean brand splash.
 */
body:has(.page-content.home) .page-content.home {
  min-height: calc(100vh - 7rem);
}

body:has(.page-content.home) .page-content.home > * {
  display: none !important;
}

/* Replace the stock green cup with the STRATO S mark. */
:is(body:has(.page-content.home), body:has(.page-content.user.signin), body:has(.page-content.user.signup))
  #navbar-logo
  img {
  content: url("/assets/img/favicon.png");
  width: 30px;
  height: 30px;
  border-radius: 6px;
  object-fit: contain;
}

/* Remove stock Gitea navigation and footer content from public pages. */
:is(body:has(.page-content.home), body:has(.page-content.user.signin), body:has(.page-content.user.signup))
  #navbar
  a[href="/explore/repos"],
:is(body:has(.page-content.home), body:has(.page-content.user.signin), body:has(.page-content.user.signup))
  #navbar
  a[href^="https://docs.gitea.com"],
:is(body:has(.page-content.home), body:has(.page-content.user.signin), body:has(.page-content.user.signup))
  .page-footer {
  display: none !important;
}

:is(body:has(.page-content.user.signin), body:has(.page-content.user.signup))
  .user.signin,
:is(body:has(.page-content.user.signin), body:has(.page-content.user.signup))
  .user.signup {
  padding-top: clamp(3rem, 10vh, 8rem);
}

:is(body:has(.page-content.user.signin), body:has(.page-content.user.signup))
  .ui.segment {
  background: rgb(8 13 21 / 88%);
  border: 1px solid rgb(135 168 198 / 22%);
  box-shadow: 0 1.5rem 4rem rgb(0 0 0 / 45%);
  backdrop-filter: blur(14px);
}

@media (max-width: 767px) {
  :is(body:has(.page-content.home), body:has(.page-content.user.signin), body:has(.page-content.user.signup)) {
    background-position: center 30%;
    background-size: auto 55vh;
    background-attachment: scroll;
  }
}
