/* Utopia web revamp v3 — language layer: the language menu in the nav pill, and Chinese type.
   Only the menu's soft rise animates. The switch is injected by assets/js/i18n.js; with JS off it does not exist. */

/* first paint in BM / Chinese: the head bootstrap adds .i18n-pending, i18n.js removes it once the words are in */
html.i18n-pending body{visibility:hidden}

/* ---- the language menu: one small button in the pill (EN ▾), the three languages drop down on click, or on hover
   for a mouse. The card is the mega menu's: white, 24px corners, the lifted shadow, a 6px soft rise. ---- */
.i18n-sw{position:relative;display:flex;align-items:center;flex:none;margin:0;padding:0;border:0}
.i18n-sw__btn{-webkit-appearance:none;appearance:none;display:inline-flex;align-items:center;justify-content:center;gap:5px;box-sizing:border-box;height:var(--tap,44px);min-width:var(--tap,44px);margin:0;padding:0 8px 0 10px;border:0;border-radius:999px;background:none;font:500 14px/1 var(--f-body,system-ui,sans-serif);letter-spacing:0;color:var(--ink-2);white-space:nowrap;cursor:pointer;-webkit-tap-highlight-color:transparent;transition:background-color 160ms ease,color 160ms ease}
.i18n-sw__btn:hover,.i18n-sw.is-open>.i18n-sw__btn{background:color-mix(in srgb,var(--ink) 6%,transparent);color:var(--ink)}
.i18n-sw__btn:focus-visible,.i18n-sw__opt:focus-visible{outline:2px solid var(--blue);outline-offset:-2px}
.i18n-sw__chev{width:12px;height:12px;flex:none;transition:transform 320ms var(--ease)}
.i18n-sw.is-open .i18n-sw__chev{transform:rotate(180deg)}
.i18n-sw__menu{position:absolute;right:0;top:calc(100% + 10px);z-index:6;box-sizing:border-box;display:grid;gap:2px;width:max-content;min-width:196px;padding:8px;border-radius:24px;background:var(--white);box-shadow:0 0 0 1px var(--hair),var(--shadow-lift);opacity:0;visibility:hidden;transform:translate3d(0,-6px,0);transition:opacity 200ms ease,transform 300ms var(--ease),visibility 0s linear 300ms}
/* a bridge over the gap, so the pointer can travel from the button down to the card */
.i18n-sw__menu::before{content:"";position:absolute;left:0;right:0;top:-14px;height:14px}
.i18n-sw.is-open>.i18n-sw__menu{opacity:1;visibility:visible;transform:none;transition:opacity 200ms ease,transform 300ms var(--ease),visibility 0s}
.i18n-sw__opt{-webkit-appearance:none;appearance:none;display:flex;align-items:center;gap:10px;box-sizing:border-box;width:100%;min-height:var(--tap,44px);margin:0;padding:0 12px;border:0;border-radius:16px;background:none;font:500 15px/1.2 var(--f-body,system-ui,sans-serif);letter-spacing:0;color:var(--ink-2);text-align:left;white-space:nowrap;cursor:pointer;-webkit-tap-highlight-color:transparent;transition:background-color 160ms ease,color 160ms ease}
.i18n-sw__opt:hover,.i18n-sw__opt:focus-visible{background:color-mix(in srgb,var(--ink) 6%,transparent);color:var(--ink)}
.i18n-sw__opt[aria-checked="true"]{color:var(--ink);font-weight:600}
.i18n-sw__code{flex:none;min-width:30px;font-size:14px;color:var(--mute)}
.i18n-sw__opt[aria-checked="true"] .i18n-sw__code{color:var(--blue-mid,var(--blue))}
.i18n-sw__name{flex:1}
.i18n-sw__tick{width:14px;height:14px;flex:none;color:var(--blue-mid,var(--blue));opacity:0}
.i18n-sw__opt[aria-checked="true"] .i18n-sw__tick{opacity:1}
.i18n-sw :is([lang|="zh"]){font-family:"PingFang SC","Hiragino Sans GB","Noto Sans SC","Microsoft YaHei",system-ui,sans-serif}
/* the Chinese row says 中文 once */
.i18n-sw__opt[data-lang="zh"] .i18n-sw__code{font-family:var(--f-body,system-ui,sans-serif)}
@media (max-width:999px){.i18n-sw{margin-right:2px}.i18n-sw__menu{right:-46px}}
@media (min-width:1000px){.i18n-sw{margin:0 -4px 0 -6px}.i18n-sw__btn{height:38px;min-width:0;padding:0 9px 0 11px}}
/* a page without the nav pill: a quiet corner control */
.i18n-sw--float{position:fixed;top:10px;right:12px;z-index:60;border-radius:999px;background:color-mix(in srgb,var(--linen) 86%,transparent);box-shadow:0 0 0 1px var(--hair)}
.i18n-sw--float .i18n-sw__menu{right:0}
body.paused .i18n-sw__menu,body.paused .i18n-sw__chev{transition:none!important}
@media (prefers-reduced-motion:reduce){.i18n-sw__menu,.i18n-sw__chev,.i18n-sw__btn,.i18n-sw__opt{transition:none!important}.i18n-sw__menu{transform:none}}

/* ---- Chinese type: system Chinese faces after the Latin ones, no tight tracking ---- */
html.lang-zh{--f-display:'Plus Jakarta Sans',"PingFang SC","Hiragino Sans GB","Noto Sans SC","Microsoft YaHei",system-ui,sans-serif;--f-body:'Inter',"PingFang SC","Hiragino Sans GB","Noto Sans SC","Microsoft YaHei",system-ui,-apple-system,sans-serif;line-break:strict}
html.lang-zh body *{letter-spacing:0!important}
/* Chinese headings break at punctuation and spaces, not in the middle of a phrase; a clause too long for a narrow
   screen may still break anywhere. One em is one full character, so the Latin measure of 15em is widened a little. */
html.lang-zh :is(h1,h2,h3,h4,.h2,.h3,.price__line,.bn-h,.ap-title,.nlk-title,.cta__title,.bn-more__big){word-break:keep-all;overflow-wrap:anywhere}
html.lang-zh :is(.h2,.h3,.price__line,.bn-h,.ap-title,.cta__title){line-height:1.2}
html.lang-zh :is(.h2,.price__line,.bn-h){max-width:19em}
html.lang-zh .hero__title{line-height:1.12}
/* Bahasa Malaysia on a phone: "Jabatan pemasaran" is wider than "Your operations", so the home hero steps down a size to stay inside the screen. */
@media (max-width:760px){html.lang-ms .hero__title:has(.rot){font-size:calc(var(--h1-hero-m) * .84)}}
html.lang-zh .statement{line-height:1.28}
html.lang-zh :is(.lead,.hero__sub,.foot__line,.bn-lead,.ap-line,.nlk-line){text-wrap:balance}

/* ---- no orphans (CY, 16 Nov 2026): a heading, line or button never ends with one word alone on its last line.
   Zero specificity (:where), so any rule that already sets text-wrap on an element keeps its own value. In every
   language, English included; the words do not change. i18n.js also ties the last two words of translated lines. ---- */
:where(html[lang]) :where(h1,h2,h3,h4,h5,h6,p,li,blockquote,figcaption,summary,dt,dd,td,th,label,.btn,.lead,.statement,.link-arrow){text-wrap:pretty}
.i18n-nw{white-space:nowrap}
