/* ==========================================================
   KingsCollection — homepage hero sequence (code: js/hero.js)
   2. .kc-hero      cream hero, drifting contour lines and light, statue of
                    Christ; the cursor paints a trail of gold light that
                    reveals the statue in glory (canvas), gold slices flash
   3. .kc-seq       scrolling shrinks the hero into a framed card on black,
                    "King of Kings / Lord of Lords" slides past, a gold cross draws
   4. .kc-about     a small About Us section right after the hero
   ========================================================== */

:root { --kc-head: 78px; }

/* ---------- 3. the scroll sequence (stage stays pinned while you scroll) ---------- */
.kc-seq {
  position: relative;
  height: 280vh;
  background: #0d0c0a;
}
.kc-stage {
  position: sticky;
  top: var(--kc-head);
  height: calc(100svh - var(--kc-head));
  min-height: 560px;
  overflow: hidden;
  background: #0d0c0a;
  isolation: isolate;
}
.kc-stage__topo { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .16; pointer-events: none; z-index: 0; }
.kc-stage__topo path { fill: none; stroke: #C9A24D; stroke-width: 1; vector-effect: non-scaling-stroke; }

.kc-marquee {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .1em;
  opacity: 0;
  pointer-events: none;
}
.kc-marquee__line {
  display: flex;
  align-items: center;
  gap: .35em;
  white-space: nowrap;
  font-size: clamp(3.6rem, 11.5vw, 11rem);
  line-height: .95;
  will-change: transform;
}
.kc-marquee__line span, .kc-marquee__line i { flex: none; }
.kc-marquee__line--serif { font-family: var(--serif); font-style: italic; font-weight: 500; color: var(--gold); }
.kc-marquee__line--sans { font-family: var(--sans); font-weight: 800; letter-spacing: -.03em; text-transform: uppercase; color: #efe9dc; }
.kc-marquee__line i { font-style: normal; font-size: .5em; color: rgba(201, 162, 77, .55); }

.kc-stage__stroke {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  width: clamp(220px, 30vw, 430px);
  height: auto;
  transform: translate(-50%, -50%);
  overflow: visible;
  pointer-events: none;
}
.kc-stage__stroke path {
  fill: none;
  stroke: var(--gold);
  stroke-width: 9;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 14px rgba(201, 162, 77, .6));
}
.kc-stage__ref {
  position: absolute;
  left: 50%;
  bottom: clamp(1rem, 4vh, 2.2rem);
  z-index: 4;
  margin: 0;
  transform: translateX(-50%);
  font-size: .7rem;
  letter-spacing: .45em;
  text-transform: uppercase;
  color: rgba(239, 233, 220, .7);
  opacity: 0;
}

/* ---------- 2. the hero ---------- */
.kc-hero {
  --cream: #F4EFE4;
  --ink: #0a0a0a;
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  background: radial-gradient(ellipse 70% 60% at 50% 42%, #fbf8f1 0%, var(--cream) 70%);
  color: var(--ink);
  transform-origin: 50% 50%;
  will-change: transform;
  isolation: isolate;
  transition: box-shadow .4s ease;
}
.kc-hero.is-card { box-shadow: 0 40px 90px rgba(0, 0, 0, .55); border-radius: 30px; }

.kc-hero__topo {
  position: absolute;
  inset: -10%;
  width: 120%;
  height: 120%;
  z-index: 0;
  pointer-events: none;
  opacity: .5;
}
.kc-hero__topo path { fill: none; stroke: #c9b78f; stroke-width: 1.1; vector-effect: non-scaling-stroke; }
/* the contour lines drift as one layer (moved by the graphics card, so it stays smooth) */
.kc-hero__topo, .kc-stage__topo { will-change: transform; animation: topoDrift 48s ease-in-out infinite alternate; }
.kc-stage__topo { animation-duration: 60s; }
@keyframes topoDrift {
  0%   { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  100% { transform: translate3d(-3%, 2%, 0) rotate(4deg) scale(1.06); }
}

/* soft drifting light, like mist */
.kc-hero__mist { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.kc-hero__mist span {
  position: absolute;
  width: 46vw; height: 30vw;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .9), rgba(255, 255, 255, .35) 55%, rgba(255, 255, 255, 0));
  will-change: transform;
  animation: mist 26s ease-in-out infinite alternate;
}
.kc-hero__mist span:nth-child(1) { left: -12%; top: 8%; }
.kc-hero__mist span:nth-child(2) { right: -14%; top: 30%; animation-duration: 32s; animation-delay: -8s; }
.kc-hero__mist span:nth-child(3) { left: 18%; bottom: -16%; animation-duration: 38s; animation-delay: -16s; }
.kc-hero__mist span:nth-child(4) { right: 10%; top: -18%; width: 34vw; animation-duration: 29s; animation-delay: -4s; }
@keyframes mist {
  0%   { transform: translate(0, 0) scale(1) rotate(0deg); }
  50%  { transform: translate(8vw, 3vw) scale(1.15) rotate(8deg); }
  100% { transform: translate(-4vw, -2vw) scale(.92) rotate(-6deg); }
}

.kc-hero__word {
  position: absolute;
  left: 50%;
  top: 6%;
  z-index: 0;
  margin: 0;
  transform: translateX(-50%);
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(5rem, 19vw, 21rem);
  line-height: .8;
  letter-spacing: -.02em;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(143, 110, 34, .32);
  pointer-events: none;
  user-select: none;
}

/* the crown of thorns sits in the middle, just under the word "Kings" */
.kc-hero__figure {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  width: min(56vw, 90vh);
  aspect-ratio: 3 / 2;
  transform: translate(-50%, -54%);
  touch-action: pan-y;
  mix-blend-mode: multiply;          /* white in the photo disappears into the cream */
}
.kc-hero__figure img,
.kc-hero__basecv,
.kc-hero__glory {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* soft edges so the white backdrop melts into the cream */
  -webkit-mask-image: radial-gradient(ellipse 58% 60% at 50% 50%, #000 66%, transparent 100%);
          mask-image: radial-gradient(ellipse 58% 60% at 50% 50%, #000 66%, transparent 100%);
}
/* until the canvas is ready (or with reduced motion): the thorns photo inverted and tinted → brown thorns on white */
.kc-hero__base { filter: grayscale(1) invert(1) sepia(1) saturate(2.2) brightness(.8) contrast(1.2); }   /* brown thorns */
.kc-hero__glory { pointer-events: none; }
.kc-hero__basecv { pointer-events: none; }
.kc-hero__figure.has-canvas-base .kc-hero__base { opacity: 0; }   /* the canvas version replaces the photo */

/* headline: lines slide up out of a mask */
.kc-hero__title {
  position: absolute;
  left: clamp(1.25rem, 4vw, 4rem);
  bottom: clamp(1.5rem, 6vh, 4rem);
  z-index: 3;
  max-width: min(30rem, 32vw);
}
.kc-hero__title .eyebrow { color: var(--gold-deep); }
.kc-hero__title h1 {
  margin: .5rem 0 1rem;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2.3rem, 4.2vw, 4.4rem);
  line-height: .98;
  letter-spacing: -.01em;
  color: var(--ink);
  text-shadow: 0 0 30px var(--cream), 0 0 12px var(--cream);
}
.kc-hero__title h1 em { font-style: italic; font-weight: 500; color: var(--gold-deep); }
.kc-hero__title .lead { margin: 0 0 1.3rem; max-width: 26rem; color: #3a3a3a; font-size: .92rem; text-shadow: 0 0 14px var(--cream); }
.kc-hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.kc-hero .btn--outline-dark { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.kc-hero .btn--outline-dark:hover { background: var(--ink); color: var(--white); }

.kc-rise { display: block; overflow: hidden; padding-bottom: .06em; }
.kc-rise > span { display: block; transform: translateY(110%); transition: transform 1.1s cubic-bezier(.2, .8, .2, 1) var(--d, 0s); }
.kc-fade { opacity: 0; transform: translateY(18px); transition: opacity .9s ease var(--d, 0s), transform .9s cubic-bezier(.2, .8, .2, 1) var(--d, 0s); }
.kc-hero.is-in .kc-rise > span { transform: none; }
.kc-hero.is-in .kc-fade { opacity: 1; transform: none; }
/* once the intro has played, fades follow the scroll straight away */
.kc-hero.is-in.done .kc-fade, .kc-hero.is-in.done .kc-hero__hint, .kc-hero.is-in.done .kc-hero__card,
.kc-hero.is-in.done .kc-hero__title, .kc-hero.is-in.done .kc-hero__word, .kc-hero.is-in.done .kc-hero__scroll {
  transition: opacity .15s linear, transform .4s cubic-bezier(.2, .8, .2, 1), box-shadow .4s;
  transition-delay: 0s;
}
.kc-hero .kc-figure-in { opacity: 0; transform: translate(-50%, -50%) scale(.94); }
.kc-hero__figure { transition: opacity 1.4s ease, transform 1.6s cubic-bezier(.2, .8, .2, 1); }

/* verse card, bottom right */
.kc-hero__card {
  position: absolute;
  right: clamp(1.25rem, 4vw, 4rem);
  bottom: clamp(1.5rem, 6vh, 4rem);
  z-index: 3;
  width: 15.5rem;
  padding: 1rem 1.1rem 1.1rem;
  background: rgba(255, 255, 255, .55);
  border: 1px solid rgba(10, 10, 10, .14);
  border-radius: 6px;
  background: rgba(255, 255, 255, .78);
  color: var(--ink);
  text-decoration: none;
}
.kc-hero.is-in .kc-hero__card { transition: opacity .9s ease var(--d, 0s), transform .4s cubic-bezier(.2, .8, .2, 1), box-shadow .4s; }
.kc-hero.is-in .kc-hero__card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0, 0, 0, .08); }
.kc-hero__card-top { display: flex; align-items: center; justify-content: space-between; font-size: .62rem; letter-spacing: .25em; text-transform: uppercase; color: #555; }
.kc-hero__card-icon { position: relative; display: grid; place-items: center; width: 34px; height: 34px; }
.kc-hero__card-icon img { height: 20px; width: auto; animation: logoFloat 4s ease-in-out infinite; }
.kc-hero__card-icon::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 1.5px dashed rgba(143, 110, 34, .7);
  animation: spin 12s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.kc-hero__card-ref { display: block; margin: .8rem 0 .35rem; font-family: var(--serif); font-weight: 700; font-size: 1.55rem; line-height: 1; }
.kc-hero__card-text {
  margin: 0; font-family: var(--serif); font-style: italic; font-size: .98rem; line-height: 1.3; color: #333;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.kc-hero__card-more { display: inline-block; margin-top: .75rem; font-size: .66rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-deep); }
.kc-hero__card-more b { display: inline-block; transition: transform .3s; }
.kc-hero__card:hover .kc-hero__card-more b { transform: translateX(5px); }

.kc-hero__hint {
  position: absolute;
  top: 1.4rem;
  right: clamp(1.25rem, 4vw, 4rem);
  z-index: 3;
  display: flex; align-items: center; gap: .55rem;
  font-size: .62rem; letter-spacing: .28em; text-transform: uppercase; color: #6b6150;
  opacity: 0; transition: opacity 1s 1.4s;
}
.kc-hero.is-in .kc-hero__hint { opacity: 1; }
.kc-hero__hint::before {
  content: ""; width: 9px; height: 9px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 0 4px rgba(201, 162, 77, .2);
  animation: hintPulse 2s ease-in-out infinite;
}
@keyframes hintPulse { 50% { box-shadow: 0 0 0 9px rgba(201, 162, 77, 0); } }

.kc-hero__scroll {
  position: absolute; left: 50%; bottom: 1rem; z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  transform: translateX(-50%);
  font-size: .58rem; letter-spacing: .35em; text-transform: uppercase; color: #6b6150;
}
.kc-hero__scroll::after {
  content: ""; width: 1px; height: 42px;
  background: linear-gradient(var(--gold) 0 0) no-repeat 0 -42px / 1px 42px, rgba(10, 10, 10, .2);
  animation: scrollCue 2s ease-in-out infinite;
}
@keyframes scrollCue { to { background-position: 0 42px, 0 0; } }

/* ---------- 4. small About Us section after the hero ---------- */
.kc-about {
  background: #F4EFE4;
  padding: clamp(3.5rem, 8vw, 6rem) 0;
  border-top: 1px solid rgba(143, 110, 34, .25);
}
.kc-about__grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.kc-about__intro .eyebrow { color: var(--gold-deep); }
.kc-about__intro h2 {
  margin: .4rem 0 1rem;
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  line-height: 1;
}
.kc-about__intro h2 em { font-style: italic; font-weight: 500; color: var(--gold-deep); }
.kc-about__intro p { margin: 0 0 1.5rem; max-width: 34rem; color: #3a3a3a; line-height: 1.7; }
.kc-about__link {
  display: inline-flex; gap: .5rem; align-items: center;
  font-size: .72rem; font-weight: 600; letter-spacing: .25em; text-transform: uppercase;
  color: var(--ink, #0a0a0a); text-decoration: none;
  padding-bottom: .35rem; border-bottom: 1px solid var(--gold);
}
.kc-about__link span { transition: transform .3s var(--ease); }
.kc-about__link:hover span { transform: translateX(5px); }
.kc-about__values { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.kc-about__values li {
  display: flex; gap: 1rem; align-items: flex-start;
  padding: 1.1rem 1.2rem;
  background: rgba(255, 255, 255, .6);
  border: 1px solid rgba(10, 10, 10, .08);
  border-radius: 6px;
}
.kc-about__values img, .kc-about__values svg { flex: none; width: 26px; height: 26px; object-fit: contain; color: var(--gold-deep); }
.kc-about__values h3 { margin: 0 0 .2rem; font-family: var(--serif); font-size: 1.25rem; }
.kc-about__values p { margin: 0; font-size: .9rem; color: #555; }
@media (max-width: 800px) {
  .kc-about__grid { grid-template-columns: 1fr; }
}

/* ---------- tablets & phones ---------- */
@media (max-width: 900px) {
  .kc-seq { height: 240vh; }
  .kc-hero__figure { width: 112vw; top: 36%; transform: translate(-50%, -50%); }
  .kc-hero__word { top: 3%; font-size: 30vw; }
  .kc-hero__title { left: 1.25rem; right: 1.25rem; bottom: 1.25rem; max-width: none; text-align: center; }
  .kc-hero__title h1 { font-size: clamp(2.4rem, 10vw, 3.6rem); }
  .kc-hero__title { max-width: none; }
  .kc-hero__title .lead { margin-inline: auto; font-size: .95rem; }
  .kc-hero__actions { justify-content: center; }
  .kc-hero__card { display: none; }
  .kc-hero__hint { top: .9rem; right: 50%; transform: translateX(50%); white-space: nowrap; }
  .kc-hero__scroll { display: none; }
  .kc-hero__mist span { width: 90vw; height: 60vw; }
}
@media (max-width: 520px) {
  .kc-hero__actions { flex-wrap: nowrap; gap: .5rem; }
  .kc-hero__actions .btn { flex: 1 1 0; padding: .85rem .4rem; font-size: .68rem; letter-spacing: .12em; }
  .kc-hero__title { bottom: 1.75rem; }
  .kc-hero__title .lead { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .kc-hero__topo, .kc-stage__topo, .kc-hero__mist span, .kc-hero__hint::before, .kc-hero__scroll::after,
  .kc-hero__card-icon::before, .kc-hero__card-icon img { animation: none; }
  .kc-rise > span, .kc-fade { transition: none; }
}
