/* KONNECT product hero carousel
 * Self-contained: needs the Anton + Inter Tight Google Fonts and hero.js.
 * Animates transform and opacity only.
 */

.kh {
  --kh-ease: cubic-bezier(0.65, 0, 0.35, 1);
  --kh-dur: 900ms;
  --kh-gutter: 24px;   /* big word side margin */
  --kh-edge: var(--kh-gutter); /* text and controls line up with the site header */
  --kh-ink: #111111;
  --kh-accent: #FF6B3D;
  --kh-accent-hover: #E85A2E;

  position: relative;
  isolation: isolate;
  overflow: hidden;
  overflow: clip;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding-top: 64px; /* header height */
  color: var(--kh-ink);
  font-family: "Inter Tight", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  touch-action: pan-y;
}
@media (min-width: 768px) { .kh { --kh-gutter: 40px; --kh-edge: max(40px, calc((100vw - 1200px) / 2 + 40px)); } }

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

/* Background colours crossfade */
.kh__bg {
  position: absolute; inset: 0; z-index: -1;
  opacity: 0;
  transition: opacity var(--kh-dur) var(--kh-ease);
}
.kh__bg.is-active { opacity: 1; }

/* Visual: big word + product */
.kh__visual {
  position: relative;
  height: clamp(360px, 50svh, 600px);
  flex: none;
}
.kh__words {
  position: absolute; left: 0; right: 0; top: 2%;
  will-change: transform;
}
.kh__word {
  position: absolute; left: 0; right: 0; top: 0;
  margin: 0;
  display: flex; justify-content: center;
  padding: 0 var(--kh-gutter);
  font-family: "Anton", "Bebas Neue", Impact, "Arial Narrow", sans-serif;
  font-weight: 400;
  /* --fit is set by hero.js once the font has loaded, so each word fills the width */
  font-size: clamp(56px, var(--fit, 17vw), 46vh);
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
}
.kh__word.is-active, .kh__word.is-leaving { opacity: 1; visibility: visible; }
.kh__char { display: inline-block; will-change: transform, opacity; }
.kh__char--space { width: 0.22em; }

.kh__products {
  position: absolute;
  left: 50%; bottom: 0;
  width: min(66vw, 320px);
  aspect-ratio: 0.76;
  translate: -50% 0;
  will-change: transform;
}
.kh__product {
  position: absolute; inset: 0;
  opacity: 0;
  visibility: hidden;
}
.kh__product.is-active, .kh__product.is-leaving { opacity: 1; visibility: visible; }
.kh__float { width: 100%; height: 100%; }
.kh.is-floating .kh__product.is-active .kh__float { animation: kh-float 3s ease-in-out infinite; }
@keyframes kh-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.kh__product picture, .kh__product img {
  display: block; width: 100%; height: 100%;
}
/* soft shadow on the wrapper (on the masked img itself it renders a pale box) */
.kh__product picture { filter: drop-shadow(0 28px 32px rgba(17, 17, 17, 0.18)); }
.kh__product img {
  object-fit: contain; object-position: center bottom;
  /* dissolve the cropped wrist at the top of the photo */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 14%);
          mask-image: linear-gradient(to bottom, transparent 0%, #000 14%);
}

/* Info: number, copy, actions */
.kh__info {
  position: relative; z-index: 2;
  padding: 16px var(--kh-edge) 0;
}
.kh__num {
  display: flex;
  font-size: 44px; font-weight: 600; letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.kh__odo { display: inline-block; height: 1em; overflow: hidden; }
.kh__odo-col {
  display: flex; flex-direction: column;
  transition: transform var(--kh-dur) var(--kh-ease);
}
.kh__odo-col span { height: 1em; }

.kh__copies { display: grid; margin-top: 10px; max-width: 30ch; }
.kh__copy {
  grid-area: 1 / 1;
  margin: 0;
  font-size: 18px; line-height: 1.45; font-weight: 500;
  opacity: 0;
  transition: opacity 300ms ease;
}
.kh__copy.is-active { opacity: 1; transition: opacity 450ms ease 350ms; }

.kh__actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px;
  margin-top: 18px;
}
.kh__btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px;
  border-radius: 999px;
  background: var(--kh-accent); color: var(--kh-ink);
  font: inherit; font-size: 16px; font-weight: 500; line-height: 1;
  text-decoration: none;
  transition: background-color 300ms ease;
}
.kh__btn:hover { background: var(--kh-accent-hover); }
.kh__textlink {
  display: inline-flex; align-items: center; min-height: 44px;
  color: var(--kh-ink); font-weight: 500;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px;
  transition: opacity 300ms ease;
}
.kh__textlink:hover { opacity: 0.7; }

/* Small links on the right (desktop only) */
.kh__links { display: none; }

/* Controls */
.kh__controls {
  position: relative; z-index: 2;
  margin-top: auto;
  padding: 16px var(--kh-edge) 8px;
  display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 4px 12px;
}
.kh__counter {
  font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums;
}
.kh__pause {
  position: relative;
  width: 44px; height: 44px;
  border: 0; border-radius: 50%; padding: 0;
  background: transparent; color: var(--kh-ink); cursor: pointer;
}
.kh__pause:hover { background: rgba(17, 17, 17, 0.08); }
.kh__pause::before, .kh__pause::after {
  content: ""; position: absolute; top: 15px; width: 3px; height: 14px; background: currentColor; border-radius: 1px;
}
.kh__pause::before { left: 17px; }
.kh__pause::after { left: 24px; }
.kh__pause[aria-pressed="true"]::before {
  left: 18px; width: 0; height: 0; background: none; border-radius: 0;
  border-style: solid; border-width: 7px 0 7px 11px;
  border-color: transparent transparent transparent currentColor;
}
.kh__pause[aria-pressed="true"]::after { display: none; }

.kh__bars { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0; min-width: 0; }
.kh__bars li { flex: 1; min-width: 0; }
.kh__bar {
  display: block; width: 100%; height: 44px;
  border: 0; padding: 0; background: transparent; cursor: pointer;
  position: relative;
}
.kh__bar::before, .kh__bar-fill {
  content: ""; position: absolute; left: 0; right: 0; top: 21px; height: 2px; border-radius: 2px;
}
.kh__bar::before { background: rgba(17, 17, 17, 0.2); }
.kh__bar-fill {
  background: var(--kh-ink);
  transform: scaleX(0); transform-origin: left center;
}
.kh__bar.is-done .kh__bar-fill { transform: scaleX(1); }

.kh :focus-visible { outline: 2px solid var(--kh-ink); outline-offset: 3px; border-radius: 6px; }
.kh__btn:focus-visible { border-radius: 999px; }

/* Desktop: full-screen stage */
@media (min-width: 1024px) {
  .kh { height: 100vh; height: 100svh; min-height: 640px; max-height: 1100px; display: block; }
  .kh__visual { position: absolute; inset: 0; height: auto; }
  .kh__words { top: 52%; }
  .kh__word { translate: 0 -50%; }
  .kh__products {
    top: 54%; bottom: auto;
    width: auto; height: min(70vh, 760px);
    translate: -50% -50%;
  }
  .kh__info { position: static; padding: 0; }
  .kh__head {
    position: absolute; z-index: 2;
    left: var(--kh-edge); top: calc(64px + 32px);
    max-width: 300px;
  }
  .kh__num { font-size: 72px; }
  .kh__actions {
    position: absolute; z-index: 2;
    left: var(--kh-edge); bottom: 96px;
    margin: 0;
  }
  .kh__links {
    display: block;
    position: absolute; right: var(--kh-edge); top: calc(64px + 40px); z-index: 2;
    list-style: none; margin: 0; padding: 0; text-align: right;
  }
  .kh__links a {
    display: inline-flex; align-items: center; min-height: 32px;
    color: var(--kh-ink); font-size: 14px; font-weight: 500; text-decoration: none;
  }
  .kh__links a:hover { text-decoration: underline; text-underline-offset: 4px; }
  .kh__controls {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding-bottom: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .kh__bg, .kh__copy, .kh__copy.is-active, .kh__odo-col { transition: opacity 300ms ease !important; }
  .kh__odo-col { transition: none !important; }
  .kh.is-floating .kh__product.is-active .kh__float { animation: none; }
}
