@font-face { font-family: "Google Sans Flex"; src: url("fonts/google-sans-flex.woff2") format("woff2"); font-weight: 1 1000; font-display: swap; }

:root {
  --bg: #f4f4f2; --ink: #161616; --line: #e3e3df; --muted: #74746f; --card: #fff; --bind: #286bfa; --uber-blue: #276ef1;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ui: "Google Sans Flex", "Noto Sans Arabic", Arial, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--ui); overflow: hidden; -webkit-font-smoothing: antialiased; }
ul { list-style: none; }

/* ---------- Stage ---------- */
.reel { position: fixed; inset: 0; overflow: hidden; background: var(--bg); }
.stage { position: absolute; left: 50%; top: 50%; width: var(--vw); height: var(--vh); transform: translate(-50%, -50%) scale(var(--k, 1)); overflow: hidden; }
.world { position: absolute; left: 0; top: 0; width: 1620px; height: 2100px; transform-origin: 0 0; }

/* ---------- Panels ---------- */
.panel { position: absolute; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px 24px 24px; box-shadow: 0 1px 0 #fff inset, 0 18px 40px -24px rgba(22, 22, 22, .18); }
.panel header { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 18px; }
.panel header span { display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 6px; border-radius: 6px; background: var(--ink); color: #fff; letter-spacing: 0; }
.panel header em { margin-left: auto; font-style: normal; font-weight: 500; letter-spacing: .02em; text-transform: none; color: var(--muted); }
.p-feed header { text-transform: none; letter-spacing: 0; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 14px; }
.p-feed header em { font-family: var(--ui); font-size: 12px; }
.p-feed { left: 0; top: 0; width: 1020px; height: 640px; }
.p-rec { left: 1060px; top: 0; width: 560px; height: 640px; }
.p-out { left: 0; top: 680px; width: 1020px; height: 640px; }
.p-tpl { left: 1060px; top: 680px; width: 560px; height: 640px; }
.p-social { left: 0; top: 1360px; width: 500px; height: 740px; }
.p-mkts { left: 540px; top: 1360px; width: 1080px; height: 740px; }

/* 01 feed sheet */
.sheet { position: relative; display: grid; grid-template-columns: 38px 58px 70px 170px 1fr 200px 64px; font-size: 13px; border-top: 1px solid var(--line); }
.sheet > span { position: relative; z-index: 1; height: 33px; padding: 0 10px; display: flex; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-bottom: 1px solid #efefec; transition: color .3s; }
.sheet > span[dir="rtl"] { justify-content: flex-end; }
.sheet > .th { height: 34px; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 11.5px; color: var(--muted); background: #f7f7f5; }
.sheet > .th.b { color: var(--bind); }
.sheet > .mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; color: var(--muted); }
.sheet > .on { color: #fff; }
.sheet .bar { position: absolute; z-index: 0; left: -6px; right: -6px; top: 34px; height: 33px; border-radius: 8px; background: var(--ink); opacity: 0; }

/* 02 record */
.fields { display: grid; gap: 1px; }
.fields li { display: grid; grid-template-columns: 158px 1fr; gap: 12px; align-items: baseline; padding: 6px 10px; border-radius: 8px; font-size: 14px; line-height: 1.3; }
.fields b { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 11.5px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.fields .v { min-height: 1.3em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fields .v[dir="rtl"] { text-align: left; }
.fields .v.none { color: #b0b0aa; }
.fields li.bound b, .fields li.soc b { color: var(--bind); }
.fields li.bound b::before, .fields li.soc b::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 7px; vertical-align: 1px; }
.fields li.bound b::before { background: var(--bind); }
.fields li.soc b::before { box-shadow: inset 0 0 0 1.5px var(--bind); }
.fields li.flash { animation: flash .9s var(--ease); }
@keyframes flash { 0% { background: rgba(40, 107, 250, .14); } 100% { background: transparent; } }

/* 03 template */
.tpl { position: relative; height: 488px; background: repeating-conic-gradient(#f1f1ee 0 25%, #f7f7f5 0 50%) 0 0 / 20px 20px; border-radius: 12px; }
.tpl .bn { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.78); border-radius: 14px; box-shadow: 0 0 0 1.3px #d6d6d2, 0 18px 40px -20px rgba(0, 0, 0, .25); }
.legend { display: grid; gap: 4px; margin-top: 16px; font-size: 13px; color: var(--muted); }
.legend .lg-feed { color: var(--bind); font-weight: 500; }
.wires { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: visible; pointer-events: none; }
.wire { fill: none; stroke: var(--bind); stroke-width: 2; stroke-linecap: round; }

/* 04 formats */
.out { position: relative; height: 560px; }
.out-in { position: absolute; left: 0; top: 0; width: 1090px; height: 780px; transform-origin: 0 0; transform: scale(.72); }
.cell { position: absolute; }
.cell b, .mk b { position: absolute; left: 0; top: -26px; font-size: 16px; font-weight: 600; color: var(--muted); }
.out-in .bn, .mkts .bn { border-radius: 14px; box-shadow: 0 0 0 2px #d6d6d2; }
.cell:not(.on) .bn, .mk:not(.on) .bn { opacity: 0; translate: 0 16px; }
.cell.on .bn, .mk.on .bn { transition: opacity .5s var(--ease), translate .6s var(--ease); transition-delay: var(--d); }
.cell:not(.on) b, .mk:not(.on) b { opacity: 0; }
.cell.on b, .mk.on b { transition: opacity .4s; transition-delay: var(--d); }

/* 05 social */
.post { width: 452px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; opacity: 0; transition: opacity .4s; }
.post.on { opacity: 1; }
.post.leave .so-text, .post.leave .so-head, .post.leave .so-foot { opacity: 0; transition: opacity .2s; }
.so-top { display: flex; align-items: center; gap: 10px; padding: 12px 14px; direction: ltr; }
.so-av { width: 36px; height: 36px; border-radius: 50%; background: #000; display: grid; place-items: center; }
.so-logo { width: 26px; height: auto; fill: #fff; }
.so-top b { display: block; font-size: 14px; }
.so-top small { font-size: 12px; color: var(--muted); }
.so-text { padding: 0 14px 12px; font-size: 14px; line-height: 1.4; min-height: 3.2em; transition: opacity .3s; }
.so-img { position: relative; aspect-ratio: 1; background: #ececea; overflow: hidden; }
.so-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.so-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .55), transparent 55%); }
.so-head { position: absolute; z-index: 1; left: 22px; right: 22px; top: 20px; display: flex; flex-direction: column; color: #fff; font-size: 34px; transition: opacity .3s; }
.so-head svg { display: block; height: 1.08em; fill: currentColor; overflow: visible; }
.so-foot { display: grid; gap: 2px; padding: 10px 14px 14px; background: #f3f3f1; transition: opacity .3s; }
.so-dom { font-size: 11px; letter-spacing: .04em; color: var(--muted); direction: ltr; text-align: start; }
.so-title { font-size: 15px; }
.so-desc { font-size: 13px; color: var(--muted); }

/* 06 markets */
.mkts { position: relative; height: 680px; }
.mk { position: absolute; width: 210px; height: 175px; }
.mk .bn { transform-origin: 0 0; }
.mk b { top: -26px; display: flex; gap: 6px; font-size: 13px; }
.mk b i { font-style: normal; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-weight: 500; }

/* ---------- Banner ---------- */
.bn { position: relative; flex: none; overflow: hidden; background: #fff; color: #000; font-size: var(--hs); }
.bn-photo { position: absolute; background: #ececea; overflow: hidden; }
.bn-photo img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transform: scale(1.12); }
.s-photo .bn-photo img { opacity: 1; transform: none; transition: opacity .6s, transform 4.5s cubic-bezier(.15, .7, .2, 1); transition-delay: var(--d, 0s); }
.bn-copy { position: absolute; display: flex; flex-direction: column; }
.bn-logo { display: block; height: var(--ls); width: auto; fill: #000; opacity: 0; transition: opacity .5s; direction: ltr; }
.s-logo .bn-logo { opacity: 1; transition-delay: var(--d, 0s); }
.bn-head { display: flex; flex-direction: column; }
.ln { display: flex; flex-wrap: wrap; column-gap: .2em; }
.bn-head .w { display: block; overflow: hidden; margin-bottom: -.04em; }
.bn-head svg, .bn-cta svg { display: block; height: 1.08em; fill: currentColor; overflow: visible; }
/* Arabic and Urdu: live text, Uber Move has no Arabic glyphs */
.tx { display: block; font-family: "Noto Sans Arabic", sans-serif; font-weight: 600; line-height: 1.35; white-space: nowrap; }
.bn-cta .tx { font-weight: 500; line-height: 1.2; }
.bn-head svg, .bn-head .tx { transform: translateY(110%); }
.s-head .bn-head svg, .s-head .bn-head .tx { transform: none; transition: transform .7s var(--ease); transition-delay: calc(var(--d, 0s) + .15s + var(--i) * 45ms); }
.leave .bn-head svg, .leave .bn-head .tx { transform: translateY(-110%); transition: transform .28s cubic-bezier(.5, 0, .9, .5); transition-delay: calc(var(--i) * 15ms); }
.bn-cta { align-self: flex-start; display: inline-flex; align-items: center; gap: .45em; padding: .62em .95em .6em; border-radius: .3em; background: #286bfa; color: #fff; font-size: var(--cs); opacity: 0; transform: scale(.8); transform-origin: 0 50%; }
.bn-cta .cw { display: flex; flex-wrap: wrap; column-gap: .25em; }
.bn-cta .arr { flex: none; height: .9em; width: .9em; fill: none; stroke: currentColor; stroke-width: 2.4; }
.s-cta .bn-cta { opacity: 1; transform: none; transition: opacity .4s, transform .5s cubic-bezier(.3, 1.5, .5, 1); transition-delay: calc(var(--d, 0s) + .6s); }
.leave .bn-cta { opacity: 0; transform: scale(.9); transition: opacity .2s, transform .25s; }

.k-tall .bn-copy { left: 9%; right: 9%; top: 5.5%; height: 49%; gap: 1em; }
.k-tall .bn-logo { align-self: flex-start; }
.k-tall .bn-head { margin-top: .3em; }
.k-tall .bn-cta { margin-top: auto; }
.k-tall .bn-photo { left: 0; right: 0; bottom: 0; height: 43%; }
.k-box .bn-photo { left: 0; right: 0; top: 0; height: 50%; }
.k-box .bn-copy { left: 7%; right: 7%; top: 55%; bottom: 7%; justify-content: space-between; gap: .4em; }
.k-box > .bn-logo { position: absolute; right: 7%; bottom: calc(7% + (var(--cs) * 2.2 - var(--ls)) / 2); }
.k-box .bn-copy .bn-cta { margin-inline-end: calc(var(--ls) * 2.4); }
.k-strip .bn-copy { inset: 0; flex-direction: row; align-items: center; gap: .8em; padding: 0 .8em; }
.k-strip .bn-head { flex: 1; min-width: 0; }
.k-strip .bn-cta { align-self: center; flex: none; max-width: 38%; margin-inline-end: var(--cr, 0); }
.k-strip .bn-photo { right: 0; top: 0; bottom: 0; width: var(--pw, 0); }
/* right-to-left markets mirror the layout */
.bn[dir="rtl"] .bn-copy { direction: rtl; }
.bn[dir="rtl"] .bn-cta { transform-origin: 100% 50%; }
.bn[dir="rtl"] .arr { transform: scaleX(-1); }
.bn[dir="rtl"].k-box > .bn-logo { right: auto; left: 7%; }
.bn[dir="rtl"].k-strip .bn-photo { right: auto; left: 0; }

/* ---------- HUD ---------- */
.hud p { position: absolute; z-index: 3; }
.hud-title, .hud-rec, .hud-step { display: flex; align-items: center; background: rgba(255, 255, 255, .88); border: 1px solid var(--line); border-radius: 999px; backdrop-filter: blur(10px); }
.hud-title { left: 32px; top: 26px; gap: 10px; font-size: 17px; padding: 8px 16px; align-items: baseline; }
.hud-title b { font-weight: 600; }
.hud-title span { color: var(--muted); font-size: 14px; }
.hud-rec { right: 32px; top: 26px; gap: 10px; padding: 9px 16px; font-size: 14px; font-weight: 600; font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.hud-rec .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--bind); }
.hud-step { left: 32px; bottom: 28px; gap: 12px; font-size: 20px; font-weight: 500; padding: 10px 18px 10px 10px; }
.step-n { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 13px; font-weight: 700; }
.step-t { display: inline-block; }
.hud-note { right: 32px; bottom: 34px; font-size: 13px; color: var(--muted); padding: 6px 12px; background: rgba(244, 244, 242, .85); border-radius: 999px; }

.cursor { position: absolute; left: 0; top: 0; z-index: 4; width: 30px; height: 30px; margin: -3px 0 0 -4px; fill: var(--ink); stroke: #fff; stroke-width: 1.6; stroke-linejoin: round; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .25)); pointer-events: none; }
.ripple { position: absolute; z-index: 3; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; border: 2px solid var(--ink); pointer-events: none; animation: ripple .6s var(--ease) forwards; }
@keyframes ripple { from { transform: scale(.2); opacity: .9; } to { transform: scale(1); opacity: 0; } }

.finale { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; background: rgba(244, 244, 242, .82); backdrop-filter: blur(14px); opacity: 0; visibility: hidden; }
.finale p { font-size: 92px; line-height: .98; letter-spacing: -.045em; font-weight: 600; }
.finale em { font-style: normal; color: #9a9a95; }

.portrait .hud-note { display: none; }
.portrait .hud-step { font-size: 24px; }
.portrait .finale p { font-size: 100px; }

/* template slots: field names until the record binds */
.slots .bn-head { position: relative; min-height: 2.2em; }
.slots .bn-head::after, .slots .bn-copy::after { position: absolute; display: grid; place-items: center; border: 2px dashed rgba(40, 107, 250, .45); border-radius: 8px; font: 500 15px ui-monospace, "SF Mono", Menlo, monospace; color: var(--bind); background: rgba(40, 107, 250, .04); transition: opacity .35s; }
.slots .bn-head::after { content: "{split headline 1–4}"; inset: 0; }
.slots .bn-copy::after { content: "{headline}"; left: 0; bottom: 0; width: 70%; height: calc(var(--cs) * 2.45); }
.slots.s-head .bn-head::after, .slots.s-cta .bn-copy::after { opacity: 0; }

/* ---------- Stills (?still=) and case-page covers (?cover=1|2|3, 1600 × 1132) ---------- */
.still .hud, .still .cursor, .still .finale { display: none; }
.still *, .still *::before, .still *::after { transition: none !important; animation: none !important; }
.cover-2 { background: var(--uber-blue); }
.cover-title { position: absolute; inset: 0; z-index: 6; padding: 110px 112px; display: flex; flex-direction: column; background: var(--uber-blue); color: #fff; overflow: hidden; }
.cv-logo { height: 70px; width: auto; fill: #fff; align-self: flex-start; }
.cover-title h1 { margin-top: auto; font-size: 150px; line-height: .95; font-weight: 600; letter-spacing: -.045em; }
.cover-title p { margin-top: 26px; max-width: 15em; font-size: 32px; line-height: 1.3; color: rgba(255, 255, 255, .78); }
.cover-art { position: absolute; right: 120px; top: 50%; width: 520px; height: 820px; transform: translateY(-50%); }
.cover-art .bn { position: absolute; border-radius: 18px; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .55); }
.feed-art .bn:nth-child(1) { right: 0; top: -30px; transform: rotate(4deg) scale(1.1); transform-origin: 100% 0; }
.feed-art .bn:nth-child(2) { left: -20px; top: 275px; transform: rotate(-4deg) scale(1.1); transform-origin: 0 0; }
.feed-art .bn:nth-child(3) { right: 0; bottom: -40px; transform: rotate(3deg) scale(1.1); transform-origin: 100% 100%; }

/* nothing in the copy column may shrink: overflow must reach fitType instead */
.bn-copy > * { flex-shrink: 0; }
