/* Hofee Lab home page — loaded independently of the user's selected Gitea theme. */
.hlab-home {
  --hlab-cyan: #45d9ff;
  --hlab-mint: #67edb0;
  --hlab-violet: #8993ff;
  --hlab-surface: rgba(15, 22, 38, 0.72);
  --hlab-border: rgba(151, 169, 220, 0.14);
  --hlab-border-bright: rgba(116, 139, 255, 0.3);
  --hlab-shadow: 0 24px 70px rgba(0, 3, 14, 0.38);
  --hlab-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

body:has(.hlab-home) #navbar {
  border-bottom: 1px solid rgba(151, 169, 220, 0.14);
  background: rgba(8, 12, 23, 0.82);
  box-shadow: 0 10px 35px rgba(0, 3, 15, 0.16);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
}

body:has(.hlab-home) #navbar .item {
  color: #dce3f5;
}

body:has(.hlab-home) .page-footer {
  border-top-color: rgba(151, 169, 220, 0.14);
  color: #8794af;
  background: #080b14;
}

/* Custom home */
.hlab-home {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: calc(100vh - 105px);
  padding: 0 !important;
  background: #080b14;
}

.hlab-aurora {
  position: absolute;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hlab-aurora::before {
  content: "";
  position: absolute;
  width: 760px;
  height: 760px;
  top: -490px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(115, 95, 255, 0.23), rgba(62, 190, 255, 0.08) 46%, transparent 70%);
  filter: blur(10px);
}

.hlab-grid {
  position: absolute;
  inset: 0;
  opacity: 0.27;
  background-image:
    linear-gradient(rgba(122, 143, 194, 0.075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122, 143, 194, 0.075) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 82%);
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

.hlab-orb {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(1px);
  opacity: 0.55;
  animation: hlab-drift 12s var(--hlab-ease) infinite alternate;
}

.hlab-orb-one {
  width: 360px;
  height: 360px;
  top: 12%;
  left: -230px;
  background: radial-gradient(circle at 70% 50%, rgba(81, 102, 255, 0.38), transparent 68%);
}

.hlab-orb-two {
  width: 440px;
  height: 440px;
  right: -290px;
  bottom: -40px;
  background: radial-gradient(circle at 30% 50%, rgba(52, 220, 188, 0.2), transparent 68%);
  animation-delay: -5s;
}

.hlab-hero {
  width: min(1240px, calc(100% - 64px));
  min-height: 650px;
  margin: 0 auto;
  padding: 92px 0 76px;
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  align-items: center;
  gap: clamp(44px, 7vw, 104px);
}

.hlab-hero-copy {
  min-width: 0;
  animation: hlab-rise 900ms var(--hlab-ease) both;
}

.hlab-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  color: #9ba8c5;
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.2em;
}

.hlab-eyebrow span {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hlab-mint);
  box-shadow: 0 0 0 5px rgba(103, 237, 176, 0.08), 0 0 18px rgba(103, 237, 176, 0.48);
}

.hlab-eyebrow span::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 1px solid rgba(103, 237, 176, 0.45);
  border-radius: inherit;
  animation: hlab-pulse 2.4s ease-out infinite;
}

.hlab-hero h1 {
  max-width: 680px;
  margin: 0;
  color: #f6f8ff;
  font-size: clamp(52px, 6vw, 86px);
  font-weight: 690;
  line-height: 0.98;
  letter-spacing: -0.058em;
  text-wrap: balance;
}

.hlab-hero h1 em {
  color: transparent;
  font-style: normal;
  background: linear-gradient(95deg, #8f98ff 3%, #50dcff 52%, #74f0b7);
  background-size: 170% auto;
  -webkit-background-clip: text;
  background-clip: text;
  animation: hlab-gradient 7s ease infinite;
}

.hlab-hero-copy > p {
  max-width: 580px;
  margin: 28px 0 0;
  color: #97a4bd;
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.68;
  letter-spacing: -0.018em;
}

.hlab-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 38px;
}

.hlab-actions .ui.button {
  min-height: 49px;
  margin: 0;
  padding: 0 22px;
  border-radius: 11px;
}

.hlab-actions .hlab-primary {
  position: relative;
  overflow: hidden;
  gap: 10px;
}

.hlab-primary::after {
  content: "";
  position: absolute;
  inset: -60% auto -60% -60%;
  width: 34%;
  transform: rotate(18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  animation: hlab-shine 5.5s ease-in-out infinite 1.5s;
}

.hlab-secondary {
  background: rgba(18, 27, 46, 0.75) !important;
  backdrop-filter: blur(14px);
}

.hlab-status {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 36px;
  color: #77849e;
  font-size: 12px;
}

.hlab-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--hlab-mint);
  box-shadow: 0 0 12px rgba(103, 237, 176, 0.65);
}

.hlab-status b {
  margin-left: 5px;
  color: #a5b0c6;
  font-weight: 580;
}

.hlab-visual {
  position: relative;
  min-width: 0;
  perspective: 1100px;
  animation: hlab-visual-in 1100ms var(--hlab-ease) 100ms both;
}

.hlab-code-window {
  position: relative;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(141, 157, 211, 0.18);
  border-radius: 18px;
  background:
    linear-gradient(150deg, rgba(19, 28, 48, 0.95), rgba(8, 13, 24, 0.96));
  box-shadow:
    0 42px 100px rgba(0, 2, 12, 0.52),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset,
    0 0 90px rgba(78, 93, 255, 0.08);
  transform: rotateY(-5deg) rotateX(2deg);
  transition: transform 700ms var(--hlab-ease), box-shadow 500ms ease;
}

.hlab-visual:hover .hlab-code-window {
  transform: rotateY(-1deg) rotateX(0) translateY(-5px);
  box-shadow:
    0 54px 120px rgba(0, 2, 12, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.035) inset,
    0 0 110px rgba(78, 154, 255, 0.12);
}

.hlab-window-top {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 17px;
  border-bottom: 1px solid rgba(145, 161, 207, 0.1);
  background: rgba(255, 255, 255, 0.014);
}

.hlab-window-top span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #39445c;
}

.hlab-window-top span:first-child { background: #ff6d78; }
.hlab-window-top span:nth-child(2) { background: #f5c05a; }
.hlab-window-top span:nth-child(3) { background: #61d99a; }

.hlab-window-top b {
  margin-left: 9px;
  color: #697791;
  font-family: var(--fonts-monospace);
  font-size: 11px;
  font-weight: 500;
}

.hlab-code {
  padding: 28px 28px 24px;
  color: #c5cee1;
  font-family: var(--fonts-monospace);
  font-size: clamp(11px, 1vw, 13px);
  line-height: 2.05;
  white-space: nowrap;
}

.hlab-code div {
  animation: hlab-code-line 600ms var(--hlab-ease) both;
}

.hlab-code div:nth-child(2) { animation-delay: 70ms; }
.hlab-code div:nth-child(3) { animation-delay: 140ms; }
.hlab-code div:nth-child(4) { animation-delay: 210ms; }
.hlab-code div:nth-child(5) { animation-delay: 280ms; }
.hlab-code div:nth-child(6) { animation-delay: 350ms; }
.hlab-code div:nth-child(7) { animation-delay: 420ms; }

.hlab-code small {
  display: inline-block;
  width: 30px;
  margin-right: 17px;
  color: #3f4a61;
  font-size: inherit;
  user-select: none;
}

.token-violet { color: #a792ff; }
.token-cyan { color: #5cdcf5; }
.token-blue { color: #72a7ff; }
.token-green { color: #79e6ae; }

.hlab-commit {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 18px 18px;
  padding: 14px 15px;
  border: 1px solid rgba(111, 231, 173, 0.13);
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(53, 196, 135, 0.075), rgba(50, 206, 230, 0.035));
}

.hlab-commit > span {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 9px;
  color: #77e6af;
  background: rgba(90, 224, 163, 0.09);
}

.hlab-commit div {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}

.hlab-commit b {
  color: #dce6f5;
  font-size: 12px;
  font-weight: 620;
}

.hlab-commit small {
  margin-top: 3px;
  color: #65728b;
  font-size: 10px;
}

.hlab-commit > i {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  color: #06150f;
  background: #65dfa7;
  box-shadow: 0 0 20px rgba(101, 223, 167, 0.2);
}

.hlab-float-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border: 1px solid rgba(154, 170, 217, 0.17);
  border-radius: 11px;
  color: #b6c1d6;
  background: rgba(17, 25, 42, 0.76);
  box-shadow: 0 18px 45px rgba(0, 2, 13, 0.32);
  backdrop-filter: blur(18px) saturate(135%);
  font-size: 11px;
  font-weight: 620;
  animation: hlab-float 5s ease-in-out infinite;
}

.hlab-float-card svg {
  color: var(--hlab-cyan);
}

.hlab-float-private {
  top: -23px;
  right: -28px;
}

.hlab-float-fast {
  bottom: 66px;
  left: -43px;
  animation-delay: -2.3s;
}

.hlab-features {
  width: min(1240px, calc(100% - 64px));
  margin: 0 auto 70px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--hlab-border);
  border-radius: 18px;
  background: rgba(13, 20, 35, 0.58);
  box-shadow: var(--hlab-shadow);
  backdrop-filter: blur(18px);
  animation: hlab-rise 900ms var(--hlab-ease) 350ms both;
}

.hlab-features article {
  display: flex;
  gap: 16px;
  min-height: 126px;
  align-items: center;
  padding: 25px 28px;
}

.hlab-features article + article {
  border-left: 1px solid var(--hlab-border);
}

.hlab-features article > span {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(120, 142, 255, 0.18);
  border-radius: 12px;
  color: #8998ff;
  background: rgba(108, 126, 255, 0.07);
}

.hlab-features b {
  color: #dce4f4;
  font-size: 13px;
  font-weight: 640;
}

.hlab-features p {
  margin: 5px 0 0;
  color: #77849e;
  font-size: 11px;
  line-height: 1.5;
}

@keyframes hlab-rise {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes hlab-visual-in {
  from { opacity: 0; transform: translateX(35px) scale(0.96); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes hlab-code-line {
  from { opacity: 0; transform: translateX(10px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes hlab-gradient {
  0%, 100% { background-position: 0 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes hlab-shine {
  0%, 28% { left: -60%; }
  46%, 100% { left: 140%; }
}

@keyframes hlab-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes hlab-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(45px, -24px, 0) scale(1.12); }
}

@keyframes hlab-pulse {
  0% { opacity: 0.8; transform: scale(0.7); }
  80%, 100% { opacity: 0; transform: scale(1.55); }
}

@media (max-width: 960px) {
  .hlab-hero {
    grid-template-columns: 1fr;
    padding-top: 74px;
  }

  .hlab-hero-copy {
    max-width: 720px;
  }

  .hlab-visual {
    width: min(680px, 100%);
    margin: 12px auto 0;
  }

  .hlab-features {
    grid-template-columns: 1fr;
  }

  .hlab-features article + article {
    border-top: 1px solid var(--hlab-border);
    border-left: 0;
  }
}

@media (max-width: 620px) {
  .hlab-hero,
  .hlab-features {
    width: min(100% - 32px, 1240px);
  }

  .hlab-hero {
    min-height: auto;
    padding: 58px 0 50px;
    gap: 58px;
  }

  .hlab-hero h1 {
    font-size: clamp(40px, 11.8vw, 48px);
    letter-spacing: -0.052em;
  }

  .hlab-hero h1 em {
    white-space: nowrap;
  }

  .hlab-hero-copy > p {
    font-size: 16px;
  }

  .hlab-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hlab-actions .ui.button {
    width: 100%;
  }

  .hlab-code {
    overflow: hidden;
    padding-inline: 18px;
    font-size: 10px;
  }

  .hlab-visual,
  .hlab-code-window,
  .hlab-visual:hover .hlab-code-window {
    transform: none;
  }

  .hlab-status {
    flex-wrap: wrap;
  }

  .hlab-code small {
    width: 22px;
    margin-right: 8px;
  }

  .hlab-float-private {
    right: 6px;
  }

  .hlab-float-fast {
    bottom: 54px;
    left: 6px;
  }

  .hlab-features {
    margin-bottom: 38px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}

