/* "Three steps to get started" on Home: a road with highway signs; the car drives from START to sign 03.
   As it reaches each sign: the number flips, the sign wobbles, the reason plate swings in with a tick; sign 03 turns mint on arrival.
   Car at 20% of the first speed (17 s). Built from comp-steps-road.html (approved 5 Oct 2026). */
#steps { padding: 80px 0 90px; background: var(--bg-2); }
#steps .sec-head { margin-bottom: 30px; }
#steps .road { position: relative; height: 400px; margin-bottom: 34px; }
#steps .road svg.rd { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
#steps .hs { position: absolute; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; }
#steps .hs .plate { background: #0F6B3E; color: #fff; border: 3px solid #fff; outline: 2px solid #0F6B3E; border-radius: 6px; padding: 10px 18px 9px; text-align: center; min-width: 210px; white-space: nowrap; box-shadow: 0 14px 20px -12px rgba(0,0,0,.8); }
#steps .hs .plate span { display: block; font: 700 13px var(--mono); opacity: .85; }
#steps .hs .plate b { display: block; font: 700 21px/1.15 var(--rf-font); margin-top: 3px; }
#steps .hs .why { margin-top: 6px; background: #F4F1EA; color: #10181E; border: 2px solid #10181E; border-radius: 4px; padding: 7px 14px; font: 700 15px/1.2 var(--rf-font); white-space: nowrap; box-shadow: 0 10px 16px -10px rgba(0,0,0,.8); }
#steps .hs .why i { font-style: normal; color: #0F6B3E; margin-right: 6px; }
#steps .hs .post { width: 7px; background: #9AA3A0; }
#steps .hs.end .plate { background: #F5C518; color: #06120F; border-color: #06120F; outline-color: #F5C518; }
#steps .batu { position: absolute; width: 36px; height: 48px; border-radius: 16px 16px 3px 3px; background: #F4F1EA; overflow: hidden; box-shadow: 0 6px 8px -5px rgba(0,0,0,.6); text-align: center; font: 700 8px/1 var(--rf-font); color: #1A2220; }
#steps .batu::before { content: ''; display: block; height: 15px; background: #F2C94C; margin-bottom: 7px; }
#steps .batu b { display: block; font-size: 12px; margin-top: 3px; }
#steps .cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
#steps .cols .n { font: 600 12.5px var(--mono); color: var(--accent); display: block; margin-bottom: 8px; }
#steps .cols h3 { margin: 0 0 6px; font-size: 19px; color: var(--head); }
#steps .cols p.what { margin: 0 0 16px; color: var(--soft); font-size: 14.5px; }
#steps .cols .wm { border-left: 3px solid var(--brand); padding: 2px 0 2px 14px; }
#steps .cols .wm small { display: block; font: 600 11.5px var(--mono); color: var(--accent); letter-spacing: .06em; margin-bottom: 6px; }
#steps .cols .wm strong { display: block; font: 600 19px/1.35 var(--rf-font); color: var(--head); }
#steps .hs { transform-origin: 50% 100%; }
#steps .hs .why { position: relative; transform-origin: 50% -8px; }
#steps .hs .why::before, #steps .hs .why::after { content: ''; position: absolute; top: -8px; width: 2px; height: 8px; background: #9AA3A0; }
#steps .hs .why::before { left: 22%; }
#steps .hs .why::after { right: 22%; }
#steps .hs .why .tk { width: 14px; height: 12px; margin-right: 6px; vertical-align: -1px; }
#steps .hs .why .tk path { stroke: #0F6B3E; stroke-width: 2.6; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 20; stroke-dashoffset: 0; }
#steps.a1 .hs:not(.hit) .why { transform: perspective(400px) rotateX(-92deg); opacity: 0; }
#steps.a1 .hs:not(.hit) .why .tk path { stroke-dashoffset: 20; }
#steps.a1 .hs.hit .why { animation: swingin 1.2s cubic-bezier(.3,.6,.3,1) both; }
#steps.a1 .hs.hit .why .tk path { animation: draw .45s ease .75s both; }
@keyframes swingin { 0% { transform: perspective(400px) rotateX(-92deg); opacity: 0; } 20% { opacity: 1; } 45% { transform: perspective(400px) rotateX(24deg); } 65% { transform: perspective(400px) rotateX(-10deg); } 82% { transform: perspective(400px) rotateX(4deg); } 100% { transform: none; opacity: 1; } }
@keyframes draw { from { stroke-dashoffset: 20; } to { stroke-dashoffset: 0; } }
#steps .hs.last .plate { transition: background .7s, color .7s, border-color .7s, outline-color .7s; }
#steps:not(.a2) .hs.last .plate, #steps .hs.last.arrived .plate { background: #F5C518; color: #06120F; border-color: #06120F; outline-color: #F5C518; }
#steps.a3 .hs.hit { animation: wob 1.4s ease-out; }
@keyframes wob { 0% { transform: translateX(-50%) rotate(0); } 18% { transform: translateX(-50%) rotate(3deg); } 38% { transform: translateX(-50%) rotate(-2.2deg); } 58% { transform: translateX(-50%) rotate(1.2deg); } 78% { transform: translateX(-50%) rotate(-.5deg); } 100% { transform: translateX(-50%) rotate(0); } }
#steps .hs .plate span { display: inline-block; }
#steps .hs .plate span.flip { animation: flip .5s ease-in-out; }
@keyframes flip { 0% { transform: perspective(200px) rotateX(0); } 50% { transform: perspective(200px) rotateX(90deg); } 100% { transform: perspective(200px) rotateX(0); } }
@media (prefers-reduced-motion: reduce) { #steps * { animation: none !important; transition: none !important; } }

/* Phone: the signs stack down a short vertical road; plates show without the drive (6 Oct 2026 phone check) */
@media (max-width: 760px) {
  #steps { padding: 56px 0 60px; }
  #steps .road { height: auto; position: relative; padding-left: 46px; display: grid; gap: 22px; margin-bottom: 30px; }
  #steps .road::before { content: ''; position: absolute; left: 12px; top: 0; bottom: 0; width: 18px; background: #2B3A35; border-radius: 9px; }
  #steps .road::after { content: ''; position: absolute; left: 20px; top: 8px; bottom: 8px; width: 2px; background: repeating-linear-gradient(#E9EEF2 0 10px, transparent 10px 20px); opacity: .7; }
  #steps .road svg.rd, #steps .batu, #steps .hs .post { display: none; }
  #steps .hs { position: static; transform: none !important; align-items: flex-start; animation: none !important; }
  #steps .hs .plate { min-width: 0; }
  #steps .cols { grid-template-columns: 1fr; gap: 28px; }
}

/* Arabic: mirror the road so it runs right to left like the text; the car then drives from the right and faces left */
@media (min-width: 761px) {
  [dir="rtl"] #steps .road svg.rd { transform: scaleX(-1); }
  [dir="rtl"] #steps .hs[style*="left:23%"] { left: 77% !important; }
  [dir="rtl"] #steps .hs[style*="left:55%"] { left: 45% !important; }
  [dir="rtl"] #steps .hs[style*="left:85%"] { left: 15% !important; }
  [dir="rtl"] #steps .batu { left: auto !important; right: 40px; }
}
