/* Beebeeb dark theme for Forgejo — built on the light theme, then inverted.
   Accent discipline: amber is used for exactly one thing per viewport. */

@import url("/assets/css/theme-forgejo-dark.css");

:root {
  --bb-bg: #14110e;
  --bb-surface: #1c1815;
  --bb-text: #f5f1e9;
  --bb-dim: #a79e92;
  --bb-amber: #f2b057;
  --bb-amber-deep: #c87f2e;
  --bb-line: #2a2420;

  --color-body: var(--bb-bg);
  --color-text: var(--bb-text);
  --color-text-light: var(--bb-dim);
  --color-secondary: var(--bb-dim);
  --color-primary: var(--bb-amber);
  --color-primary-contrast: #14110e;
}

body {
  background: var(--bb-bg);
  color: var(--bb-text);
}

/* --- chrome ------------------------------------------------------------- */

.page-content.home ~ .page-footer,
.page-content.home {
  background: var(--bb-bg);
}

body:has(.page-content.home) #navbar {
  background: var(--bb-bg);
  border-bottom: 1px solid var(--bb-line);
  box-shadow: none;
}

body:has(.page-content.home) #navbar .item,
body:has(.page-content.home) #navbar a {
  color: var(--bb-dim);
}

body:has(.page-content.home) #navbar .item:hover,
body:has(.page-content.home) #navbar a:hover {
  color: var(--bb-text);
}

body:has(.page-content.home) .page-footer {
  background: transparent;
  border-top: 1px solid var(--bb-line);
  color: var(--bb-dim);
}

body:has(.page-content.home) .page-footer a {
  color: var(--bb-dim);
}

/* --- the door ----------------------------------------------------------- */

.page-content.home .tw-mb-8 {
  padding: 0;
  margin: 0;
}

.page-content.home .ui.stackable.page.grid {
  display: none;
}

.page-content.home .tw-px-8 {
  padding: 0 clamp(20px, 6vw, 64px);
}

.page-content.home .center {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: calc(100vh - 132px);
  max-width: 40rem;
  margin: 0 auto;
  text-align: left;
}

/* the mark: 96px, sits alone above the headline */
.page-content.home img.logo {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  margin: 0 0 2.4rem;
  box-shadow: 0 18px 44px -22px rgba(242, 176, 87, 0.55);
}

.page-content.home .hero h1.title {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
    Georgia, serif;
  font-size: clamp(2.4rem, 5.4vw, 3.5rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.022em;
  color: var(--bb-text);
  margin: 0;
}

.page-content.home .hero h2 {
  font-size: 1.06rem;
  line-height: 1.6;
  font-weight: 400;
  color: var(--bb-dim);
  margin: 1rem 0 0;
  max-width: 30rem;
}

/* the single motion: amber rule draws once, on load */
.page-content.home .hero h2::after {
  content: "";
  display: block;
  width: 56px;
  height: 2px;
  margin-top: 1.9rem;
  background: var(--bb-amber);
  transform-origin: left center;
  animation: bb-draw 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes bb-draw {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-content.home .hero h2::after {
    animation: none;
  }
}

/* the only button on the page */
.page-content.home a[href*="/user/login"],
.page-content.home a[href*="/user/sign_up"] {
  display: inline-flex;
  align-items: center;
  margin-top: 2.4rem;
  padding: 0.85rem 1.5rem;
  background: var(--bb-amber);
  color: #14110e;
  font-weight: 600;
  font-size: 0.97rem;
  border-radius: 3px;
  text-decoration: none;
  transition: background 0.15s ease;
}

.page-content.home a[href*="/user/login"]:hover,
.page-content.home a[href*="/user/sign_up"]:hover {
  background: var(--bb-amber-deep);
  color: #14110e;
}

.page-content.home a[href*="/user/login"]:focus-visible,
.page-content.home a[href*="/user/sign_up"]:focus-visible {
  outline: 2px solid var(--bb-text);
  outline-offset: 3px;
}

/* --- chrome ---------------------------------------------------------------
   Forgejo's navbar and footer paint from the imported light theme's own
   variables, so they have to be restated here rather than inherited. */
#navbar {
  background: var(--bb-bg) !important;
  border-bottom: 1px solid var(--bb-line) !important;
  box-shadow: none !important;
}

#navbar .item,
#navbar a.item,
#navbar a {
  color: var(--bb-dim) !important;
  background: transparent !important;
}

#navbar .item:hover,
#navbar a.item:hover,
#navbar a:hover,
#navbar .item.active {
  color: var(--bb-text) !important;
  background: transparent !important;
}

.ui.menu.navbar .item svg,
.ui.menu.navbar svg {
  fill: currentColor;
}

.page-footer {
  background: var(--bb-bg) !important;
  border-top: 1px solid var(--bb-line) !important;
  color: var(--bb-dim) !important;
}

.page-footer a,
.page-footer .item {
  color: var(--bb-dim) !important;
}

.page-footer a:hover {
  color: var(--bb-text) !important;
}

/* hide the Forgejo build line; SHOW_FOOTER_VERSION is ignored here */
.page-footer > .left-links { display: none !important; }

/* official lockup in the hero, square mark in the navbar */
.page-content.home img.logo {
  width: auto !important;
  height: 64px !important;
  max-width: min(320px, 72%) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  margin-bottom: 2.4rem !important;
  object-fit: contain;
}

#navbar-logo img { display: none; }
#navbar-logo {
  width: 30px;
  height: 30px;
  background: url("/assets/img/beebeeb-mark.svg") center / contain no-repeat;
  border-radius: 7px;
}


/* Форgejo's surfaces need explicit dark values once the light theme is gone */
:root {
  --color-box-body: #1c1815;
  --color-box-header: #1c1815;
  --color-input-background: #1c1815;
  --color-input-border: #3a332c;
  --color-input-text: #f5f1e9;
  --color-secondary-dark-1: #1c1815;
  --color-secondary-dark-2: #241f1a;
  --color-secondary-dark-3: #2a2420;
  --color-text-dark-1: #f5f1e9;
  --color-text-dark-2: #a79e92;
  --color-text-dark-3: #6e665c;
}
