/* ARCHMAGE Forgejo branding. Loaded site-wide via header.tmpl.
   Subtle red accent over Forgejo's own theme; the heavy matrix backdrop only
   renders on the landing page (the canvas is created by home.tmpl's script). */
@font-face {
  font-family: 'Matrix';
  src: url('/assets/fonts/MatrixMainframe.otf') format('opentype');
  font-display: swap;
}

/* --- landing hero (home page) --- */
#matrixCanvas {
  position: fixed; inset: 0; z-index: -2; opacity: 0.22; pointer-events: none;
}
.archmage-hero {
  position: relative; z-index: 1;
  min-height: 62vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 1.4rem; padding: 3rem 1.5rem;
}
.archmage-hero::before { /* faint grid, like the unreal.dev splash */
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255,59,63,0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,59,63,0.05) 1px, transparent 1px);
  background-size: 42px 42px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 78%);
          mask-image: radial-gradient(ellipse at center, #000 30%, transparent 78%);
}
.archmage-hero img.archmage-logo {
  width: 132px; height: 132px;
  filter: drop-shadow(0 0 18px rgba(255,59,63,0.55));
  animation: archmage-float 6s ease-in-out infinite;
}
@keyframes archmage-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .archmage-hero img.archmage-logo { animation: none; } }
.archmage-hero h1 {
  font-family: ui-monospace, 'JetBrains Mono', 'Fira Mono', monospace;
  font-weight: 800; letter-spacing: 0.14em; text-transform: lowercase;
  font-size: clamp(2.1rem, 6vw, 3.6rem); margin: 0;
  color: #ff3b3f; text-shadow: 0 0 22px rgba(255,59,63,0.45);
}
.archmage-hero .tagline {
  max-width: 40ch; margin: 0 auto;
  font-family: ui-monospace, monospace; letter-spacing: 0.02em;
  color: #cfcfcf; font-size: clamp(0.98rem, 2.2vw, 1.18rem); line-height: 1.7;
}
.archmage-hero .tagline b { color: #ff666a; font-weight: 700; }
.archmage-hero .archmage-cta {
  display: inline-flex; gap: 0.6rem; margin-top: 0.4rem;
  font-family: ui-monospace, monospace; letter-spacing: 0.04em;
}
.archmage-hero .archmage-cta a {
  padding: 0.55rem 1.2rem; border: 1px solid #ff3b3f; border-radius: 4px;
  color: #ff3b3f; text-decoration: none; transition: all 0.18s ease;
}
.archmage-hero .archmage-cta a:hover { background: #ff3b3f; color: #000; box-shadow: 0 0 18px rgba(255,59,63,0.5); }
.archmage-hero .archmage-cta a.ghost { border-color: #444; color: #b3b3b3; }
.archmage-hero .archmage-cta a.ghost:hover { border-color: #ff3b3f; color: #ff3b3f; background: transparent; box-shadow: none; }

/* --- login page (with REQUIRE_SIGNIN off, / redirects here for actions;
   the matrix rain renders behind it via the path-gated script) --- */
.page-content.user.signin .ui.form,
.page-content.user.signin .ui.attached.segment {
  background: rgba(13, 13, 13, 0.86);
  border: 1px solid #2a0000;
  backdrop-filter: blur(3px);
  box-shadow: 0 0 40px rgba(255, 59, 63, 0.14);
}
.page-content.user.signin .ui.top.attached.header,
.page-content.user.signin h1, .page-content.user.signin h2 {
  font-family: ui-monospace, 'JetBrains Mono', monospace;
  letter-spacing: 0.08em; color: #ff3b3f;
}
.page-content.user.signin .ui.primary.button {
  background: #ff3b3f; color: #000; font-weight: 700;
}
.page-content.user.signin .ui.primary.button:hover {
  background: #ff666a; box-shadow: 0 0 16px rgba(255, 59, 63, 0.5);
}
.page-content.user.signin::before { /* tagline above the form */
  content: 'Welcome to the library. Enter the archives.';
  display: block; text-align: center; margin: 0 auto 1.4rem;
  font-family: ui-monospace, monospace; letter-spacing: 0.04em;
  color: #cfcfcf; position: relative; z-index: 1;
}

/* --- gentle site-wide accents (do not fight Forgejo's layout) --- */
::selection { background: #ff3b3f; color: #000; }
.ui.red, .archmage-accent { color: #ff3b3f !important; }
