/* ---------------------------------------------------------------------
   forge log — dark mode, amber-on-ink palette matching kamikishi.net's
   Inkwell theme. Drop a hero image at /static/img/hero-bg.jpg and it
   will be picked up automatically (see --hero-bg-image below).
   ------------------------------------------------------------------- */

:root {
  --bg:        #15131a;   /* deep plum-black */
  --bg-alt:    #1d1a24;   /* panel background */
  --bg-raised: #241f2c;   /* card / hover surfaces */
  --border:    #322c3c;

  --text:      #ece6da;   /* warm parchment */
  --text-dim:  #a89c8e;

  --accent:    #e0a458;   /* warm amber — primary */
  --accent-2:  #c9832f;   /* deeper amber */
  --live:      #7fb88a;   /* live/success green */
  --ink:       #2f2a3a;   /* ink-blot decoration */
  --danger:    #d97066;

  --font-heading: 'Cinzel', serif;
  --font-body: 'Lora', serif;

  --hero-bg-image: none; /* set to url("/static/img/hero-bg.jpg") once you add one */
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
}

body {
  background-image:
    radial-gradient(circle at 15% 0%, rgba(224,164,88,0.08), transparent 40%),
    radial-gradient(circle at 85% 20%, rgba(126,184,212,0.05), transparent 45%);
  min-height: 100vh;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { font-family: var(--font-heading); color: var(--text); margin: 0 0 0.4em; letter-spacing: 0.02em; }

/* ---------------------------------------------------------------- header */

.site-header {
  position: relative;
  padding: 2.5rem 1.5rem 2rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(224,164,88,0.06), transparent);
  overflow: visible;
}

.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.wordmark {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--accent);
  text-shadow: 0 0 24px rgba(224,164,88,0.25);
}

.tagline { color: var(--text-dim); margin: 0; font-style: italic; }

.topnav { display: flex; gap: 1.2rem; font-family: var(--font-heading); font-size: 0.85rem; letter-spacing: 0.05em; text-transform: uppercase; }
.topnav a { margin-right: 1.2rem; }
.topnav a:last-child { margin-right: 0; }

/* ---------------------------------------------------------------- layout */

main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  display: grid;
  gap: 1.75rem;
}

.card {
  position: relative;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: 0 10px 30px -18px rgba(0,0,0,0.6);
  overflow: visible;
}

.card h3 {
  font-size: 1.1rem;
  color: var(--accent);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.empty { color: var(--text-dim); font-style: italic; }

/* ---------------------------------------------------------------- hero */

.hero {
  background:
    var(--hero-bg-image),
    linear-gradient(135deg, var(--bg-raised), var(--bg-alt));
  background-size: cover;
  background-position: center;
}

.hero .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.75rem;
  color: var(--text-dim);
  margin: 0 0 0.3rem;
}

.hero h2 { font-size: 2rem; }
.hero .desc { color: var(--text-dim); max-width: 60ch; }

.stat-row { display: flex; gap: 2rem; margin-top: 1.25rem; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; margin-right: 2rem; }
.stat:last-child { margin-right: 0; }
.stat .num { font-family: var(--font-heading); font-size: 1.8rem; color: var(--accent); }
.stat .label { font-size: 0.78rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; }

.live-badge {
  display: inline-block;
  margin-top: 1.25rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: rgba(127,184,138,0.12);
  border: 1px solid var(--live);
  color: var(--live);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
}

/* ---------------------------------------------------------------- goals */

.goal { margin-bottom: 1.1rem; }
.goal:last-child { margin-bottom: 0; }
.goal-head { display: flex; justify-content: space-between; font-size: 0.9rem; margin-bottom: 0.35rem; }
.goal-bar { background: var(--bg-raised); border-radius: 999px; height: 10px; overflow: hidden; border: 1px solid var(--border); }
.goal-fill { height: 100%; background: linear-gradient(90deg, var(--accent-2), var(--accent)); border-radius: 999px; transition: width 0.6s ease; }
.goal-note { color: var(--text-dim); font-size: 0.85rem; margin: 0.35rem 0 0; }

/* ---------------------------------------------------------------- branches */

.branch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.9rem; }

.branch-pill {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  color: var(--text);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.branch-pill:hover { border-color: var(--accent); transform: translateY(-2px); text-decoration: none; }
.branch-name { font-family: var(--font-heading); color: var(--accent); font-size: 0.95rem; }
.branch-sha { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.78rem; color: var(--text-dim); }
.branch-msg { font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.branch-when { font-size: 0.75rem; color: var(--text-dim); }

/* ---------------------------------------------------------------- containers */

.container-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; }

.container-card {
  position: relative;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  overflow: visible;
}
.container-card.is-live { border-color: var(--live); box-shadow: 0 0 0 1px var(--live) inset; }
.container-name { font-family: var(--font-heading); color: var(--accent); }
.container-version { font-family: ui-monospace, monospace; font-size: 0.85rem; color: var(--text-dim); }
.container-date { font-size: 0.75rem; color: var(--text-dim); margin-top: 0.4rem; }

/* ---------------------------------------------------------------- timeline */

.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--border); }
.timeline-item { position: relative; padding: 0 0 1.2rem 1.4rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute; left: -6.5px; top: 4px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 3px var(--bg-alt);
}
.commit-msg { color: var(--text); font-weight: 600; }
.commit-msg:hover { color: var(--accent); }
.commit-meta { display: flex; flex-wrap: wrap; gap: 0.6rem; font-size: 0.78rem; color: var(--text-dim); margin-top: 0.25rem; align-items: center; }
.commit-meta > * { margin-right: 0.6rem; }
.commit-meta > *:last-child { margin-right: 0; }
.commit-meta .sha { font-family: ui-monospace, monospace; }
.branch-tag {
  background: rgba(224,164,88,0.12);
  border: 1px solid var(--accent-2);
  color: var(--accent);
  border-radius: 999px;
  padding: 0.05rem 0.55rem;
  font-size: 0.7rem;
}
.diffstat .add { color: var(--live); }
.diffstat .del { color: var(--danger); }

/* ---------------------------------------------------------------- activity */

.activity-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.activity-list li { font-size: 0.88rem; color: var(--text-dim); }
.activity-list strong { color: var(--text); font-weight: 600; }
.kind { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 0.3rem; }
.kind-commit { background: var(--accent); }
.kind-branch { background: var(--live); }
.kind-container { background: #7eb8d4; }
.kind-live { background: var(--danger); }
.kind-goal { background: #ffd24c; }

/* ---------------------------------------------------------------- footer */

footer {
  position: relative;
  max-width: 1080px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
}
footer .err { color: var(--danger); }

/* ---------------------------------------------------------------- stickers
   Diagonal little badges plopped on top of specific cards, Neocities-
   style. Position each `.sticker` inside a `position: relative` element
   and it'll pin to that element's corner. */

.sticker {
  position: absolute;
  width: 74px;
  transform: rotate(var(--rot, -8deg));
  filter: drop-shadow(0 6px 10px rgba(0,0,0,0.45));
  pointer-events: none;
  z-index: 5;
}
.sticker-corner { top: -20px; right: 24px; width: 64px; }
.hero .sticker-star { top: -18px; right: -14px; width: 70px; }
.container-card .sticker-live { top: -16px; right: -12px; width: 90px; }
footer .sticker-ink { top: -30px; left: 50%; transform: translateX(-50%) rotate(var(--rot, 6deg)); width: 56px; opacity: 0.85; }

@media (max-width: 640px) {
  .sticker-corner { display: none; }
  .hero .sticker-star { width: 52px; top: -10px; right: -8px; }
}

/* ---------------------------------------------------------------- misc */

::selection { background: var(--accent); color: var(--bg); }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--bg-raised); border: 2px solid var(--bg); border-radius: 6px; }
