/* BlackHarp brand layer for Gitea. Loads for every theme via custom/header.tmpl. */

/* Self-hosted fonts (SIL OFL). No requests leave the site. */
@font-face {
  font-family: "Orbitron";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/orbitron-700-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/space-grotesk-var-latin.woff2") format("woff2");
}

:root {
  --bh-font-brand: "Orbitron", "Space Grotesk", sans-serif;
  --bh-font-display: "Space Grotesk", -apple-system, "Segoe UI", system-ui, sans-serif;
  --bh-ink-950: #07131c;
  --bh-ink-900: #102330;
  --bh-ink-800: #1b3645;
  --bh-teal-400: #2ec4b6;
  --bh-teal-500: #14b8a6;
  --bh-teal-600: #0f766e;
  --bh-radius-sm: 0.75rem;
  --bh-radius-md: 1.25rem;
  --color-logo: var(--color-primary);
}

/* Display type for headings; body copy and code keep Gitea's system stacks. */
h1, h2, h3, h4,
.ui.header,
.repo-header .repo-title,
.flex-item-title {
  font-family: var(--bh-font-display);
  letter-spacing: -0.01em;
}

/* Navbar wordmark next to the harp. The link's aria-label stays the accessible name. */
#navbar-logo::after {
  content: "BlackHarp";
  margin-left: 0.55rem;
  font-family: var(--bh-font-brand);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--color-text-dark);
}
#navbar-logo img {
  width: 26px;
  height: 26px;
}

/* ------------------------------------------------------------------ */
/* Landing page                                                        */
/* ------------------------------------------------------------------ */

.page-content.bh-home {
  padding: 0;
}
.page-content.bh-home > .bh-hero:first-child {
  margin-top: 0;
}

/* Hero is always ink, whatever the theme: it is the brand moment. */
.bh-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: #d5e1e6;
  background:
    radial-gradient(60rem 30rem at 85% 10%, rgba(46, 196, 182, 0.16), transparent 60%),
    radial-gradient(40rem 26rem at 0% 100%, rgba(20, 184, 166, 0.10), transparent 60%),
    linear-gradient(180deg, var(--bh-ink-950) 0%, var(--bh-ink-900) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
/* Faint grid, like ruled staves. */
.bh-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 75%);
}

.bh-hero__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6.5rem) clamp(1rem, 4vw, 2rem);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.bh-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1.25rem;
  padding: 0.35rem 0.85rem;
  border: 1px solid rgba(46, 196, 182, 0.35);
  border-radius: 999px;
  background: rgba(46, 196, 182, 0.08);
  color: var(--bh-teal-400);
  font-family: var(--bh-font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.bh-eyebrow__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--bh-teal-400);
  box-shadow: 0 0 0 0 rgba(46, 196, 182, 0.6);
  animation: bh-ping 2.4s ease-out infinite;
}

.bh-home .bh-title {
  margin: 0;
  color: #ffffff;
  font-family: var(--bh-font-brand);
  font-weight: 700;
  font-size: clamp(2.6rem, 6.5vw, 4.75rem);
  line-height: 1;
  letter-spacing: 0.01em;
}
.bh-title__sub {
  display: block;
  margin-top: 0.6rem;
  font-family: var(--bh-font-display);
  font-weight: 500;
  font-size: 0.42em;
  letter-spacing: 0.02em;
  color: #bccbd2;
}
.bh-title__accent {
  color: var(--bh-teal-400);
}

.bh-home .bh-lede {
  max-width: 34rem;
  margin: 1.5rem 0 2rem;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.6;
  color: #bccbd2;
  text-wrap: pretty;
}

.bh-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.bh-home a.bh-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0.7rem 1.3rem;
  border-radius: 999px;
  font-family: var(--bh-font-display);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.bh-home a.bh-btn--primary {
  background: var(--bh-teal-400);
  color: var(--bh-ink-950);
  box-shadow: 0 10px 30px rgba(46, 196, 182, 0.25);
}
.bh-home a.bh-btn--primary:hover {
  background: #5ad3c8;
  transform: translateY(-1px);
}
.bh-home a.bh-btn--ghost {
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #f3f8f9;
  background: rgba(255, 255, 255, 0.03);
}
.bh-home a.bh-btn--ghost:hover {
  border-color: var(--bh-teal-400);
  background: rgba(46, 196, 182, 0.08);
  transform: translateY(-1px);
}
.bh-home a.bh-btn:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
}

/* Harp strings as a commit graph. */
.bh-hero__art {
  position: relative;
  justify-self: center;
  width: min(100%, 460px);
}
.bh-hero__art svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.bh-frame {
  fill: url(#bh-frame-grad);
  fill-rule: evenodd;
}
.bh-pad {
  fill: var(--bh-teal-400);
  filter: drop-shadow(0 0 6px rgba(46, 196, 182, 0.9));
  animation: bh-glow 3.2s ease-in-out infinite;
}
.bh-pad--late {
  animation-delay: 1.6s;
}
.bh-string {
  stroke: url(#bh-string-grad);
  stroke-width: 2;
  stroke-linecap: round;
  transform-box: fill-box;
  transform-origin: center;
  animation: bh-pluck 7s ease-in-out infinite;
}
.bh-string:nth-of-type(2) { animation-delay: 0.35s; }
.bh-string:nth-of-type(3) { animation-delay: 0.7s; }
.bh-string:nth-of-type(4) { animation-delay: 1.05s; }
.bh-string:nth-of-type(5) { animation-delay: 1.4s; }
.bh-string:nth-of-type(6) { animation-delay: 1.75s; }
.bh-string:nth-of-type(7) { animation-delay: 2.1s; }
.bh-branch {
  fill: none;
  stroke: var(--bh-teal-400);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-opacity: 0.9;
}
.bh-commit {
  fill: var(--bh-ink-950);
  stroke: var(--bh-teal-400);
  stroke-width: 3;
}
.bh-commit--head {
  fill: var(--bh-teal-400);
  filter: drop-shadow(0 0 8px rgba(46, 196, 182, 0.8));
}
.bh-spark {
  fill: #ffffff;
  opacity: 0;
  animation: bh-rise 5s linear infinite;
}
.bh-spark:nth-of-type(2) { animation-delay: 1.6s; }
.bh-spark:nth-of-type(3) { animation-delay: 3.2s; }

/* Theme-aware section below the hero. */
.bh-features {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1rem, 4vw, 2rem) 1rem;
}
.bh-home .bh-features__title {
  margin: 0 0 1.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-light-2);
}
.bh-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.bh-card {
  padding: 1.5rem;
  border: 1px solid var(--color-secondary);
  border-radius: var(--bh-radius-md);
  background: var(--color-box-body);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.bh-card:hover {
  border-color: var(--color-primary-alpha-60);
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(7, 19, 28, 0.12);
}
.bh-card__icon {
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 1rem;
  border-radius: var(--bh-radius-sm);
  background: var(--color-primary-alpha-10);
  color: var(--color-primary);
}
.bh-card__icon .svg {
  width: 20px;
  height: 20px;
}
.bh-home .bh-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text-dark);
}
.bh-home .bh-card p {
  margin: 0;
  line-height: 1.55;
  color: var(--color-text-light-1);
}

.bh-home .bh-outro {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.5rem clamp(1rem, 4vw, 2rem) clamp(2.5rem, 6vw, 4rem);
  color: var(--color-text-light-2);
}
.bh-home .bh-outro a {
  color: var(--color-primary);
  font-weight: 600;
}

@keyframes bh-ping {
  0% { box-shadow: 0 0 0 0 rgba(46, 196, 182, 0.6); }
  70%, 100% { box-shadow: 0 0 0 0.6rem rgba(46, 196, 182, 0); }
}
@keyframes bh-glow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}
@keyframes bh-pluck {
  0%, 86%, 100% { transform: translateX(0); }
  88% { transform: translateX(2.5px); }
  90% { transform: translateX(-2px); }
  92% { transform: translateX(1.5px); }
  94% { transform: translateX(-1px); }
  96% { transform: translateX(0.5px); }
}
@keyframes bh-rise {
  0% { opacity: 0; transform: translateY(0); }
  10% { opacity: 0.9; }
  80% { opacity: 0.9; }
  100% { opacity: 0; transform: translateY(var(--bh-rise, -260px)); }
}

@media (max-width: 900px) {
  .bh-hero__inner {
    grid-template-columns: minmax(0, 1fr);
  }
  .bh-hero__art {
    width: min(100%, 280px);
    order: -1;
  }
  .bh-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bh-eyebrow__dot,
  .bh-pad,
  .bh-string,
  .bh-spark {
    animation: none;
  }
  .bh-spark {
    opacity: 0;
  }
  .bh-home a.bh-btn,
  .bh-card {
    transition: none;
  }
}
