/* ==========================================================================
   Showreel — a dark stage where the real product screens drift past on a tilted
   plane, with the sentence that matters held in the middle. Built with CSS
   transforms instead of a video file: it stays sharp at any width, the words are
   real text in three languages, and it costs a few small images rather than
   several megabytes. Prefix: hxr-.
   ========================================================================== */

.hxr{position:relative;overflow:hidden;background:#05041a;color:#fff;isolation:isolate}
.hxr-in{position:relative;display:grid;place-items:center;min-height:min(86vh,820px);padding:96px 0}

/* ---------- the plane ---------- */
.hxr-plane{
  position:absolute;
  top:50%;left:50%;
  width:188%;height:150%;
  transform:translate(-50%,-50%) perspective(1500px) rotateX(19deg) rotateZ(-11deg) scale(1.04);
  transform-origin:50% 50%;
  display:grid;align-content:center;gap:26px;
  pointer-events:none;
  z-index:0;
}
.hxr-row{display:flex;width:max-content;will-change:transform}
.hxr-row > div{display:flex;gap:26px;padding-right:26px;flex:none}
.hxr-row img{
  width:246px;height:auto;flex:none;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.1);
  box-shadow:0 26px 60px -24px rgba(0,0,0,.8);
  background:#0d0c26;
}
.hxr-row.is-a{animation:hxr-left 76s linear infinite}
.hxr-row.is-b{animation:hxr-right 92s linear infinite}
.hxr-row.is-c{animation:hxr-left 64s linear infinite}
@keyframes hxr-left{from{transform:translate3d(0,0,0)}to{transform:translate3d(-50%,0,0)}}
@keyframes hxr-right{from{transform:translate3d(-50%,0,0)}to{transform:translate3d(0,0,0)}}
.hxr.is-paused .hxr-row{animation-play-state:paused}

/* ---------- the veil that makes the words legible ---------- */
.hxr-veil{
  position:absolute;inset:0;z-index:1;pointer-events:none;
  background:
    radial-gradient(52% 46% at 50% 50%,rgba(5,4,26,.92) 0%,rgba(5,4,26,.74) 46%,rgba(5,4,26,.08) 78%),
    linear-gradient(to bottom,rgba(5,4,26,.9) 0%,rgba(5,4,26,.18) 24%,rgba(5,4,26,.18) 76%,rgba(5,4,26,.9) 100%),
    linear-gradient(to right,rgba(5,4,26,.8) 0%,rgba(5,4,26,0) 24%,rgba(5,4,26,0) 76%,rgba(5,4,26,.8) 100%);
}

/* ---------- the words ---------- */
.hxr-center{position:relative;z-index:2;text-align:center;width:min(1000px,calc(100% - 48px))}
.hxr-kicker{margin:0 0 20px;font:800 11.5px/1 'Instrument Sans',system-ui,sans-serif;letter-spacing:.16em;text-transform:uppercase;color:#6fd8ff}
.hxr-lines{position:relative;display:grid}
.hxr-lines h2{
  grid-area:1/1;margin:0;
  font:700 clamp(1.9rem,3.9vw,3.3rem)/1.1 'Familjen Grotesk','Instrument Sans',system-ui,sans-serif;
  letter-spacing:-.034em;color:#fff;
  opacity:0;transform:translateY(.26em);
  /* the line leaving goes first and the next one follows, so two sentences are never
     half-visible on top of each other */
  transition:opacity .22s ease,transform .22s ease;
}
.hxr-lines h2.is-on{opacity:1;transform:none;transition:opacity .42s cubic-bezier(.2,.8,.2,1) .2s,transform .42s cubic-bezier(.2,.8,.2,1) .2s}
.hxr-sub{margin:26px 0 0;font:400 1.0625rem/1.6 'Instrument Sans',system-ui,sans-serif;color:rgba(255,255,255,.66)}
.hxr-cta{display:inline-flex;align-items:center;gap:9px;margin-top:28px;padding:13px 22px;border:1px solid rgba(255,255,255,.26);border-radius:14px;color:#fff;font:700 15px/1 'Instrument Sans',system-ui,sans-serif;transition:border-color .14s ease,background .14s ease}
.hxr-cta:hover{border-color:#fff;background:rgba(255,255,255,.08);color:#fff}
.hxr-cta svg{width:17px;height:17px}

/* ---------- the control, bottom left, like a player ---------- */
.hxr-toggle{
  position:absolute;left:28px;bottom:26px;z-index:3;
  display:inline-flex;align-items:center;gap:9px;
  padding:10px 16px 10px 13px;border-radius:999px;
  border:1px solid rgba(255,255,255,.2);background:rgba(10,9,38,.6);
  color:rgba(255,255,255,.85);font:700 12px/1 'Instrument Sans',system-ui,sans-serif;
  cursor:pointer;backdrop-filter:blur(6px);
}
.hxr-toggle:hover{border-color:rgba(255,255,255,.5);color:#fff}
.hxr-toggle svg{width:13px;height:13px}

@media (max-width:1000px){
  .hxr-in{min-height:min(76vh,640px);padding:72px 0}
  .hxr-plane{width:260%;gap:18px}
  .hxr-row img{width:198px}
  .hxr-row > div{gap:18px;padding-right:18px}
}
@media (max-width:640px){
  .hxr-in{min-height:0;padding:56px 0 96px}
  .hxr-plane{width:380%;gap:14px;transform:translate(-50%,-50%) perspective(1100px) rotateX(16deg) rotateZ(-9deg) scale(1.02)}
  .hxr-row img{width:150px}
  .hxr-row > div{gap:14px;padding-right:14px}
  .hxr-center{width:calc(100% - 40px)}
  .hxr-sub{font-size:1rem}
  .hxr-toggle{left:20px;bottom:18px}
}
@media (prefers-reduced-motion:reduce){
  .hxr-row{animation:none !important}
  .hxr-lines h2{transition:none}
}
