/* ================================================================
   CREATST Forge — Custom Branding CSS
   No external requests, fonts, CDNs
   ================================================================ */

:root {
  --creatst-deep: #0a1628;
  --creatst-azure: #0e3d6b;
  --creatst-cyan: #22d3ee;
  --creatst-spark: #67e8f9;
  --creatst-glass: rgba(255,255,255,.06);
  --creatst-glass-border: rgba(255,255,255,.12);
  --creatst-text: rgba(255,255,255,.92);
  --creatst-text-dim: rgba(255,255,255,.55);
}

/* ================================================================
   HOME PAGE
   ================================================================ */

/* Hide default Forgejo home elements */
.creatst-home > .tw-mb-8 { display: none !important; }

/* Full-viewport gradient background */
.creatst-bg {
  position: fixed; inset: 0; z-index: 0;
  background: linear-gradient(135deg, var(--creatst-deep) 0%, var(--creatst-azure) 40%, #0c7792 100%);
  background-size: 200% 200%;
  animation: creatstGrad 12s ease-in-out infinite;
}
@keyframes creatstGrad {
  0%,100% { background-position: 0% 50% }
  50%     { background-position: 100% 50% }
}

/* Blobs */
.creatst-blob {
  position: fixed; border-radius: 50%;
  filter: blur(80px); opacity: .16; z-index: 1;
  animation: creatstFloat 8s ease-in-out infinite;
}
.creatst-blob-1 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, var(--creatst-cyan), transparent 70%);
  top: -80px; left: -60px;
  animation-duration: 10s;
}
.creatst-blob-2 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, #3b82f6, transparent 70%);
  bottom: -40px; right: -40px;
  animation-delay: -4s; animation-duration: 9s;
}
.creatst-blob-3 {
  width: 240px; height: 240px;
  background: radial-gradient(circle, var(--creatst-spark), transparent 70%);
  top: 35%; left: 55%; opacity: .1;
  animation-delay: -2s; animation-duration: 11s;
}
@keyframes creatstFloat {
  0%,100% { transform: translate(0,0) scale(1) }
  33%     { transform: translate(25px,-18px) scale(1.04) }
  66%     { transform: translate(-18px,22px) scale(.96) }
}

/* Rings */
.creatst-ring {
  position: fixed; border-radius: 50%; z-index: 1;
  border: 1px solid rgba(255,255,255,.05);
  top: 50%; left: 50%; transform: translate(-50%,-50%);
  animation: creatstRing 7s ease-in-out infinite;
}
.creatst-ring-1 { width: 550px; height: 550px }
.creatst-ring-2 { width: 350px; height: 350px; animation-delay: -3s; animation-duration: 8s }
@keyframes creatstRing {
  0%,100% { opacity: .35; transform: translate(-50%,-50%) scale(1) }
  50%     { opacity: .12; transform: translate(-50%,-50%) scale(1.06) }
}

/* Content container */
.creatst-content {
  position: relative; z-index: 10;
  display: flex; align-items: center; justify-content: center;
  min-height: calc(100vh - 52px); /* account for Forgejo navbar */
  padding: 2rem 1.5rem 4rem;
}

/* Glass card */
.creatst-card {
  background: var(--creatst-glass);
  border: 1px solid var(--creatst-glass-border);
  backdrop-filter: blur(24px) saturate(1.3);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
  border-radius: 1.25rem;
  padding: 2.5rem 2.25rem;
  max-width: 480px; width: 100%;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.08);
}

/* Logo */
.creatst-logo {
  margin: 0 auto 1.5rem; width: 56px; height: 56px;
}
.creatst-logo svg {
  width: 100%; height: 100%;
  animation: creatstShimmer 3s ease-in-out infinite;
}
@keyframes creatstShimmer {
  0%,100% { opacity: 1; filter: drop-shadow(0 0 6px var(--creatst-spark)) }
  50%     { opacity: .65; filter: drop-shadow(0 0 14px var(--creatst-cyan)) }
}

/* Brand label */
.creatst-brand {
  font-size: .7rem; font-weight: 700; letter-spacing: .28em;
  text-transform: uppercase; color: var(--creatst-cyan);
  margin-bottom: .4rem;
}

/* Title */
.creatst-title {
  font-size: 1.45rem !important; font-weight: 300 !important; line-height: 1.35;
  color: var(--creatst-text) !important;
  margin-bottom: .65rem !important;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif !important;
}

/* Description */
.creatst-desc {
  font-size: .88rem; line-height: 1.6; color: var(--creatst-text-dim);
  margin-bottom: 1.5rem;
}

/* Features */
.creatst-features { margin-bottom: 1.75rem; text-align: left }
.creatst-feature {
  display: flex; align-items: center; gap: .6rem;
  padding: .45rem 0;
  font-size: .82rem; color: var(--creatst-text-dim);
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.creatst-feature:last-child { border-bottom: none }
.creatst-feature svg { flex-shrink: 0; color: var(--creatst-cyan); opacity: .7 }

/* CTA button */
.creatst-cta {
  display: inline-block;
  padding: .7rem 2rem;
  background: linear-gradient(135deg, var(--creatst-azure), #0369a1) !important;
  color: #fff !important; font-weight: 500; font-size: .9rem;
  border-radius: .5rem;
  text-decoration: none !important;
  transition: filter .2s ease, transform .15s ease;
  box-shadow: 0 4px 16px rgba(14,61,107,.4);
}
.creatst-cta:hover {
  filter: brightness(1.2);
  transform: translateY(-1px);
}

/* Powered by */
.creatst-powered {
  margin-top: 1.25rem;
  font-size: .7rem; color: var(--creatst-text-dim); opacity: .5;
}
.creatst-powered span { font-weight: 600 }

/* Footer */
.creatst-footer {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 10;
  padding: .85rem; text-align: center;
  background: linear-gradient(transparent, rgba(10,22,40,.85));
}
.creatst-footer p {
  font-size: .65rem; letter-spacing: .15em; text-transform: uppercase;
  color: var(--creatst-text-dim);
}
.creatst-footer span { color: var(--creatst-cyan); font-weight: 600 }

/* ================================================================
   HIDE Explore from public nav (unauthenticated) via CSS
   Does not break anything for authenticated users
   ================================================================ */
.page-content.home .navbar .item[href="/explore/repos"] { display: none !important }

/* ================================================================
   SIGN-IN PAGE
   ================================================================ */
body.page-content.user.signin,
body.page-content.user.login { background: linear-gradient(135deg, var(--creatst-deep) 0%, var(--creatst-azure) 50%, #0c4a7e 100%) !important }

.page-content.user.signin .ui.container,
.page-content.user.login .ui.container { max-width: 440px }

.page-content.user.signin .ui.attached.segment,
.page-content.user.login .ui.attached.segment {
  border-radius: 12px !important;
  box-shadow: 0 8px 32px rgba(0,0,0,.25) !important;
  border: 1px solid rgba(255,255,255,.08) !important;
}

/* Primary buttons */
.ui.primary.button, .ui.primary.buttons .button {
  background: linear-gradient(135deg, var(--creatst-azure), #0369a1) !important;
  border: none !important; transition: filter .2s ease !important;
}
.ui.primary.button:hover, .ui.primary.buttons .button:hover { filter: brightness(1.15) !important }

/* Sign-in header */
.page-content.user.signin .ui.top.attached.header,
.page-content.user.login .ui.top.attached.header {
  background: rgba(14,61,107,.15) !important;
  border-bottom: 1px solid rgba(34,211,238,.15) !important;
}

/* Navbar accent */
.ui.secondary.pointing.menu .active.item { border-color: var(--creatst-cyan) !important }

/* Footer brand */
.page-footer .left-links::after {
  content: " · CREATST Forge"; color: var(--creatst-cyan);
  font-weight: 600; letter-spacing: .05em; font-size: .85em;
}

/* ================================================================
   REDUCED MOTION
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
  .creatst-bg { animation: none }
  .creatst-blob, .creatst-ring, .creatst-logo svg { animation: none }
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 480px) {
  .creatst-card { padding: 2rem 1.25rem }
  .creatst-title { font-size: 1.2rem !important }
}

/* ================================================================
   OVERRIDE: hide default Forgejo home page body
   The Forgejo navbar stays visible for Sign In link
   ================================================================ */
.page-content.home > .tw-mb-8,
.page-content.home > .ui.stackable { display: none !important }

/* CREATST Forge home polish — remove default Forgejo chrome on public welcome page */
body:has(.creatst-home) {
  margin: 0 !important;
  overflow-x: hidden !important;
  background: #07172b !important;
}

body:has(.creatst-home) #navbar,
body:has(.creatst-home) .page-footer {
  display: none !important;
}

body:has(.creatst-home) .page-content.home.creatst-home {
  min-height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
}

body:has(.creatst-home) .creatst-bg {
  top: 0 !important;
}

