/* The Quest Board — Stormreach notice board.
 * Dark stone and torchlight frame; every project is a parchment notice
 * pinned to the board. One committed dark look, no theme toggle. */

:root {
  /* stone */
  --stone-deep: #0a0806;
  --stone: #16110b;
  --stone-lift: #221a11;

  /* torchlight + brass */
  --gold: #d9a441;
  --gold-dim: #a8832e;
  --ember: rgba(255, 168, 66, 0.14);

  /* parchment */
  --parch-1: #f2e8ca;
  --parch-2: #e6d6a8;
  --parch-3: #d8c691;
  --parch-edge: rgba(111, 90, 50, 0.55);

  /* ink */
  --ink: #2b1a08;
  --ink-2: #5a3a1c;
  --ink-faint: #7d6a44;

  /* on-stone text */
  --sand: #d8cbaa;
  --sand-dim: #a3937a;

  --wax: #8a1f1a;
  --moss: #55663a;

  --font-display: 'Cinzel', 'Trajan Pro', Georgia, serif;
  --font-body: 'EB Garamond', Georgia, 'Times New Roman', serif;

  --maxw: 1120px;
  --pad: clamp(1rem, 4vw, 2rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--sand);
  background-color: var(--stone-deep);
  background-image:
    radial-gradient(60rem 32rem at 12% -8%, var(--ember), transparent 62%),
    radial-gradient(52rem 30rem at 88% -4%, rgba(255, 140, 50, 0.10), transparent 60%),
    radial-gradient(70rem 50rem at 50% 120%, rgba(90, 60, 25, 0.22), transparent 70%),
    linear-gradient(180deg, var(--stone) 0%, var(--stone-deep) 70%);
  background-attachment: fixed;
}

/* Grain + vignette over the whole page so the stone is not a flat wash. */
.torchlight {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

body > *:not(.torchlight) { position: relative; z-index: 1; }

a { color: var(--gold); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0.5rem;
  padding: 0.6rem 1rem;
  background: var(--stone-lift);
  border: 1px solid var(--gold-dim);
  font-family: var(--font-display);
  text-decoration: none;
}
.skip:focus { left: 0.5rem; z-index: 10; }

/* ---------- masthead ---------- */

.masthead {
  padding: clamp(3rem, 9vw, 6rem) var(--pad) clamp(1.5rem, 4vw, 2.5rem);
  text-align: center;
}

.masthead__inner { max-width: 46rem; margin: 0 auto; }

.masthead__eyebrow {
  margin: 0 0 0.9rem;
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold-dim);
}

.masthead__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.3rem, 8vw, 4.1rem);
  line-height: 1.05;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gold);
  background: linear-gradient(180deg, #f6dfa4 0%, var(--gold) 52%, #8f6a22 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 10px rgba(255, 160, 60, 0.22));
}

.masthead__lede {
  margin: 1.3rem auto 0;
  max-width: 38rem;
  color: var(--sand-dim);
  font-size: 1.08rem;
}

/* the hanging rule under the masthead */
.masthead::after {
  content: '\2756';
  display: block;
  margin: clamp(1.8rem, 5vw, 2.8rem) auto 0;
  width: min(100%, 34rem);
  color: var(--gold-dim);
  font-size: 0.85rem;
  line-height: 0;
  border-top: 1px solid rgba(168, 131, 46, 0.35);
  padding-top: 0.1rem;
}

/* ---------- board + sections ---------- */

.board {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(1rem, 4vw, 2rem) var(--pad) 0;
}

.board__empty {
  text-align: center;
  color: var(--sand-dim);
  font-style: italic;
  padding: 4rem 0;
}

.board__section { margin-bottom: clamp(3rem, 8vw, 5rem); }

.section__head {
  margin-bottom: clamp(1.4rem, 4vw, 2rem);
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(168, 131, 46, 0.22);
}

.section__title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.25rem, 3.4vw, 1.65rem);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #e9c877;
}

.section__sigil {
  font-size: 1.15em;
  line-height: 1;
  color: var(--gold-dim);
  filter: drop-shadow(0 0 8px rgba(255, 170, 70, 0.25));
}

.section__blurb {
  margin: 0.5rem 0 0;
  color: var(--sand-dim);
  font-style: italic;
}

.section__count {
  margin: 0.45rem 0 0;
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #8a7855;
}

/* ---------- the notices ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: clamp(1.5rem, 4vw, 2.25rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.card {
  --tilt: 0deg;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 2.1rem 1.5rem 1.35rem;
  color: var(--ink);
  background:
    linear-gradient(158deg, var(--parch-1) 0%, var(--parch-2) 48%, var(--parch-3) 100%);
  border: 1px solid var(--parch-edge);
  border-radius: 3px;
  box-shadow:
    0 12px 26px rgba(0, 0, 0, 0.5),
    inset 0 0 44px rgba(150, 118, 58, 0.16);
  transform: rotate(var(--tilt));
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.card:hover,
.card:focus-within {
  transform: rotate(0deg) translateY(-5px);
  box-shadow:
    0 20px 38px rgba(0, 0, 0, 0.55),
    0 0 28px rgba(255, 170, 70, 0.10),
    inset 0 0 44px rgba(150, 118, 58, 0.16);
}

/* brass tack holding the notice to the board */
.card__pin {
  position: absolute;
  top: 0.6rem;
  left: 50%;
  width: 0.85rem;
  height: 0.85rem;
  margin-left: -0.425rem;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #ffe3a6 0%, #c9992f 45%, #6d4d12 100%);
  box-shadow: 0 2px 3px rgba(60, 40, 12, 0.55);
}

.card__stamp {
  position: absolute;
  top: 0.85rem;
  right: 0.9rem;
  max-width: 4.6rem;   /* longer stamps wrap rather than eat the title row */
  padding: 0.22rem 0.5rem;
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: center;
  color: var(--wax);
  border: 2px double currentColor;
  border-radius: 2px;
  transform: rotate(-8deg);
  opacity: 0.82;
}

.card--building .card__stamp { color: #9a6516; }
.card--planned  .card__stamp { color: var(--ink-faint); }
.card--retired  .card__stamp { color: var(--moss); }

.card--planned,
.card--retired { filter: saturate(0.8); }

.card__head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding-right: 5rem; /* keeps the title row clear of the stamp */
}

.card__sigil {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1.25rem;
  line-height: 1;
  border: 1px solid rgba(111, 90, 50, 0.4);
  border-radius: 50%;
  background: rgba(255, 250, 230, 0.45);
  box-shadow: inset 0 1px 3px rgba(120, 95, 45, 0.25);
}

.card__title {
  min-width: 0;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.18rem;
  line-height: 1.25;
  letter-spacing: 0.015em;
  color: var(--ink);
}

.card__link {
  color: inherit;
  text-decoration-color: rgba(111, 90, 50, 0.45);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.card__link:hover { color: #6d1f16; }

.card__tagline {
  margin: -0.25rem 0 0;
  font-style: italic;
  font-size: 1.02rem;
  color: var(--ink-2);
}

.card__summary {
  margin: 0;
  font-size: 0.99rem;
  line-height: 1.55;
  color: #3d2a12;
}

.card__highlights {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.38rem;
  font-size: 0.94rem;
  color: var(--ink-2);
}

.card__highlights li {
  position: relative;
  padding-left: 1.15rem;
}

.card__highlights li::before {
  content: '\2756';
  position: absolute;
  left: 0;
  top: 0.05em;
  font-size: 0.62em;
  color: var(--gold-dim);
}

.card__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(111, 90, 50, 0.28);
}

.card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tag {
  padding: 0.12rem 0.55rem;
  font-family: var(--font-display);
  font-size: 0.63rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6b5732;
  border: 1px solid rgba(111, 90, 50, 0.38);
  border-radius: 999px;
}

.card__actions {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-left: auto;
}

.card__open {
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6d1f16;
  text-decoration: none;
  border-bottom: 1px solid rgba(109, 31, 22, 0.4);
  padding-bottom: 1px;
  white-space: nowrap;
}
.card__open:hover { border-bottom-color: currentColor; }

.card__repo {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7a6339;
  text-decoration: none;
  border-bottom: 1px dotted rgba(122, 99, 57, 0.55);
  white-space: nowrap;
}
.card__repo:hover { color: var(--ink); }

/* ---------- buy me a coffee ----------
 * Rules mirror cdnjs.buymeacoffee.com/1.0.0/button.prod.min.js (inline-flex,
 * 12px radius, 32px logo, 8px text gap, Poppins Bold). The one deliberate
 * deviation: the widget's 24px/60px sizing overflows a notice on a narrow
 * screen, so the button steps down to 18px/52px and spans the card. Colours,
 * shape, logo and destination are the widget's own. */

.card__support {
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(111, 90, 50, 0.28);
}

.bmc-btn {
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 52px;
  padding: 0 1.1rem;
  border: none;
  border-radius: 12px;
  color: #000000;
  background-color: #ffdd00;
  font-size: 18px;
  font-weight: 700;
  line-height: 27px;
  text-decoration: none !important;
  box-shadow: 0 2px 6px rgba(60, 42, 20, 0.35);
  transition: filter 160ms ease, transform 160ms ease;
}

.bmc-btn:hover,
.bmc-btn:focus {
  cursor: pointer;
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.bmc-btn svg {
  height: 32px;
  flex-shrink: 0;
  transform: scale(0.9);
  vertical-align: middle;
}

.bmc-btn-text {
  margin-left: 8px;
  text-align: left;
  white-space: nowrap;
  font-family: 'Poppins', system-ui, sans-serif;
}

.logo-outline { fill: #000000; }
.logo-coffee { fill: #ffffff; }

@media (prefers-reduced-motion: reduce) {
  .bmc-btn { transition: none; }
  .bmc-btn:hover,
  .bmc-btn:focus { transform: none; }
}

/* ---------- colophon ---------- */

.colophon {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 3.5rem) var(--pad) clamp(2.5rem, 6vw, 4rem);
  text-align: center;
  border-top: 1px solid rgba(168, 131, 46, 0.16);
}

.colophon__line { margin: 0; color: var(--sand-dim); }

/* the character name, worn like a signature after the handle */
.colophon__alias {
  font-style: italic;
  color: #8a7855;
}

.colophon__meta {
  margin: 0.6rem 0 0;
  font-size: 0.78rem;
  color: #7c6c52;
}

.build {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
}

@media (prefers-reduced-motion: reduce) {
  .card { transform: none; transition: none; }
  .card:hover,
  .card:focus-within { transform: none; }
}
