/* Signature visuals — one per trade. State: .sig-i.on (shown) / .sig-i.cur (latest), --p = progress 0..1 on .sig */
.sig { --p: 0; position: relative; width: 100%; color: var(--paper); font-family: var(--sans); }
.sig-lab { font-size: .82rem; font-weight: 600; letter-spacing: .01em; white-space: nowrap; }
.sig-i { transition: transform .9s var(--ease), opacity .6s ease, color .5s, background-color .5s, border-color .5s; }

/* cuisine — chips land on the plate */
.sv-plate { container-type: inline-size; --r: 40cqw; position: relative; aspect-ratio: 1; width: min(100%, 520px); margin: auto; }
.sv-rim { position: absolute; inset: 9%; width: 82%; height: 82%; transform: rotate(-90deg); }
.sv-rim circle { fill: none; stroke: rgba(243, 238, 228, .22); stroke-width: .8; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--p)); transition: stroke-dashoffset .6s linear; }
.sv-rim circle + circle { stroke: var(--gold); stroke-width: .5; opacity: .6; }
.sv-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.sv-center b { font: 400 clamp(3rem, 7vw, 5.4rem)/1 var(--serif); }
.sv-center small { opacity: .5; font-size: .8rem; letter-spacing: .2em; }
.chipx { position: absolute; left: 50%; top: 50%; display: flex; align-items: center; gap: .5rem; padding: .55rem .9rem .55rem .6rem; border-radius: 99px; background: var(--paper); color: var(--ink);
  transform: translate(-50%, -50%) rotate(var(--a)) translate(calc(var(--r) * 1.6)) rotate(calc(-1 * var(--a))); opacity: 0; }
.chipx i { width: 10px; height: 10px; border-radius: 50%; background: var(--red); flex: none; }
.chipx.on { opacity: 1; transform: translate(-50%, -50%) rotate(var(--a)) translate(var(--r)) rotate(calc(-1 * var(--a))); }
.chipx:nth-child(odd of .chipx) i { background: var(--green); }

/* pâtisserie — layers drop in */
.sv-cake { display: flex; flex-direction: column; align-items: center; width: min(100%, 520px); margin: auto; padding-top: 2rem; }
.layer { position: relative; height: 54px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: var(--ink); opacity: 0; transform: translateY(-160px) rotate(-3deg); }
.layer.on { opacity: 1; transform: none; }
.layer i { display: none; }
.l0 { width: 92%; background: #c99b62; } .l1 { width: 84%; background: #f3e6cf; } .l2 { width: 78%; background: #8a4b2a; color: var(--paper); }
.l3 { width: 70%; background: #efd9b4; } .l4 { width: 62%; background: var(--red); color: #fff; } .l5 { width: 54%; background: #fbf6ec; border-radius: 30px 30px 10px 10px; }
.layer + .layer { margin-top: 4px; }
.sv-stand { width: 100%; height: 10px; border-radius: 6px; background: rgba(243, 238, 228, .25); margin-top: 6px; }

/* service — table top view */
.sv-table { width: min(100%, 560px); margin: auto; }
.sv-table svg { width: 100%; height: auto; display: block; }
.sv-table .cloth { fill: rgba(243, 238, 228, .05); stroke: rgba(243, 238, 228, .18); }
.sv-table .pl { fill: var(--paper); } .sv-table .pl2 { fill: none; stroke: rgba(27, 25, 22, .15); stroke-width: 2; }
.sv-table .cut { fill: none; stroke: var(--paper); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.sv-table .gl { fill: none; stroke: var(--paper); stroke-width: 3; } .sv-table .gl2 { fill: rgba(217, 58, 47, .55); }
.sv-table .nap { fill: var(--red); }
.sv-table g.sig-i { opacity: 0; transform-box: fill-box; transform-origin: center; transform: translateY(-40px) scale(.9); }
.sv-table g.sig-i.on { opacity: 1; transform: none; }
.sv-legend { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; justify-content: center; margin: 1.4rem 0 0; padding: 0; list-style: none; counter-reset: s; }
.sv-legend li { opacity: .3; counter-increment: s; }
.sv-legend li::before { content: counter(s, decimal-leading-zero) ' '; color: var(--gold); font-size: .75rem; }
.sv-legend li.on { opacity: 1; }

/* réception — key board */
.sv-keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2.4rem 1.2rem; width: min(100%, 560px); margin: auto; padding: 1.4rem; border-radius: 14px; background: #2a1d14; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.key { position: relative; display: flex; flex-direction: column; align-items: center; transform-origin: 50% 0; transform: rotate(-14deg); opacity: .28; }
.key .hook { width: 12px; height: 12px; border-radius: 50%; background: #b48a4a; box-shadow: 0 0 0 3px #2a1d14, 0 0 0 4px rgba(180, 138, 74, .4); }
.key .tag { margin-top: 6px; width: 100%; padding: .9rem .4rem .7rem; border-radius: 6px 6px 22px 22px; background: #5b3b25; color: #f3e6cf; text-align: center; display: grid; gap: .25rem; }
.key .tag b { font: 500 1.35rem/1 var(--serif); }
.key .sig-lab { font-size: .68rem; white-space: normal; line-height: 1.2; }
.key.on { opacity: 1; transform: rotate(0); animation: swing 1.4s var(--ease); }
.key.on .tag { background: var(--red); color: #fff; }
@keyframes swing { 0% { transform: rotate(-14deg); } 40% { transform: rotate(8deg); } 70% { transform: rotate(-3deg); } 100% { transform: rotate(0); } }

/* guide — route with stops */
.sv-route { position: relative; width: min(100%, 620px); margin: auto; aspect-ratio: 490 / 260; }
.sv-route svg { width: 100%; height: 100%; overflow: visible; }
.sv-route .road-bg { fill: none; stroke: rgba(243, 238, 228, .15); stroke-width: 2; stroke-dasharray: 2 8; stroke-linecap: round; }
.sv-route .road { fill: none; stroke: var(--gold); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--p)); transition: stroke-dashoffset .5s linear; }
.stop { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%) scale(.6); opacity: .25; display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.stop i { width: 16px; height: 16px; border-radius: 50%; background: var(--ink); border: 3px solid rgba(243, 238, 228, .5); }
.stop .sig-lab { position: absolute; top: 22px; padding: .25rem .55rem; border-radius: 6px; background: var(--paper); color: var(--ink); font-size: .74rem; }
.stop:nth-of-type(even) .sig-lab { top: auto; bottom: 22px; }
.stop.on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.stop.on i { background: var(--red); border-color: var(--paper); }

/* hôtesse — greetings */
.sv-hello { display: grid; place-items: center; gap: 2rem; padding: 2rem 0; }
.sv-hello .badge { display: flex; align-items: center; gap: .8rem; padding: .7rem 1.1rem .7rem .7rem; border-radius: 12px; background: var(--paper); color: var(--ink); box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .6); }
.sv-hello .badge img { border-radius: 50%; }
.sv-hello .badge b { display: block; font-size: .95rem; } .sv-hello .badge small { opacity: .6; font-size: .75rem; }
.sv-hello .words { position: relative; height: 1.2em; width: 100%; font: 400 clamp(3rem, 8vw, 6.5rem)/1.2 var(--serif); text-align: center; overflow: hidden; }
.sv-hello .w { position: absolute; inset: 0; opacity: 0; transform: translateY(100%); }
.sv-hello .w[lang=ar] { font-family: var(--ar-display); }
.sv-hello .w.on { opacity: .18; transform: translateY(-100%); }
.sv-hello .w.cur { opacity: 1; transform: none; color: var(--paper); }

/* gestion — the hotel facade */
.sv-hotel { width: min(100% - 10.5rem, 380px); margin: auto; padding: 0; display: flex; flex-direction: column; }
.sv-hotel .roof { align-self: center; padding: .35rem 1.2rem; border-radius: 6px 6px 0 0; background: #23262a; color: var(--gold); font-size: .75rem; letter-spacing: .5em; text-indent: .5em; }
.floor { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; padding: 12px 14px; background: #23262a; border-top: 1px solid rgba(255, 255, 255, .05); }
.floor .win { height: 26px; border-radius: 3px; background: #15171a; transition: background-color .5s, box-shadow .5s; }
.floor.on .win { background: #f3c97a; box-shadow: 0 0 18px -2px rgba(243, 201, 122, .55); }
.floor.on .win:nth-child(2n) { transition-delay: .12s; } .floor.on .win:nth-child(3n) { transition-delay: .24s; }
.floor .sig-lab { position: absolute; inset-inline-start: calc(100% + 16px); top: 50%; transform: translateY(-50%); white-space: nowrap; opacity: .25; transition: opacity .5s; }
.floor.on .sig-lab { opacity: 1; }
.sv-hotel .door { align-self: center; width: 22%; height: 46px; background: var(--red); border-radius: 30px 30px 0 0; margin-top: -1px; }

@media (prefers-reduced-motion: reduce) { .sig-i { transition: none; } .key.on { animation: none; } }
