/* RotoSight case studies: chooser + weight balancing + RotoAuto cut-offs + RotoPour weigh.
   Numbers and the seesaw are driven by cases.js; everything else is CSS and starts once its block is in view (.in). */
.cs-choose { background: #fff; }
.cs-choose h2, .cs-head h2 { font-size: clamp(30px, 3.6vw, 48px); max-width: 780px; }
.cs-sub { margin: 14px 0 0; color: var(--mute); font-size: 17px; }

.cs-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 48px; }
.cs-tile { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 34px 28px 28px; border-radius: 4px 4px 22px 22px; transition: background-color .3s, transform .35s cubic-bezier(.16,1,.3,1); }
.cs-tile::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; border-radius: 3px; background: var(--orange); transform: scaleX(0); transform-origin: left; transition: transform 1.1s cubic-bezier(.65,0,.35,1) calc(var(--rd, 0s) + .2s); }
.cs-tile.in::before { transform: scaleX(1); }
.cs-tile:hover { background: #fff8f0; transform: translateY(-4px); }
.cs-no { position: absolute; right: 22px; top: 18px; font-size: 64px; line-height: 1; font-weight: 800; letter-spacing: -.04em; color: transparent; -webkit-text-stroke: 1.5px rgba(16,33,47,.14); transition: -webkit-text-stroke-color .3s; }
.cs-tile:hover .cs-no { -webkit-text-stroke-color: rgba(247,134,30,.7); }
.cs-ic { display: block; width: 56px; height: 56px; }
.cs-ic svg { display: block; width: 100%; height: 100%; overflow: visible; }
.cs-tile h3 { margin: 8px 0 0; font-size: 22px; line-height: 1.2; font-weight: 800; letter-spacing: -.02em; }
.cs-tile p { margin: 0; font-size: 15.5px; line-height: 1.6; color: var(--mute); }
.cs-go { margin-top: auto; padding-top: 10px; display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 700; color: #c25e00; }
.cs-go svg { transition: transform .25s; }
.cs-tile:hover .cs-go svg { transform: translateX(5px); }
.cs-tile.in .ti-beam { animation: tibeam 2.4s ease-in-out infinite alternate; transform-origin: 32px 31px; }
.cs-tile.in .ti-mercury { animation: timerc 3s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.cs-tile.in .ti-fan { animation: spin 1.1s linear infinite; transform-origin: 0 0; }
.cs-tile.in .ti-ring { stroke-dasharray: 1; animation: tiring 3.4s ease-in-out infinite; }
@keyframes tibeam { from { transform: rotate(-9deg); } to { transform: rotate(9deg); } }
@keyframes timerc { 0%,100% { transform: scaleY(.35); } 55% { transform: scaleY(1); } }
@keyframes tiring { 0% { stroke-dashoffset: 1; } 55%,90% { stroke-dashoffset: .15; } 100% { stroke-dashoffset: 1; } }

.cs-sec { padding: 96px 0; border-top: 1px solid var(--line); }
.cs-sec.tint { background: #fdf6ec; }
.cs-head p { margin: 14px 0 0; max-width: 760px; color: var(--mute); font-size: 17px; line-height: 1.65; }

/* ---------- 01 balance ---------- */
.bal { margin-top: 44px; padding: 28px 32px 22px; border-radius: 30px; background: #fff; border: 1px solid var(--line); box-shadow: 0 40px 70px -46px rgba(16,33,47,.4); }
.bal-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.bal-top b { font-size: 18px; letter-spacing: -.01em; }
.bal-pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: #ffefe0; color: #c25e00; transition: background-color .3s, color .3s; }
.bal-pill i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.bal-pill em { font-style: normal; }
.bal-stage svg { display: block; width: 100%; max-width: 640px; height: auto; margin: 8px auto 0; overflow: visible; }
.bal-beam { transform-origin: 260px 117px; }
.bal-beam text { font: 800 11px Inter, sans-serif; fill: #fff; letter-spacing: .06em; }
.bal-read { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 4px; }
.bal-side { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 12px; font-size: 13px; color: var(--mute); }
.bal-side b { min-width: 86px; text-align: right; font-size: 14px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.cbar { height: 12px; border-radius: 12px; background: #e9edf2; overflow: hidden; }
.cbar i { display: block; height: 100%; border-radius: inherit; background: var(--c, var(--orange)); transform-origin: left; transform: scaleX(var(--w, 1)); }
.cbar.big { height: 14px; }
.in .cmp .cbar i { animation: cbar 1.3s cubic-bezier(.16,1,.3,1) var(--d, 0s) both; }
@keyframes cbar { from { transform: scaleX(0); } to { transform: scaleX(var(--w, 1)); } }
.bal-gap { margin: 18px 0 4px; text-align: center; font-size: 15px; font-weight: 700; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 6px; }
.bal-gap b { font-size: 26px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.bal-gap em { font-style: normal; }
.bal-gap span { flex-basis: 100%; font-size: 12px; font-weight: 600; color: var(--mute); }
.bal[data-state="bad"] .bal-gap { color: #d1313a; }
.bal[data-state="adj"] .bal-gap { color: #c25e00; }
.bal[data-state="ok"] .bal-gap { color: #15803d; }
.bal[data-state="ok"] .bal-pill { background: #dcfce7; color: #15803d; }
.bal[data-state="bad"] .bal-pill { background: #fee2e2; color: #d1313a; }

.bal-cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: 40px; }
.cmp { position: relative; padding: 4px 36px 8px 0; }
.cmp + .cmp { padding: 4px 0 8px 36px; border-left: 1px solid var(--line); }
.cmp::before { content: ""; display: block; width: 56px; height: 4px; margin-bottom: 20px; border-radius: 4px; }
.cmp.bad::before { background: #e5484d; } .cmp.good::before { background: #22c55e; }
.cmp header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cmp h3 { margin: 0; font-size: 22px; line-height: 1.25; font-weight: 800; letter-spacing: -.02em; }
.chip { padding: 5px 12px; border-radius: 999px; font-size: 11.5px; font-weight: 800; letter-spacing: .08em; }
.chip.bad { background: #fee2e2; color: #d1313a; } .chip.good { background: #dcfce7; color: #15803d; }
.cmp-t { margin: 14px 0 18px; font-size: 15.5px; line-height: 1.65; color: var(--mute); }
.cmp-row { display: grid; grid-template-columns: 56px 1fr 84px; align-items: center; gap: 12px; padding: 10px 14px; margin-bottom: 8px; border-radius: 12px; background: #f6f7f9; font-size: 14px; font-weight: 700; }
.cmp-row b { text-align: right; font-variant-numeric: tabular-nums; }
.cmp-m { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0 0; }
.cmp-m > div { padding: 12px 14px; border-radius: 12px; background: #fbf5ec; }
.cmp-m dt { font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); }
.cmp-m dd { margin: 4px 0 0; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.cmp.bad .gap dd { color: #d1313a; } .cmp.good .gap dd { color: #15803d; }
.cmp-why { margin: 16px 0 0; font-size: 15px; line-height: 1.65; color: var(--mute); }

/* ---------- 02 cut-off ---------- */
.ra { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; margin-top: 44px; }
.ra-art { margin: 0; padding: 22px; border-radius: 30px; background: #fff; box-shadow: 0 40px 70px -46px rgba(16,33,47,.4); }
.ra-art figcaption { margin-top: 6px; text-align: center; font-size: 12.5px; font-weight: 600; color: var(--mute); }
.ra-svg { display: block; width: 100%; height: auto; overflow: visible; }
.ra-svg text { font-family: Inter, sans-serif; }
.ra-t { font-size: 10px; font-weight: 700; fill: #4d5d6c; }
.ra-t2 { font-size: 11px; font-weight: 800; fill: #4d5d6c; }
.ra-axes line { stroke: rgba(11,32,54,.3); stroke-width: 2; stroke-linecap: round; }
.ra-curve { fill: none; stroke: var(--orange); stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.ra-fill { fill: rgba(247,134,30,.12); }
.ra-dot { fill: #fff; stroke: var(--orange); stroke-width: 3.5; offset-path: path("M262 236 C300 230 350 180 390 140 C402 128 412 128 424 138 C450 162 470 214 500 232"); offset-distance: 100%; }
.ra-cutline { stroke: #15803d; stroke-width: 1.8; stroke-dasharray: 4 4; }
.ra-cutpill rect { fill: #15803d; } .ra-cutpill text { font-size: 10px; font-weight: 800; fill: #fff; letter-spacing: .06em; }
.ra-arc { fill: none; stroke: #0b2036; stroke-width: 2.6; stroke-linecap: round; opacity: 0; transform-origin: 0 0; }
.ra-led { fill: #fff; }
.ra-heat { opacity: 0; }
.ra-oven-off { opacity: 0; }
.ra-fan { transform-origin: 0 0; }
.ra-fanwrap { opacity: .25; }
.ra-pwm { fill: #4aa3ff; transform-box: fill-box; transform-origin: 50% 100%; transform: scaleY(.15); }
.ra-pwm.p0 { --lo: .5; } .ra-pwm.p1 { --lo: .62; } .ra-pwm.p2 { --lo: .75; } .ra-pwm.p3 { --lo: .88; } .ra-pwm.p4 { --lo: 1; }
.ra.in .ra-curve { animation: racurve 10s linear infinite; }
.ra.in .ra-fill { animation: rafill 10s linear infinite; }
.ra.in .ra-dot { animation: radot 10s linear infinite; }
.ra.in .ra-cutline { animation: racut 10s linear infinite; }
.ra.in .ra-cutpill { animation: racutp 10s cubic-bezier(.34,1.56,.64,1) infinite; transform-box: fill-box; transform-origin: center; }
.ra.in .ra-heat { animation: raheat 10s ease-in-out infinite; }
.ra.in .ra-oven-on { animation: raon 10s linear infinite; }
.ra.in .ra-oven-off { animation: raoff 10s linear infinite; }
.ra.in .ra-fanwrap { animation: rafanw 10s linear infinite; }
.ra.in .ra-fan { animation: spin .7s linear infinite; }
.ra.in .ra-pwm { animation: rapwm 10s ease-in-out infinite; }
.ra.in .ra-pwm.p1 { animation-delay: .06s; } .ra.in .ra-pwm.p2 { animation-delay: .12s; } .ra.in .ra-pwm.p3 { animation-delay: .18s; } .ra.in .ra-pwm.p4 { animation-delay: .24s; }
.ra.in .ra-arc { animation: raarc 2.4s cubic-bezier(.2,.6,.3,1) infinite; }
.ra.in .ra-arc.a2 { animation-delay: .5s; } .ra.in .ra-arc.a3 { animation-delay: 1s; }
.ra.in .ra-led { animation: led 1.2s ease-in-out infinite; }
@keyframes racurve { 0% { stroke-dashoffset: 1; opacity: 1; } 60% { stroke-dashoffset: 0; } 93% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes rafill { 0%,5% { opacity: 0; } 60%,93% { opacity: 1; } 100% { opacity: 0; } }
@keyframes radot { 0% { offset-distance: 0%; opacity: 1; } 60% { offset-distance: 100%; } 93% { offset-distance: 100%; opacity: 1; } 100% { offset-distance: 100%; opacity: 0; } }
@keyframes racut { 0%,29% { opacity: 0; } 32%,93% { opacity: 1; } 100% { opacity: 0; } }
@keyframes racutp { 0%,29% { opacity: 0; transform: scale(.4); } 35%,93% { opacity: 1; transform: scale(1); } 100% { opacity: 0; } }
@keyframes raheat { 0% { opacity: .2; } 15% { opacity: 1; } 29% { opacity: 1; } 31%,100% { opacity: 0; } }
@keyframes raon { 0%,29% { opacity: 1; } 31%,100% { opacity: 0; } }
@keyframes raoff { 0%,29% { opacity: 0; } 32%,93% { opacity: 1; } 100% { opacity: 0; } }
@keyframes rafanw { 0%,38% { opacity: .25; } 44%,93% { opacity: 1; } 100% { opacity: .25; } }
@keyframes rapwm { 0%,38% { transform: scaleY(.15); } 44% { transform: scaleY(1); } 92% { transform: scaleY(var(--lo)); } 100% { transform: scaleY(.15); } }
@keyframes raarc { 0% { opacity: 0; transform: scale(.5); } 25% { opacity: .9; } 100% { opacity: 0; transform: scale(2.2); } }

.ra-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ra-steps li { position: relative; display: grid; grid-template-columns: 44px 1fr; gap: 16px; padding: 20px 20px 20px 4px; border-radius: 18px; }
.ra-steps li::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: #fff3e3; opacity: 0; }
.ra-steps b { display: grid; place-items: center; width: 44px; height: 44px; margin-left: 12px; border-radius: 50%; background: #fff; border: 2px solid rgba(247,134,30,.45); font-size: 13px; font-weight: 800; color: #c25e00; }
.ra-steps strong { display: block; font-size: 19px; line-height: 1.3; letter-spacing: -.01em; }
.ra-steps span { display: block; margin-top: 4px; font-size: 15px; line-height: 1.6; color: var(--mute); }
.ra { isolation: isolate; }
.ra.in .ra-steps li::before { animation: rastep0 10s ease-in-out infinite; }
.ra.in .ra-steps li:nth-child(2)::before { animation-name: rastep1; }
.ra.in .ra-steps li:nth-child(3)::before { animation-name: rastep2; }
.ra.in .ra-steps li b { animation: rabadge0 10s ease-in-out infinite; }
.ra.in .ra-steps li:nth-child(2) b { animation-name: rabadge1; }
.ra.in .ra-steps li:nth-child(3) b { animation-name: rabadge2; }
@keyframes rastep0 { 0%,2% { opacity: 0; } 5%,27% { opacity: 1; } 31%,100% { opacity: 0; } }
@keyframes rastep1 { 0%,27% { opacity: 0; } 31%,41% { opacity: 1; } 46%,100% { opacity: 0; } }
@keyframes rastep2 { 0%,41% { opacity: 0; } 46%,93% { opacity: 1; } 98%,100% { opacity: 0; } }
@keyframes rabadge0 { 0%,2%,31%,100% { background: #fff; color: #c25e00; } 5%,27% { background: var(--orange); color: #fff; } }
@keyframes rabadge1 { 0%,27%,46%,100% { background: #fff; color: #c25e00; } 31%,41% { background: var(--orange); color: #fff; } }
@keyframes rabadge2 { 0%,41%,98%,100% { background: #fff; color: #c25e00; } 46%,93% { background: var(--orange); color: #fff; } }

/* ---------- 03 pour ---------- */
.pour-flow { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; list-style: none; padding: 0; margin: 44px 0 0; }
.pour-flow li { position: relative; display: grid; grid-template-columns: 38px 1fr; gap: 14px; padding-top: 26px; }
.pour-flow li::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--orange), rgba(247,134,30,.15)); transform: scaleX(0); transform-origin: left; transition: transform 1.2s cubic-bezier(.65,0,.35,1) calc(var(--i) * .2s + .3s); }
.pour-flow.in li::before { transform: scaleX(1); }
.pour-flow b { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--orange); color: #fff; font-size: 14px; font-weight: 800; box-shadow: 0 10px 22px -8px rgba(247,134,30,.7); }
.pour-flow strong { display: block; font-size: 20px; letter-spacing: -.015em; }
.pour-flow span { display: block; margin-top: 3px; font-size: 15px; line-height: 1.55; color: var(--mute); }

.scr-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 44px; }
.scr { position: relative; margin: 0; }
.scr-n { position: absolute; z-index: 3; left: -10px; top: -14px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--orange); color: #fff; font-size: 14px; font-weight: 800; box-shadow: 0 12px 24px -8px rgba(247,134,30,.75); }
.scr-win { overflow: hidden; border-radius: 16px; background: #fff; border: 1px solid #dfe3e7; box-shadow: 0 36px 60px -36px rgba(16,33,47,.5); }
.scr-bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: #f7f8fa; border-bottom: 1px solid #e9ecef; }
.scr-bar i { width: 8px; height: 8px; border-radius: 50%; background: #d3d9df; }
.scr-bar span { margin-left: 8px; font-size: 11.5px; font-weight: 700; color: #3a4a5a; }
.scr-bar em { margin-left: auto; padding: 3px 9px; border-radius: 999px; font-style: normal; font-size: 9.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; background: #ffe3c4; color: #a65700; }
.scr-body { display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: center; padding: 18px 16px 12px; background: #fff; transition: background-color .4s; }
.scr.done .scr-body { background: #ecfdf3; }
.scr.over .scr-body { background: #fdecec; }
.scr-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; align-self: start; }
.scr-list li { height: 26px; border-radius: 6px; background: #eef1f4; }
.scr-list li.on { background: #ffe3c4; }
.scr-main { display: grid; }
.scr-dial { position: relative; width: 132px; height: 132px; margin: 0 auto; }
.scr-dial svg { display: block; width: 100%; height: 100%; }
.d-bg { fill: none; stroke: #e6eaee; stroke-width: 9; }
.d-fg { fill: none; stroke: var(--orange); stroke-width: 9; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke .3s; }
.scr.done .d-fg { stroke: #22c55e; } .scr.over .d-fg { stroke: #ef4444; }
.d-txt { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.d-txt small { font-size: 8.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.d-txt b { font-size: 30px; line-height: 1.05; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.d-txt span { font-size: 11px; font-weight: 700; color: var(--mute); }
.scr-chips { display: flex; justify-content: center; gap: 10px; margin-top: 12px; }
.scr-chips div { padding: 6px 12px; border-radius: 9px; background: rgba(255,255,255,.85); border: 1px solid #e6eaee; text-align: center; }
.scr-chips small { display: block; font-size: 8.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); }
.scr-chips b { font-size: 12.5px; font-weight: 800; }
.scr-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px 14px; background: inherit; }
.scr.done .scr-foot { background: #ecfdf3; } .scr.over .scr-foot { background: #fdecec; }
.scr-msg { font-size: 12px; font-weight: 800; color: #c25e00; }
.scr.done .scr-msg { color: #15803d; } .scr.over .scr-msg { color: #d1313a; }
.scr-btn { padding: 7px 12px; border-radius: 8px; background: #d9dfe5; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #5b6a79; }
.scr.over .scr-btn { background: #e8c4c4; color: #8c3a3a; }
.scr figcaption { margin-top: 16px; }
.scr figcaption b { display: block; font-size: 19px; letter-spacing: -.015em; }
.scr figcaption span { display: block; margin-top: 4px; font-size: 15px; line-height: 1.55; color: var(--mute); }
.scr.over.alert .scr-dial { animation: shake .45s ease-in-out 2; }
@keyframes shake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-5px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(3px); } }

@media (max-width: 1000px) {
  .cs-tiles { gap: 20px; }
  .ra { gap: 36px; }
}
@media (max-width: 900px) {
  .cs-sec { padding: 64px 0; }
  .cs-tiles { grid-template-columns: 1fr; gap: 8px; margin-top: 32px; }
  .bal { padding: 20px 18px 16px; }
  .bal-read { grid-template-columns: 1fr; gap: 10px; }
  .bal-cmp { grid-template-columns: 1fr; gap: 36px; }
  .cmp, .cmp + .cmp { padding: 4px 0 8px; border-left: 0; }
  .ra { grid-template-columns: 1fr; }
  .pour-flow { grid-template-columns: 1fr; gap: 22px; }
  .scr-grid { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 560px) {
  .cmp-row { grid-template-columns: 50px 1fr 76px; padding: 9px 10px; }
  .cmp-m dd { font-size: 18px; }
  .cmp h3 { font-size: 19px; }
  .bal-side { grid-template-columns: 44px 1fr auto; }
  .scr-body { grid-template-columns: 1fr; }
  .scr-list { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .cs-choose *, .cs-sec *, .cs-sec *::before, .cs-sec *::after { animation: none !important; transition: none !important; }
  .cs-tile::before, .pour-flow li::before { transform: scaleX(1); }
  .ra-curve, .ra-fill { opacity: 1; } .ra-dot { offset-distance: 100%; } .ra-cutline, .ra-oven-off, .ra-fanwrap { opacity: 1; } .ra-oven-on, .ra-heat { opacity: 0; }
  .ra-pwm { transform: scaleY(var(--lo)); } .ra-steps li::before { opacity: 0; }
  .d-fg { stroke-dashoffset: .3; }
}
