/* ============================================================
   L08 — Finish Details (Wave 6)
   Additive only. Cascades after polish.css.

   Required HTML snippet inside <footer class="colophon"> (or equivalent):

   <svg class="tg-monogram" viewBox="0 0 64 64" aria-label="ТГ / TG monogram" role="img">
     <g fill="none" stroke="currentColor" stroke-width="1.2"
        stroke-linecap="round" stroke-linejoin="round">
       <path d="M10 16 H54"/>
       <path d="M32 16 V52"/>
       <path d="M16 22 H24 V42"/>
       <path d="M46 26 a8 8 0 1 0 0 12 h-6"/>
       <path d="M32 32 l2.6 2.6 -2.6 2.6 -2.6 -2.6 z" fill="currentColor"/>
     </g>
   </svg>

   <p class="signature-line">Съставено тихо · Composed quietly</p>
   <button class="scroll-top" aria-label="Return to top"></button>
   ============================================================ */

/* ---- Colophon refinement ---------------------------------- */
footer .colophon,
.colophon {
  position: relative;
}

.colophon p,
.colophon .colophon-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 0 0.9em;
}

/* Gold dot separators between spans */
.colophon p > span + span::before,
.colophon .colophon-line > span + span::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 3px;
  margin-right: 0.9em;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.65;
  transform: translateY(-3px);
}

/* Leading and trailing § in light gold, quiet */
.colophon p::before,
.colophon .colophon-line::before {
  content: "§";
  color: var(--accent);
  opacity: 0.55;
  font-family: var(--font-display);
  margin-right: 0.6em;
  font-weight: 300;
}
.colophon p::after,
.colophon .colophon-line::after {
  content: "§";
  color: var(--accent);
  opacity: 0.55;
  font-family: var(--font-display);
  margin-left: 0.6em;
  font-weight: 300;
}

/* Fine line — ruled-line above, centered, restrained */
.colophon-fine {
  position: relative;
  margin-top: 2.25rem;
  padding-top: 1.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--pearl-soft);
  opacity: 0.82;
}
.colophon-fine::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(280px, 42%);
  height: 1px;
  background: linear-gradient(
    to right,
    transparent 0%,
    var(--accent) 20%,
    var(--accent) 80%,
    transparent 100%
  );
  opacity: 0.45;
}

/* ---- TG Monogram mark ------------------------------------- */
.tg-monogram {
  display: block;
  width: 44px;
  height: 44px;
  margin: 1.75rem auto 1rem;
  color: var(--accent);
  opacity: 0.88;
  transition: opacity 600ms ease, transform 600ms ease;
}
.tg-monogram:hover {
  opacity: 1;
  transform: scale(1.03);
}

/* ---- Quiet signature line --------------------------------- */
.signature-line {
  margin: 1.5rem 0 0.75rem;
  text-align: center;
  color: var(--pearl-soft);
  opacity: 0.45;
  font-family: var(--font-body);
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-variant: var(--tr-caps, all-small-caps);
  font-feature-settings: "smcp" 1, "c2sc" 1;
  font-weight: 400;
}

/* ---- Scroll-top diamond affordance ------------------------ */
.scroll-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  background: var(--accent);
  transform: rotate(45deg) scale(0.6);
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
  transition: opacity 500ms ease, transform 500ms ease;
  box-shadow: 0 0 0 1px rgba(184, 137, 74, 0.18);
  z-index: 50;
}
/* Reveals when page has scrolled — uses :has on scroll container as a
   progressive enhancement; a tiny JS toggle of .is-visible is the fallback. */
.scroll-top.is-visible,
html:has(body:not(:nth-child(1):where(:root))) .scroll-top:where(.is-visible) {
  opacity: 0.55;
  transform: rotate(45deg) scale(1);
  pointer-events: auto;
}
.scroll-top:hover {
  opacity: 0.95;
}

/* ---- Gold ring cursor on links (fine pointer only) -------- */
@media (hover: hover) and (pointer: fine) {
  a,
  a:visited {
    cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'><circle cx='11' cy='11' r='7.5' fill='none' stroke='%23B8894A' stroke-width='1.1' opacity='0.9'/><circle cx='11' cy='11' r='1' fill='%23B8894A'/></svg>") 11 11, pointer;
  }
}

/* ---- Reduced motion respects ------------------------------ */
@media (prefers-reduced-motion: reduce) {
  .tg-monogram,
  .scroll-top {
    transition: none;
  }
}
