/* ============================================================
   Hero visuals shared by the homepage and the service pages:
   lanes of site screenshots that drift (the "wall"), a pair of
   overlapping site frames, and a miniature of the assistant.
   Decorative: every wall is aria-hidden and stops for reduced motion.
   ============================================================ */

/* ---------- lanes and tiles ---------- */
.kw-lane { min-width: 0; }
.kw-track { display: flex; flex-direction: column; animation: kw-y 90s linear infinite; will-change: transform; }
.kw-b .kw-track { animation-duration: 110s; animation-direction: reverse; }
.kw-c .kw-track { animation-duration: 78s; }
.kw-tile {
  display: block; flex: none; margin-bottom: 20px; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--border-2); background: var(--surface);
  box-shadow: 0 30px 60px -34px #000;
}
.kw-tile i { display: block; position: relative; height: 20px; border-bottom: 1px solid var(--border); }
.kw-tile i::before {
  content: ""; position: absolute; left: 10px; top: 7px; width: 6px; height: 6px; border-radius: 50%;
  background: var(--border-2); box-shadow: 10px 0 0 var(--border-2), 20px 0 0 var(--border-2);
}
.kw-tile img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: center top; }
@keyframes kw-y { to { transform: translateY(-50%); } }
@keyframes kw-x { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .kw-track { animation: none; } }

/* ---------- service pages: a visual beside the headline ---------- */
.service-hero.has-visual { position: relative; }
.service-hero.has-visual > :not(.sh-visual) { position: relative; z-index: 2; }
.sh-visual { pointer-events: none; }
@media (min-width: 1001px) {
  .service-hero.has-visual h1 { font-size: clamp(3rem, 5.3vw, 5.6rem); max-width: 60%; }
  .service-hero.has-visual .service-intro { max-width: min(600px, 50%); font-size: clamp(1.02rem, 1.3vw, 1.15rem); }
  .sh-visual { position: absolute; z-index: 1; top: 0; bottom: 0; right: 0; width: 45%; }
  .sh-wall {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 34%, #000 94%, transparent), linear-gradient(180deg, transparent, #000 18%, #000 80%, transparent);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(90deg, transparent, #000 34%, #000 94%, transparent), linear-gradient(180deg, transparent, #000 18%, #000 80%, transparent);
    mask-composite: intersect;
  }
  .sh-wall .kw-grid {
    position: absolute; inset: -30% -14% -30% 4%;
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; transform: rotate(-8deg);
  }
  /* two frames, one tucked behind the other */
  .sh-pair { display: grid; align-content: center; padding: 40px clamp(22px, 4.5vw, 72px) 40px 6%; }
  .sh-pair .kw-tile { margin: 0; grid-area: 1 / 1; width: 82%; }
  .sh-pair .kw-tile:first-child { justify-self: end; transform: translateY(-22%) rotate(3deg); }
  .sh-pair .kw-tile:last-child { justify-self: start; transform: translateY(24%) rotate(-3deg); box-shadow: 0 40px 80px -30px #000; }
  .sh-chat { display: grid; align-content: center; justify-items: center; padding: 40px clamp(22px, 4.5vw, 72px) 40px 8%; }
  .sh-chat .hero-chat { width: min(400px, 100%); transform: rotate(-2deg); }
}
@media (max-width: 1000px) {
  /* in the flow, straight after the headline */
  .sh-visual { margin: 4px calc(-1 * clamp(22px, 4.5vw, 72px)) 30px; overflow: hidden; }
  .sh-wall { padding-block: 16px; }
  .sh-wall .kw-grid { transform: rotate(-3deg); margin-inline: -24px; }
  .sh-wall .kw-lane + .kw-lane { display: none; }
  .sh-wall .kw-track { flex-direction: row; width: max-content; animation-name: kw-x; animation-duration: 70s; }
  .sh-wall .kw-tile { width: min(240px, 58vw); margin: 0 12px 0 0; }
  .sh-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 8px clamp(22px, 4.5vw, 72px) 14px; }
  .sh-pair .kw-tile { margin: 0; }
  .sh-pair .kw-tile:first-child { transform: rotate(-2deg); }
  .sh-pair .kw-tile:last-child { transform: translateY(10px) rotate(2deg); }
  .sh-chat { padding: 4px clamp(22px, 4.5vw, 72px) 10px; }
  .sh-chat .hero-chat { max-width: 360px; }
  .sh-chat .hc-card { display: none; }
}

/* ---------- a miniature of the assistant: lit frame, avatar, bubbles and card ---------- */
.hero-chat {
  position: relative;
  display: grid; gap: 0; border-radius: 20px; overflow: hidden; border: 1px solid transparent;
  background:
    linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--bg) 55%, var(--surface))) padding-box,
    linear-gradient(160deg, color-mix(in srgb, var(--accent) 60%, transparent), var(--border-2) 40%, color-mix(in srgb, var(--accent) 25%, transparent)) border-box;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.75), 0 24px 60px -36px color-mix(in srgb, var(--accent) 45%, transparent);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.hero-chat.is-link:hover { transform: translateY(-5px); box-shadow: 0 50px 90px -30px rgba(0,0,0,.8), 0 30px 70px -36px color-mix(in srgb, var(--accent) 60%, transparent); }
.hc-head {
  display: flex; align-items: center; gap: 10px; padding: 12px 12px 11px;
  border-bottom: 1px solid color-mix(in srgb, var(--text) 9%, transparent);
  background: radial-gradient(120% 160% at 0% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 60%);
}
.hero-chat .ad-avatar { display: grid; place-items: center; flex: 0 0 auto; background: linear-gradient(145deg, #f08a4b, #b6431f 55%, #7c2711); color: #fff6ee; font-weight: 700; letter-spacing: -.02em; box-shadow: inset 0 1px 0 rgba(255,255,255,.35); }
.hero-chat .hc-av { position: relative; width: 34px; height: 34px; border-radius: 11px; font-size: .64rem; }
.hero-chat .hc-av::after { content: ""; position: absolute; right: -3px; bottom: -3px; width: 10px; height: 10px; border-radius: 50%; background: var(--good); border: 2px solid var(--surface); }
.hc-id { display: grid; min-width: 0; flex: 1 1 auto; }
.hc-id strong { font-size: .8rem; font-weight: 650; letter-spacing: -.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hc-id small { font-size: .66rem; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hc-pill { flex: 0 0 auto; padding: 3px 7px; border-radius: 99px; font: 600 .5rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent-text, var(--accent)); background: var(--accent-soft); border: 1px solid var(--accent-border, var(--border-2)); }
.hc-body { display: grid; gap: 9px; padding: 12px 12px 4px; background: radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--text) 6%, transparent) 1px, transparent 0) 0 0 / 16px 16px; }
.hc-q {
  justify-self: end; max-width: 86%; padding: 8px 11px; border-radius: 14px 14px 5px 14px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 88%, #fff), var(--accent)); color: var(--accent-ink);
  font-size: .74rem; font-weight: 600; line-height: 1.35; box-shadow: 0 8px 18px -12px color-mix(in srgb, var(--accent) 80%, transparent);
}
.hc-row { display: flex; align-items: flex-end; gap: 7px; }
.hero-chat .hc-mini { width: 22px; height: 22px; border-radius: 7px; font-size: .42rem; }
.hc-a {
  display: grid; gap: 8px; flex: 1 1 auto; padding: 9px 10px; border-radius: 14px 14px 14px 5px; font-size: .72rem; line-height: 1.45; color: var(--text);
  background: color-mix(in srgb, var(--surface) 86%, transparent); border: 1px solid color-mix(in srgb, var(--text) 9%, transparent);
}
.hc-card { display: grid; gap: 5px; padding: 8px; border-radius: 10px; background: color-mix(in srgb, var(--bg) 55%, var(--surface)); border: 1px solid color-mix(in srgb, var(--text) 9%, transparent); }
.hc-card-head { display: flex; align-items: center; gap: 7px; font-size: .7rem; font-weight: 650; }
.hc-ico { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; color: var(--accent-text, var(--accent)); background: var(--accent-soft); }
.hc-ico svg, .hc-send svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hc-step { display: flex; align-items: center; gap: 7px; font-size: .66rem; color: var(--text-mid); }
.hc-step b { display: grid; place-items: center; width: 16px; height: 16px; border-radius: 5px; font: 700 .55rem var(--mono); color: var(--accent-text, var(--accent)); background: var(--accent-soft); }
.hc-input { display: flex; align-items: center; justify-content: space-between; margin: 8px 12px 0; padding: 4px 4px 4px 12px; border-radius: 99px; border: 1px solid color-mix(in srgb, var(--text) 9%, transparent); background: color-mix(in srgb, var(--bg) 70%, transparent); font-size: .7rem; color: var(--text-dim); }
.hc-send { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); }
.hero-chat-cta { padding: 9px 14px 12px; font-size: .58rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-text, var(--accent)); text-align: center; }
