/* Topdata IoT — editorial, restrained. One typeface family, hairlines, one accent used sparingly. */
:root {
  --paper: #f3f3f0;
  --paper-2: #ebebe7;
  --ink: #111214;
  --ink-2: #4a4c52;
  --ink-3: #6b6d73;
  --line: rgba(17, 18, 20, .12);
  --accent: #00a9e3;
  --ease: cubic-bezier(.22, .61, .21, 1);
  --sans: "Geist", "IBM Plex Sans Arabic", ui-sans-serif, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --gutter: max(5vw, 24px);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
html.lenis, html.lenis body { height: auto; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
html[dir="rtl"] body { font-family: "IBM Plex Sans Arabic", var(--sans); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--ink); color: var(--paper); }

/* ---------- stage ---------- */
#stage { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; display: block; }
.stage-veil { position: fixed; inset: 0; z-index: 1; pointer-events: none; background: var(--paper); opacity: 0; transition: opacity .8s var(--ease); }
body.past-story .stage-veil { opacity: 1; }

/* ---------- loader ---------- */
.loader { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; align-content: center; gap: 28px; background: var(--paper); transition: opacity .9s var(--ease), visibility .9s; }
.loader img { width: 70px; }
.loader-bar { width: 120px; height: 1px; background: var(--line); overflow: hidden; }
.loader-bar span { display: block; height: 100%; width: 0; background: var(--ink); transition: width .4s var(--ease); }
body.ready .loader { opacity: 0; visibility: hidden; }

/* ---------- type primitives ---------- */
.index { margin: 0 0 28px; font: 400 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.display { margin: 0; font: 400 clamp(42px, 5.4vw, 86px)/1 var(--sans); letter-spacing: -.045em; }
.display .line { display: block; overflow: hidden; padding-bottom: .06em; }
.display .line > span { display: inline-block; }
.display .line:last-child > span { color: #8a8c92; }
.title { margin: 0; font: 400 clamp(34px, 3.9vw, 58px)/1.04 var(--sans); letter-spacing: -.035em; }
.title.xl { font-size: clamp(40px, 5.4vw, 84px); line-height: 1; }
.title.mega { font-size: clamp(48px, 8vw, 132px); line-height: .96; letter-spacing: -.05em; max-width: 14ch; }
html[dir="rtl"] .display, html[dir="rtl"] .title { letter-spacing: 0; line-height: 1.2; }
.body, .lede { margin: 24px 0 0; color: var(--ink-2); font-size: clamp(17px, 1.25vw, 19px); max-width: 34em; }
.lede { font-size: clamp(18px, 1.4vw, 21px); }

/* ---------- buttons / links ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; height: 50px; padding: 0 28px; border-radius: 999px; font: 500 15px/1 var(--sans); border: 0; cursor: pointer; transition: background .3s, color .3s, transform .4s var(--ease); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: #2a2c31; }
.btn:active { transform: scale(.98); }
.link-arrow { display: inline-flex; align-items: center; gap: 10px; font: 500 15px/1 var(--sans); padding: 0; border: 0; background: none; cursor: pointer; }
.link-arrow::after { content: "→"; transition: transform .4s var(--ease); }
html[dir="rtl"] .link-arrow::after { content: "←"; }
.link-arrow:hover::after { transform: translateX(4px); }
html[dir="rtl"] .link-arrow:hover::after { transform: translateX(-4px); }

/* ---------- nav ---------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; height: 72px; padding: 0 var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 24px; transition: transform .6s var(--ease), background .4s, border-color .4s; border-bottom: 1px solid transparent; }
.nav.solid { background: rgba(243, 243, 240, .86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom-color: var(--line); }
.nav.hide { transform: translateY(-100%); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 40px; width: auto; }
.brand-sub { font: 500 12px/1 var(--mono); letter-spacing: .12em; color: var(--ink-2); padding-left: 12px; border-left: 1px solid var(--line); }
html[dir="rtl"] .brand-sub { padding: 0 12px 0 0; border-left: 0; border-right: 1px solid var(--line); }
.nav-links { display: flex; gap: 28px; }
.nav-links a, .nav-signin, .lang { font: 400 14px/1 var(--sans); color: var(--ink-2); transition: color .3s; }
.nav-links a:hover, .nav-signin:hover, .lang:hover { color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: 26px; }
.lang { border: 0; background: none; cursor: pointer; padding: 0; font-family: "IBM Plex Sans Arabic", var(--sans); }
.nav-signin { color: var(--ink); padding: 11px 18px; border: 1px solid var(--ink); border-radius: 999px; transition: background .3s, color .3s; }
.nav-signin:hover { background: var(--ink); color: var(--paper); }
.nav-actions { gap: 14px; }
.nav-actions .lang { margin-inline-end: 12px; }
.nav-start { font: 500 14px/1 var(--sans); padding: 12px 19px; border-radius: 999px; background: var(--ink); color: var(--paper); transition: background .3s; }
.nav-start:hover { background: #2a2c31; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nav-menu { display: none; position: relative; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: none; cursor: pointer; }
.nav-menu i { position: absolute; left: 13px; right: 13px; height: 1.5px; background: var(--ink); transition: transform .5s var(--ease), top .5s var(--ease); }
.nav-menu i:nth-of-type(1) { top: 17px; } .nav-menu i:nth-of-type(2) { top: 25px; }
body.menu-open .nav-menu i:nth-of-type(1) { top: 21px; transform: rotate(45deg); }
body.menu-open .nav-menu i:nth-of-type(2) { top: 21px; transform: rotate(-45deg); }
body.menu-open .nav { background: var(--paper); transform: none; border-bottom-color: var(--line); }
.menu-sheet { position: fixed; inset: 0; z-index: 45; padding: 104px var(--gutter) 40px; background: var(--paper); display: flex; flex-direction: column; gap: 36px; overflow-y: auto;
  opacity: 0; transform: translateY(-12px); transition: opacity .45s var(--ease), transform .6s var(--ease); }
.menu-sheet.on { opacity: 1; transform: none; }
.menu-links { border-top: 1px solid var(--ink); }
.menu-links a { display: flex; align-items: baseline; gap: 18px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.menu-links span { font: 400 12px/1 var(--mono); color: var(--ink-3); width: 24px; }
.menu-links b { font: 400 clamp(26px, 7vw, 40px)/1.1 var(--sans); letter-spacing: -.03em; }
.menu-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.menu-cta .btn { flex: 1; min-width: 140px; }
.btn-line { border: 1px solid var(--ink); background: none; color: var(--ink); }
.menu-contact { margin: auto 0 0; display: grid; gap: 8px; font-size: 15px; color: var(--ink-2); }
html[dir="rtl"] .menu-contact b { display: inline-block; }
@media (max-width: 1300px) { .nav-menu { display: block; } .nav-links { display: none; } }
@media (max-width: 640px) { .nav-signin, .nav-start { display: none; } .nav-actions .lang { margin-inline-end: 4px; } }
@media (min-width: 1301px) { .menu-sheet { display: none !important; } }

/* ---------- chapter rail ---------- */
.rail { position: fixed; right: var(--gutter); top: 50%; z-index: 40; transform: translateY(-50%); list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; transition: opacity .4s; }
html[dir="rtl"] .rail { right: auto; left: var(--gutter); }
.rail li { width: 18px; height: 1px; background: var(--ink-3); opacity: .5; transition: width .5s var(--ease), opacity .4s; justify-self: end; }
.rail li.on { width: 34px; opacity: 1; background: var(--ink); }
body.past-story .rail { opacity: 0; }

/* ---------- story ---------- */
main { position: relative; z-index: 2; }
.chapter { min-height: 130vh; padding: 0 var(--gutter); display: flex; flex-direction: column; justify-content: center; pointer-events: none; }
.chapter .copy { position: relative; pointer-events: auto; width: min(460px, 100%); }
.chapter.right .copy { margin-left: auto; margin-right: 5vw; }
html[dir="rtl"] .chapter.right .copy { margin-right: auto; margin-left: 5vw; }
html[dir="rtl"] .chapter.left .copy { margin-left: auto; }
/* the camera keeps the subject out of the copy column (main.js); this soft paper wash only calms background detail */
.chapter .copy::before { content: ""; position: absolute; z-index: -1; pointer-events: none; display: none; }
.chapter .title { max-width: 13ch; }
.chapter.hero .lede { max-width: 26em; }
/* the white maquette city runs under the scale copy: a soft paper halo on the letters, not a slab */
#scale .copy { text-shadow: 0 0 2px var(--paper), 0 0 10px var(--paper), 0 0 22px var(--paper), 0 0 36px rgba(243, 243, 240, .9); }
/* the city of sites fills the whole frame: give its copy a firmer paper wash */
main { overflow-x: clip; }
.chapter.hero { min-height: 100vh; justify-content: flex-end; padding-bottom: 9vh; position: relative; }
.chapter.hero .copy { width: min(640px, 100%); position: static; }
.chapter.hero .display { font-size: clamp(40px, 4.6vw, 76px); }
.chapter.hero .copy::before { display: none; }
.hero-cta { display: flex; align-items: center; flex-wrap: wrap; gap: 30px; margin-top: 40px; }
.hero-stats { display: flex; margin: 64px 0 0; border-top: 1px solid var(--line); max-width: 560px; }
.hero-stats div { flex: 1; padding: 18px 24px 0 0; }
.hero-stats div + div { padding-left: 24px; border-left: 1px solid var(--line); }
html[dir="rtl"] .hero-stats div + div { border-left: 0; border-right: 1px solid var(--line); padding: 18px 24px 0 0; }
.hero-stats dt { font: 400 28px/1 var(--sans); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.hero-stats dd { margin: 8px 0 0; font: 400 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }

.spec { list-style: none; margin: 34px 0 0; padding: 0; border-top: 1px solid var(--line); }
.spec li { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.spec em { font: 400 12px/1.6 var(--mono); font-style: normal; letter-spacing: .04em; color: var(--ink-3); text-transform: uppercase; }
.live-stats { display: flex; margin: 40px 0 0; border-top: 1px solid var(--line); }
.live-stats div { flex: 1; padding-top: 18px; }
.live-stats dt { font: 400 clamp(40px, 4vw, 60px)/1 var(--sans); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.live-stats dd { margin: 10px 0 0; font: 400 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }

/* ---------- sections ---------- */
.section { position: relative; padding: 160px var(--gutter); }
.sec-head { max-width: 980px; margin-bottom: 90px; }

.numbers { border-top: 1px solid var(--line); padding-top: 120px; }
.num-row { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--ink); }
.num { padding: 34px 32px 0 0; }
.num + .num { padding-left: 32px; border-left: 1px solid var(--line); }
html[dir="rtl"] .num + .num { border-left: 0; border-right: 1px solid var(--line); padding: 34px 32px 0 0; }
.num strong { display: block; font: 300 clamp(64px, 8vw, 136px)/.9 var(--sans); letter-spacing: -.06em; font-variant-numeric: tabular-nums; }
.num p { margin: 26px 0 0; max-width: 22em; color: var(--ink-2); font-size: 16px; }

.app-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.app-list li { display: grid; grid-template-columns: 90px 1.1fr 1.4fr 1fr; gap: 24px; align-items: baseline; padding: 34px 0; border-bottom: 1px solid var(--line); position: relative; transition: padding .6s var(--ease); }
.app-list li::after { content: ""; position: absolute; left: 0; bottom: -1px; height: 1px; width: 0; background: var(--ink); transition: width .8s var(--ease); }
.app-list li:hover::after { width: 100%; }
.app-list li:hover { padding-left: 14px; }
html[dir="rtl"] .app-list li:hover { padding-left: 0; padding-right: 14px; }
.app-list .n { font: 400 13px/1 var(--mono); color: var(--ink-3); }
.app-list h3 { margin: 0; font: 400 clamp(24px, 2.3vw, 34px)/1.1 var(--sans); letter-spacing: -.025em; }
.app-list p { margin: 0; color: var(--ink-2); }
.app-list em { font: 400 12px/1.5 var(--mono); font-style: normal; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); text-align: right; }
html[dir="rtl"] .app-list em { text-align: left; }

.ai-sec { background: var(--paper-2); }
.ai-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 8vw; align-items: center; }
.ai-list { display: grid; grid-template-columns: 1fr 1fr; margin: 56px 0 44px; border-top: 1px solid var(--line); }
.ai-list div { padding: 20px 20px 22px 0; border-bottom: 1px solid var(--line); }
.ai-list div:nth-child(even) { padding-left: 20px; border-left: 1px solid var(--line); }
.ai-list dt { font: 500 16px/1.3 var(--sans); }
.ai-list dd { margin: 6px 0 0; color: var(--ink-3); font-size: 15px; }
.phone { justify-self: center; margin: 0; width: 330px; aspect-ratio: 330 / 680; padding: 11px; border-radius: 56px; background: #0e0f11; box-shadow: 0 0 0 1px #2a2c30 inset, 0 80px 120px -60px rgba(17, 18, 20, .55); position: relative; }
.phone::before { content: ""; position: absolute; left: 50%; top: 22px; width: 96px; height: 28px; margin-left: -48px; border-radius: 20px; background: #000; z-index: 2; }
.phone-screen { height: 100%; border-radius: 46px; background: #fbfbf9; padding: 18px 20px 20px; overflow: hidden; display: flex; flex-direction: column; gap: 14px; }
.ph-status { display: flex; justify-content: space-between; font: 500 13px/1 var(--sans); padding: 4px 8px 18px; }
.ph-status span:last-child { letter-spacing: 1px; font-size: 9px; }
.ph-top span { display: block; font: 400 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.ph-top b { display: block; margin-top: 6px; font: 500 30px/1 var(--sans); letter-spacing: -.03em; }
.ph-report { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ph-report div { padding: 12px 0; } .ph-report div + div { padding-left: 12px; border-left: 1px solid var(--line); }
.ph-report strong { display: block; font: 400 26px/1 var(--sans); letter-spacing: -.03em; }
.ph-report span { font: 400 10px/1 var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.ph-chart { height: 86px; display: flex; align-items: flex-end; gap: 5px; }
.ph-chart i { flex: 1; height: var(--h); border-radius: 2px; background: var(--ink); }
.ph-chart i:nth-child(5) { background: var(--accent); }
.ph-summary { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.ph-event { display: grid; grid-template-columns: 50px 1fr auto; gap: 12px; align-items: center; padding-top: 12px; border-top: 1px solid var(--line); }
.ph-event b { display: block; font: 500 14px/1.2 var(--sans); } .ph-event span { font-size: 12px; color: var(--ink-3); }
.ph-event em { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.thumb { width: 50px; height: 38px; border-radius: 8px; }
.thumb.t1 { background: linear-gradient(160deg, #c9ccc8, #8d918f); } .thumb.t2 { background: linear-gradient(160deg, #cfd2d6, #7c8188); } .thumb.t3 { background: linear-gradient(160deg, #d8d2c6, #a49a88); }

.dev-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); }
.dev { padding: 0 32px 0 0; }
.dev + .dev { padding-left: 32px; border-left: 1px solid var(--line); }
html[dir="rtl"] .dev + .dev { border-left: 0; border-right: 1px solid var(--line); padding: 0 32px 0 0; }
.dev figure { margin: 0 0 30px; height: clamp(240px, 24vw, 380px); display: grid; place-items: center; overflow: hidden; }
.dev figure img { width: auto; height: 94%; max-width: 100%; object-fit: contain; transition: transform 1.2s var(--ease); }
.dev:hover figure img { transform: scale(1.04); }
.dev h3 { margin: 0; font: 400 26px/1.1 var(--sans); letter-spacing: -.02em; }
.dev p { margin: 10px 0 0; color: var(--ink-2); font-size: 16px; max-width: 26em; }

.security { padding-top: 40px; }
.sec-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 8vw; padding: 110px 7vw; background: var(--ink); color: var(--paper); border-radius: 4px; }
.security .index { color: #8b8e94; }
.sec-list { margin: 0; border-top: 1px solid rgba(243, 243, 240, .2); align-self: end; }
.sec-list div { padding: 20px 0; border-bottom: 1px solid rgba(243, 243, 240, .14); display: grid; grid-template-columns: 1fr 1.3fr; gap: 20px; }
.sec-list dt { font: 500 16px/1.4 var(--sans); }
.sec-list dd { margin: 0; color: #a8abb0; font-size: 15px; }

.contact { padding-bottom: 120px; }
.ct-grid { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 90px; border-top: 1px solid var(--ink); }
.ct-grid > * { padding: 24px 24px 0 0; }
.ct-grid > * + * { padding-left: 24px; border-left: 1px solid var(--line); }
html[dir="rtl"] .ct-grid > * + * { border-left: 0; border-right: 1px solid var(--line); padding: 24px 24px 0 0; }
.ct-grid span { display: block; font: 400 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px; }
.ct-grid b { font: 400 18px/1.4 var(--sans); }
.ct-grid a b { background: linear-gradient(var(--ink), var(--ink)) 0 100% / 0 1px no-repeat; transition: background-size .6s var(--ease); }
.ct-grid a:hover b { background-size: 100% 1px; }
.ct-person b { display: block; font-size: 22px; letter-spacing: -.02em; }
.ct-person span { margin: 8px 0 0; }

.footer { position: relative; z-index: 2; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 40px; padding: 36px var(--gutter) 44px; border-top: 1px solid var(--line); background: var(--paper); }
.footer img { height: 30px; width: auto; }
.footer nav { display: flex; gap: 30px; justify-content: center; font-size: 14px; color: var(--ink-2); }
.footer nav a:hover { color: var(--ink); }
.legal { margin: 0; font: 400 12px/1 var(--mono); color: var(--ink-3); letter-spacing: .04em; }

/* reveal */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1.2s var(--ease), transform 1.2s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Topdata AI assistant ---------- */
.assistant { position: fixed; right: var(--gutter); bottom: max(24px, calc(env(safe-area-inset-bottom) + 14px)); z-index: 80; }
html[dir="rtl"] .assistant { right: auto; left: var(--gutter); }
.ai-fab { display: flex; align-items: center; gap: 12px; height: 48px; padding: 0 22px 0 18px; border: 0; border-radius: 999px; cursor: pointer; background: var(--ink); color: var(--paper); font: 500 14px/1 var(--sans); box-shadow: 0 20px 40px -20px rgba(17, 18, 20, .6); transition: transform .4s var(--ease), opacity .3s; }
.ai-fab:hover { transform: translateY(-2px); }
.assistant.nudge:not(.open) .ai-fab { animation: nudge 2.4s var(--ease) 2; }
@keyframes nudge { 12% { transform: translateY(-5px); } 24% { transform: none; } }
.ai-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(0, 169, 227, .6); } 70%, 100% { box-shadow: 0 0 0 10px rgba(0, 169, 227, 0); } }
.assistant.open .ai-fab { opacity: 0; pointer-events: none; transform: scale(.9); }
.ai-panel { position: absolute; right: 0; bottom: 0; width: min(380px, calc(100vw - 32px)); height: min(600px, calc(100vh - 120px)); display: grid; grid-template-rows: auto 1fr auto auto;
  background: var(--paper); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; box-shadow: 0 50px 100px -40px rgba(17, 18, 20, .45);
  transform-origin: bottom right; transform: translateY(16px) scale(.97); opacity: 0; pointer-events: none; transition: transform .5s var(--ease), opacity .35s; }
html[dir="rtl"] .ai-panel { right: auto; left: 0; transform-origin: bottom left; }
.assistant.open .ai-panel { transform: none; opacity: 1; pointer-events: auto; }
.ai-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 18px 16px 22px; border-bottom: 1px solid var(--line); }
.ai-head b { display: block; font: 500 16px/1.2 var(--sans); }
.ai-status { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font: 400 11px/1 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
.ai-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #2fbf71; }
.ai-close { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; background: none; cursor: pointer; font-size: 20px; line-height: 1; }
.ai-log { overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 12px; overscroll-behavior: contain; }
.ai-msg { max-width: 88%; font-size: 15px; line-height: 1.5; animation: msg .5s var(--ease); }
@keyframes msg { from { opacity: 0; transform: translateY(6px); } }
.ai-msg.bot { align-self: flex-start; }
.ai-msg.me { align-self: flex-end; padding: 10px 14px; border-radius: 16px; background: var(--ink); color: var(--paper); }
.dots { display: inline-flex; gap: 4px; padding: 6px 0; } .dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--ink-3); animation: dot 1s infinite; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 50% { opacity: .25; } }
.ai-msg.bot:has(.ai-contact) { max-width: 100%; width: 100%; }
.ai-contact { border-top: 1px solid var(--line); }
.ai-contact b { display: block; margin-top: 14px; font: 500 15px/1.3 var(--sans); }
.ai-contact p { margin: 4px 0 8px; color: var(--ink-3); font-size: 13px; }
.ai-c { display: grid; gap: 4px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.ai-c span { font: 400 10px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.ai-c:hover { color: #0a6fa0; }
.ai-chips { display: flex; gap: 8px; padding: 0 20px 12px; overflow-x: auto; scrollbar-width: none; transition: opacity .3s; }
.ai-chips.busy { opacity: .35; pointer-events: none; }
/* chips wrap (max ~3 rows) instead of a hard-cut horizontal scroller */
.ai-chips { flex-wrap: wrap; overflow-x: hidden; overflow-y: auto; max-height: 122px; padding-bottom: 14px; -webkit-mask-image: linear-gradient(#000 calc(100% - 18px), transparent); mask-image: linear-gradient(#000 calc(100% - 18px), transparent); }
.ai-chip { padding: 8px 12px; font-size: 12.5px; }
.ai-chips[hidden] { display: none; }
.ai-chips:not(.all) { -webkit-mask-image: none; mask-image: none; max-height: none; }
.ai-chips.all { max-height: 168px; }
.ai-chip.more { border-style: dashed; color: var(--ink-2); }
/* welcome state: every quick question, wrapped, directly under the greeting */
.ai-sugg { display: flex; flex-wrap: wrap; gap: 8px; animation: msg .5s var(--ease); }
.ai-sugg .ai-chip { font-size: 13px; padding: 9px 13px; text-align: start; }
html[dir="rtl"] .ai-chip, html[dir="rtl"] .ai-panel { font-family: "IBM Plex Sans Arabic", var(--sans); }
.ai-chip { flex: none; border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 9px 13px; font: 400 13px/1 var(--sans); cursor: pointer; transition: border-color .3s; }
.ai-chip:hover { border-color: var(--ink); }
.ai-form { display: flex; gap: 8px; padding: 12px 14px 14px; border-top: 1px solid var(--line); }
.ai-form input { flex: 1; height: 44px; border: 0; background: transparent; padding: 0 8px; font: 400 15px/1 var(--sans); outline: none; }
.ai-form button { width: 44px; height: 44px; border: 0; border-radius: 50%; cursor: pointer; background: var(--ink); color: var(--paper); font-size: 18px; }


/* AI mark: a vision aperture — rotating blades, breathing iris, twinkling spark */
.ai-mark { width: 26px; height: 26px; flex: none; overflow: visible; }
.ai-mark .blades { fill: none; stroke: var(--paper); stroke-width: 1.6; stroke-dasharray: 9.6 3.5; stroke-linecap: round; transform-origin: 16px 16px; animation: aiSpin 9s linear infinite; }
.ai-mark .ring { fill: none; stroke: var(--paper); stroke-width: .9; opacity: .45; }
.ai-mark .iris { fill: var(--accent); transform-origin: 16px 16px; animation: aiIris 3.2s var(--ease) infinite; }
.ai-mark .pupil { fill: var(--ink); }
.ai-mark .spark { fill: var(--accent); transform-origin: 26.5px 5.5px; animation: aiSpark 2.8s ease-in-out infinite; }
.ai-mark.on-light { width: 34px; height: 34px; }
.ai-mark.on-light .blades { stroke: var(--ink); }
.ai-mark.on-light .ring { stroke: var(--ink); opacity: .25; }
.assistant.thinking .ai-mark .blades { animation-duration: 1.4s; }
@keyframes aiSpin { to { transform: rotate(360deg); } }
@keyframes aiIris { 0%, 100% { transform: scale(1); } 50% { transform: scale(.78); } }
@keyframes aiSpark { 0%, 100% { transform: scale(.4); opacity: .3; } 50% { transform: scale(1.15) rotate(45deg); opacity: 1; } }
.ai-head { gap: 14px; justify-content: flex-start; }
.ai-id { flex: 1; }


/* ---------- plans ---------- */
.plans .body { margin-top: 26px; }
.plan-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--ink); }
.plan { padding: 34px 28px 40px 0; padding-inline: 0 28px; display: flex; flex-direction: column; }
.plan + .plan { padding-inline-start: 28px; border-inline-start: 1px solid var(--line); }
.plan ul { flex: 1; }
.plan-cta { margin-top: 30px; align-self: flex-start; }
.plan.custom h3 { color: var(--ink-2); }
.plan-incl { margin: -50px 0 34px; color: var(--ink-2); font-size: 16px; }
@media (max-width: 1200px) and (min-width: 961px) {
  .plan-grid { grid-template-columns: repeat(2, 1fr); }
  .plan:nth-child(odd) { padding-inline-start: 0; border-inline-start: 0; }
  .plan:nth-child(n+3) { border-top: 1px solid var(--line); }
}
.plan .index { margin-bottom: 18px; }
.plan h3 { margin: 0; font: 400 40px/1 var(--sans); letter-spacing: -.035em; }
.plan-d { margin: 12px 0 28px; color: var(--ink-2); }
.plan ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.plan li { padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 15px; display: flex; gap: 10px; }
.plan li::before { content: "—"; color: var(--ink-3); }
.plan.featured h3::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 12px; border-radius: 50%; background: var(--accent); vertical-align: middle; }
.plan-note { margin: 40px 0 0; max-width: 46em; color: var(--ink-3); font-size: 15px; }
.plan-note a { color: var(--ink); border-bottom: 1px solid var(--ink); }
@media (max-width: 960px) { .plan-grid { grid-template-columns: 1fr; } .plan + .plan { padding-inline-start: 0; border-inline-start: 0; border-top: 1px solid var(--line); } .plan-incl { margin-top: -40px; } }
html[dir="rtl"] .plan.featured h3::after { margin-left: 0; margin-right: 12px; }
/* ---------- RTL / bidi fixes ---------- */
/* figures like "10,000+" and "24/7" must keep their order inside Arabic */
.num strong, .hero-stats dt, .live-stats dt, .aix-fact strong { direction: ltr; unicode-bidi: isolate; }
html[dir="rtl"] .num strong, html[dir="rtl"] .hero-stats dt, html[dir="rtl"] .live-stats dt, html[dir="rtl"] .aix-fact strong { text-align: right; }
.footer { padding-bottom: 44px; padding-inline-end: calc(var(--gutter) + 96px); }
body.fab-mini .ai-fab-text { display: none; }
.assistant { transition: opacity .4s var(--ease), transform .5s var(--ease); }
body.at-contact .assistant:not(.open) { opacity: 0; transform: translateY(12px); pointer-events: none; }
body.fab-mini .ai-fab { width: 52px; height: 52px; padding: 0; justify-content: center; }
.ai-fab { transition: transform .4s var(--ease), opacity .3s, width .5s var(--ease), padding .5s var(--ease); }
.sec-list dt a { border-bottom: 1px solid rgba(243, 243, 240, .45); transition: border-color .3s; }
.sec-list dt a:hover { border-color: var(--paper); }
.sec-list dt a::after { content: " →"; } html[dir="rtl"] .sec-list dt a::after { content: " ←"; }
html { scroll-padding-top: 96px; }
.ltr, a[href^="tel:"] b, a[href^="mailto:"] b, .ai-c b, .ai-c[href^="tel:"], .ai-c[href^="mailto:"] { direction: ltr; unicode-bidi: isolate; }
html[dir="rtl"] a[href^="tel:"] b, html[dir="rtl"] a[href^="mailto:"] b { display: inline-block; text-align: right; }
html[dir="rtl"] .index, html[dir="rtl"] .hero-stats dd, html[dir="rtl"] .live-stats dd, html[dir="rtl"] .spec em,
html[dir="rtl"] .app-list em, html[dir="rtl"] .ct-grid span, html[dir="rtl"] .ai-status, html[dir="rtl"] .ai-c span {
  font-family: "IBM Plex Sans Arabic", var(--sans); letter-spacing: 0; text-transform: none; font-size: 13px; }
/* ---------- stacked story (phones, portrait tablets): copy pinned low, subject framed above it ---------- */
@media (max-width: 820px), (max-aspect-ratio: 4/5) {
  .chapter { --stacked: 1; min-height: 165vh; justify-content: flex-end; padding: 0 20px 3vh; }
  .chapter .copy { position: sticky; bottom: calc(3vh + 58px); width: 100%; max-width: 560px; margin: 0 !important; }
  html[dir="rtl"] .chapter .copy { margin: 0 0 0 auto !important; }
  .chapter .copy::before, #scale .copy::before { display: block; inset: -56px -20px -3vh; border-radius: 0; background: linear-gradient(to bottom, rgba(243, 243, 240, 0), rgba(243, 243, 240, .9) 64px, rgba(243, 243, 240, .96)); opacity: 0; transition: opacity .7s var(--ease); }
  .chapter .copy.live::before, #scale .copy.live::before { opacity: 1; }
  .chapter .title { max-width: none; font-size: clamp(30px, 8.4vw, 44px); }
  .chapter .body { margin-top: 14px; font-size: 16px; }
  .chapter .spec { margin-top: 20px; }
  .chapter .spec li { padding: 9px 0; font-size: 14px; }
  .chapter .index { margin-bottom: 16px; }
  .live-stats { margin-top: 22px; } .live-stats dt { font-size: 38px; }
  .chapter.hero { min-height: 100svh; padding-bottom: 5vh; }
  .chapter.hero .copy { position: relative; bottom: auto; }
  .chapter.hero .display { font-size: clamp(34px, 9.4vw, 58px); }
  .chapter.hero { padding-bottom: calc(3vh + 58px); }
  .chapter.hero .lede { margin-top: 16px; font-size: 16.5px; }
  .hero-cta { margin-top: 24px; gap: 22px; }
  .hero-stats { margin-top: 30px; }
}
/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .nav-links { display: none; }
  .app-list li { grid-template-columns: 60px 1fr; }
  .app-list p, .app-list em { grid-column: 2; text-align: start; }
}
@media (max-width: 960px) {
  .num-row, .dev-grid, .ct-grid { grid-template-columns: 1fr; }
  .num + .num, .dev + .dev, .ct-grid > * + * { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); margin-top: 28px; }
  .dev { padding: 28px 0 0; }
  .ai-inner, .sec-inner { grid-template-columns: 1fr; }
  .sec-inner { padding: 70px 26px; }
  .rail { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav { height: 62px; }
  .brand img { height: 34px; }
  .section { padding: 110px 20px; }
  .hero-stats div { padding-right: 12px; } .hero-stats div + div { padding-left: 12px; }
  .hero-stats dt { font-size: 22px; }
  .ai-list { grid-template-columns: 1fr; } .ai-list div:nth-child(even) { padding-left: 0; border-left: 0; }
  .phone { width: 290px; }
  .sec-list div { grid-template-columns: 1fr; gap: 6px; }
  .footer { grid-template-columns: 1fr; gap: 20px; } .footer nav { justify-content: flex-start; }
  .ai-fab-text { display: none; } .ai-fab { width: 52px; height: 52px; padding: 0; justify-content: center; }
  .footer { padding-inline-end: 20px; padding-bottom: 104px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- script fonts: हिन्दी (Devanagari) · 中文 (Simplified Chinese) — localisation ----------
   Latin keeps Geist; Devanagari / CJK fall through to Noto, which lang.js loads only when that language
   is chosen (display=swap). Mono labels fall back to the same script font. Neither script gets
   tracking (it breaks the Devanagari headline bar and spaces CJK unevenly); both get a little more leading. */
html[lang="hi"] { --sans: "Geist", "Noto Sans Devanagari", "Nirmala UI", "Kohinoor Devanagari", ui-sans-serif, system-ui, sans-serif;
  --mono: "Geist Mono", "Noto Sans Devanagari", "Nirmala UI", "Kohinoor Devanagari", ui-monospace, monospace; }
html[lang="zh"] { --sans: "Geist", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", ui-sans-serif, system-ui, sans-serif;
  --mono: "Geist Mono", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", ui-monospace, monospace; }
html:is([lang="hi"], [lang="zh"]) body * { letter-spacing: 0 !important; }
html:is([lang="hi"], [lang="zh"]) body .lang { font-family: var(--sans); }
html[lang="hi"] body { line-height: 1.7; }
html[lang="zh"] body { line-height: 1.75; }
html[lang="hi"] :is(.display, .title, h1, h2, h3) { line-height: 1.34; }
html[lang="zh"] :is(.display, .title, h1, h2, h3) { line-height: 1.24; }
html[lang="hi"] .display .line { padding-bottom: .12em; }
/* headings: CJK measures in em, not ch (13ch ≈ 7 Han characters); balance lines so no character is stranded */
html:is([lang="hi"], [lang="uz"], [lang="zh"]) :is(.display, .title) { text-wrap: balance; }
html[lang="zh"] .title { max-width: min(100%, 14em); }
html[lang="zh"] :is(.display, .title, h1, h2, h3, .bridge p) { word-break: keep-all; line-break: strict; overflow-wrap: anywhere; }   /* break Chinese headings at punctuation, not mid-word */

/* Oʻzbekcha: the modifier letters ʻ ʼ come from a two-glyph Noto subset (lang.js); everything else stays Geist */
html[lang="uz"] { --sans: "Geist", "Noto Sans", ui-sans-serif, system-ui, sans-serif; --mono: "Geist Mono", "Noto Sans", ui-monospace, monospace; }

/* QA-16: stacked (≤960px) Arabic rows must not keep the RTL column divider */
@media (max-width: 960px) {
  html[dir="rtl"] .ct-grid > * + *, html[dir="rtl"] .num + .num, html[dir="rtl"] .dev + .dev { border-right: 0; padding-right: 0; }
}
html[dir="rtl"] .ct-grid > :first-child { padding: 24px 0 0 24px; }
