/* Home: "Yantra Smart Buddy". ONE incident told in 4 chapters on a 14s loop (chapter starts: 0 / 20 / 38 / 70 %):
   1) a machine stops, nobody knows   2) Smart Buddy sees it   3) only the people who need to act are told   4) fixed, running again.
   transform / opacity only. Starts once in view (.in). */
.sbs { position: relative; overflow: clip; isolation: isolate; padding: 104px 0 112px; background: #29343a; color: #fafaf8; }
.sbs-grid { position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(to right, rgba(250,250,248,.06) 1px, transparent 1px), linear-gradient(to bottom, rgba(250,250,248,.06) 1px, transparent 1px); background-size: 64px 64px; -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 20%, transparent 78%); mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 20%, transparent 78%); }
.sbs::before { content: ""; position: absolute; z-index: -1; left: 50%; top: 38%; width: 900px; height: 900px; margin: -450px 0 0 -450px; border-radius: 50%; background: radial-gradient(circle, rgba(247,134,30,.18), transparent 62%); }
.sbs-head { max-width: 820px; margin-inline: auto; text-align: center; }
.sbs-head .eyebrow { color: #ffb867; }
.sbs-head h2 { margin-inline: auto; max-width: 820px; font-size: clamp(30px, 4vw, 52px); color: #fafaf8; }
.sbs-head p { margin: 18px auto 0; max-width: 680px; font-size: 17px; line-height: 1.7; color: rgba(250,250,248,.78); }
.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; }

/* stage */
.sbst { position: relative; width: min(100%, 1120px); aspect-ratio: 1000 / 640; margin: 48px auto 0; }
.sbl { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.sbk { fill: none; stroke: rgba(250,250,248,.1); stroke-width: 1.5; }
.sbk.m { stroke: rgba(247,134,30,.55); stroke-width: 2.5; }
.sbk.tg { stroke: rgba(250,250,248,.1); }
.sbst.in .sbk.tg { animation: sblit 14s ease infinite; filter: drop-shadow(0 0 6px rgba(247,134,30,.6)); }
@keyframes sblit { 0%,39% { stroke: rgba(250,250,248,.1); stroke-width: 1.5; } 42%,92% { stroke: #f7861e; stroke-width: 3; } 97%,100% { stroke: rgba(250,250,248,.1); stroke-width: 1.5; } }
.sbk.tg.sc { stroke-width: 1.5; }
.sbst.in .sbk.tg.sc { animation: sblit2 14s ease infinite; filter: none; }
@keyframes sblit2 { 0%,39% { stroke: rgba(250,250,248,.1); stroke-width: 1.5; } 42%,92% { stroke: rgba(247,134,30,.6); stroke-width: 2; } 97%,100% { stroke: rgba(250,250,248,.1); stroke-width: 1.5; } }
.sbd { fill: #ffb867; offset-path: var(--p); offset-distance: 0%; opacity: 0; filter: drop-shadow(0 0 8px rgba(247,134,30,.95)); }
.sbst.in .sbd { animation: sbspoke 14s linear infinite; animation-delay: calc(var(--o) * .18s); }
.sbst.in .sbd.src { animation: sbsrc 14s linear infinite; animation-delay: 0s; }
@keyframes sbsrc { 0%,20% { offset-distance: 0%; opacity: 0; } 21% { opacity: 1; } 28% { offset-distance: 100%; opacity: 1; } 29%,100% { offset-distance: 100%; opacity: 0; } }
@keyframes sbspoke { 0%,39% { offset-distance: 0%; opacity: 0; } 40% { opacity: 1; } 48% { offset-distance: 100%; opacity: 1; } 50%,100% { offset-distance: 100%; opacity: 0; } }

.sbm { position: absolute; left: 50%; top: 2%; z-index: 3; display: flex; align-items: center; gap: 12px; padding: 9px 20px 9px 9px; border-radius: 999px; background: #1d272c; box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 20px 30px -16px rgba(0,0,0,.7); transform: translateX(-50%); }
.sbm::before { content: ""; position: absolute; inset: 0; border-radius: 999px; border: 2px solid #e5484d; opacity: 0; pointer-events: none; }
.sbst.in .sbm::before { animation: sbrip 14s ease-out infinite; }
@keyframes sbrip { 0% { opacity: .85; scale: 1; } 9% { opacity: 0; scale: 1.28; } 10% { opacity: .85; scale: 1; } 19% { opacity: 0; scale: 1.28; } 20%,100% { opacity: 0; } }
.sbtag { position: absolute; z-index: 3; left: 50%; top: 3.6%; margin-left: 158px; padding: 7px 14px; border-radius: 999px; font-size: clamp(11px, 1.05vw, 14px); font-weight: 800; letter-spacing: .02em; white-space: nowrap; opacity: 0; }
.sbtag.t1 { background: rgba(229,72,77,.16); color: #ff9a9d; box-shadow: 0 0 0 1px rgba(229,72,77,.4); }
.sbtag.t2 { background: rgba(247,134,30,.18); color: #ffb867; box-shadow: 0 0 0 1px rgba(247,134,30,.5); }
.sbst.in .sbtag.t1 { animation: sbt1 14s ease infinite; } .sbst.in .sbtag.t2 { animation: sbt2 14s ease infinite; }
@keyframes sbt1 { 0%,3% { opacity: 0; translate: -8px 0; } 7%,18% { opacity: 1; translate: 0 0; } 21%,100% { opacity: 0; translate: 0 0; } }
@keyframes sbt2 { 0%,22% { opacity: 0; translate: -8px 0; } 26%,37% { opacity: 1; translate: 0 0; } 40%,100% { opacity: 0; translate: 0 0; } }
.sbm-ic { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: #3a4852; }
.sbm-ic svg { width: 30px; height: 30px; }
.sbm .led { fill: #e5484d; }
.sbst.in .sbm .led { animation: sbled 14s linear infinite; }
@keyframes sbled { 0%,70% { fill: #e5484d; } 74%,93% { fill: #22c55e; } 97%,100% { fill: #e5484d; } }
.sbm-t b { display: block; font-size: 14px; font-weight: 800; }
.sbm-s { position: relative; display: block; height: 17px; min-width: 112px; }
.sbm-s i { position: absolute; left: 0; top: 0; font-style: normal; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.sbm-s .s1 { color: #ff8f93; } .sbm-s .s2 { color: #6ee7a0; opacity: 0; }
.sbst.in .sbm-s .s1 { animation: sbs1 14s linear infinite; } .sbst.in .sbm-s .s2 { animation: sbs2 14s linear infinite; }
@keyframes sbs1 { 0%,70% { opacity: 1; } 73%,93% { opacity: 0; } 97%,100% { opacity: 1; } }
@keyframes sbs2 { 0%,70% { opacity: 0; } 74%,93% { opacity: 1; } 97%,100% { opacity: 0; } }

.sbh { position: absolute; left: 50%; top: 40%; z-index: 3; width: 17%; aspect-ratio: 1; transform: translate(-50%, -50%); display: grid; place-items: center; }
.sbh-c { position: relative; z-index: 2; display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; background: #fff; box-shadow: 0 30px 50px -20px rgba(0,0,0,.7), 0 0 0 7px rgba(247,134,30,.22), 0 0 70px 6px rgba(247,134,30,.18); }
.sbh-c img { width: 60%; height: 60%; object-fit: contain; }
.sbh b { position: absolute; z-index: 3; top: calc(100% + 16px); left: 50%; transform: translateX(-50%); padding: 7px 16px; border-radius: 999px; background: var(--orange); color: #fff; font-size: 13px; font-weight: 800; letter-spacing: .04em; white-space: nowrap; box-shadow: 0 14px 22px -10px rgba(247,134,30,.8); }
.sbh-r { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(247,134,30,.7); opacity: 0; }
.sbst.in .sbh-r { animation: sbring 14s ease-out infinite; }
@keyframes sbring { 0%,27% { opacity: 0; transform: scale(1); } 29% { opacity: .85; transform: scale(1); } 42%,100% { opacity: 0; transform: scale(1.9); } }
.sbst.in .sbh-c { animation: sbbeat 14s ease-in-out infinite; }
@keyframes sbbeat { 0%,27% { transform: scale(1); } 30% { transform: scale(1.1); } 35%,100% { transform: scale(1); } }

/* people: everyone is shown, only the 3 who need to act light up */
.sbn { position: absolute; left: var(--x); top: var(--y); z-index: 2; width: 12%; aspect-ratio: 1; transform: translate(-50%, -50%); }
.sbav { display: block; width: 100%; height: 100%; overflow: hidden; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px #29343a, 0 0 0 7px var(--orange), 0 30px 40px -18px rgba(0,0,0,.7); }
.sbav svg, .sbav img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* not-involved roles: real colour photo, just a little darker. Brightness, not opacity, so the photo stays solid and no line shows through the face */
.sbn.dim { filter: brightness(.74) saturate(.85); }
.js .sbst:not(.in) .sbn { opacity: 0; }
.sbst.in .sbn { animation: sbnin .8s cubic-bezier(.34,1.56,.64,1) both; animation-delay: calc(var(--k) * .1s + .3s); }
.sbst.in .sbn.tgt { animation: sbnin .8s cubic-bezier(.34,1.56,.64,1) both, sbtgt 14s ease infinite; animation-delay: calc(var(--k) * .1s + .3s), 0s; }
@keyframes sbnin { from { scale: .5; } to { scale: 1; } }
@keyframes sbtgt { 0%,39% { filter: brightness(.74) saturate(.85); } 43%,92% { filter: brightness(1) saturate(1); } 97%,100% { filter: brightness(.74) saturate(.85); } }
.sbn::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid #ffb867; opacity: 0; pointer-events: none; }
.sbst.in .sbn.sec { animation: sbnin .8s cubic-bezier(.34,1.56,.64,1) both, sbsec 14s ease infinite; animation-delay: calc(var(--k) * .1s + .3s), 0s; }
@keyframes sbsec { 0%,39% { filter: brightness(.74) saturate(.85); } 43%,92% { filter: brightness(.95) saturate(1); } 97%,100% { filter: brightness(.74) saturate(.85); } }
.sbst.in .sbn.tgt::after { animation: sbhalo 14s ease-out infinite; animation-delay: calc(var(--o) * .18s); }
@keyframes sbhalo { 0%,41% { opacity: 0; transform: scale(1); } 44% { opacity: .9; transform: scale(1); } 58%,100% { opacity: 0; transform: scale(1.4); } }
.sbn > b { position: absolute; top: calc(100% + 14px); left: 50%; transform: translateX(-50%); font-size: clamp(11px, 1.1vw, 14.5px); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #ffb867; white-space: nowrap; }
.sbb { position: absolute; z-index: 5; display: grid; padding: 10px 17px; border-radius: 14px; background: #fff; color: #0b2036; font-size: clamp(11.5px, 1.1vw, 14.5px); font-weight: 700; white-space: nowrap; box-shadow: 0 18px 30px -14px rgba(0,0,0,.7); opacity: 0; }
.sbb span { grid-area: 1 / 1; }
/* kept-informed roles: a quieter glass bubble, so the three who must act still stand out */
.sbn.sec .sbb { background: rgba(250,250,248,.14); color: #fafaf8; box-shadow: 0 0 0 1px rgba(250,250,248,.28), 0 18px 30px -14px rgba(0,0,0,.6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.sbn.sec .sbb .ok { color: #6ee7a0; }
.sbn.bt .sbb { left: 50%; bottom: calc(100% + 14px); translate: -50% 0; }
.sbn.bb .sbb { left: 50%; top: calc(100% + 46px); translate: -50% 0; }
.sbb .ok { color: #15803d; opacity: 0; }
.sbn.bl .sbb { left: calc(100% + 18px); top: 50%; margin-top: -20px; }
.sbn.br .sbb { right: calc(100% + 18px); top: 50%; margin-top: -20px; }
.sbst.in .sbb { animation: sbbub 14s ease infinite; animation-delay: calc(var(--o) * .18s); }
.sbst.in .sbb .m { animation: sbmsg 14s ease infinite; animation-delay: calc(var(--o) * .18s); }
.sbst.in .sbb .ok { animation: sbok 14s ease infinite; animation-delay: calc(var(--o) * .18s); }
@keyframes sbbub { 0%,42% { opacity: 0; scale: .7; } 47%,86% { opacity: 1; scale: 1; } 91%,100% { opacity: 0; scale: .9; } }
@keyframes sbmsg { 0%,70% { opacity: 1; } 74%,100% { opacity: 0; } }
@keyframes sbok { 0%,71% { opacity: 0; } 75%,100% { opacity: 1; } }

/* the four chapters under the stage: a stepper that fills as the story moves, and one clear line for the chapter on screen */
.sbcap { position: relative; width: min(100%, 940px); margin: 64px auto 0; text-align: center; }
.sbsteps { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; padding: 0; list-style: none; }
.sbsteps li { position: relative; display: grid; justify-items: center; align-content: start; gap: 12px; opacity: .42; }
.sbsteps li + li::before, .sbsteps li + li::after { content: ""; position: absolute; top: 19px; left: -50%; width: 100%; height: 3px; border-radius: 3px; }
.sbsteps li + li::before { background: rgba(250,250,248,.16); }
.sbsteps li + li::after { background: var(--orange); transform: scaleX(0); transform-origin: left; }
.sbsteps i { position: relative; z-index: 1; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--orange); font-style: normal; font-size: 16px; font-weight: 800; color: #fff; box-shadow: 0 0 0 5px #29343a, 0 12px 20px -8px rgba(247,134,30,.8); }
.sbsteps span { max-width: 170px; text-wrap: balance; font-size: clamp(12px, 1.15vw, 15px); line-height: 1.25; font-weight: 800; letter-spacing: .01em; color: #fafaf8; }
.sbst.in ~ .sbcap .s1 { animation: sbk1 14s ease infinite; } .sbst.in ~ .sbcap .s2 { animation: sbk2 14s ease infinite; }
.sbst.in ~ .sbcap .s3 { animation: sbk3 14s ease infinite; } .sbst.in ~ .sbcap .s4 { animation: sbk4 14s ease infinite; }
.sbst.in ~ .sbcap .s2::after { animation: sbf2 14s ease infinite; } .sbst.in ~ .sbcap .s3::after { animation: sbf3 14s ease infinite; } .sbst.in ~ .sbcap .s4::after { animation: sbf4 14s ease infinite; }
@keyframes sbk1 { 0%,93% { opacity: 1; } 97%,100% { opacity: .42; } }
@keyframes sbk2 { 0%,19% { opacity: .42; } 22%,93% { opacity: 1; } 97%,100% { opacity: .42; } }
@keyframes sbk3 { 0%,37% { opacity: .42; } 40%,93% { opacity: 1; } 97%,100% { opacity: .42; } }
@keyframes sbk4 { 0%,69% { opacity: .42; } 72%,93% { opacity: 1; } 97%,100% { opacity: .42; } }
@keyframes sbf2 { 0%,18% { transform: scaleX(0); } 22%,93% { transform: scaleX(1); } 97%,100% { transform: scaleX(0); } }
@keyframes sbf3 { 0%,36% { transform: scaleX(0); } 40%,93% { transform: scaleX(1); } 97%,100% { transform: scaleX(0); } }
@keyframes sbf4 { 0%,68% { transform: scaleX(0); } 72%,93% { transform: scaleX(1); } 97%,100% { transform: scaleX(0); } }

.sbtxt { position: relative; height: 118px; margin-top: 34px; }
.sbtxt p { position: absolute; inset: 0 0 auto 0; display: grid; justify-items: center; gap: 12px; margin: 0; opacity: 0; transform: translateY(10px); }
.sbtxt strong { max-width: 780px; font-size: clamp(23px, 2.7vw, 34px); line-height: 1.2; font-weight: 800; letter-spacing: -.03em; color: #fafaf8; }
.sbtxt span { max-width: 640px; font-size: clamp(14.5px, 1.3vw, 17px); line-height: 1.6; color: rgba(250,250,248,.72); }
.sbst.in ~ .sbcap .c1 { animation: sbc1 14s ease infinite; } .sbst.in ~ .sbcap .c2 { animation: sbc2 14s ease infinite; }
.sbst.in ~ .sbcap .c3 { animation: sbc3 14s ease infinite; } .sbst.in ~ .sbcap .c4 { animation: sbc4 14s ease infinite; }
@keyframes sbc1 { 0%,2% { opacity: 0; transform: translateY(10px); } 5%,18% { opacity: 1; transform: none; } 21%,96% { opacity: 0; transform: translateY(-8px); } 100% { opacity: 0; } }
@keyframes sbc2 { 0%,20% { opacity: 0; transform: translateY(10px); } 23%,36% { opacity: 1; transform: none; } 39%,100% { opacity: 0; transform: translateY(-8px); } }
@keyframes sbc3 { 0%,38% { opacity: 0; transform: translateY(10px); } 41%,68% { opacity: 1; transform: none; } 71%,100% { opacity: 0; transform: translateY(-8px); } }
@keyframes sbc4 { 0%,70% { opacity: 0; transform: translateY(10px); } 73%,93% { opacity: 1; transform: none; } 97%,100% { opacity: 0; transform: translateY(-8px); } }
.sbnote { display: block; margin-top: 10px; font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: rgba(250,250,248,.38); }

/* FAQ */
.sbq { display: grid; grid-template-columns: .9fr 1.1fr; gap: 72px; align-items: start; margin-top: 112px; }
.sbq-l h3 { margin: 0; font-size: clamp(26px, 3vw, 38px); line-height: 1.15; font-weight: 800; letter-spacing: -.03em; color: #fafaf8; }
.sbq-l p { margin: 14px 0 0; max-width: 440px; font-size: 16px; line-height: 1.65; color: rgba(250,250,248,.75); }
.sbq-act { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.sbq-act .btn { padding: 14px 26px; border-radius: 14px; font-size: 15px; display: inline-flex; align-items: center; gap: 8px; }
.btn-ghost-d { color: #fafaf8; border: 1.5px solid rgba(250,250,248,.4); }
.btn-ghost-d:hover { background: rgba(250,250,248,.1); border-color: #fafaf8; }
.sbq-r details { border-top: 1px solid rgba(250,250,248,.16); }
.sbq-r details:last-child { border-bottom: 1px solid rgba(250,250,248,.16); }
.sbq-r summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 22px 0; cursor: pointer; list-style: none; font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.sbq-r summary::-webkit-details-marker { display: none; }
.sbq-r summary::after { content: ""; flex: none; width: 28px; height: 28px; border-radius: 50%; background: rgba(250,250,248,.1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffb867' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E") center / 14px no-repeat; transition: transform .35s cubic-bezier(.34,1.56,.64,1); }
.sbq-r details[open] summary::after { transform: rotate(45deg); }
.sbq-r summary:focus-visible { outline: 2px solid var(--orange); outline-offset: 4px; border-radius: 6px; }
.sbq-r details p { margin: 0 0 22px; max-width: 560px; font-size: 15.5px; line-height: 1.7; color: rgba(250,250,248,.78); animation: sbfaq .5s cubic-bezier(.16,1,.3,1); }
@keyframes sbfaq { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

@media (max-width: 1000px) { .sbq { gap: 40px; } }
@media (max-width: 900px) {
  .sbs { padding: 64px 0 72px; }
  /* phone: the same story, only the people involved: machine -> Smart Buddy -> operator / supervisor / maintenance */
  .sbst { aspect-ratio: auto; display: grid; grid-template-columns: repeat(3, 1fr); justify-items: center; gap: 62px 8px; margin: 40px auto 0; padding: 24px 0 8px; overflow: hidden; }
  .sbl, .sbn.dim { display: none; }
  .sbm { position: relative; left: auto; top: auto; transform: none; grid-column: 1 / -1; }
  .sbh { position: relative; left: auto; top: auto; transform: none; grid-column: 1 / -1; width: 130px; margin-bottom: 18px; }
  .sbn.tgt { position: relative; left: auto; top: auto; transform: none; width: min(86px, 24vw); display: block; margin-bottom: 78px; }
  .sbn.tgt > b { top: calc(100% + 10px); font-size: 10.5px; letter-spacing: .04em; }
  .sbn.tgt .sbb { left: 50% !important; right: auto !important; top: calc(100% + 34px) !important; margin: 0 !important; translate: -50% 0; white-space: normal; text-align: center; width: max-content; max-width: 30vw; padding: 7px 9px; font-size: 11px; }
  .sbm::after { content: ""; position: absolute; left: 50%; top: calc(100% + 6px); width: 2px; height: 44px; margin-left: -1px; background: repeating-linear-gradient(180deg, rgba(247,134,30,.8) 0 6px, transparent 6px 12px); }
  .sbst.in .sbm::after { animation: sbvd .8s linear infinite; }
  @keyframes sbvd { to { background-position: 0 12px; } }
  .sbcap { margin-top: 40px; }
  .sbtag { display: none; }
  .sbtxt { height: 176px; }
  .sbsteps i { width: 34px; height: 34px; font-size: 14px; } .sbsteps li + li::before, .sbsteps li + li::after { top: 16px; }
  .sbsteps span { font-size: 11px; max-width: 80px; }
  .sbq { grid-template-columns: 1fr; gap: 32px; margin-top: 72px; }
}
@media (max-width: 560px) { .sbq-r summary { font-size: 16.5px; } .sbq-act .btn { flex: 1; justify-content: center; } }
@media (prefers-reduced-motion: reduce) {
  .sbs *, .sbs *::before, .sbs *::after { animation: none !important; transition: none !important; }
  .sbn.tgt { filter: none; } .sbb { opacity: 1; scale: 1; } .sbb .ok { opacity: 0; } .sbd { display: none; } .sbk.tg { stroke: rgba(247,134,30,.9); } .sbk.tg.sc { stroke: rgba(247,134,30,.6); }
  .sbsteps li { opacity: 1; } .sbsteps li + li::after { transform: none; } .sbtag { display: none; }
  .sbtxt p { opacity: 0; } .sbtxt .c3 { opacity: 1; transform: none; } .sbm-s .s1 { opacity: 1; } .js .sbst:not(.in) .sbn { opacity: 1; }
}

/* ---------- autoplay story, tuned for laptop and desktop ---------- */
.sbhint { display: none; }
.sbsteps li { cursor: pointer; }
.sbsteps li:hover span { color: #ffb867; }
@media (min-width: 901px) {
  .sbst { width: min(100%, 1000px); }
  .sbcap { margin-top: 56px; }
}
@media (prefers-reduced-motion: no-preference) {
  .sbst.in .sbn.dim .sbav { animation: sbbob 6s ease-in-out infinite; animation-delay: calc(var(--k) * -1.1s); }
  @keyframes sbbob { 50% { transform: translateY(-4px); } }
}
