/* =====================================================================
   Homepage: a calm hero with the inquiry → paid flow, sections that
   settle from a 3D tilt as you scroll, and product scenes drawn in code.
   ===================================================================== */

/* ---------- 3D settle (js/home.js sets --s from 0 to 1 as a block scrolls in) ---------- */
.settle {
  --s: 0;
  transform-origin: 50% 100%;
  transform: perspective(1600px) rotateX(calc((1 - var(--s)) * 22deg)) translateY(calc((1 - var(--s)) * 70px)) scale(calc(0.92 + var(--s) * 0.08));
  opacity: calc(0.25 + var(--s) * 0.75);
  will-change: transform, opacity;
}

@media (prefers-reduced-motion: reduce) {
  .settle {
    transform: none;
    opacity: 1;
  }
}


/* =====================================================================
   Hero film: seven short scenes (team → lead → deal → quote → invoice →
   receipt → Finixyz with its features), cut like a product video.
   Liquid glass = translucent fill + backdrop blur/saturate + a bright
   rim and a soft specular highlight.
   ===================================================================== */
.cine-hero {
  position: relative;
  padding: 104px 0 60px;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}

.cine-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;

  i {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.45;
    animation: cineBlob 18s ease-in-out infinite alternate;
  }

  i:nth-child(1) { width: 520px; height: 520px; left: 4%; top: 32%; background: #4285f4; }
  i:nth-child(2) { width: 420px; height: 420px; right: 6%; top: 26%; background: #a142f4; animation-delay: -5s; }
  i:nth-child(3) { width: 360px; height: 360px; left: 38%; top: 62%; background: #34a853; animation-delay: -9s; opacity: 0.3; }
  i:nth-child(4) { width: 300px; height: 300px; right: 30%; top: 48%; background: #fbbc04; animation-delay: -13s; opacity: 0.28; }
}

@keyframes cineBlob {
  to { transform: translate(60px, -40px) scale(1.15); }
}

/* The headline waits for the film: it appears (words rising in) once the film reaches Finixyz. */
.cine-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 44px;

  .h-title { max-width: 920px; }
  .h-lede { max-width: 620px; margin: 18px auto 0; }
  .ctas { justify-content: center; }
}

.glass {
  background: color-mix(in srgb, var(--card) 55%, transparent);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid color-mix(in srgb, #fff 55%, transparent);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 -1px 0 rgba(255, 255, 255, 0.12),
    0 20px 50px -24px rgba(0, 0, 0, 0.35);
}

[data-theme='dark'] .glass,
:root:not([data-theme='light']) .glass {
  --rim: rgba(255, 255, 255, 0.18);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .glass {
    border-color: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 20px 50px -24px rgba(0, 0, 0, 0.7);
  }
}

[data-theme='dark'] .glass {
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 20px 50px -24px rgba(0, 0, 0, 0.7);
}

/* ---------- The film frame ---------- */
.film {
  position: relative;
  max-width: 1080px;
  height: 600px;
  margin: 56px auto 0;
  border-radius: 40px;
  overflow: hidden;
  background: color-mix(in srgb, var(--card) 40%, transparent);
  -webkit-backdrop-filter: blur(30px) saturate(160%);
  backdrop-filter: blur(30px) saturate(160%);
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 50px 100px -50px rgba(0, 0, 0, 0.45);
  text-align: left;
  animation: filmIn 1100ms 150ms cubic-bezier(0.2, 0, 0, 1) both;
}


.film-skip {
  position: absolute;
  right: 22px;
  bottom: 22px;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px 8px 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, #fff 45%, var(--line));
  background: color-mix(in srgb, var(--card) 60%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  backdrop-filter: blur(14px) saturate(180%);
  color: var(--ink);
  font: 500 13px var(--font);
  cursor: pointer;

  .ms { font-size: 18px; }
}

.film.done .film-skip { display: none; }

@keyframes filmIn {
  from { opacity: 0; transform: perspective(1600px) rotateX(18deg) translateY(60px) scale(0.94); }
}

.film-bars {
  position: absolute;
  top: 18px;
  left: 24px;
  right: 24px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  z-index: 5;

  i {
    height: 3px;
    border-radius: 2px;
    background: color-mix(in srgb, var(--ink) 14%, transparent);
    overflow: hidden;
    position: relative;
  }

  i::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--primary);
    transform-origin: left;
    transform: scaleX(var(--p, 0));
  }
}

.film-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 26px;
  margin: 0;
  text-align: center;
  z-index: 5;

  span {
    display: inline-block;
    padding: 9px 18px;
    border-radius: 999px;
    font: 500 15px var(--font);
    color: var(--ink);
    background: color-mix(in srgb, var(--card) 60%, transparent);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid color-mix(in srgb, #fff 45%, transparent);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 10px 26px -14px rgba(0, 0, 0, 0.35);
  }

  span.swap { animation: capIn 520ms cubic-bezier(0.34, 1.4, 0.64, 1); }
}

@keyframes capIn {
  from { opacity: 0; transform: translateY(10px) scale(0.96); filter: blur(4px); }
}

.film-replay {
  position: absolute;
  right: 22px;
  bottom: 22px;
  z-index: 6;
  display: none;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--card) 70%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: var(--ink);
  font: 500 13px var(--font);
  cursor: pointer;

  .ms { font-size: 18px; }
}

.film.done .film-replay { display: inline-flex; }
.film.done .film-cap { display: none; }

/* ---------- Scenes: 3D cuts ---------- */
.film .stage {
  position: absolute;
  inset: 0;
  /* undo the site's product .stage (margin, width, top origin) */
  margin: 0;
  width: auto;
  transform-origin: center;
  perspective: 1400px;
  transform-style: preserve-3d;
}

.scene {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateZ(-260px) rotateX(10deg);
  filter: blur(8px);
  transition: opacity 600ms cubic-bezier(0.2, 0, 0, 1), transform 900ms cubic-bezier(0.2, 0, 0, 1), filter 600ms, visibility 0s 900ms;
}

.scene.on {
  opacity: 1;
  visibility: visible;
  transform: none;
  filter: none;
  transition: opacity 700ms cubic-bezier(0.2, 0, 0, 1) 150ms, transform 1000ms cubic-bezier(0.2, 0, 0, 1) 100ms, filter 700ms 150ms, visibility 0s;
}

.scene.out {
  opacity: 0;
  transform: translateZ(220px) rotateX(-6deg);
  filter: blur(10px);
}

/* Elements in a scene animate only while it's on */
.scene:not(.on) * { animation-play-state: paused !important; }
.scene:not(.on) .anim-reset { animation: none !important; }

.glass-tag {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 10px 12px;
  border-radius: 999px;
  font: 500 14px var(--font);
  color: var(--ink);
  background: color-mix(in srgb, var(--card) 60%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid color-mix(in srgb, #fff 50%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 16px 34px -18px rgba(0, 0, 0, 0.4);
  opacity: 0;
  animation: tagIn 700ms cubic-bezier(0.34, 1.4, 0.64, 1) both;

  .ms { font-size: 19px; color: var(--primary); }
}

@keyframes tagIn {
  from { opacity: 0; transform: translateY(16px) scale(0.9); }
  to { opacity: 1; transform: none; }
}

/* 1 · team: the CRM's staff badges (same design as the profile page), smaller */
.s-team {
  .team-lines {
    position: absolute;
    width: 600px;
    height: 300px;
    left: 50%;
    top: 50%;
    margin: -150px 0 0 -300px;

    path {
      fill: none;
      stroke: color-mix(in srgb, var(--primary) 45%, transparent);
      stroke-width: 2.5;
      stroke-linecap: round;
      stroke-dasharray: 700;
      stroke-dashoffset: 700;
      animation: drawLine 1100ms 1000ms cubic-bezier(0.2, 0, 0, 1) forwards;
    }
  }

  .badge {
    --x: 0px;
    position: absolute;
    left: 50%;
    top: 50%;
    width: 116px;
    margin-left: -58px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: translate(var(--x), 10px);
    animation: badgeFly 1000ms calc(200ms + var(--i) * 160ms) cubic-bezier(0.34, 1.3, 0.64, 1) both;
  }

  .b-lead {
    transform: translate(0, -262px);
    animation-name: badgeFlyTop;
  }

  .strap {
    width: 12px;
    height: 22px;
    border-radius: 0 0 3px 3px;
    background: repeating-linear-gradient(90deg, var(--c) 0 4px, color-mix(in srgb, var(--c) 70%, #fff) 4px 5px);
  }

  .clip {
    width: 22px;
    height: 12px;
    margin-top: -4px;
    border-radius: 4px 4px 7px 7px;
    background: linear-gradient(180deg, #dfe3e8, #9aa1ab);
    position: relative;
    z-index: 2;
  }

  .sb {
    position: relative;
    width: 100%;
    aspect-ratio: 0.63;
    margin-top: -6px;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    color: #1f1f1f;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 20px 34px -18px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.08);
  }

  .slot {
    position: absolute;
    top: 6px;
    left: 50%;
    width: 22px;
    height: 5px;
    margin-left: -11px;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.18);
    z-index: 2;
  }

  .band {
    width: 100%;
    padding: 16px 6px 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: #fff;
    background: radial-gradient(120% 100% at 100% 0%, rgba(255, 255, 255, 0.22), transparent 60%), linear-gradient(150deg, var(--c), color-mix(in srgb, var(--c) 60%, #7c4dff));

    b {
      font: 600 7.5px var(--font);
      letter-spacing: 0.02em;
    }
  }

  .mk {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    background: #fff;
    display: grid;
    place-items: center;

    img {
      width: 11px;
      height: 11px;
      object-fit: contain;
    }
  }

  .ring {
    margin-top: -24px;
    padding: 2px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
  }

  .ph {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--c);
    color: #fff;
    font: 600 15px var(--font);
  }

  .nm {
    margin-top: 5px;
    font: 600 10px var(--font);
  }

  .rl {
    margin-top: 3px;
    padding: 1px 6px;
    border-radius: 6px;
    font: 600 7px var(--font);
    color: var(--c);
    background: color-mix(in srgb, var(--c) 12%, #fff);
  }

  .tm {
    margin-top: 2px;
    font-size: 6.5px;
    color: #5f6368;
  }

  .fx {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    width: 100%;
    padding: 6px 8px 0;
    text-align: left;

    small {
      display: block;
      font-size: 4.8px;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: #80868b;
    }

    b {
      display: block;
      font: 600 6.5px ui-monospace, Menlo, monospace;
      white-space: nowrap;
    }
  }

  .ft {
    margin-top: auto;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 4px 8px;
    font: 700 5.5px ui-monospace, Menlo, monospace;
    letter-spacing: 0.12em;
    color: #fff;
    background: var(--c);
  }

  .t-team { bottom: 70px; animation-delay: 1800ms; }
}

@keyframes badgeFly {
  from { opacity: 0; transform: translate(calc(var(--x) * 2.2), 260px) rotate(calc(var(--x) / 12)) rotateY(70deg) scale(0.6); }
  to { opacity: 1; transform: translate(var(--x), 10px); }
}

@keyframes badgeFlyTop {
  from { opacity: 0; transform: translate(0, -460px) rotateX(70deg) scale(0.6); }
  to { opacity: 1; transform: translate(0, -262px); }
}

@keyframes drawLine {
  to { stroke-dashoffset: 0; }
}

/* 2 · lead: every channel a lead can come from; WhatsApp lights up and becomes the lead */
.s-lead .channels {
  display: flex;
  gap: 14px;
  margin-bottom: 4px;

  .ch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    opacity: 0;
    animation: chIn 600ms calc(150ms + var(--k) * 90ms) cubic-bezier(0.34, 1.5, 0.64, 1) forwards;

    > .ms,
    > svg {
      width: 48px;
      height: 48px;
      padding: 11px;
      border-radius: 16px;
      box-sizing: border-box;
      font-size: 26px;
      display: grid;
      place-items: center;
      color: #fff;
      background: var(--c);
      box-shadow: 0 10px 22px -12px var(--c);
    }

    > svg {
      padding: 9px;
    }

    small {
      font: 500 11.5px var(--font);
      color: var(--muted);
    }
  }

  .ch.ig > .ms {
    background: linear-gradient(45deg, #f9ce34, #ee2a7b 50%, #6228d7);
  }

  /* the one this lead came in on */
  .ch.on > svg {
    animation: chPick 900ms 1000ms cubic-bezier(0.34, 1.5, 0.64, 1) both;
  }

  .ch:not(.on) {
    animation: chIn 600ms calc(150ms + var(--k) * 90ms) cubic-bezier(0.34, 1.5, 0.64, 1) forwards, chDim 500ms 1100ms forwards;
  }
}

@keyframes chIn {
  from { opacity: 0; transform: translateY(16px) scale(0.6); }
  to { opacity: 1; transform: none; }
}

@keyframes chDim {
  from { opacity: 1; }
  to { opacity: 0.4; filter: grayscale(0.6); }
}

@keyframes chPick {
  40% { transform: scale(1.18); }
  to { transform: scale(1.08); box-shadow: 0 0 0 5px color-mix(in srgb, #25d366 25%, transparent), 0 14px 26px -12px #25d366; }
}

.s-lead .wa-ic svg {
  width: 30px;
  height: 30px;
  padding: 5px;
  border-radius: 10px;
  background: #25d366;
  box-sizing: border-box;
}

/* 2 · lead */
.s-lead {
  flex-direction: column;
  gap: 22px;

  .chat {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 20px;
    animation: popUp 700ms 1500ms cubic-bezier(0.34, 1.4, 0.64, 1) both;

    .wa { color: #25d366; font-size: 26px; }
    b { display: block; font: 600 14.5px var(--font); color: var(--ink); }
    small { font-size: 13px; color: var(--muted); }
  }

  .lead-card {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 360px;
    padding: 16px 18px;
    border-radius: 22px;
    background: var(--card);
    box-shadow: 0 24px 50px -24px rgba(0, 0, 0, 0.45);
    animation: popUp 800ms 2100ms cubic-bezier(0.34, 1.4, 0.64, 1) both;

    > span:nth-child(2) { flex: 1; }
    b { display: block; font: 600 16px var(--font); color: var(--ink); }
    small { font-size: 13px; color: var(--muted); }
  }

  .ring {
    position: relative;
    display: grid;
    place-items: center;

    svg { width: 54px; height: 54px; transform: rotate(-90deg); }
    circle { fill: none; stroke: var(--line); stroke-width: 5; }
    .v { stroke: #e8590c; stroke-linecap: round; stroke-dasharray: 113; stroke-dashoffset: 113; animation: ringTo 1300ms 2400ms cubic-bezier(0.2, 0, 0, 1) forwards; }
    b { position: absolute; font-size: 15px; }
  }

  .who { width: 34px; height: 34px; border-radius: 50%; background: #9334e6; color: #fff; display: grid; place-items: center; font: 600 12px var(--font); }
  .t-lead { position: relative; animation-delay: 3000ms; }
}

@keyframes popUp {
  from { opacity: 0; transform: translateY(30px) scale(0.85) rotateX(30deg); }
}

@keyframes ringTo {
  to { stroke-dashoffset: 20; }
}

/* 3 · deal */
.s-deal {
  .board {
    display: grid;
    grid-template-columns: repeat(4, 150px);
    gap: 12px;
    animation: popUp 700ms 100ms cubic-bezier(0.2, 0, 0, 1) both;
  }

  .col {
    height: 250px;
    padding: 12px 10px;
    border-radius: 20px;
    background: color-mix(in srgb, var(--card) 55%, transparent);
    border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
    display: flex;
    flex-direction: column;
    gap: 8px;

    small { font: 600 12px var(--font); color: var(--muted); text-align: center; margin-bottom: 4px; }
    i { height: 46px; border-radius: 12px; background: color-mix(in srgb, var(--ink) 7%, transparent); }
    i.s { height: 34px; opacity: 0.7; }
    &.won { background: color-mix(in srgb, #34a853 12%, transparent); }
  }

  .deal-chip {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 144px;
    padding: 10px 12px;
    border-radius: 14px;
    background: var(--card);
    border-left: 4px solid #9334e6;
    box-shadow: 0 20px 34px -16px rgba(0, 0, 0, 0.5);
    animation: dealRide 3000ms 700ms cubic-bezier(0.65, 0, 0.35, 1) both;

    b { display: block; font: 600 12.5px var(--font); color: var(--ink); }
    small { font-size: 12px; color: var(--muted); }
  }

  .won-ic {
    position: absolute;
    right: -12px;
    top: -12px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #fbbc04;
    color: #fff;
    display: grid;
    place-items: center;
    transform: scale(0);
    animation: wonPop 600ms 3500ms cubic-bezier(0.34, 1.6, 0.64, 1) forwards;

    .ms { font-size: 17px; }
  }
}

@keyframes dealRide {
  0% { transform: translate(-306px, -66px); opacity: 0; }
  10% { opacity: 1; transform: translate(-306px, -66px); }
  35% { transform: translate(-144px, -66px) rotate(-3deg); }
  45% { transform: translate(-144px, -66px); }
  68% { transform: translate(18px, -66px) rotate(3deg); }
  76% { transform: translate(18px, -66px); }
  100% { transform: translate(180px, -66px); border-left-color: #34a853; }
}

@keyframes wonPop {
  to { transform: scale(1); }
}

/* 4 · quote */
.s-quote {
  .doc {
    width: 300px;
    padding: 22px;
    border-radius: 22px;
    background: var(--card);
    box-shadow: 0 30px 60px -28px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 12px;
    transform: translateX(-120px);
    animation: docIn 800ms 100ms cubic-bezier(0.34, 1.3, 0.64, 1) both;

    > i { display: block; height: 8px; border-radius: 4px; background: var(--line); width: 0; animation: lineW 700ms cubic-bezier(0.2, 0, 0, 1) forwards; }
    > i:nth-of-type(1) { animation-delay: 700ms; }
    > i:nth-of-type(2) { animation-delay: 900ms; }
    > i:nth-of-type(3) { animation-delay: 1100ms; }
  }

  .doc-h {
    display: flex;
    align-items: center;
    gap: 10px;

    .lg { width: 34px; height: 34px; border-radius: 10px; background: var(--primary); }
    b { display: block; font: 600 15px var(--font); color: var(--ink); }
    small { font-size: 12px; color: var(--muted); }
  }

  .doc-t {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-top: 6px;
    padding-top: 12px;
    border-top: 1px dashed var(--line);

    small { color: var(--muted); }
    b { font: 600 17px var(--font); color: var(--ink); }
  }

  .plane {
    position: absolute;
    left: 50%;
    top: 50%;
    font-size: 34px;
    color: var(--primary);
    opacity: 0;
    animation: planeFly 1400ms 1700ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
  }

  .seen {
    position: absolute;
    left: 50%;
    top: 50%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-radius: 20px;
    transform: translate(70px, -40px);
    opacity: 0;
    animation: seenIn 700ms 2800ms cubic-bezier(0.34, 1.4, 0.64, 1) forwards;

    > .ms { color: #1a73e8; }
    b { display: block; font: 600 14.5px var(--font); color: var(--ink); }
    small { font-size: 12.5px; color: var(--muted); }
  }
}

@keyframes docIn {
  from { opacity: 0; transform: translateX(-120px) translateY(40px) rotateY(-30deg); }
}

@keyframes lineW {
  to { width: var(--w); }
}

@keyframes planeFly {
  0% { opacity: 0; transform: translate(40px, 0) rotate(-20deg) scale(0.6); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(260px, -120px) rotate(-30deg) scale(1.1); }
}

@keyframes seenIn {
  to { opacity: 1; transform: translate(60px, -40px); }
}

/* 5 · invoice */
.s-invoice {
  flex-direction: column;
  gap: 18px;

  .inv {
    position: relative;
    width: 330px;
    transform: none;
    animation: popUp 800ms 100ms cubic-bezier(0.34, 1.3, 0.64, 1) both;
  }

  .paid {
    position: absolute;
    right: 18px;
    top: 66px;
    padding: 4px 14px;
    border: 4px solid #188038;
    border-radius: 10px;
    color: #188038;
    font: 800 22px var(--font);
    letter-spacing: 0.14em;
    transform: rotate(-12deg) scale(2.4);
    opacity: 0;
    animation: stamp 500ms 2000ms cubic-bezier(0.34, 1.6, 0.64, 1) forwards;
  }

  .mpesa {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    border-radius: 20px;
    animation: popUp 700ms 1300ms cubic-bezier(0.34, 1.4, 0.64, 1) both;

    .ok { width: 32px; height: 32px; border-radius: 50%; background: #188038; color: #fff; display: grid; place-items: center; font-size: 20px; }
    b { display: block; font: 600 14.5px var(--font); color: var(--ink); }
    small { font-size: 12.5px; color: var(--muted); }
  }
}

.s-invoice .doc,
.s-quote .doc {
  width: 300px;
  padding: 22px;
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 30px 60px -28px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.s-invoice .doc > i {
  display: block;
  height: 8px;
  border-radius: 4px;
  background: var(--line);
  width: var(--w);
}

.s-invoice .doc-h {
  display: flex;
  align-items: center;
  gap: 10px;

  .lg { width: 34px; height: 34px; border-radius: 10px; background: #188038; }
  b { display: block; font: 600 15px var(--font); color: var(--ink); }
  small { font-size: 12px; color: var(--muted); }
}

.s-invoice .doc-t {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 12px;
  border-top: 1px dashed var(--line);

  small { color: var(--muted); }
  b { font: 600 17px var(--font); color: #188038; }
}

@keyframes stamp {
  to { opacity: 1; transform: rotate(-12deg) scale(1); }
}

/* 6 · receipt */
.s-receipt {
  flex-direction: column;

  .printer {
    position: relative;
    z-index: 2;
    width: 280px;
    height: 54px;
    border-radius: 18px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--ink) 75%, var(--card)), color-mix(in srgb, var(--ink) 90%, var(--card)));
    box-shadow: 0 16px 30px -16px rgba(0, 0, 0, 0.5);

    .slot { position: absolute; left: 30px; right: 30px; bottom: 12px; height: 6px; border-radius: 3px; background: #000; opacity: 0.6; }
  }

  .rcpt {
    width: 210px;
    margin-top: -18px;
    padding: 30px 18px 18px;
    background: var(--card);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 92% 97%, 84% 100%, 76% 97%, 68% 100%, 60% 97%, 52% 100%, 44% 97%, 36% 100%, 28% 97%, 20% 100%, 12% 97%, 4% 100%, 0 97%);
    box-shadow: 0 30px 50px -30px rgba(0, 0, 0, 0.5);
    transform-origin: top;
    animation: print 2000ms 300ms steps(14, end) both;

    b { font: 800 14px var(--font); letter-spacing: 0.2em; color: var(--ink); }
    small { font-family: ui-monospace, Menlo, monospace; font-size: 11.5px; color: var(--muted); }
    .amt { font: 600 20px var(--font); color: var(--ink); margin: 6px 0; }
    i { width: 100%; height: 6px; border-radius: 3px; background: var(--line); }
    i.s { width: 70%; }
    .thx { margin-top: 6px; font-size: 11.5px; color: #188038; font-weight: 500; }
  }

  /* in the column under the receipt, so it never lands on it when the film is small */
  .t-rcpt { position: relative; margin-top: 22px; animation-delay: 2400ms; }
}

@keyframes print {
  from { clip-path: inset(0 0 100% 0); transform: translateY(-40px); }
  to { transform: none; }
}

/* 7 · Finixyz and its features */
.s-orbit {
  --zx: 0px;
  --zy: 0px;
  --zs: 1;

  .orbit-ring {
    position: absolute;
    width: 440px;
    height: 440px;
    left: 50%;
    top: 50%;
    margin: -220px 0 0 -220px;
    animation: spin 60s linear infinite;
    transition: opacity 400ms;

    circle { fill: none; stroke: color-mix(in srgb, var(--primary) 30%, transparent); stroke-width: 1.5; stroke-dasharray: 4 10; }
  }

  .core {
    position: absolute;
    left: 50%;
    top: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transform: translate(-50%, -50%);
    animation: coreIn 1100ms 100ms cubic-bezier(0.34, 1.4, 0.64, 1) both;
    transition: opacity 400ms, transform 700ms cubic-bezier(0.2, 0, 0, 1);

    b { font: 600 22px var(--font); color: var(--ink); letter-spacing: -0.3px; }
  }

  .core-glass {
    width: 128px;
    height: 128px;
    border-radius: 36px;
    display: grid;
    place-items: center;
    background: #fff;
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid color-mix(in srgb, #fff 60%, transparent);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 0 0 10px color-mix(in srgb, var(--primary) 8%, transparent), 0 30px 60px -24px color-mix(in srgb, var(--primary) 60%, transparent);
    animation: corePulse 3.2s ease-in-out 1.2s infinite;

    img { width: 70px; height: 70px; object-fit: contain; }
  }

  .feat {
    --r: 205px;
    position: absolute;
    left: 50%;
    top: 50%;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px 10px 12px;
    border-radius: 999px;
    font: 500 14px var(--font);
    color: var(--ink);
    cursor: pointer;
    background: color-mix(in srgb, var(--card) 62%, transparent);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    backdrop-filter: blur(18px) saturate(180%);
    border: 1px solid color-mix(in srgb, #fff 55%, transparent);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 14px 30px -16px rgba(0, 0, 0, 0.35);
    transform: translate(-50%, -50%) rotate(var(--a)) translateX(var(--r)) rotate(calc(-1 * var(--a)));
    animation: featIn 800ms cubic-bezier(0.34, 1.4, 0.64, 1) both;
    transition: opacity 400ms, transform 700ms cubic-bezier(0.2, 0, 0, 1), box-shadow 300ms;

    .ms { font-size: 20px; color: var(--primary); }

    &:hover,
    &:focus-visible,
    &.on {
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 0 0 3px color-mix(in srgb, var(--primary) 30%, transparent), 0 20px 40px -18px rgba(0, 0, 0, 0.45);
    }
  }

  .feat:nth-of-type(1) { animation-delay: 600ms; }
  .feat:nth-of-type(2) { animation-delay: 680ms; }
  .feat:nth-of-type(3) { animation-delay: 760ms; }
  .feat:nth-of-type(4) { animation-delay: 840ms; }
  .feat:nth-of-type(5) { animation-delay: 920ms; }
  .feat:nth-of-type(6) { animation-delay: 1000ms; }
  .feat:nth-of-type(7) { animation-delay: 1080ms; }
  .feat:nth-of-type(8) { animation-delay: 1160ms; }

  /* The camera: the whole ring sits in .orbit-inner, which scales up and slides so the hovered feature
     lands in the centre; everything else blurs back, and the feature's story settles in below it. */
  .orbit-inner {
    position: absolute;
    inset: 0;
    transform: scale(var(--zs)) translate(var(--zx), var(--zy));
    transition: transform 900ms cubic-bezier(0.2, 0, 0, 1);
  }

  .core,
  .orbit-ring,
  .feat {
    transition: opacity 500ms, filter 600ms, transform 700ms cubic-bezier(0.2, 0, 0, 1), box-shadow 300ms;
  }

  &.zoom {
    .orbit-ring { opacity: 0.15; }
    .core { opacity: 0.15; filter: blur(4px); }
    .feat:not(.on) { opacity: 0.25; filter: blur(3px); }
  }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes coreIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.3) rotate(-25deg); filter: blur(10px); }
}

@keyframes corePulse {
  50% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 0 0 22px color-mix(in srgb, var(--primary) 4%, transparent), 0 30px 60px -24px color-mix(in srgb, var(--primary) 60%, transparent); }
}

@keyframes featIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.4); filter: blur(6px); }
}

.feat-detail {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(460px, 86%);
  padding: 26px 28px;
  border-radius: 28px;
  text-align: center;
  transform: translate(-50%, 6%) scale(0.92);
  opacity: 0;
  pointer-events: none;
  transition: opacity 400ms cubic-bezier(0.2, 0, 0, 1), transform 600ms cubic-bezier(0.34, 1.3, 0.64, 1);

  .fd-ic { font-size: 34px; color: var(--primary); }
  b { display: block; margin: 6px 0 6px; font: 600 24px var(--font); color: var(--ink); letter-spacing: -0.3px; }
  p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted); }
}

.s-orbit.zoom .feat-detail {
  pointer-events: auto;
  opacity: 1;
  transform: translate(-50%, 12%) scale(1);
  transition-delay: 250ms;
}

/* ---------- Small screens: same film, scaled ---------- */
@media (max-width: 900px) {
  .film { height: 520px; border-radius: 30px; }
}

@media (max-width: 560px) {
  .cine-hero { padding-top: 110px; }
  .film { height: 430px; }
  .film-cap span { font-size: 13px; }
  .scene .glass-tag { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .film,
  .scene,
  .scene * {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- Film: full screen first, then docked beside the headline ---------- */
html.film-lock {
  overflow: hidden;
}

.film .stage {
  scale: var(--ss, 1);
}

/* While it plays, the film is the whole screen (above the menu). */
.film.full {
  position: fixed;
  inset: 0;
  z-index: 100;
  max-width: none;
  width: 100vw;
  height: 100dvh;
  margin: 0;
  border-radius: 0;
  border: none;
  background:
    radial-gradient(40% 50% at 18% 30%, color-mix(in srgb, #4285f4 22%, transparent), transparent 70%),
    radial-gradient(35% 45% at 82% 28%, color-mix(in srgb, #a142f4 18%, transparent), transparent 70%),
    radial-gradient(30% 40% at 55% 85%, color-mix(in srgb, #34a853 14%, transparent), transparent 70%),
    var(--bg);
  animation: fullIn 700ms cubic-bezier(0.2, 0, 0, 1) both;

  .film-bars {
    top: 28px;
    left: max(24px, calc(50% - 520px));
    right: max(24px, calc(50% - 520px));
  }

  .film-cap {
    bottom: 48px;
  }

  .film-skip {
    right: 32px;
    bottom: 40px;
  }
}

@media (min-width: 1200px) and (min-height: 760px) {
  .film.full {
    --ss: 1.18;
  }
}

@keyframes fullIn {
  from {
    opacity: 0;
  }
}

/* The headline only shows once the film has docked. */
.cine-hero:not(.ready) .cine-head {
  display: none;
}

.cine-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.cine-hero.ready {
  .cine-grid {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    align-items: center;
    gap: 48px;
    min-height: calc(100dvh - 180px);
  }

  .cine-head {
    margin: 0;
    align-items: flex-start;
    text-align: left;

    .h-title {
      font-size: clamp(38px, 4.4vw, 62px);
      line-height: 1.05;
    }

    .ctas {
      margin-top: 32px;
    }

    .h-lede {
      margin: 18px 0 0;
    }

    .ctas {
      justify-content: flex-start;
    }
  }

  .film {
    --ss: 0.88;
    width: 100%;
    max-width: none;
    height: 600px;
    margin: 0;
    animation: none;
  }
}

/* "Learn more" in a feature's panel */
.feat-detail .fd-more {
  margin-top: 16px;
  display: inline-flex;
}

@media (max-width: 1000px) {
  .cine-hero.ready {
    .cine-grid {
      grid-template-columns: minmax(0, 1fr);
      min-height: 0;
      gap: 28px;
    }

    .cine-head {
      align-items: center;
      text-align: center;

      .h-lede {
        margin: 18px auto 0;
      }

      .ctas {
        justify-content: center;
      }
    }

    .film {
      --ss: 0.8;
      height: 540px;
    }
  }
}

@media (max-width: 560px) {
  .film.full {
    --ss: 0.62;
  }

  .cine-hero.ready .film {
    --ss: 0.6;
    height: 440px;
  }
}


/* The hero is its own stacking layer: lift it above the page while the film is full screen. */
.cine-hero:has(.film.full) {
  z-index: 100;
}

/* "Scroll to see more" under the docked hero; fades out once the page moves */
.scroll-cue {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: 18px;
  translate: -50% 0;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font: 500 11px var(--font);
  color: var(--muted);
  text-decoration: none;
  transition: opacity 300ms, color 200ms;

  &:hover {
    color: var(--ink);
  }

  .mouse {
    width: 16px;
    height: 26px;
    border: 1.5px solid currentColor;
    border-radius: 9px;
    display: flex;
    justify-content: center;
    padding-top: 5px;

    i {
      width: 3px;
      height: 6px;
      border-radius: 2px;
      background: currentColor;
      animation: cueWheel 1.8s cubic-bezier(0.2, 0, 0, 1) infinite;
    }
  }
}

.cine-hero.ready .scroll-cue {
  display: flex;
  animation: cueIn 700ms 1200ms cubic-bezier(0.2, 0, 0, 1) both;
}

.cine-hero.ready .scroll-cue.gone {
  opacity: 0;
  pointer-events: none;
}

@keyframes cueWheel {
  0% { opacity: 0; transform: translateY(-2px); }
  30% { opacity: 1; }
  80%, 100% { opacity: 0; transform: translateY(8px); }
}

@keyframes cueIn {
  from { opacity: 0; transform: translateY(10px); }
}


/* Phones, full screen: Skip sits top-right beside the progress bars, clear of the scene and its caption */
@media (max-width: 560px) {
  .film.full {
    --ss: 0.54;

    .film-bars {
      top: calc(22px + env(safe-area-inset-top, 0px));
      left: 16px;
      right: 92px;
    }

    .film-skip {
      top: calc(10px + env(safe-area-inset-top, 0px));
      bottom: auto;
      right: 12px;
      padding: 6px 12px 6px 8px;
      font-size: 12.5px;
    }

    .film-cap {
      bottom: calc(28px + env(safe-area-inset-bottom, 0px));
    }
  }
}

@media (max-width: 380px) {
  .film.full {
    --ss: 0.48;
  }
}

/* While the film flies from full screen into its place, keep it above the sections below. */
.cine-hero.docking {
  z-index: 100;
}

/* No scroll hint on phones (the page already shows there's more) */
@media (max-width: 1000px) {
  .cine-hero.ready .scroll-cue {
    display: none;
  }
}


/* ================================================================ two ways to sell (retail / corporate) */
.tw-switch { display: flex; gap: 6px; width: max-content; max-width: 100%; margin: 0 auto 40px; padding: 6px; border-radius: 999px; background: var(--surface-2); }
.tw-switch button { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 22px; border: none; border-radius: 999px; background: none; color: var(--ink-2); font: 500 15px var(--font); cursor: pointer; transition: background 0.3s var(--ease), color 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.tw-switch button.on { background: var(--card); color: var(--primary); box-shadow: var(--shadow-1); }
.tw-panel { display: grid; grid-template-columns: 1.25fr 1fr; gap: 56px; align-items: center; }
.tw-panel[hidden] { display: none; }
.tw-panel.on { animation: tw-in 0.6s var(--ease); }
@keyframes tw-in { from { opacity: 0; transform: translateY(16px); } }
.tw-shot { position: relative; }
.tw-shot .laptop { margin: 0; }
.tw-c1 { left: -18px; bottom: 18%; }
.tw-c2 { right: -12px; top: 6%; }
.tw-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.tw-list li { display: flex; gap: 16px; align-items: flex-start; }
.tw-list li > .ms { flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--tint); color: var(--primary); font-size: 22px; }
.tw-list b { font: 500 17px/1.3 var(--font); }
.tw-list p { margin: 4px 0 0; color: var(--muted); font-size: 15px; line-height: 1.5; }

/* ================================================================ warehouse */
.wms-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; }
.wms-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 28px; }
.wms-card { padding: 18px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); }
.wms-card .ms { display: block; color: var(--primary); font-size: 26px; margin-bottom: 8px; }
.wms-card b { font: 500 16px var(--font); }
.wms-card p { margin: 6px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.wms-shot { position: relative; padding-bottom: 60px; }
.wms-mini { position: absolute; right: -16px; bottom: 0; width: 52%; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-3); border: 6px solid var(--card); }
.wms-mini img { display: block; width: 100%; }

/* ================================================================ advert band */
.ad-band { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; padding: 64px 56px; border-radius: 40px; overflow: hidden; color: #fff;
  background: radial-gradient(120% 140% at 0% 0%, #1a73e8 0%, #0b57d0 38%, #062e6f 100%); }
.ad-band::before { content: ''; position: absolute; inset: -40% -10% auto auto; width: 70%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(168, 199, 250, 0.45), transparent 60%); filter: blur(10px); animation: ad-glow 9s ease-in-out infinite alternate; }
@keyframes ad-glow { to { transform: translate(-18%, 22%) scale(1.15); } }
.ad-copy { position: relative; z-index: 1; }
.ad-kicker { display: inline-flex; align-items: center; gap: 6px; font: 500 14px var(--font); opacity: 0.85; }
.ad-kicker .ms { font-size: 18px; }
.ad-title { margin: 14px 0 16px; font: 500 clamp(30px, 4vw, 48px)/1.08 var(--font); letter-spacing: -0.02em; }
.ad-title b { font-weight: 600; background: linear-gradient(90deg, #fff, #a8c7fa); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ad-copy p { margin: 0; max-width: 520px; font-size: 17px; line-height: 1.6; opacity: 0.88; }
.ad-stats { display: flex; gap: 28px; margin: 28px 0; flex-wrap: wrap; }
.ad-stats span { display: flex; flex-direction: column; }
.ad-stats b { font: 600 30px var(--font); }
.ad-stats small { font-size: 13px; opacity: 0.75; }
.ad-band .ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.ad-stack { position: relative; z-index: 1; height: 380px; }
.ad-stack img { position: absolute; width: 78%; border-radius: 14px; box-shadow: 0 30px 60px -18px rgba(0, 0, 0, 0.55); border: 1px solid rgba(255, 255, 255, 0.18); transition: transform 0.8s var(--ease); }
.ad-s1 { right: 0; top: 0; transform: rotate(4deg); }
.ad-s2 { left: 6%; top: 22%; z-index: 2; transform: rotate(-3deg); }
.ad-s3 { right: 4%; bottom: 0; z-index: 3; width: 60% !important; transform: rotate(2deg); }
.ad-band:hover .ad-s1 { transform: rotate(6deg) translate(10px, -10px); }
.ad-band:hover .ad-s2 { transform: rotate(-5deg) translate(-10px, 0); }
.ad-band:hover .ad-s3 { transform: rotate(3deg) translate(8px, 8px); }
@media (prefers-reduced-motion: reduce) { .ad-band::before, .tw-panel.on { animation: none; } }

@media (max-width: 960px) {
  .tw-panel, .wms-grid, .ad-band { grid-template-columns: 1fr; gap: 32px; }
  .tw-c1, .tw-c2 { display: none; }
  .ad-band { padding: 40px 24px; border-radius: 28px; }
  .ad-stack { height: 260px; }
  .wms-mini { right: 0; }
}
@media (max-width: 560px) {
  .wms-cards { grid-template-columns: 1fr; }
  .tw-switch button { padding: 0 14px; font-size: 14px; }
}
.ad-band .ctas { justify-content: flex-start; }
