/* ========== WJK Fullscreen Hero Slider (feather on <figure>::before) ========== */
:root{
  --wjk-hero-height: 100svh;
  --wjk-slide-duration: 6500ms;        /* autoplay per slide (read by JS) */
  --wjk-fade: 2600ms;                  /* JS reads this (ms) for transition length */
  --wjk-ui-max: 1200px;
  --wjk-ui-pad: clamp(16px, 4vw, 40px);

  /* Controls sizing/alignment */
  --wjk-arrow-size: 44px;              /* arrow button size */
  --wjk-gap: 12px;                     /* gap between bits in control row */
  --wjk-meta-lift: clamp(20px, 5vh, 96px); /* raise meta above control row */

  /* Feather tones */
  --wjk-feather-top: rgba(0,0,0,.65);
  --wjk-feather-mid: rgba(0,0,0,0);
  --wjk-feather-bot: rgba(0,0,0,.65);

  /* UI colors */
  --wjk-text: #fff;
  --wjk-text-dim: rgba(255,255,255,.85);
  --wjk-track: rgba(255,255,255,.25);
  --wjk-fill: #fff;

  /* Arrow visuals */
  --wjk-arrow-bg: rgba(255,255,255,.12);
  --wjk-arrow-bg-hover: rgba(255,255,255,.22);
}

html, body { margin: 0; padding: 0; }

.wjk-hero{
  position: relative; width: 100%;
  height: var(--wjk-hero-height);
  color: var(--wjk-text);
  isolation: isolate;
  background:#000;
}
@supports (height: 100dvh){ .wjk-hero{ height:100dvh; } }

.wjk-hero__viewport{ position: relative; width: 100%; height: 100%; overflow: hidden; }

/* ---------- Slides ---------- */
/* IMPORTANT: no z-index here (lets external controls layer independently) */
.wjk-hero__slide{
  position: absolute; inset: 0;
  opacity: 0;                          /* GSAP controls visibility */
  will-change: opacity, transform;
}
.wjk-hero__slide:first-child{ opacity:1; } /* fallback if JS is off */

/* Photo fills the frame */
.wjk-hero__slide img{
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  display: block;
  z-index: 0;                          /* base layer inside the slide */
}

/* Feather overlay ON THE FIGURE — above image, below meta */
.wjk-hero__slide::before{
  content:"";
  position:absolute; inset:0;
  z-index: 1;                           /* above image */
  pointer-events:none;
  background: linear-gradient(
    to bottom,
    var(--wjk-feather-top) 0%,
    rgba(0,0,0,.35) 18%,
    var(--wjk-feather-mid) 40%,
    var(--wjk-feather-mid) 60%,
    rgba(0,0,0,.35) 82%,
    var(--wjk-feather-bot) 100%
  );
}

/* ---------- Per-slide meta (title + link) ---------- */
/* Sits ABOVE the feather; positioned higher than the control row */
.wjk-hero__meta{
  position: absolute; inset-inline: 0;
  bottom: calc(
    max(0px, env(safe-area-inset-bottom)) + var(--wjk-arrow-size) + var(--wjk-gap) + var(--wjk-meta-lift)
  );
  z-index: 2;                           /* above ::before feather */
  pointer-events: none;                 /* inner box re-enables clicks */
}
.wjk-hero__meta-inner{
  width: min(var(--wjk-ui-max), 100%);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;

  /* Align to the INSIDE edges of the arrows (matches progress track) */
  padding-left:  calc(var(--wjk-ui-pad) + env(safe-area-inset-left)  + var(--wjk-arrow-size) + var(--wjk-gap));
  padding-right: calc(var(--wjk-ui-pad) + env(safe-area-inset-right) + var(--wjk-arrow-size) + var(--wjk-gap));

  pointer-events: auto;
}
.wjk-hero__title{
  font-size: clamp(16px, 2.2vw, 20px);
  letter-spacing: .02em; line-height: 1.2;
  color: var(--wjk-text);
  font-family: "Garamond", "Adobe Garamond Pro", "EB Garamond", Georgia, serif;
  font-weight: 400;  /* Garamond looks best at normal weight */
  font-style: normal;
}
.wjk-hero__jump{
  font-size: clamp(12px, 1.6vw, 12px);
  text-transform: uppercase; letter-spacing: .12em;
  text-decoration: none; color: var(--wjk-text-dim);
  border-bottom: 1px solid transparent; padding-bottom: 2px;
}
.wjk-hero__jump:hover,
.wjk-hero__jump:focus-visible{ color: var(--wjk-text); border-color: currentColor; }

/* ---------- Controls & Progress (bottom layer) ---------- */
.wjk-hero__controls{
  position: absolute; left: 0; right: 0;
  bottom: calc(max(0px, env(safe-area-inset-bottom)) + 40px); /* adjust 40px as needed */
  z-index: 10;                          /* sits above slide image/feather, below meta */
  width: min(var(--wjk-ui-max), 100%); margin-inline: auto;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--wjk-gap);
  padding: 0 calc(var(--wjk-ui-pad) + env(safe-area-inset-left))
           clamp(16px, 3vh, 28px)
           calc(var(--wjk-ui-pad) + env(safe-area-inset-right));
}

/* Arrow overrides (outlined rounded-square) */
.wjk-hero .wjk-hero__controls .wjk-hero__arrow{
  all: unset; box-sizing: border-box;
  width: var(--wjk-arrow-size); height: var(--wjk-arrow-size);
  display: grid; place-items: center;
  border: 2px solid rgba(255,255,255,.95) !important; border-radius: 10px;
  background: transparent !important; color:#fff; cursor: pointer;
  line-height:0; font-size:0; box-shadow:none !important; text-transform:none !important;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.wjk-hero .wjk-hero__controls .wjk-hero__arrow:hover,
.wjk-hero .wjk-hero__controls .wjk-hero__arrow:focus-visible{
  background: rgba(255,255,255,.12) !important; border-color:#fff !important; outline:none; transform: translateY(-1px);
}

/* Base link style */
.wjk-hero__jump {
  position: relative;
  font-size: clamp(12px, 1.6vw, 12px);
  text-transform: uppercase;
  letter-spacing: .12em;
  text-decoration: none; 
  color: var(--wjk-text-dim);
  padding-bottom: 2px;
  border: none; /* remove old border-bottom */
  transition: color 0.3s ease;
}

/* Underline as pseudo-element */
.wjk-hero__jump::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background-color: currentColor;
  transition: width 0.3s ease;
}

/* Hover/focus state */
.wjk-hero__jump:hover,
.wjk-hero__jump:focus-visible {
  color: var(--wjk-text);
}

.wjk-hero__jump:hover::after,
.wjk-hero__jump:focus-visible::after {
  width: 100%; /* expands left → right */
}

.wjk-hero .wjk-hero__controls .wjk-hero__arrow::before{
  content:""; width:18px; height:18px; display:block; background:currentColor;
  -webkit-mask:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><polyline points="15 18 9 12 15 6" fill="none" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>') center/contain no-repeat;
          mask:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><polyline points="15 18 9 12 15 6" fill="none" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>') center/contain no-repeat;
  opacity:.95;
}
#wjk-next::before{ transform: scaleX(-1); }

.wjk-hero__progress{
  position: relative; height: 2px;
  background: var(--wjk-track); border-radius: 2px; overflow: hidden;
}
.wjk-hero__progress-fill{
  position: absolute; inset: 0 auto 0 0;
  width: 0%; background: var(--wjk-fill);
  transform-origin: left center;
}

/* ---------- Responsive tweaks ---------- */
@media (max-width: 768px){
  :root{ --wjk-arrow-size: 40px; }
  .wjk-hero .wjk-hero__controls .wjk-hero__arrow::before{ width:16px; height:16px; }
}

@media (prefers-reduced-motion: reduce){
  .wjk-hero__progress-fill{ transition: none !important; }
}

/* Utility spacing guards */
.wjk-hero + * { margin-top: 0; }
* + .wjk-hero { margin-top: 0; }
