/* ============================================================
   PIGMENT BANNER + STORY BOX  (rabbet, 2026-11-30)
   Appended to style.css. Source of facts: Capstan's GALLERY SERIES
   posts in creative. Banner image: the 2:1 indigo/gold wash,
   2024-09-07_200013_23FD2970.jpeg (1252x626).
   ============================================================ */

.kg-banner {
  position: relative;
  width: 100%;
  height: clamp(200px, 26vw, 400px);
  overflow: hidden;
  background: #0a0d16;
  isolation: isolate;
}
.kg-banner__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 58%;
  transform: scale(1.04);          /* crop past the sheet edge */
  transform-origin: center 58%;
  z-index: 0;
}
.kg-banner__scrim {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(to top, rgba(4,7,15,.94) 0%, rgba(4,7,15,.80) 20%, rgba(4,7,15,.34) 46%, rgba(4,7,15,.05) 74%, rgba(4,7,15,0) 100%);
  pointer-events: none;
}
.kg-banner__cap {
  position: absolute; z-index: 2;
  left: clamp(18px, 4vw, 64px); right: clamp(18px, 4vw, 64px);
  bottom: calc(46px + 30px);
  color: #f4f0e6;
}
.kg-banner__cap .k {
  display: block;
  font: 600 10.5px/1 Inter, Inter, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #ecd9a8;
  text-shadow: 0 1px 3px rgba(3,6,14,.95), 0 0 18px rgba(3,6,14,.7);
  margin-bottom: .7em;
}
.kg-banner__cap .h {
  margin: 0;
  font: 400 clamp(17px, 2vw, 27px)/1.22 "Cormorant Garamond", Georgia, serif;
  letter-spacing: .015em;
  color: #fffdf7;
  /* the wash is mid-toned blue here, so this needs more than a soft glow */
  text-shadow:
    0 1px 2px rgba(3,6,14,.92),
    0 2px 10px rgba(3,6,14,.85),
    0 0 34px rgba(3,6,14,.6);
  max-width: 22em;
}

/* ---- ticker ---- */
.kg-tick {
  position: absolute; z-index: 3;
  left: 0; right: 0; bottom: 0;
  height: 46px;
  display: flex; align-items: stretch;
  background: rgba(7,10,20,.82);
  border-top: 1px solid rgba(226,196,124,.26);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.kg-tick__lab {
  flex: 0 0 auto;
  display: flex; align-items: center;
  padding: 0 clamp(11px, 1.5vw, 20px);
  font: 600 10px/1 Inter, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: .2em; text-transform: uppercase;
  color: #e2c47c;
  border-right: 1px solid rgba(226,196,124,.26);
  white-space: nowrap;
}
.kg-tick__rail { flex: 1 1 auto; overflow: hidden; display: flex; align-items: center; }
.kg-tick__track {
  display: flex; align-items: center;
  white-space: nowrap;
  will-change: transform;
  animation: kg-scroll 118s linear infinite;
}
.kg-tick:hover .kg-tick__track { animation-play-state: paused; }
.kg-tick__item {
  font: 400 12.5px/1.35 Inter, Inter, ui-sans-serif, system-ui, sans-serif;
  color: #dde4f0;
  padding: 0 46px 0 0;
  white-space: nowrap;
}
.kg-tick__item b {
  color: #e8cf95; font-weight: 600;
  letter-spacing: .015em;
}
.kg-tick__item i {
  color: rgba(221,228,240,.6);
  font-style: normal;
  font-size: .92em;
}
@keyframes kg-scroll {
  from { transform: translate3d(0,0,0); }
  to   { transform: translate3d(-50%,0,0); }
}

/* ---- story card, matching the page's own metadata panel ---- */
.kg-story__card { margin-top: 2rem; }

.kg-card {
  position: relative;
  background: #ece9e2;
  border: 1px solid rgba(26,26,26,.08);
  border-radius: 2px;
  padding: clamp(1.2rem, 2.4vw, 1.75rem);
  min-height: 226px;
  display: flex; flex-direction: column;
}
.kg-card__num {
  font: 500 9.5px/1 Inter, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: .2em; text-transform: uppercase;
  color: #8b8578;
  margin-bottom: 1.15em;
  display: flex; justify-content: space-between; align-items: center;
}
.kg-card__num span:last-child { letter-spacing: .1em; }
.kg-card__name {
  margin: 0 0 .3em;
  font: 400 clamp(19px, 2vw, 25px)/1.15 "Cormorant Garamond", Georgia, serif;
  color: #1a1a1a;
}
.kg-card__chem {
  font: 400 11.5px/1.55 "JetBrains Mono", ui-monospace, Menlo, monospace;
  color: #6f6a5e;
  margin: 0 0 1em;
  letter-spacing: .005em;
}
.kg-card__body {
  margin: 0;
  font: 400 14px/1.68 "Cormorant Garamond", Georgia, serif;
  color: #33312c;
}
.kg-card__dots {
  display: flex; gap: 4px; flex-wrap: wrap;
  margin-top: auto; padding-top: 1.35em;
}
.kg-dot {
  width: 14px; height: 2px;
  background: rgba(26,26,26,.16);
  border: 0; padding: 0; cursor: pointer;
  transition: background .3s;
}
.kg-dot.is-on { background: #8a6d2f; }
.kg-card__fade { animation: kg-fade .5s ease; }
@keyframes kg-fade {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: none; }
}

@media (max-width: 820px) {
  .kg-story__inner { grid-template-columns: 1fr; }
  .kg-banner__cap .h { max-width: none; }
  .kg-banner { height: clamp(170px, 42vw, 260px); }
  .kg-tick__item { padding-right: 30px; font-size: 12px; }
  .kg-story__p { font-size: 14px; }
}
@media (max-width: 560px) {
  .kg-banner__cap { bottom: calc(46px + 14px); }
  .kg-banner__cap .k { font-size: 9.5px; letter-spacing: .18em; }
  .kg-tick__lab { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .kg-tick__track { animation: none; }
  .kg-tick__rail { overflow-x: auto; }
  .kg-card__fade { animation: none; }
}

/* --- contrast + card fixes (rabbet 2026-11-30) --- */
.kg-banner__cap .h{
  color:#fffdf7;
  text-shadow:0 1px 2px rgba(0,0,0,.92), 0 2px 26px rgba(0,0,0,.8);
  font-weight:500;
}
.kg-banner__scrim{
  background:linear-gradient(to top,
    rgba(4,7,14,.94) 0%, rgba(4,7,14,.74) 24%,
    rgba(4,7,14,.30) 56%, rgba(4,7,14,0) 100%);
}
.kg-story__card{margin-top:2.4rem;}
.kg-card{
  background:#fff;
  border:1px solid rgba(120,100,70,.22);
  border-radius:2px;
  padding:1.5rem 1.6rem;
  box-shadow:0 1px 2px rgba(0,0,0,.04);
}
.kg-card__num{color:#8a6d2f;font-size:9.5px;letter-spacing:.2em;margin-bottom:.85em;}
.kg-card__name{font:400 1.6rem/1.16 "Cormorant Garamond",Georgia,serif;color:#1a1a1a;margin:0 0 .3em;}
.kg-card__chem{font:400 .72rem/1.5 "JetBrains Mono",ui-monospace,monospace;color:#7a6440;margin:0 0 .9em;}
.kg-card__body{font:400 .9rem/1.72 Inter,system-ui,sans-serif;color:#3d3d38;margin:0;}
.kg-card__body em{color:#5a5449;}
.kg-card__dots{margin-top:1.25em;padding-top:1em;border-top:1px solid rgba(120,100,70,.16);}
.kg-dot{background:rgba(138,109,47,.22);width:18px;}
.kg-dot.is-on{background:#8a6d2f;}
@media(max-width:820px){.kg-card__name{font-size:1.4rem;}}

/* --- ticker edge fade: partial items read as a moving ribbon, not breakage --- */
.kg-tick__rail{
  -webkit-mask-image:linear-gradient(to right, transparent 0, #000 42px, #000 calc(100% - 42px), transparent 100%);
          mask-image:linear-gradient(to right, transparent 0, #000 42px, #000 calc(100% - 42px), transparent 100%);
}

/* --- ticker edges: gradient overlays (mask-image is unreliable in some
   Chromium builds, so use real elements painted over the rail) --- */
.kg-tick__rail{
  -webkit-mask-image:linear-gradient(to right,
    transparent 0, #000 34px, #000 calc(100% - 90px), transparent 100%);
  mask-image:linear-gradient(to right,
    transparent 0, #000 34px, #000 calc(100% - 90px), transparent 100%);
}
