/* ---------- storefront motion (see /js/motion.js) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .js [data-reveal].is-revealed { opacity: 1; transform: none; }
  .js [data-reveal-stagger] > * {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1), transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: calc(var(--i, 0) * 70ms);
  }
  .js [data-reveal-stagger].is-revealed > * { opacity: 1; transform: none; }

  /* display headings rise out of a mask, a beat after their block fades in */
  .js [data-reveal] .kb-display {
    clip-path: inset(0 0 100% 0);
    transform: translateY(0.4em);
    transition: clip-path 1.1s cubic-bezier(0.77, 0, 0.175, 1) 0.08s, transform 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.08s;
  }
  .js [data-reveal].is-revealed .kb-display { clip-path: inset(-0.3em -0.2em -0.3em -0.2em); transform: none; }

  /* product photos ease in as they arrive instead of popping */
  .kb-card__media img.is-pending { opacity: 0; transform: translateY(4%) scale(0.96); }
}
.kb-campaign__media[data-parallax] { will-change: transform; transform: scale(1.12); }

/* ---------- brand marquee under the hero ---------- */
.kb-marquee {
  overflow: hidden;
  border-bottom: 1px solid var(--kb-line);
  padding: clamp(16px, 2.4vw, 30px) 0;
  background: var(--color-background);
}
.kb-marquee__track { display: flex; width: max-content; animation: kb-marquee 55s linear infinite; }
.kb-marquee:hover .kb-marquee__track,
.kb-marquee:focus-within .kb-marquee__track { animation-play-state: paused; }
.kb-marquee__group { display: flex; align-items: center; flex-shrink: 0; }
.kb-marquee__item {
  font-family: var(--font-heading); font-weight: 800; text-transform: uppercase;
  font-size: clamp(1.7rem, 4.6vw, 3.9rem); line-height: 1; letter-spacing: -0.02em;
  padding: 0 clamp(18px, 2.6vw, 40px);
  color: var(--kb-ink); white-space: nowrap;
  transition: color 0.2s ease, -webkit-text-stroke-color 0.2s ease;
}
.kb-marquee__item.is-outline { color: transparent; -webkit-text-stroke: 1.5px var(--kb-ink); }
.kb-marquee__item:hover, .kb-marquee__item:focus-visible { color: var(--color-accent); -webkit-text-stroke-color: var(--color-accent); }
.kb-marquee__sep { width: 9px; height: 9px; flex-shrink: 0; background: var(--color-accent); transform: rotate(45deg); }
@keyframes kb-marquee { to { transform: translate3d(-50%, 0, 0); } }
@media (prefers-reduced-motion: reduce) {
  .kb-marquee { overflow-x: auto; }
  .kb-marquee__track { animation: none; }
}
.kb-marquee + .kb-section { border-top: 0; }

/* hairline catalog grid: draw the lines per cell, so a part-filled last row
   ends cleanly instead of showing the line colour as a grey block */
.kb-grid { gap: 0; background: none; border-bottom: 0; }
.kb-grid > * { box-shadow: inset -1px 0 0 var(--kb-line), inset 0 -1px 0 var(--kb-line); }

/* ---------- product cards: the shoe lifts toward you ---------- */
.kb-card__img--alt { transform: scale(1.04); }
@media (hover: hover) {
  .kb-card:hover .kb-card__img--alt { transform: none; }
  .kb-card:hover .kb-card__media img:only-of-type { transform: translateY(-3%) scale(1.06); }
}

/* ---------- brand index: floating shoe follows the cursor ---------- */
.kb-brand-row__peek {
  left: 0; right: auto; width: 240px; height: 240px;
  background: none;
  transform: translate(calc(var(--peek-x, 60vw) - 50%), -50%) scale(0.7) rotate(-8deg);
  transition: opacity 0.3s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
@media (hover: hover) and (min-width: 990px) {
  .kb-brand-row:hover .kb-brand-row__peek { opacity: 1; transform: translate(calc(var(--peek-x, 60vw) - 50%), -50%) scale(1) rotate(-4deg); }
}

/* phones: the model note goes under the brand name instead of being cut off */
@media (max-width: 749px) {
  .kb-brand-row { flex-direction: column; align-items: stretch; gap: 6px; }
  .kb-brand-row__meta { white-space: normal; justify-content: space-between; }
}

/* ---------- PDP: hover to inspect details ---------- */
@media (hover: hover) and (min-width: 990px) {
  .kb-pdp__frame { overflow: hidden; }
  .kb-pdp__frame img { transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1); }
  .kb-pdp__frame.is-zoomed { cursor: zoom-out; }
  .kb-pdp__frame:not(.is-zoomed) img { cursor: zoom-in; }
  .kb-pdp__frame.is-zoomed img { transform: scale(2); }
}

/* ---------- product imagery: transparent cutouts need no multiply hack ---------- */
img[src*="/images/clean/"] { mix-blend-mode: normal; }
.kb-card__media img { object-fit: contain; }
.kb-brand-row__peek { object-fit: contain; }

/* closed drawer: its shadow used to bleed 40px into the right edge of every page */
.cart-drawer:not(.is-open) { box-shadow: none; visibility: hidden; transition: translate 300ms ease, visibility 0s 300ms; }
.cart-drawer.is-open { visibility: visible; }


/* ============================================================
   Storefront additions (announcement, search, filters, consent,
   newsletter, legal pages, PDP extras)
   ============================================================ */
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* announcement bar: all messages side by side on desktop, rotating on phones */
.kb-announce span + span::before { content: '·'; margin-right: 32px; opacity: 0.5; }
@media (max-width: 749px) {
  .kb-announce { min-height: 30px; align-items: center; }
  .kb-announce span { display: none; }
  .kb-announce span.is-active { display: block; white-space: normal; text-align: center; line-height: 1.4; animation: kb-fade-in 0.5s ease; }
  .kb-announce span + span::before { content: none; }
}
@keyframes kb-fade-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }

/* search as you type */
.kb-search-inline, .kb-mnav__search { position: relative; }
.kb-predictive {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 120; width: min(440px, 92vw);
  background: #fff; color: var(--kb-ink); border: 1px solid var(--kb-ink);
  box-shadow: 0 18px 40px rgba(10, 10, 11, 0.14); max-height: min(70vh, 560px); overflow: auto;
  text-transform: none; letter-spacing: 0;
}
.kb-mnav__search .kb-predictive { left: 0; right: 0; width: auto; }
.kb-predictive[hidden] { display: none; }
.kb-predictive__brands { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 12px 4px; }
.kb-predictive__item { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--kb-line); text-decoration: none; }
.kb-predictive__item:hover, .kb-predictive__item.is-active { background: var(--kb-plate); }
.kb-predictive__item img, .kb-predictive__noimg { width: 56px; height: 56px; object-fit: contain; background: var(--kb-plate); display: block; }
.kb-predictive__info small { display: block; font-size: 10.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--kb-dim); }
.kb-predictive__info strong { display: block; font-size: 13.5px; font-weight: 500; line-height: 1.3; }
.kb-predictive__price { font-size: 13px; font-weight: 600; text-align: right; white-space: nowrap; }
.kb-predictive__price s { display: block; font-weight: 400; color: var(--kb-dim); font-size: 12px; }
.kb-predictive__all { display: block; padding: 12px; text-align: center; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.kb-predictive__all:hover { background: var(--kb-plate); }
.kb-predictive__empty { margin: 0; padding: 16px; font-size: 13.5px; color: var(--kb-dim); }

/* chips (filters, brands) */
.kb-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px;
  border: 1px solid var(--kb-line); background: var(--color-background); color: var(--kb-ink);
  font-size: 13px; font-weight: 500; white-space: nowrap; text-decoration: none; transition: border-color 0.15s ease, background 0.15s ease;
}
.kb-chip small { color: var(--kb-dim); font-size: 11px; }
.kb-chip:hover { border-color: var(--kb-ink); }
.kb-chip.is-active { background: var(--kb-ink); border-color: var(--kb-ink); color: #fff; }
.kb-filters { display: flex; align-items: center; gap: 12px; padding: 12px var(--kb-pad); border-bottom: 1px solid var(--kb-line); flex-wrap: wrap; }
.kb-filters__label { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--kb-dim); }
.kb-filters__chips { display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 749px) {
  .kb-filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .kb-filters::-webkit-scrollbar { display: none; }
  .kb-filters .kb-filters__chips { flex-wrap: nowrap; }
}
.kb-pagination__gap { padding: 0 6px; color: var(--kb-dim); }

/* search page + 404 */
.kb-search-page { display: flex; gap: 8px; max-width: 560px; margin: 18px 0 10px; }
.kb-search-page input { flex: 1; min-width: 0; height: 48px; padding: 0 14px; border: 1px solid var(--kb-line); background: #fff; font: inherit; font-size: 15px; }
.kb-search-page input:focus { outline: none; border-color: var(--kb-ink); }
.kb-search-brands { padding: 8px var(--kb-pad) 64px; display: flex; flex-direction: column; gap: 12px; }
.kb-notfound { max-width: 640px; margin: 0 auto; padding: clamp(48px, 10vh, 120px) 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.kb-notfound__code { font-family: var(--font-heading); font-weight: 800; font-size: clamp(5rem, 18vw, 11rem); line-height: 0.8; color: transparent; -webkit-text-stroke: 2px var(--kb-ink); }
.kb-notfound h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin: 0; }
.kb-notfound p { margin: 0; color: var(--kb-dim); line-height: 1.6; }
.kb-notfound .kb-search-page { width: 100%; justify-content: center; }
.kb-inline-link { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* narrow pages: track order, contact */
.kb-narrow-page { max-width: 520px; margin: 0 auto; padding: clamp(40px, 8vh, 96px) 24px; }
.kb-narrow-page h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 12px; }
.kb-narrow-page__lead { color: var(--kb-dim); line-height: 1.6; margin: 0 0 24px; }
.kb-stack-form .field input, .kb-stack-form .field textarea { width: 100%; }
.kb-form-error { padding: 12px 14px; border: 1px solid var(--color-accent); background: #fdf2f1; color: #9f2b23; font-size: 14px; }
.kb-contact { max-width: 1100px; margin: 0 auto; padding: clamp(40px, 8vh, 96px) var(--kb-pad); display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); }
.kb-contact h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin: 0 0 14px; }
.kb-contact__list { list-style: none; margin: 0 0 24px; padding: 0; border-top: 1px solid var(--kb-line); }
.kb-contact__list li { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--kb-line); font-size: 15px; }
.kb-contact__list svg { width: 20px; height: 20px; flex-shrink: 0; }
.kb-contact__sent { display: flex; gap: 14px; align-items: flex-start; padding: 22px; border: 1px solid var(--kb-ink); }
.kb-contact__sent svg { width: 28px; height: 28px; flex-shrink: 0; }
.kb-contact__sent p { margin: 0; line-height: 1.6; }
@media (max-width: 749px) { .kb-contact { grid-template-columns: 1fr; } }

/* legal / info pages */
.kb-legal { max-width: 760px; margin: 0 auto; padding: clamp(40px, 8vh, 88px) 24px clamp(48px, 9vh, 104px); font-size: 15.5px; line-height: 1.7; }
.kb-legal h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin: 0 0 18px; }
.kb-legal h2 { font-family: var(--font-heading); font-size: 19px; font-weight: 700; letter-spacing: -0.01em; margin: 34px 0 10px; text-transform: none; }
.kb-legal p, .kb-legal ul { margin: 0 0 12px; }
.kb-legal ul { padding-left: 20px; }
.kb-legal li { margin-bottom: 6px; }
.kb-legal a { text-decoration: underline; text-underline-offset: 3px; }
.kb-legal__highlights { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--kb-line); margin: 10px 0 8px; }
.kb-legal__highlights div { padding: 18px; border-right: 1px solid var(--kb-line); }
.kb-legal__highlights div:last-child { border-right: 0; }
.kb-legal__highlights strong { display: block; font-family: var(--font-heading); font-size: 20px; text-transform: uppercase; }
.kb-legal__highlights span { font-size: 13px; color: var(--kb-dim); }
@media (max-width: 640px) { .kb-legal__highlights { grid-template-columns: 1fr; } .kb-legal__highlights div { border-right: 0; border-bottom: 1px solid var(--kb-line); } .kb-legal__highlights div:last-child { border-bottom: 0; } }

/* newsletter + footer bits */
.kb-newsletter { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 80px); align-items: end; padding: clamp(48px, 9vh, 96px) var(--kb-pad); background: var(--kb-ink); color: #fff; }
.kb-newsletter h2 { font-size: clamp(1.9rem, 4.2vw, 3.4rem); margin: 0 0 12px; }
.kb-newsletter p { margin: 0; color: rgba(255, 255, 255, 0.7); line-height: 1.6; }
.kb-newsletter__form { display: flex; flex-wrap: wrap; gap: 10px; }
.kb-newsletter__form input[type="email"] { flex: 1 1 240px; height: 52px; padding: 0 16px; border: 1px solid rgba(255, 255, 255, 0.35); background: transparent; color: #fff; font: inherit; font-size: 15px; }
.kb-newsletter__form input[type="email"]::placeholder { color: rgba(255, 255, 255, 0.5); }
.kb-newsletter__form input[type="email"]:focus { outline: none; border-color: #fff; }
.kb-newsletter__form .btn { height: 52px; background: #fff; color: var(--kb-ink); border-color: #fff; }
.kb-newsletter__form .btn:hover { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }
.kb-newsletter__note { flex-basis: 100%; font-size: 12.5px !important; }
.kb-newsletter__note a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 749px) { .kb-newsletter { grid-template-columns: 1fr; align-items: start; } }
.kb-footer__contact { display: flex; flex-direction: column; gap: 4px; margin: 14px 0 0; font-size: 14px; }
.kb-footer__linkbtn { background: none; border: 0; padding: 0; font: inherit; font-size: 14px; color: inherit; cursor: pointer; text-align: left; }

/* product rails: hairlines per card, so a short rail ends cleanly instead
   of showing the line colour as a grey block */
.kb-rail { gap: 0; background: none; }
.kb-rail > * { box-shadow: inset -1px 0 0 var(--kb-line); }
.kb-footer__linkbtn:hover { text-decoration: underline; text-underline-offset: 3px; }

/* cookie consent */
.kb-consent {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 300; max-width: 720px; margin: 0 auto;
  display: flex; gap: 18px; align-items: center; padding: 18px 20px;
  background: #fff; color: var(--kb-ink); border: 1px solid var(--kb-ink); box-shadow: 0 20px 50px rgba(10, 10, 11, 0.18);
}
.kb-consent[hidden] { display: none; }
.kb-consent strong { display: block; font-size: 14px; margin-bottom: 4px; }
.kb-consent p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--kb-dim); }
.kb-consent a { color: var(--kb-ink); text-decoration: underline; text-underline-offset: 3px; }
.kb-consent__actions { display: flex; gap: 8px; flex-shrink: 0; }
.kb-consent__actions .btn { white-space: nowrap; }
@media (max-width: 640px) {
  .kb-consent { left: 10px; right: 10px; bottom: 10px; flex-direction: column; align-items: stretch; gap: 12px; padding: 14px; }
  .kb-consent p { font-size: 12.5px; }
  .kb-consent__actions { flex-direction: column-reverse; }
  .kb-consent__actions .btn { width: 100%; white-space: normal; padding-top: 12px; padding-bottom: 12px; }
}

/* PDP extras */
.size-chart-table { width: 100%; border-collapse: collapse; margin: 10px 0 14px; font-size: 13.5px; }
.size-chart-table th, .size-chart-table td { padding: 7px 10px; border-bottom: 1px solid var(--kb-line); text-align: left; }
.size-chart-table th { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--kb-dim); }
.size-chart-table tr:nth-child(even) td { background: var(--kb-plate); }
.pdp-notify { margin-top: 12px; padding: 14px; border: 1px solid var(--kb-ink); background: #fff; }
.pdp-notify[hidden] { display: none; }
.pdp-notify__text { margin: 0 0 10px; font-size: 13.5px; line-height: 1.5; }
.pdp-notify__row { display: flex; gap: 8px; }
.pdp-notify__row input { flex: 1; min-width: 0; height: 44px; padding: 0 12px; border: 1px solid var(--kb-line); font: inherit; font-size: 14px; }
.pdp-notify__row input:focus { outline: none; border-color: var(--kb-ink); }
.pdp-notify__msg { margin: 8px 0 0; font-size: 13px; color: var(--color-success); min-height: 1em; }
.kb-related, .kb-recent { border-top: 1px solid var(--kb-line); }
.kb-mini-card { display: flex; flex-direction: column; gap: 3px; text-decoration: none; }
.kb-mini-card__media { display: block; aspect-ratio: 1; background: var(--kb-plate); margin-bottom: 8px; }
.kb-mini-card__media img { width: 100%; height: 100%; object-fit: contain; }
.kb-mini-card small { font-size: 10.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--kb-dim); }
.kb-mini-card strong { font-size: 14px; font-weight: 500; line-height: 1.35; }
.kb-mini-card span:last-child { font-size: 14px; font-weight: 600; }
.kb-mini-card:hover strong { text-decoration: underline; text-underline-offset: 3px; }
